2141 Commits

Author SHA1 Message Date
Glenn Jocher
a6e99e4d66
cURL download double quotes (#7999)
Attempt to resolve Windows issues
2022-05-26 20:37:48 +02:00
Glenn Jocher
980aace209
Add psutil and ipython to requirements.txt (#7998)
* Add `psutil` and `ipython` to requirements.txt

Lightweight packages used by YOLOv5 for system utilization (psutil) and interactive notebooks (IPython)

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

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

* sort alphabetically

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-05-26 19:12:19 +02:00
Glenn Jocher
cd71aa3515
check_requirements() Windows fix (#7997) 2022-05-26 19:01:46 +02:00
Glenn Jocher
945579699a
Remove formats variable to avoid pd conflict (#7993)
* Remove `formats` variable to avoid `pd` conflict

* Update export.py
2022-05-26 16:07:58 +02:00
Glenn Jocher
1dcb774998
Update requirements.txt with Usage example (#7966)
Update requirements.txt
2022-05-25 01:40:17 +02:00
Glenn Jocher
5d6fbb1e25
Update greetings.yml (#7965) 2022-05-24 23:32:21 +02:00
Glenn Jocher
d07f9ce0ea
AMP check improvements backup YOLOv5n pretrained (#7959)
* Reduce AMP check to detections verification

More robust and faster

* Update general.py

* Update general.py
2022-05-24 15:33:35 +02:00
Glenn Jocher
68ff6c9c08
Increase NMS fixed time limit 300ms + 30ms/img (#7957)
* Increase NMS fixed time limit to 200ms

* Update general.py
2022-05-24 14:11:03 +02:00
Glenn Jocher
b5ebd47d64
Increase NMS time limit to 50 ms/img (#7956) 2022-05-24 13:58:10 +02:00
Glenn Jocher
c215878f11
YOLOv5 Apple Metal Performance Shader (MPS) support (#7878)
* Apple Metal Performance Shader (MPS) device support

Following https://pytorch.org/blog/introducing-accelerated-pytorch-training-on-mac/

Should work with Apple M1 devices with PyTorch nightly installed with command `--device mps`. Usage examples:
```bash
python train.py --device mps
python detect.py --device mps
python val.py --device mps
```

* Update device strategy to fix MPS issue
2022-05-24 13:34:32 +02:00
xylieong
27911dc824
OpenVINO metadata fix2 (#7954)
* Bug Fixed: OpenVINO metadata

* Bug Fixed: OpenVINO metadata

* Update export.py

* Update export.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-05-24 13:19:25 +02:00
Glenn Jocher
0dd66e2dc7
OpenVINO metadata fix (#7952)
* Rename OpenVINO meta.yaml to model name

* Rename OpenVINO meta.yaml to model name

* Rename OpenVINO meta.yaml to model name

* fix
2022-05-24 11:59:59 +02:00
xylieong
a3a652c933
Add OpenVINO metadata to export (#7947)
* Write .yaml file when exporting model to openvino

Write .yaml file automatically when exporting model to openvino to be used during inference

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

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

* Update export.py

* Update export.py

* Load metadata on inference

* Update common.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-05-24 11:30:36 +02:00
Glenn Jocher
541a5b72bb
Windows check_file() fix (#7938)
Resolves Ultralytics HUB CI errors.
2022-05-23 16:15:38 +02:00
Glenn Jocher
9b4e05439c
Fix AMP check tolerance (#7937)
Adjust to 5%, fixes failing Colab AMP check with V100 (1.5% different) with 200% safety margin.
2022-05-23 15:57:16 +02:00
Glenn Jocher
cf3fb58522
AMP check image download backup (#7936)
Resolves https://github.com/ultralytics/yolov5/discussions/7931
2022-05-23 15:31:54 +02:00
Glenn Jocher
cee5959c74
Code refactor (#7923)
* Code refactor for general.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-05-22 15:24:08 +02:00
Glenn Jocher
eb1217f3ac
Add PyTorch AMP check (#7917)
* Add PyTorch AMP check

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

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

* Cleanup

* Cleanup

* Cleanup

* Robust for DDP

* Fixes

* Add amp enabled boolean to check_train_batch_size

* Simplify

* space to prefix

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-05-22 13:41:18 +02:00
Glenn Jocher
547c89b3a0
Add --keras argument for TF exports (#7921)
Resolves https://github.com/ultralytics/yolov5/issues/7911#issuecomment-1133671255
2022-05-22 13:33:36 +02:00
Glenn Jocher
15057d2a34
Add check_yaml() to benchmarks.py (#7916)
Locate file in subdirectories.
2022-05-21 19:39:19 +02:00
Glenn Jocher
5774a1514d
Add DWConvTranspose2d() module (#7881)
* Add DWConvTranspose2d() module

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

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

* Add DWConvTranspose2d() module

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

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

* Fix

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

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

* Fix

* Fix

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-05-20 16:13:40 +02:00
Glenn Jocher
a9a92aec5c
cv2.resize interpolation fix (#7903)
Fix for https://github.com/ultralytics/yolov5/discussions/7901
2022-05-20 12:59:05 +02:00
Anton Lebedev
43569d53da
Bug fix mAP0.5-0.95 (#6787)
* Improve mAP0.5-0.95

Two changes provided
1. Added limit on the maximum number of detections for each image likewise pycocotools
2. Rework process_batch function

Changes #2 solved issue #4251
I also independently encountered the problem described in issue #4251 that the values for the same thresholds do not match when changing the limits in the torch.linspace function.
These changes solve this problem.

Currently during validation yolov5x.pt model the following results were obtained:
from yolov5 validation
               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100%|██████████| 157/157 [01:07<00:00,  2.33it/s]
                 all       5000      36335      0.743      0.626      0.682      0.506
from pycocotools
 Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.505
 Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=100 ] = 0.685

These results are very close, although not completely pass the competition issue #2258.
I think it's problem with false positive bboxes matched ignored criteria, but this is not actual for custom datasets and does not require an additional solution.

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

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

* Remove line to retain pycocotools results

* Update val.py

* Update val.py

* Remove to device op

* Higher precision int conversion

* Update val.py

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>
2022-05-20 11:33:10 +02:00
xylieong
f43cd53d44
Added Windows cmd to count GPU devices (#7891)
* Added Windows cmd to count GPU devices

* Cleanup

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-05-19 15:48:44 +02:00
Jaewon Lee
fe1b503cbb
Removed shell=True from subprocess commands that require user inputs (#7875)
* Removed shell=True from subprocess commands that require user inputs. Also removed unused arguments

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

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

* Added check=True

* Revert line add

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-05-19 11:49:13 +02:00
Glenn Jocher
7d46c69235
Invert Docker Image publishing order (#7877)
To appear on Docker Hub in top down order:

- latest
- latest-cpu
- latest-arm64
2022-05-18 17:23:42 +02:00
Glenn Jocher
9a7f289eed
Update Dockerfile-arm64 (#7860)
* Update Dockerfile-arm64

* Update docker.yml
2022-05-17 16:35:12 +02:00
Glenn Jocher
1b8e70f037
Add TFDWConv() depth_multiplier (#7858)
Enabled grouped non c1 == c2 convolutions in TF YOLOv5 models.
2022-05-17 15:42:36 +02:00
Glenn Jocher
91c82d8f92
Update Dockerfile-cpu install libpython3.8-dev (#7857)
* Update Dockerfile-cpu install `libpython3.8-dev`

Fix OpenVINO export

* Update Dockerfile-arm64
2022-05-17 15:09:10 +02:00
Glenn Jocher
d7d2b10f69
Create docker.yml (#7856)
* Create docker.yml

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

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

* Update docker.yml

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

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

* Update docker.yml

* Update docker.yml

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

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

* Cleanup

* Cleanup2

* [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-17 14:11:38 +02:00
Glenn Jocher
e4d82c1951
Update CI CPU badge (#7855)
* Update README.md

* Update greetings.yml
2022-05-17 13:01:18 +02:00
Glenn Jocher
614ef110b3
Update Dockerfile --no-install-recommends (#7846)
* Update Dockerfile-cpu `--no-install-recommends`

Per https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends

* Update Dockerfile-M1

* Update Dockerfile

* Update Dockerfile-M1

* Update Dockerfile-cpu
2022-05-17 01:29:23 +02:00
Glenn Jocher
b52fd48b4a
TFDWConv() depthwise_initializer fix (#7845) 2022-05-16 23:37:38 +02:00
Nanohana
05d4fc9db4
Replace openvino-dev with OpenVINO Runtime inference (#7843)
* Uses OpenVINO runtime instead of openvino-dev

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

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

* export with openvino package

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

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

* Revert export.py

* Update common.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-05-16 21:03:02 +02:00
Glenn Jocher
2b64b45cd8
Fix TFDWConv() c1 == c2 check (#7842) 2022-05-16 18:06:46 +02:00
Glenn Jocher
fb7fa5be8b
New TensorFlow TFCrossConv() module (#7827)
* New TensorFlow `TFCrossConv()` module

* Move from experimental to common

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

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

* Add C3x

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

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

* Add to C3x to yolo.py

* Add to C3x to tf.py

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

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

* TFC3x bug fix

* TFC3x bug fix

* TFC3x bug fix

* Add TFDWConv g==c1==c2 check

* Add comment

* Update tf.py

* [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-16 17:02:16 +02:00
dependabot[bot]
d29df68299
Bump cirrus-actions/rebase from 1.6 to 1.7 (#7831)
Bumps [cirrus-actions/rebase](https://github.com/cirrus-actions/rebase) from 1.6 to 1.7.
- [Release notes](https://github.com/cirrus-actions/rebase/releases)
- [Commits](https://github.com/cirrus-actions/rebase/compare/1.6...1.7)

---
updated-dependencies:
- dependency-name: cirrus-actions/rebase
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-16 10:48:51 +02:00
Glenn Jocher
4d59f65db5
New TensorFlow TFDWConv() module (#7824)
* New TensorFlow `TFDWConv()` module

Analog to DWConv() module:
8aa2085a7e/models/common.py (L53-L57)

* Fix and new activations() function

* Update tf.py
2022-05-16 01:04:16 +02:00
Glenn Jocher
1e112ced79
YOLOv5 OpenVINO PyTorch Hub inference fix (#7826)
Resolves bug report #7817
2022-05-16 00:56:44 +02:00
Glenn Jocher
8aa2085a7e
Refactor modules (#7823) 2022-05-15 19:44:16 +02:00
Glenn Jocher
f00071416f
Refactor collections and fstrings (#7821)
* Update torch_utils.py

* Additional code refactoring

* tuples to sets

* Cleanup
2022-05-15 16:38:26 +02:00
Glenn Jocher
3356f2609c
Add Python version output (#7814) 2022-05-14 18:30:47 +02:00
Glenn Jocher
4a295b1a89
Add @threaded decorator (#7813)
* Add `@threaded` decorator

* [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-14 16:12:08 +02:00
Glenn Jocher
9d8ed37df7
Rename utils/datasets.py > utils/dataloaders.py (#7799) 2022-05-13 14:34:16 +02:00
Yonghye Kwon
5a1ef32553
Add random interpolation method augmentation (#6826)
* add random_interpolation option to make model robust to interpolation methods

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

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

* Fix precommit error

* Update augmentations.py

* Update augmentations.py

* Update augmentations.py

* Update datasets.py

* Update datasets.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-05-13 14:26:11 +02:00
Glenn Jocher
5e077bfd39
Add Dockerfile-M1 (#7720)
* Add Dockerfile-M1

* Update

* Update

* Update Dockerfile-M1
2022-05-13 14:15:21 +02:00
Glenn Jocher
8a4175cde0
Add smoothing to curve plots and max F1 index (#7798)
@sergiossm
2022-05-13 13:53:21 +02:00
Glenn Jocher
d95a728f55
Implement DDP static_graph=True (#6940)
* Implement DDP `static_graph=True`

Experimental implementation of new PyTorch 1.11.0 DDP feature.

* Add 1.11.0 check

* [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

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-05-13 12:32:47 +02:00
Glenn Jocher
f3fecf94a9
Pin downloads to release version (#7790)
* Pin downloads to release version

Fixes a release version to avoid forward-compatibility issues in future releases.

* [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-13 00:24:53 +02:00
Cristi Fati
4870064629
Ability to dowlnoad older assets (#7767)
* Ability to dowlnoad older assets

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

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

* Cleanup

* Cleanup2

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-05-11 12:52:10 +02:00