Commit Graph
100 Commits
Author SHA1 Message Date
Glenn Jocher d059d1da03 Report fused model summary by default (#7722) 2022-05-06 23:51:59 -07:00
Glenn Jocher aa7a0e91b1 Update on_train_end callback (#7716) 2022-05-05 21:25:13 -07:00
Glenn Jocherandpre-commit-ci[bot] 1d0a0944c1 Update tutorial.ipynb (#7715)
* Update tutorial.ipynb

* Created using Colaboratory

* [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-05-05 20:55:52 -07:00
Glenn Jocher c4cb7c684a Update README.md (#7686) 2022-05-03 15:18:01 -07:00
Glenn Jocherandpre-commit-ci[bot] d4ea61e043 FROM nvcr.io/nvidia/pytorch:22.04-py3 (#7680)
* FROM nvcr.io/nvidia/pytorch:22.04-py3

* Update Docker

* Update Docker

* Update Docker

* Update Docker

* Update TRT auto-install

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

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

* Cleanup

* Cleanup

* Cleanup cpu

* Cleanup cpu

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-05-03 13:47:30 -07:00
Glenn Jocher e305aba686 Pin Docker-cpu FROM ubuntu:20.04 (#7677) 2022-05-02 23:27:24 -07:00
Glenn Jocher c4862fcd31 Update Dockerfile-cpu to force python3.9 (#7675)
* Update

* Update

* Do not install torch

* Pillow>9.1

* Update Dockerfile-cpu

* Update Dockerfile-cpu

* Update Dockerfile-cpu

* Update Dockerfile-cpu

* Update Dockerfile-cpu

* Update Dockerfile-cpu

* Update Dockerfile-cpu

* Update Dockerfile-cpu

* Update Dockerfile-cpu

* Update Dockerfile

* fix emoji

* reduce scipy

* add libpython3.9

* Update Dockerfile
2022-05-02 20:53:02 -07:00
Glenn Jocher 488fb0a36a Bump scipy>=1.5 to meet numpy constraints (#7646)
Resolves https://github.com/ultralytics/yolov5/issues/7638
2022-04-29 12:00:30 -07:00
Glenn Jocher b24a576823 Reduce opencv-python>=4.1.1 for Jetson Nano (#7645)
May help https://github.com/ultralytics/yolov5/issues/7631#issuecomment-1113007451
2022-04-29 11:50:30 -07:00
Glenn Jocher 1a3ecb8b38 increment_path() robustness improvements (#7628)
Improved robustness to filename edge cases like `data/images/zidane.23.jpg` that currently fail. May resolve https://github.com/ultralytics/yolov5/issues/7432
2022-04-28 14:00:43 -07:00
Glenn Jocher b53917de8d Remove tqdm.auto (#7599) 2022-04-26 15:00:01 -07:00
Glenn Jocher e54e758cfb Add PyTorch-only benchmark arg (#7564)
Usage:
```
python utils/benchmarks.py --weights yolov5s.pt --img 640 --pt-only
```
2022-04-24 20:03:23 -07:00
Glenn Jocher 950a85d9f6 TensorRT PyTorch Hub inference fix (#7560)
Solution proposed in https://github.com/ultralytics/yolov5/issues/7128 to TRT PyTorch Hub CUDA illegal memory errors.
2022-04-24 12:45:56 -07:00
Glenn Jocher c16671fc74 Add print(results) override for PyTorch Hub results (#7559) 2022-04-24 12:07:05 -07:00
Glenn Jocher be67572279 Enable results.print() when _verbose=False (#7558)
Follows implementation of _verbose flag for PyTorch Hub models. Currently these are so silent that result.print() does nothing 😂
2022-04-24 11:30:40 -07:00
Glenn Jocherandpre-commit-ci[bot] 7043872f25 PyTorch Hub _verbose=False fix2 (#7550)
* PyTorch Hub `_verbose=False` fix2

* Update downloads.py

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

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

* Update hubconf.py

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

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

* Update

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

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

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-04-23 11:26:25 -07:00
Glenn Jocher 1f1ec1c3e7 Restrict TRT autoinstall to Linux-only (#7549)
May partially resolve concerns in https://github.com/ultralytics/yolov5/pull/7537#discussion_r856843711
2022-04-23 09:36:36 -07:00
Glenn Jocherandpre-commit-ci[bot] 404b4fefbe Update restapi.py (#7309)
* Update restapi.py

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

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

* Update restapi.py

* Update restapi.py

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

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

* Update restapi.py

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-04-22 16:19:21 -07:00
Glenn Jocherandpre-commit-ci[bot] 3a89377c04 Improve availability of YOLOv5 in Russia (#7545)
* Add redundant weights download mirrors

This PR seeks to improve access worldwide to YOLOv5 weights. Universal access to AI for all is our core value, and we are against any censorship or restriction efforts.

I've uploaded the official YOLOv5 v6.1 weights to a primary backup bucket on GCP and to secondary backup on Google Drive at https://drive.google.com/drive/folders/1EFQTEUeXWSFww0luse2jB9M1QNZQGwNl. Autodownload with try the first two locations (GitHuB release assets and GCP bucket), and point users to the Google Drive folder if the first two fail.

* [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-04-22 16:07:33 -07:00
Glenn Jocher f62609eb52 Update check_requirements() with cmds=() argument (#7543) 2022-04-22 14:31:05 -07:00
Glenn Jocher e04d8b1cb0 Update precommit monthly python 3.7+ (#7542) 2022-04-22 13:43:50 -07:00
Glenn Jocherandpre-commit-ci[bot] cc1d7df03c Autoinstall TensorRT if missing (#7537)
* Autoinstall TensorRT if missing

May resolve https://github.com/ultralytics/yolov5/issues/7464

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

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

* Update export.py

* Update export.py

* Update export.py

* Update export.py

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-04-22 12:31:33 -07:00
Glenn Jocher 813eba85b2 Empty val batch CUDA device fix (#7539)
Verified fix for https://github.com/ultralytics/yolov5/pull/7525#issuecomment-1106081123
2022-04-22 12:01:14 -07:00
Glenn Jocher b804b36bc4 Add Docker --file argument to build (#7527) 2022-04-21 20:31:26 -07:00
Glenn Jocher d2e698c75c Reduce val device transfers (#7525) 2022-04-21 20:06:57 -07:00
Glenn Jocher 23718df1c6 Fix val plots=plots (#7524) 2022-04-21 18:21:01 -07:00
Glenn Jocher 918d7b2b3f Refactor Dockerfiles to utils/docker (#7510)
* Refactor Docker files

* Refactor Docker files

* Update Dockerfile
2022-04-20 14:23:55 -07:00
Glenn Jocher 3f3852e2ff Fix val.py Ensemble() (#7490) 2022-04-19 21:15:04 -07:00
Glenn Jocher ab5b917494 check_fonts() download to CONFIG_DIR fix (#7489)
Follows https://github.com/ultralytics/yolov5/pull/7488. Correct bug where fonts were downloading to current working directory rather than global CONFIG_DIR
2022-04-19 17:50:02 -07:00
Glenn Jocherandpre-commit-ci[bot] c9042dc2ad Improved non-latin Annotator() plotting (#7488)
* Improved non-latin labels Annotator plotting

May resolve https://github.com/ultralytics/yolov5/issues/7460

* Update train.py

* Update train.py

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

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

* add progress arg

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-04-19 17:32:15 -07:00
Glenn Jocher c9a3b14a74 Disable pbar for DDP ranks > 0 (#7440) 2022-04-16 15:12:38 +02:00
Glenn Jocher 3eefab1bb1 Remove tensorrt pip install check (#7439) 2022-04-15 21:48:52 +02:00
Glenn Jocher 014acde79d Update git_describe() (#7402)
* Update `git_describe()`

Add .git path check to avoid `fatal: not a git repository (or any of the parent directories): .git` printout

* Update general.py
2022-04-12 17:26:53 +02:00
Glenn Jocher 2da2466168 Fix EdgeTPU output directory (#7399)
* Fix EdgeTPU output directory

Outputs to same directory as --weights

* Update export.py
2022-04-12 15:08:53 +02:00
Glenn Jocher 5333b55e74 Remove OpenVINO ONNX opset<=12 check (#7398)
No longer needed.
2022-04-12 14:57:50 +02:00
Glenn Jocher 4bb7eb8b84 Dynamic normalization layer selection (#7392)
* Dynamic normalization layer selection

Based on actual available layers. Torch 1.7 compatible, resolves https://github.com/ultralytics/yolov5/issues/7381

* Update train.py
2022-04-12 11:02:11 +02:00
Glenn Jocher bd2dda8e64 Update optimizer param group strategy (#7376)
* Update optimizer param group strategy

Avoid empty lists on missing BathNorm2d models as in https://github.com/ultralytics/yolov5/issues/7375

* fix init
2022-04-11 12:34:35 +02:00
Glenn Jocher 8c420c4c1f Update ci-testing.yml (#7365)
Remove keras==2.6.0 patch
2022-04-10 15:17:25 +02:00
Glenn Jocher b8d4f2bf74 Replace Slack with Community Forum in issues (#7364) 2022-04-10 14:50:01 +02:00
Glenn Jocher db36f13c7a Delete FUNDING.yml (#7363)
Deleting as redundant with FUNDING.yml present in organization repo at https://github.com/ultralytics/.github
2022-04-10 14:40:33 +02:00
Glenn Jocher 1993efd59e Swap unsafe_chunk() for chunk() (#7362)
Eliminates all unsafe function in YOLOv5 out of an abundance of caution.
2022-04-10 13:53:28 +02:00
Glenn Jocher 406ee528f0 Loss and IoU speed improvements (#7361)
* Loss speed improvements

* bbox_iou speed improvements

* bbox_ioa speed improvements

* box_iou speed improvements

* box_iou speed improvements
2022-04-10 13:46:07 +02:00
Glenn Jocher 3bb233a7fb Add ONNX export metadata (#7353) 2022-04-09 13:27:49 +02:00
Glenn Jocher 698a5d7f26 Add python benchmarks.py --test for export-only (#7350)
* Test exports

* Fix precommit
2022-04-09 01:32:16 +02:00
Glenn Jocher 446e6f563a Rename 'MacOS' to 'macOS' (#7349) 2022-04-08 23:05:15 +02:00
Glenn Jocher 302b00b5f4 Update _make_grid() (#7346) 2022-04-08 12:55:16 +02:00
Glenn Jocherandpre-commit-ci[bot] 5f941a84ef Print dataset scan only if RANK in (-1, 0) (#7337)
* Print dataset scan only `if RANK in (-1, 0)`

* [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-04-07 16:44:08 +02:00
Glenn Jocherandpre-commit-ci[bot] 676e10cf1a Simplify callbacks.py return (#7333)
* Simplify callbacks.py return

* Indent args (pytorch convention)

* [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-04-07 16:15:01 +02:00
Glenn Jocher 5783de26fe Objects365 dataset breakdown images vs zips (#7335) 2022-04-07 16:12:44 +02:00
Glenn Jocher 0ca85ed65f Update Objects365.yaml (#7323)
Updated dataset size to 712GB (includes undeleted zips).
2022-04-06 23:52:19 +02:00
Glenn Jocher 245d6459a9 Add callbacks (#7315)
* Add `on_train_start()` callback

* Update

* Update
2022-04-06 17:23:34 +02:00
Glenn Jocher 32661f75ac Add retry=3 to download() (#7313)
* Add `retry=3` to `download()`

* Update general.py

* Update general.py

* Update general.py

* Update VOC.yaml

* Update VisDrone.yaml
2022-04-06 13:12:41 +02:00
Glenn Jocher f735458987 Use tqdm.auto (#7311) 2022-04-06 12:20:24 +02:00
Glenn Jocherandpre-commit-ci[bot] d257c75c84 Update export.py (#7301)
* Update export.py

Simplify code.

* [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-04-05 21:21:57 +02:00
Glenn Jocher c759bbdf19 Add check_requirements(('pycocotools>=2.0',)) (#7295)
Add  `check_requirements(('pycocotools>=2.0',))`
2022-04-05 15:55:16 +02:00
Glenn Jocher b1300f3e0b Add dataset sizes (zipped) (#7293) 2022-04-05 15:14:54 +02:00
Glenn Jocher d2e7ba2a3a val.py --weights and --data compatibility check (#7292)
Improved error messages for understanding of user error with val.py. May help https://github.com/ultralytics/yolov5/issues/7291
2022-04-05 14:23:15 +02:00
Glenn Jocher 5f97001ed4 Context manager open(file) as f fixes (#7289)
* Flask context manager `open()` fix

* Additional read context manager fixes
2022-04-05 12:54:25 +02:00
Glenn Jocher 2181ef371e Update cv2.imread() patch with flags argument (#7287) 2022-04-05 11:49:32 +02:00
Glenn Jocher 2da68664b5 Update Dockerfile (#7282) 2022-04-05 00:52:37 +02:00
Glenn Jocher ea72b84f5e Integrate offset into grid (#7262)
Eliminate 1 op during training and inference.
2022-04-03 23:40:23 +02:00
Glenn Jocher 8bc839ed8e TorchScript single-output fix (#7261) 2022-04-03 22:51:11 +02:00
Glenn Jocherandpre-commit-ci[bot] 05cf0d1a44 Export single output only (#7259)
* Update

* Update

* [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-04-03 21:29:20 +02:00
Glenn Jocher 779efbb9ca Update 2022-04-03 21:21:55 +02:00
Glenn Jocher ad0e4d5d19 torch.split() replace slicing on out-of-place inference (#7258) 2022-04-03 20:05:50 +02:00
Glenn Jocher 4f839b7970 Refactor out-of-place Detect() for reduced ops (#7257) 2022-04-03 19:26:23 +02:00
Glenn Jocher ffcbd8ca97 Export with official nn.SiLU() (#7256)
* Update

* Update time_limit
2022-04-03 18:45:05 +02:00
Glenn Jocher 035b5548e4 Update tutorial.ipynb (#7255) 2022-04-03 12:18:24 +02:00
Glenn Jocher 3d3483cf0c Update tutorial.ipynb (#7254) 2022-04-03 12:14:12 +02:00
Glenn Jocher 6f4eb95af7 Update setup.cfg to description_file field (#7248)
Resolve `UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead`
2022-04-03 00:18:18 +02:00
Glenn Jocher a19406b39d Update minimum Python>=3.7.0 (#7247) 2022-04-02 15:05:00 +02:00
Glenn Jocher 37675e110f Fix www.youtube.com hostname (#7242)
* Fix `www.youtube.com` hostname

* Update datasets.py
2022-04-01 21:38:49 +02:00
Glenn Jocher 71621df875 Create CODE_OF_CONDUCT.md (#7233) 2022-04-01 00:24:37 +02:00
Glenn Jocher 734ab033fd SavedModel TF Serve Fix (#7228)
* SavedModel TF Serve Fix

Fix for https://github.com/ultralytics/yolov5/issues/7205 proposed by @tylertroy

* Update export.py
2022-04-01 00:07:23 +02:00
Glenn Jocher 4d157f578a Update .pre-commit-config.yaml (#7230) 2022-03-31 17:26:34 +02:00
Glenn Jocher 2c3221844b CLI fire prep updates (#7229)
* CLI fire prep updates

* revert unintentional TF export change
2022-03-31 17:11:43 +02:00
Glenn Jocher df9008ee69 Add train.py --name cfg option (#7202)
Automatically names run as --cfg argument
2022-03-31 13:17:22 +02:00
Glenn Jocher c94736acec ENV OMP_NUM_THREADS=8 (#7215) 2022-03-30 16:01:55 +02:00
Glenn Jocher 9c1e91aea2 Update tutorial.ipynb (#7212) 2022-03-30 12:53:49 +02:00
Glenn Jocherandpre-commit-ci[bot] cf4f3c3455 yolo.py profiling updates (#7178)
* yolo.py profiling updates

* [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-29 10:15:53 +02:00
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