Commit Graph
100 Commits
Author SHA1 Message Date
Glenn Jocher ee77632393 Revert C3() change (#7172) 2022-03-28 02:31:00 +02:00
Glenn Jocher 1832264dd6 Update 2022-03-28 02:26:44 +02:00
Glenn Jocher b2194b9015 yolo.py --profile updates (#7170) 2022-03-27 20:24:42 +02:00
Glenn Jocher 7830e91b9a yolo.py --profile default GPU batch size 16 2022-03-26 16:53:42 +01:00
Glenn Jocher 3373aab56c NMS unused variable fix (#7161)
* NMS unused variable fix

* Update general.py
2022-03-26 16:52:58 +01:00
Glenn Jocher e19f87eb4b Sidestep os.path.relpath() Windows bug (#7158)
* Sidestep os.path.relpath() Windows bug

os.path.relpath() seems to have a major bug on Windows due to Windows horrible path handling. This fix attempts to sidestep the issue.

```
File "C:\Users\mkokg/.cache\torch\hub\ultralytics_yolov5_master\export.py", line 64, in
ROOT = Path(os.path.relpath(ROOT, Path.cwd())) # relative
File "C:\Users\mkokg\AppData\Local\Programs\Python\Python310\lib\ntpath.py", line 718, in relpath
raise ValueError("path is on mount %r, start on mount %r" % (
ValueError: path is on mount 'C:', start on mount 'D:'
```

* Update yolo.py

* Update yolo.py

* Update yolo.py

* Update export.py
2022-03-26 14:18:53 +01:00
Glenn Jocher 26bfd44465 Adjust NMS time limit warning to batch size (#7156) 2022-03-26 11:45:28 +01:00
Glenn Jocher 7a2a11893b Add Architecture Summary to README Tutorials (#7146)
* Add Architecture Summary to README Tutorials

Per https://github.com/ultralytics/yolov5/issues/6998#issuecomment-1073517405

* Update README.md
2022-03-25 14:45:23 +01:00
Glenn Jocher a0a4adf6de Add PyTorch Hub results.save(labels=False) option (#7129)
Resolves https://github.com/ultralytics/yolov5/issues/388#issuecomment-1077121821
2022-03-24 11:31:22 +01:00
Glenn Jocher c3ae4e4af6 Multi-threaded VisDrone and VOC downloads (#7108)
* Multi-threaded VOC download

* Update VOC.yaml

* Update

* Update general.py

* Update general.py
2022-03-23 01:19:37 +01:00
Glenn Jocher ecc2c7ba73 Remove named arguments where possible (#7105)
* Remove named arguments where possible

Speed improvements.

* Update yolo.py

* Update yolo.py

* Update yolo.py
2022-03-22 20:44:07 +01:00
Glenn Jocher 6134ec5d94 Model summary pathlib fix (#7104)
Stems not working correctly for YOLOv5l with current .rstrip() implementation. After fix:
```
YOLOv5l summary: 468 layers, 46563709 parameters, 46563709 gradients, 109.3 GFLOPs
```
2022-03-22 20:05:07 +01:00
Glenn Jocher ee0b3b2a95 Update benchmarks significant digits (#7103) 2022-03-22 18:02:35 +01:00
Glenn Jocherandpre-commit-ci[bot] 05aae17333 torch.split() 1.7.0 compatibility fix (#7102)
* Update loss.py

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

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

* Update loss.py

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-03-22 17:36:05 +01:00
Glenn Jocher a600baed8e Update model summary to display model name (#7101) 2022-03-22 15:41:19 +01:00
Glenn Jocher a2d617ece9 Update loss for FP16 tobj (#7088) 2022-03-21 19:18:34 +01:00
Glenn Jocher 6f128031d0 Update loss.py with if self.gr < 1: (#7087)
* Update loss.py with `if self.gr < 1:`

* Update loss.py
2022-03-21 18:35:36 +01:00
Glenn Jocher 9b771a3e71 Revert "Update detect.py non-inplace with y.tensor_split() (#7062)" (#7074)
This reverts commit d5e363f29d.
2022-03-21 09:33:39 +01:00
Glenn Jocher 9cd89b75cc Fix2 check_anchor_order() in pixel-space not grid-space (#7067)
Follows https://github.com/ultralytics/yolov5/pull/7060 which provided only a partial solution to this issue. #7060 resolved occurences in yolo.py, this applies the same fix in autoanchor.py.
2022-03-20 18:55:13 +01:00
Glenn Jocher 178c109576 Add non-zero da check_anchor_order() condition (#7066) 2022-03-20 18:37:27 +01:00
Glenn Jocher 9e75cbf4c1 Update __init__.py (#7065) 2022-03-20 18:17:04 +01:00
Glenn Jocher e278fd63ec Update W&B message to LOGGER.info() (#7064) 2022-03-20 18:15:22 +01:00
Glenn Jocher 0529b77232 Update common.py lists for tuples (#7063)
Improved profiling.
2022-03-20 18:03:37 +01:00
Glenn Jocher d5e363f29d Update detect.py non-inplace with y.tensor_split() (#7062) 2022-03-20 18:02:05 +01:00
Glenn Jocher f327eee614 Fix check_anchor_order() in pixel-space not grid-space (#7060)
* Update `check_anchor_order()`

Use mean area per output layer for added stability.

* Check in pixel-space not grid-space fix
2022-03-20 16:27:51 +01:00
Glenn Jocher 9f4d11379b Fix incomplete URL substring sanitation (#7056)
Resolves code scanning alert in https://github.com/ultralytics/yolov5/issues/7055
2022-03-20 14:18:05 +01:00
Glenn Jocher 6843ea5d7f Create SECURITY.md (#7054)
* Create SECURITY.md

Resolves https://github.com/ultralytics/yolov5/issues/7052

* Move into ./github

* Update SECURITY.md
2022-03-20 13:55:32 +01:00
Glenn Jocher 9ebec7885f Update Dockerfile to git clone instead of COPY (#7053)
Resolves git command errors that currently happen in image, i.e.:

```bash
root@382ae64aeca2:/usr/src/app# git pull
Warning: Permanently added the ECDSA host key for IP address '140.82.113.3' to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
```
2022-03-20 13:51:22 +01:00
Glenn Jocher b0ba101ac0 ComputeLoss() indexing/speed improvements (#7048)
* device as class attribute

* Update loss.py

* Update loss.py

* improve zeros

* tensor split
2022-03-20 01:04:48 +01:00
Glenn Jocher 3f634d43c8 Conditional Timeout() by OS (disable on Windows) (#7013)
* Conditional `Timeout()` by OS (disable on Windows)

* Update general.py
2022-03-16 15:33:54 +01:00
Glenn Jocher c09fb2aa95 Update TQDM bar format (#6988) 2022-03-15 16:32:56 +01:00
Glenn Jocher 932dc78496 YOLOv5 Export Benchmarks for GPU (#6963)
* Add benchmarks.py GPU support

* Updates

* Updates

* Updates

* Updates

* Add --half

* Add TRT requirements

* Cleanup

* Add TF to warmup types

* Update export.py

* Update export.py

* Update benchmarks.py
2022-03-14 15:07:13 +01:00
Glenn Jocher 99de551f97 pt model to cpu on TF export 2022-03-14 12:41:06 +01:00
Glenn Jocher 2d45de617e Model ema key backward compatibility fix (#6972)
Fix for older model loading issue in https://github.com/ultralytics/yolov5/commit/d3d9cbce221b2ced46dde374f24fde72c8e71c37#commitcomment-68622388
2022-03-14 10:54:51 +01:00
Glenn Jocher 701e1177ac Tensor initialization on device improvements (#6959)
* Update common.py speed improvements

Eliminate .to() ops where possible for reduced data transfer overhead. Primarily affects warmup and PyTorch Hub inference.

* Updates

* Updates

* Update detect.py

* Update val.py
2022-03-12 14:00:48 +01:00
Glenn Jocher 52c1399fdc DetectMultiBackend() return device update (#6958)
Fixes ONNX validation that returns outputs on CPU.
2022-03-12 13:16:29 +01:00
Glenn Jocher c84dd27d62 New val.py cuda variable (#6957)
* New val.py `cuda` variable

Fix for ONNX GPU val.

* Update val.py
2022-03-12 12:57:08 +01:00
Glenn Jocher c6b4f84fd1 Update Dockerfile torch==1.11.0+cu113 (#6954) 2022-03-12 00:45:07 +01:00
Glenn Jocher b94b59e199 DetectMultiBackend() --half handling (#6945)
* DetectMultiBackend() `--half` handling

* CI fixes

* rename .half to .fp16 to avoid conflict

* warmup fix

* val update

* engine update

* engine update
2022-03-11 16:31:52 +01:00
Glenn Jocher 84efa62b2d Fix PyTorch Hub export inference shapes (#6949)
May resolve https://github.com/ultralytics/yolov5/issues/6947
2022-03-11 16:18:40 +01:00
Glenn Jocher caf7ad0500 Allow 3-point segments (#6938)
May resolve https://github.com/ultralytics/yolov5/issues/6931
2022-03-10 18:41:47 +01:00
Glenn Jocher 055e72af5b Optimize PyTorch 1.11.0 compatibility update (#6933) 2022-03-10 12:58:41 +01:00
Glenn Jocher d3d9cbce22 PyTorch 1.11.0 compatibility updates (#6932)
Resolves `AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'` first raised in https://github.com/ultralytics/yolov5/issues/5499
2022-03-10 12:41:06 +01:00
Glenn Jocher 6dd82c0252 Move git_describe() to general.py (#6918)
* Move `git_describe()` to general.py

* Move `git_describe()` to general.py
2022-03-09 18:22:53 +01:00
Glenn Jocher e6e36aac10 Update bytes to GB with bitshift (#6886) 2022-03-07 19:26:37 +01:00
Glenn Jocher acc58c1dcf Fix TRT max_workspace_size deprecation notice (#6856)
* Fix TRT `max_workspace_size` deprecation notice

* Update export.py

* Update export.py
2022-03-07 13:52:53 +01:00
Glenn Jocher 4728840745 Update --cache disk deprecate *_npy/ dirs (#6876)
* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Cleanup

* Cleanup
2022-03-06 16:16:17 +01:00
Glenn Jocher 8a66ebad44 Add *.ts to VID_FORMATS (#6859) 2022-03-04 14:10:13 +01:00
Glenn Jocherandpre-commit-ci[bot] 601dbb83f0 AutoAnchor improved initialization robustness (#6854)
* Update AutoAnchor

* Update AutoAnchor

* [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>
2022-03-04 10:32:18 +01:00
Glenn Jocher 63ddb6f0d0 Update autoanchor.py (#6794)
* Update autoanchor.py

* Update autoanchor.py
2022-02-26 19:15:12 +01:00
Glenn Jocher c2403eb04c Update PULL_REQUEST_TEMPLATE.md (#6783) 2022-02-25 14:01:58 +01:00
Glenn Jocher 9ec51a6396 YOLOv5s6 params FLOPs fix (#6782) 2022-02-25 13:59:21 +01:00
Glenn Jocher 0f819919ad Update EMA decay tau (#6769)
* Update EMA

* Update EMA

* ratio invert

* fix ratio invert

* fix2 ratio invert

* warmup iterations to 100

* ema_k

* implement tau

* implement tau
2022-02-25 12:33:09 +01:00
Glenn Jocher cea994b3f6 Update hyp.VOC.yaml (#6772) 2022-02-25 00:14:17 +01:00
Glenn Jocher 741cd0eb23 Update tutorial.ipynb (#6771) 2022-02-25 00:12:27 +01:00
Glenn Jocher c161557563 Default OMP_NUM_THREADS=8 (#6770) 2022-02-25 00:09:14 +01:00
Glenn Jocher 47f265dde2 Update min warmup iterations from 1k to 100 (#6768) 2022-02-24 23:37:25 +01:00
Glenn Jocher 4bab56526b Update tutorial.ipynb (2 CPUs, 12.7 GB RAM, 42.2/166.8 GB disk) (#6767) 2022-02-24 18:29:59 +01:00
Glenn Jocher 66aaf5184d Pre-commit table fix (#6744) 2022-02-22 19:35:31 +01:00
Glenn Jocher 3752807c0b YOLOv5 v6.1 release (#6739) 2022-02-22 12:35:24 +01:00
Glenn Jocher 2692e67c5f Updated VOC hyperparameters (#6732)
* Update hyps

* Update hyp.VOC.yaml

* Update pathlib

* Update hyps

* Update hyps

* Update hyps

* Update hyps
2022-02-22 12:11:18 +01:00
Glenn Jocher a936f5f219 Switch default LR scheduler from cos to linear (#6729)
* Switch default LR scheduler from cos to linear

Based on empirical results of training both ways on all YOLOv5 models.

* linear bug fix
2022-02-21 14:23:27 +01:00
Glenn Jocher c43f135571 Update nw to max(nd, 1) (#6714) 2022-02-20 21:47:46 +01:00
Glenn Jocher 4de8b24881 Suppress torch AMP-CPU warnings (#6706)
This is a torch bug, but they seem unable or unwilling to fix it so I'm creating a suppression in YOLOv5. 

Resolves https://github.com/ultralytics/yolov5/issues/6692
2022-02-19 16:48:33 +01:00
Glenn Jocher de9c25b35e Use export_formats() in export.py (#6705)
* Use `export_formats()` in export.py

* list fix
2022-02-19 16:08:33 +01:00
Glenn Jocherandpre-commit-ci[bot] 56697c43ff Fix CoreML P6 inference (#6700)
* Fix CoreML P6 inference

* [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>
2022-02-18 20:38:33 +01:00
Glenn Jocher 3670d91b05 Fix --evolve --bucket gs://... (#6698) 2022-02-18 19:15:37 +01:00
Glenn Jocher 07221f1591 FROM nvcr.io/nvidia/pytorch:21.10-py3 (#6677)
Revert to 21.10 on autobuild fail
2022-02-17 16:05:30 +01:00
Glenn Jocher 18b5081166 FROM nvcr.io/nvidia/pytorch:21.10-py3 (#6673)
Reordered installation may help reduce resource usage in autobuild
2022-02-17 15:42:47 +01:00
Glenn Jocher 25456284b4 Update Dockerfile reorder installs (#6672)
Also `nvidia-tensorboard-plugin-dlprof`, `nvidia-tensorboard` are no longer installed in NVCR base.
2022-02-17 15:10:19 +01:00
Glenn Jocher 09d263b376 FROM nvcr.io/nvidia/pytorch:21.10-py3 (#6671)
22.10 returns 'no space left on device' error message.

Seems like a bug at docker. Raised issue in https://github.com/docker/hub-feedback/issues/2209
2022-02-17 14:51:53 +01:00
Glenn Jocher bb054d5f55 FROM nvcr.io/nvidia/pytorch:22.01-py3 (#6670) 2022-02-17 14:20:42 +01:00
Glenn Jocher 9a8ebe671c Update Dockerfile torch==1.10.2+cu113 (#6669) 2022-02-17 13:24:44 +01:00
Glenn Jocher 2e5c67e537 Robust scipy.cluster.vq.kmeans too few points (#6668)
* Handle `scipy.cluster.vq.kmeans` too few points

Resolves #6664

* Update autoanchor.py

* Cleanup
2022-02-17 12:55:03 +01:00
Glenn Jocher 7b80545e8e Add --cache val (#6663)
New `--cache val` argument will cache validation set only into RAM. Should help multi-GPU training speeds without consuming as much RAM as full `--cache ram`.
2022-02-17 00:47:42 +01:00
Glenn Jocher 1ff43702a8 Validate with 2x --workers single-GPU/CPU fix (#6659)
Fix for #6658 for single-GPU and CPU training use cases
2022-02-16 14:50:37 +01:00
Glenn Jocher 6769021901 Validate with 2x --workers (#6658) 2022-02-16 14:44:44 +01:00
Glenn Jocher ee6c70ae43 Fix yolov3.yaml remove list (#6655)
Per https://github.com/ultralytics/yolov3/issues/1887#issuecomment-1041135181
2022-02-16 10:13:05 +01:00
Glenn Jocher 538930023c Fix ConfusionMatrix scale vmin=0.0 (#6638)
Fix attempt for https://github.com/ultralytics/yolov5/issues/6626
2022-02-14 14:54:55 +01:00
Glenn Jocherandpre-commit-ci[bot] a45e472358 YOLOv5 Export Benchmarks (#6613)
* Add benchmarks.py

* Update

* Add requirements

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* dataset autodownload from root

* Update

* Redirect to /dev/null

* sudo --help

* Cleanup

* Add exports pd df

* Updates

* Updates

* Updates

* Cleanup

* dir handling fix

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

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

* Cleanup

* Cleanup2

* Cleanup3

* Cleanup model_type

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-02-12 16:05:43 +01:00
Glenn Jocher 3eef80457f Add YOLOv5n to Reproduce section (#6619) 2022-02-11 21:48:01 +01:00
Glenn Jocher b40bdd6b2d YouTube dependency fix youtube_dl==2020.12.2 (#6612)
Per https://github.com/ultralytics/yolov5/issues/5860#issuecomment-1035320018 by @hdnh2006
2022-02-11 13:46:20 +01:00
Glenn Jocher c21da596f3 Fix hyp_evolve.yaml indexing bug (#6604)
* Fix `hyp_evolve.yaml` indexing bug

Bug caused hyp_evolve.yaml to display latest generation result rather than best generation result.

* Update plots.py

* Update general.py

* Update general.py

* Update general.py
2022-02-10 14:51:29 +01:00
Glenn Jocher a5c9057dcc Update train.py 2022-02-10 14:15:18 +01:00
Glenn Jocher 364b7c5111 Fix YouTube dislike button bug in pafy package (#6603)
Per https://github.com/ultralytics/yolov5/issues/6583#issuecomment-1034421945 by @alicera
2022-02-10 13:13:44 +01:00
Glenn Jocher 9c513ca629 Add DATASETS_DIR global in general.py (#6578) 2022-02-08 22:20:44 +01:00
Glenn Jocher f627bc53f8 Fix plot_labels() colored histogram bug (#6574)
* Fix `plot_labels()` colored histogram bug

* Cleanup
2022-02-08 14:03:50 +01:00
Glenn Jocher 22da63e30f Fix zero-export handling with if any(f): (#6569)
* Fix zero-export handling with `if any(f):`

Partial fix for https://github.com/ultralytics/yolov5/issues/6563

* Cleanup
2022-02-08 12:20:39 +01:00
Glenn Jocher 006eb40ab7 Improved AutoBatch DDP error message (#6568)
* Improved AutoBatch DDP error message

* Cleanup
2022-02-08 11:45:30 +01:00
Glenn Jocher b57abb17f2 Move trainloader functions to class methods (#6559)
* Move trainloader functions to class methods

* results = ThreadPool(NUM_THREADS).imap(self.load_image, range(n))

* Cleanup
2022-02-07 18:59:26 +01:00
Glenn Jocher dc7e093071 Edge TPU TF imports fix (#6542)
* Edge TPU TF imports fix

Fix for https://github.com/ultralytics/yolov5/issues/6535#issuecomment-1030631526

* Update common.py
2022-02-05 15:45:44 +01:00
Glenn Jocherandpre-commit-ci[bot] 079b36d72b Edge TPU tf.lite.experimental.load_delegate fix (#6536)
* Edge TPU `tf.lite.experimental.load_delegate` fix

Fix attempt for #6535

* [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>
2022-02-04 09:30:01 +01:00
Glenn Jocher 9bc72a3ac2 Edge TPU export 'list index out of range' fix (#6533) 2022-02-04 00:04:06 +01:00
Glenn Jocher 8d05716b66 Edge TPU compiler sudo fix (#6531)
* Edge TPU compiler sudo fix

Allows for auto-install of Edge TPU compiler on non-sudo systems like the YOLOv5 Docker image.

@kalenmike

* Update export.py

* Update export.py

* Update export.py
2022-02-03 20:40:09 +01:00
Glenn Jocherandpre-commit-ci[bot] a82292ec53 Social icons after text (#6473)
* Social icons after text

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

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

* Update README.md

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-02-03 19:55:19 +01:00
Glenn Jocherandpre-commit-ci[bot] c3e599cfda Update val_batch*.jpg for Chinese fonts (#6526)
* Update plots for Chinese fonts

* make is_chinese() non-str safe

* Add global FONT

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

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

* Update general.py

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-02-03 19:09:24 +01:00
Glenn Jocher cb40c9afda TODO issues exempt from stale action (#6530) 2022-02-03 18:11:28 +01:00
Glenn Jocher 19e0208fc9 Update hyp.scratch-high.yaml (#6525)
Update `lrf: 0.1`, tested on YOLOv5x6 to 55.0 mAP@0.5:0.95, slightly higher than current.
2022-02-03 12:15:13 +01:00
Glenn Jocher 4c40933266 Suppress export.run() TracerWarnings (#6499)
Suppresses warnings when calling export.run() directly, not just CLI python export.py.

Also adds Requirements examples for CPU and GPU backends
2022-02-01 23:52:50 +01:00
Glenn Jocher 842d049e1b Suppress torch.jit.TracerWarning on export (#6498)
* Suppress torch.jit.TracerWarning

TracerWarnings can be safely ignored.

* Cleanup
2022-02-01 22:59:26 +01:00