1747 Commits

Author SHA1 Message Date
greg2451
554f782537
Add *.engine (TensorRT extensions) to .gitignore (#5911)
* Add *.engine (TensorRT extensions) to .gitignore

* Update .dockerignore

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-12-07 18:20:16 +01:00
Ayush Chaurasia
3f152e5807
Update wandb_utils.py (#5908) 2021-12-07 16:09:11 +01:00
Li Zeng
fa05f8c977
Detections().tolist() explicit argument fix (#5907)
debugged for missigned Detections attributes
2021-12-07 16:01:41 +01:00
Glenn Jocher
2ed726baff pbar fix 2021-12-06 20:55:05 +01:00
Glenn Jocher
4a922e4f3c Merge master 2021-12-06 20:51:06 +01:00
Glenn Jocher
07ae9f799a DetectMultiBackend fix 2021-12-06 20:50:38 +01:00
Glenn Jocher
1075488d89
Single-command multiple-model export (#5882)
* Export multiple models in series

Export multiple models in series by adding additional `*.pt` files to the `--weights` argument, i.e.:

```bash
python export.py --include tflite --weights yolov5n.pt  # export 1 model
python export.py --include tflite --weights yolov5n.pt yolov5s.pt yolov5m.pt yolov5l.pt yolov5x.pt  # export 5 models
```

* Update export.py

* Update README.md
2021-12-04 16:28:40 +01:00
Glenn Jocher
7bf04d9bbf
AutoShape() models as DetectMultiBackend() instances (#5845)
* Update AutoShape()

* autodownload ONNX

* Cleanup

* Finish updates

* Add Usage

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* fix device

* Update hubconf.py

* Update common.py

* smart param selection

* autodownload all formats

* autopad only pytorch models

* new_shape edits

* stride tensor fix

* Cleanup
2021-12-04 15:00:07 +01:00
Glenn Jocher
d885799c71
Update nl after cutout() (#5873) 2021-12-03 15:28:14 +01:00
Can
360eec6910
Update plot_lr_scheduler() (#5864)
shallow copy modify originals
2021-12-03 13:37:45 +01:00
iumyx2612
92a7391039
Add --workers 8 argument to val.py (#5857)
* Update val.py

Add an option to choose number of workers if not called by train.py

* Update comment

* 120 char line width

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-12-02 16:49:50 +01:00
Glenn Jocher
00e308f7be
Update TorchScript suffix to *.torchscript (#5856) 2021-12-02 16:06:45 +01:00
Vishnu Pradeep
30db14fea8
Update val.py (#5838)
* Update val.py

Solving Non-ASCII character '\xf0' error during runtime

* Update val.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-12-02 13:20:58 +01:00
gggmt
1679aacdc7
Update LoadImages ret_val=False handling (#5852)
Video errors may occur.
2021-12-02 10:57:39 +01:00
Yu Zhang
e8f8f2b903
Avoid inplace modifyingimgs in LoadStreams (#5850)
When OpenCV retrieving image fail, original code would modify source images **inplace**, which may result in plotting bounding boxes on a black image. That is, before inference, source image `im0s[i]` is OK, but after inference before `Process predictions`,  `im0s[i]` may have been changed.
2021-12-02 10:51:19 +01:00
Glenn Jocher
9451512a86 Merge master 2021-12-01 15:38:41 +01:00
Glenn Jocher
bc484579d7
Handle non-TTY wandb.errors.UsageError (#5839)
* `try: except (..., wandb.errors.UsageError)`

* bug fix
2021-12-01 15:38:02 +01:00
imyhxy
a4207a202d
Fix TensorRT potential unordered binding addresses (#5826)
* feat: change file suffix in pythonic way

* fix: enforce binding addresses order

* fix: enforce binding addresses order
2021-11-30 13:52:22 +01:00
Glenn Jocher
5ca5dd4c87
Update dataset_stats() to cv2.INTER_AREA (#5821) 2021-11-29 13:15:36 +01:00
dependabot[bot]
8277033b65
Bump actions/cache from 2.1.6 to 2.1.7 (#5816)
Bumps [actions/cache](https://github.com/actions/cache) from 2.1.6 to 2.1.7.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.6...v2.1.7)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-29 12:04:36 +01:00
Glenn Jocher
94d8fec6d8
GCP VM from Image example (#5814) 2021-11-28 18:12:46 +01:00
Glenn Jocher
fcd180d336
Refactor new model.warmup() method (#5810)
* Refactor new `model.warmup()` method

* Add half
2021-11-27 12:29:45 +01:00
Glenn Jocher
7c6bae0ae6
Remove NCOLS from tqdm (#5804)
* Remove NCOLS from tqdm

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-26 13:37:28 +01:00
Phil2020
53349dac8e
Scope TF imports in DetectMultiBackend() (#5792)
* tensorflow or tflite exclusively as interpreter

As per bug report https://github.com/ultralytics/yolov5/issues/5709 I think there should be only one attempt to assign interpreter, and it appears tflite is only ever needed for the case of edgetpu model.

* Scope imports

* Nested definition line fix

* Update common.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-11-25 17:54:00 +01:00
Ayush Chaurasia
f2ca30a407
W&B: refactor W&B tables (#5737)
* update

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* reformat

* Single-line argparser argument

* Update README.md

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update README.md

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-11-25 17:19:21 +01:00
rockstarr
4c7b2bdc30
TorchScript torch==1.7.0 Path support (#5781)
* fix path error in export.py

* Update export.py

updated!

* Update export.py

oops forget something
2021-11-25 11:18:30 +01:00
rockstarr
c55e674ac3
fix the path error in export.py (#5778)
* fix the path error in export.py

* Update export.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-11-25 08:42:15 +01:00
Glenn Jocher
4ca4aec46f
Do not save hyp.yaml and opt.yaml on evolve (#5775)
* Do not save hyp.yaml and opt.yaml on evolve

* Update general.py
2021-11-24 23:25:51 +01:00
imyhxy
7a39803476
Export, detect and validation with TensorRT engine file (#5699)
* Export and detect with TensorRT engine file

* Resolve `isort`

* Make validation works with TensorRT engine

* feat: update export docstring

* feat: change suffix from *.trt to *.engine

* feat: get rid of pycuda

* feat: make compatiable with val.py

* feat: support detect with fp16 engine

* Add Lite to Edge TPU string

* Remove *.trt comment

* Revert to standard success logger.info string

* Fix Deprecation Warning

```
export.py:310: DeprecationWarning: Use build_serialized_network instead.
  with builder.build_engine(network, config) as engine, open(f, 'wb') as t:
```

* Revert deprecation warning fix

@imyhxy it seems we can't apply the deprecation warning fix because then export fails, so I'm reverting my previous change here.

* Update export.py

* Update export.py

* Update common.py

* export onnx to file before building TensorRT engine file

* feat: triger ONNX export failed early

* feat: load ONNX model from file

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-11-22 14:58:07 +01:00
Zengyf-CVer
f17c86b7f0
Save *.npy features on detect.py --visualize (#5701)
* Add feature map to save npy files

Add feature map to save npy files,export npy files with 32 feature maps per layer.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update plots.py

* Update plots.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update plots.py

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-11-21 20:21:44 +01:00
Glenn Jocher
d6ae1c835a Created using Colaboratory 2021-11-21 19:26:07 +01:00
IL2006
5185981993
SECURITY.md (#5695)
* SECURITY_1.md

* Delete SECURITY.md

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-11-20 01:26:48 +01:00
Glenn Jocher
46daa7b78d
Remove .autoshape() method (#5694) 2021-11-20 01:11:36 +01:00
Glenn Jocher
36d12a500e
Explicitly compute TP, FP in val.py (#5727) 2021-11-20 01:04:56 +01:00
Jirka Borovec
eb51ffdcac
Prune unused imports (#5711)
* prune unused imports

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-19 13:32:53 +01:00
Glenn Jocher
8df64a9122
NUM_THREADS leave at least 1 CPU free (#5706)
Updated strategy leaves at least 1 cpu free to avoid system overloads. Partially addresses https://github.com/ultralytics/yolov5/issues/5685
2021-11-18 14:53:42 +01:00
Glenn Jocher
562191f575
Update export.py docstring (#5689) 2021-11-17 15:18:50 +01:00
Glenn Jocher
47fac9ff73
Update train.py comment to 'Model attributes' (#5670) 2021-11-16 13:58:15 +01:00
Nrupatunga
0453b758e7
TFDetect dynamic anchor count assignment fix (#5668)
* fix tf.py when anchors not equal to 3

* revert the isort fix

* update the fix to use anchor attribute available already
2021-11-16 12:36:00 +01:00
Glenn Jocher
e80a09bbfa
Update ci-testing.yml to Python 3.9 (#5660) 2021-11-15 20:15:50 +01:00
dependabot[bot]
fb19561f98
Bump pip from 19.2 to 21.1 in /utils/google_app_engine (#5661)
Bumps [pip](https://github.com/pypa/pip) from 19.2 to 21.1.
- [Release notes](https://github.com/pypa/pip/releases)
- [Changelog](https://github.com/pypa/pip/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/pip/compare/19.2...21.1)

---
updated-dependencies:
- dependency-name: pip
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-15 20:10:29 +01:00
Ding Yiwei
c2523be634
Replace 2 transpose() with 1 permute in TransformerBlock()` (#5645) 2021-11-15 10:06:18 +01:00
Glenn Jocher
cdd161a539 Merge master 2021-11-14 19:40:03 +01:00
Ayush Chaurasia
540ef0dd30
W&B refactor, handle exceptions, CI example (#5618)
* handle exceptions| attempt CI

* update

* Pre-commit manual run

* yaml one-liner

* Update ci-testing.yml

* Comment W&B CI

Leave as example for future separate CI

* Update ci-testing.yml

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-11-14 13:26:53 +01:00
Glenn Jocher
80cfaf40ef
AutoAnchor and AutoBatch LOGGER (#5635)
* AutoBatch, AutoAnchor `LOGGER`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update autoanchor.py

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-13 15:40:18 +01:00
Werner Duvaud
09d170381c
Default DataLoader shuffle=True for training (#5623)
* Fix shuffle DataLoader argument

* Add shuffle argument

* Disable shuffle when rect

* Cleanup, add rect warning

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Cleanup2

* Cleanup3

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-13 13:07:32 +01:00
Glenn Jocher
7473f0f95d
DDP WORLD_SIZE-safe dataloader workers (#5631)
* WORLD_SIZE-safe workers

* Update with DDP comment
2021-11-12 14:48:55 +01:00
Glenn Jocher
d5b21b1ecb
HUB dataset previews to JPEG (#5627)
@kalenmike per our convo yesterday.
2021-11-12 12:05:25 +01:00
Glenn Jocher
def7a0fd19
Improve plots.py robustness (#5616)
* Improve plots.py robustness

Addresses issues #5374, #5395, #5611

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-11 12:56:38 +01:00
Glenn Jocher
69032519bc
np.unique() sort fix for segments (#5609)
* `np.unique()` sort fix for segments

* Update datasets.py
2021-11-11 00:15:17 +01:00