Commit Graph

2097 Commits (39d7a93619083cb8e37f5ef7708cf50b34e20ee1)
 

Author SHA1 Message Date
UnglvKitDe 39d7a93619
Fix AP calculation bug #8464 (#8484)
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-07-07 20:42:09 +02:00
Glenn Jocher dd28df98c2
Avoid FP64 ops for MPS support in train.py (#8511)
Avoid FP64 ops for MPS support

Resolves https://github.com/ultralytics/yolov5/pull/7878#issuecomment-1177952614
2022-07-07 20:36:23 +02:00
Glenn Jocher 9d7bc06ae7
Revert "Expose OpenVINO `batch_size` similarly to TensorRT" (#8510)
Revert "Expose OpenVINO `batch_size` similarly to TensorRT (#8437)"

This reverts commit da2ee3934e.
2022-07-07 20:13:42 +02:00
Ayush Chaurasia 27d831b6e4
Training reproducibility improvements (#8213)
* attempt at reproducibility

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

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

* use deterministic algs

* fix everything :)

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

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

* revert dataloader changes

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

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

* process_batch as np

* remove newline

* Remove dataloader init fcn

* Update val.py

* Update train.py

* revert additional changes

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

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

* Update train.py

* Add --seed arg

* Update general.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 val.py

* Update train.py

* Update general.py

* Update general.py

* Add deterministic argument to init_seeds()

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-07-07 14:39:29 +02:00
Glenn Jocher 36f64a981d
Update tutorial.ipynb (#8507) 2022-07-07 12:34:01 +02:00
Junya Morioka 1ab23fc67f
Exclude torch==1.12.0, torchvision==0.13.0 (Fix #8395) (#8497)
Exclude torch==1.12.0, torchvision==0.13.0
2022-07-06 19:32:58 +02:00
pre-commit-ci[bot] fdc9d9198e
[pre-commit.ci] pre-commit suggestions (#8470)
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.2.0 → v4.3.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.2.0...v4.3.0)
- [github.com/asottile/pyupgrade: v2.32.1 → v2.34.0](https://github.com/asottile/pyupgrade/compare/v2.32.1...v2.34.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-07-04 22:09:24 +02:00
Glenn Jocher c7689198bc
Update stale.yml (#8465) 2022-07-04 15:01:11 +02:00
Glenn Jocher 29d79a6360
Do not prefer Apple MPS (#8446)
Require explicit request for MPS, i.e.
```bash
python detect.py --device mps
```

Reverts https://github.com/ultralytics/yolov5/pull/8210 for preferring MPS if available. 

Note that torch MPS is experiencing ongoing compatibility issues in https://github.com/pytorch/pytorch/issues/77886
2022-07-02 18:35:45 +02:00
Colin Wong da2ee3934e
Expose OpenVINO `batch_size` similarly to TensorRT (#8437) 2022-07-01 22:15:09 +02:00
Glenn Jocher d94b4705a6
TRT `--half` fix autocast images to FP16 (#8435)
* TRT `--half` fix autocast images to FP16

Resolves bug raised in https://github.com/ultralytics/yolov5/issues/7822

* Update common.py
2022-07-01 15:41:14 +02:00
Glenn Jocher 898332433a
Update cache comments (#8414)
* Update cache comments

For better readability

* Update dataloaders.py
2022-06-30 16:19:22 +02:00
Amir Pourmand e50dc38d36
Improve `--local_rank` arg comment (#8409)
* add more docs

* add more docs

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

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

* Update train.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-06-30 15:01:31 +02:00
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