2234 Commits

Author SHA1 Message Date
Giacomo Guiduzzi
6935a54e60
Implementation of Early Stopping for DDP training (#8345)
* Implementation of Early Stopping for DDP training

This edit correctly uses the broadcast_object_list() function to send slave processes a boolean so to end the training phase if the variable is True, thus allowing the master process to destroy the process group and terminate.

* Update train.py

* Update train.py

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

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

* Update train.py

* Update train.py

* Update train.py

* Further cleanup

This cleans up the definition of broadcast_list and removes the requirement for clear() afterward.

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-06-29 12:41:46 +02:00
Glenn Jocher
f76a78e707
Update tutorial.ipynb (#8380) 2022-06-28 17:34:24 +02:00
Glenn Jocher
0c1324067c
Fix ONNX --dynamic export on GPU (#8378)
* Fix ONNX `--dynamic` export on GPU

Patch forces --dynamic export model and image to CPU. Resolves bug raised in https://github.com/ultralytics/yolov5/issues/8377

* Update export.py
2022-06-28 15:22:15 +02:00
dependabot[bot]
50ff6eee31
Update protobuf requirement from <=3.20.1 to <4.21.3 (#8346)
Updates the requirements on [protobuf](https://github.com/protocolbuffers/protobuf) to permit the latest version.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/generate_changelog.py)
- [Commits](https://github.com/protocolbuffers/protobuf/commits)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-06-28 12:04:58 +02:00
Glenn Jocher
34df5032a7
Add File Size (MB) column to benchmarks (#8359)
* Add filesize to benchmarks.py

* Add filesize to benchmarks.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-06-27 17:46:49 +02:00
Glenn Jocher
8ebf569d14
Fix bias warmup LR init (#8356)
Per https://github.com/ultralytics/yolov5/issues/8352
2022-06-27 16:11:24 +02:00
Zhiqiang Wang
b0814c9521
Revamp Chinese docs (#8350)
Revamp Chines docs
2022-06-27 13:10:30 +02:00
Nicholas Zolton
0537e8dd13
Allow detect.py to use video size for initial window size (#8330)
* fixed initial window size of detect.py being tiny

* cleanup

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-06-27 00:04:11 +02:00
Glenn Jocher
5c990e3674
Create README_cn.md (#8344)
* Create README_cn.md

Add mandarin version of README

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

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

* Update README.md

* fix link

* fix english link

* remove line

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

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

* Update .pre-commit-config.yaml

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

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

* Update README_cn.md

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

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

* Update .pre-commit-config.yaml

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

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

* Update README_cn.md

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

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

* Update .pre-commit-config.yaml

* Update README.md

* Update README_cn.md

* Kiera fix

* Update README_cn.md

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-06-26 17:46:39 +02:00
Ryan Hirasaki
19f33cbae2
Allow preview resize in detect.py (#8318)
* Initial implementation of --viewsz

* use mouse resize

* Add comment

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-06-24 15:30:44 +02:00
Glenn Jocher
724d5b21b7
device_name="MYRIAD" for Intel NCS2 comment (#8327)
Display device_name="MYRIAD" for Intel NCS2 option per user question in https://github.com/ultralytics/yolov5/issues/8154
2022-06-24 14:18:58 +02:00
Glenn Jocher
a2a1ed201d
logging.ERROR on RANK not in (0, 1) (#8284)
Improve DDP console response in https://github.com/ultralytics/yolov5/issues/8283
2022-06-21 17:41:14 +02:00
Glenn Jocher
1156a323f8
Created using Colaboratory (#8255)
* 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-06-18 14:29:32 +02:00
Glenn Jocher
669f707d62
process_batch() as numpy arrays (#8254)
Avoid potential issues with deterministic ops. 

[ ] - verify for identical mAP to master
2022-06-18 13:54:55 +02:00
Glenn Jocher
d6051382f1
HUB dataset_stats() error reporting (#8192)
* HUB dataset_stats() error reporting

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

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

* Update dataloaders.py

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-06-17 18:37:08 +02:00
Glenn Jocher
303f3785ae
Prefer MPS over CPU if available (#8210)
* Prefer MPS over CPU if available

* Update torch_utils.py
2022-06-17 18:28:29 +02:00
Glenn Jocher
86e6add07b
Remove streaming source sleep period (#8243)
Negatively impacts YouTube inference but removes any lag on webcams/RTSP/RTMP etc.

Resolves https://github.com/ultralytics/yolov5/issues/4465
2022-06-17 17:59:27 +02:00
Glenn Jocher
75bbaa8f44
Reject webcam inference on Colab/Kaggle (#8209)
* Reject webcam inference on Colab/Kaggle

Improve user error understanding for https://github.com/ultralytics/yolov5/issues/8180

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

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

* cleanup

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-06-14 14:28:21 +02:00
dependabot[bot]
6a67594cbf
Bump actions/setup-python from 3 to 4 (#8186)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  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-06-13 12:16:55 +02:00
Glenn Jocher
c23a441c9d
Improved dataset_stats() YAML checks (#8125)
* Update dataloaders.py

* Update dataloaders.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-06-11 19:30:54 +02:00
Glenn Jocher
6adc53ba5f
Docker GPU pip install opencv-python<4.6.0.66 (#8164)
* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update
2022-06-09 22:45:49 +02:00
Glenn Jocher
7c2691f9dc
FROM nvcr.io/nvidia/pytorch:22.05-py3 (#8162) 2022-06-09 22:06:33 +02:00
Glenn Jocher
6e4661773e
AutoBatch checks against failed solutions (#8159)
* AutoBatch checks against failed solutions

@kalenmike this is a simple improvement to AutoBatch to verify that returned solutions have not already failed, i.e. return batch-size 8 when 8 already produced CUDA out of memory.

This is a halfway fix until I can implement a 'final solution' that will actively verify the solved-for batch size rather than passively assume it works.

* Update autobatch.py

* Update autobatch.py
2022-06-09 17:15:49 +02:00
HRan2004
cf298fb72f
fix(utils): missing edge when resample segments (#8092)
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-06-09 10:52:05 +02:00
pre-commit-ci[bot]
2dd3db0050
[pre-commit.ci] pre-commit suggestions (#8119)
updates:
- [github.com/asottile/pyupgrade: v2.32.0 → v2.32.1](https://github.com/asottile/pyupgrade/compare/v2.32.0...v2.32.1)

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-06-07 00:04:11 +02:00
Glenn Jocher
18674e2f03
experimental.py Apple MPS device fix (#8121)
* experimental.py Apple MPS fix

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

* Update experimental.py

* Update experimental.py
2022-06-06 23:58:50 +02:00
Glenn Jocher
47233e1698
Improved dataset error introspection (#8091)
* Improved dataset error introspection

Intended to help https://github.com/ultralytics/yolov5/issues/8090

* Update general.py
2022-06-03 12:45:51 +02:00
Glenn Jocher
7cef03dddd
Fix torch long to float tensor on HUB macOS (#8067) 2022-06-01 17:34:46 +02:00
Glenn Jocher
a80dd66efe
Update stale.yml to 300 ops per run (#8061) 2022-05-31 20:18:40 +02:00
Glenn Jocher
7d87b9eae8
Make Docker actions conditional on ultralytics/yolov5 repo (#8060)
* Update ci-testing.yml

* Update ci-testing.yml

* Update ci-testing.yml

* Update docker.yml
2022-05-31 16:36:57 +02:00
Sahil Chachra
6dd6aea086
Fix FP32 TensorRT model export (#8046)
Fixed FP32 TRT  model export

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-05-31 12:41:09 +02:00
Glenn Jocher
487edd5609 Dataset autodownload fstring updates 2022-05-31 12:36:20 +02:00
Glenn Jocher
258f4c6438
attempt_load() deserialize fix (#8051) 2022-05-31 10:55:14 +02:00
tcmyxc
50b886ddc6
.detach() on bias init (#8044)
make init bias better, 
I think `detach` is more safer than `data`
2022-05-31 09:53:36 +02:00
Glenn Jocher
dcf8073881
Simplify and fix --save-period epoch 0 (#8042)
Simplify and update `--save-period` epoch 0
2022-05-30 12:42:12 +02:00
Glenn Jocher
632559b1e6
Add Dockerfile descriptions (#8031) 2022-05-29 20:43:01 +02:00
Glenn Jocher
d490bdd7d6
Add best.pt PyTorch Hub inference to CI (#8024) 2022-05-28 22:55:03 +02:00
Glenn Jocher
7433d3829a
Add requirements.txt protobuf<=3.20.1 (#8017)
* Pin `protobuf==3.20.1`

* Update requirements.txt

* Update ci-testing.yml
2022-05-28 12:12:27 +02:00
Glenn Jocher
5580b27daf
check_requirements() "" Windows double quote (#8016) 2022-05-28 11:13:44 +02:00
Glenn Jocher
07e84370ac
Pin CI protobuf==3.20.1 (#8015)
Pin protobuf==3.20.1

Resolve protobuf 4 issues.
2022-05-28 10:53:44 +02:00
Glenn Jocher
bf1a6dda7b
Update CI benchmarks to ONNX autoinstall (#8008)
Avoids openvino-dev conflicts
2022-05-27 16:54:18 +02:00
Glenn Jocher
09ba6f6eec
Add warning emoji ⚠️ on --conf > 0.001 (#8005)
* Add warning emoji on `--conf > 0.001`

* Update val.py
2022-05-27 11:49:30 +02:00
Glenn Jocher
2373c507b0
Update and add benchmarks to ci-testing.yml (#7996)
* Update and rename ci-testing.yml to ci.yml

* Update ci.yml

* Update ci.yml

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

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

* Update and rename ci.yml to ci-tests.yml

* Update ci-tests.yml

* Update ci-tests.yml

* Rename ci-tests.yml to ci-testing.yml

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-05-27 11:46:55 +02:00
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