Commit Graph

1892 Commits (c3d5ac151eaedb61495e5866f13a9746d3706abc)
 

Author SHA1 Message Date
Jirka Borovec c3d5ac151e
precommit: yapf (#5494)
* precommit: yapf

* align isort

* fix

# Conflicts:
#	utils/plots.py

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

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

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

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

* Update setup.cfg

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

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

* Update setup.cfg

* Update setup.cfg

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

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

* Update wandb_utils.py

* Update augmentations.py

* Update setup.cfg

* Update yolo.py

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

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

* Update val.py

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

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

* simplify colorstr

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

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

* val run fix

* export.py last comma

* Update export.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

* PyTorch Hub tuple fix

* PyTorch Hub tuple fix2

* PyTorch Hub tuple fix3

* Update setup

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>
2022-03-31 16:52:34 +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 Jocher 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
dependabot[bot] d51f9b2ff6
Bump actions/cache from 2.1.7 to 3 (#7175)
Bumps [actions/cache](https://github.com/actions/cache) from 2.1.7 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.7...v3)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-28 10:42:19 +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
Zengyf-CVer a4c661873f
Fix `detect.py --view-img` for non-ASCII paths (#7093)
* Update detect.py

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

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

* Update general.py

* Update detect.py

* Update general.py

* Update general.py

* Update general.py

* Update general.py

* Update general.py

* Update general.py

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

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

* Update general.py

* Update general.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>
2022-03-25 13:40:55 +01:00
RcINS d115bbf509
Fix `cv2.imwrite` on non-ASCII paths (#7139)
* Fix imwrite on non-ASCII paths

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

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

* Update general.py

* Update __init__.py

* Update __init__.py

* Update datasets.py

* Update hubconf.py

* Update detect.py

* [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>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-03-25 13:25:30 +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
yeshanliu bc3ed957ce
`np.fromfile()` Chinese image paths fix (#6979)
* 🎉 🆕 now can read Chinese image path. 

use "cv2.imdecode(np.fromfile(f, np.uint8), cv2.IMREAD_COLOR)" instead of "cv2.imread(f)" for Chinese image path.

* Update datasets.py

* Update __init__.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-03-23 15:35:15 +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 Jocher 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
Philip Gutjahr 529fbc1814
Use PIL to eliminate chroma subsampling in crops (#7008)
* use pillow to save higher-quality jpg (w/o color subsampling)

* Cleanup and doc issue

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-03-20 15:46:29 +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
Mrinal Jain 4effd064b1
Consistent saved_model output format (#7032) 2022-03-18 12:29:24 +01:00
Max Strobel 7c6a33564a
fix: add default PIL font as fallback (#7010)
* fix: add default font as fallback

Add default font as fallback if the downloading of the Arial.ttf font
fails for some reason, e.g. no access to public internet.

* Update plots.py

Co-authored-by: Maximilian Strobel <Maximilian.Strobel@infineon.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-03-17 16:37:09 +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 d3d9cbce22 (commitcomment-68622388)
2022-03-14 10:54:51 +01:00
paradigm c13d4ce7ef
EdgeTPU optimizations (#6808)
* removed transpose op for better edgetpu support

* fix for training case

* enabled experimental new quantizer flag

* precalculate add and mul ops at compile time

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-03-12 16:15:09 +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