Commit Graph

2128 Commits (7f7bd6fbcd214886aa2a275500eb5e05933bea05)
 

Author SHA1 Message Date
Glenn Jocher 7f7bd6fbcd
Set `torch.cuda.manual_seed_all()` for DDP (#8688)
* Set `torch.cuda.manual_seed_all()` for DDP

* Update general.py

* Update general.py
2022-07-23 18:24:14 +02:00
UnglvKitDe 1c5e92aba1
Add generator and worker seed (#8602)
* Add generator and worker seed

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

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

* Update dataloaders.py

* Update dataloaders.py

* Update dataloaders.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-07-23 01:25:17 +02:00
Glenn Jocher b92430a83b
Update hubconf.py to reset logging level to INFO (#8680) 2022-07-22 19:01:16 +02:00
Glenn Jocher b17629e54f
Update warning emojis (#8678) 2022-07-22 15:23:22 +02:00
Glenn Jocher 38721de7ef
Update hubconf.py to reset LOGGER.level after load (#8674)
Resolves silent outputs after model load
2022-07-22 11:54:31 +02:00
Glenn Jocher 4c1784bd15
Use contextlib's suppress method to silence an error (#8668) 2022-07-21 23:12:49 +02:00
Rüdiger Busche 602d7ffb0e
Check TensorBoard logger before adding graph (#8664)
Otherwise, an error is thrown if the tensorboard logger is not included.
2022-07-21 17:40:53 +02:00
daquexian 92e47b85d9
Upgrade onnxsim to v0.4.1 (#8632)
* upgrade onnxsim to v0.4.1

Signed-off-by: daquexian <daquexian566@gmail.com>

* Update export.py

* Update export.py

* Update export.py

* Update export.py

* Update export.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-07-19 19:01:24 +02:00
Glenn Jocher fbe67e4653
Fix `OMP_NUM_THREADS=1` for macOS (#8624)
Resolves https://github.com/ultralytics/yolov5/issues/8623
2022-07-18 17:53:30 +02:00
Glenn Jocher 9cf5fd5ac3
assert torch!=1.12.0 for DDP training (#8621)
* assert torch!=1.12.0 for DDP training

* [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-07-18 15:05:58 +02:00
Glenn Jocher 51fb467b63
Refactor optimizer initialization (#8607)
* Refactor optimizer initialization

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

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

* Update train.py

* Update train.py

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-07-17 11:43:52 +02:00
Glenn Jocher 24305787ae
FROM nvcr.io/nvidia/pytorch:22.06-py3 (#8600) 2022-07-17 00:55:55 +02:00
Glenn Jocher a34b376d0f
Link fuse() to AutoShape() for Hub models (#8599) 2022-07-16 23:46:23 +02:00
Glenn Jocher 6e86af3de8
Add `pip install wheel` to avoid legacy `setup.py install` (#8597)
* Update ci-testing with `pip install wheel`

* Update ci-testing.yml

* Update dockerfiles
2022-07-16 16:41:43 +02:00
Glenn Jocher 5c45a4b13d
Update `tqdm>=4.64.0` and `thop>=0.1.1` (#8596)
* Update `tqdm>=4.64.0` and `thop>=0.1.1`

* Update requirements.txt
2022-07-16 16:14:16 +02:00
Glenn Jocher cf28dda366
Update `scipy>=1.7.3` (#8595) 2022-07-16 15:54:34 +02:00
Yonghye Kwon 7204c1ca25
Explicitly set `weight_decay` value (#8592)
* explicitly set weight_decay value

The default weight_decay value of AdamW is 1e-2, so we should set it to zero.

* [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>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-07-16 15:51:48 +02:00
Glenn Jocher 72a81e7a1c
Update requirements.txt comment spacing (#8562) 2022-07-15 16:01:29 +02:00
Colin Wong f4b05680f8
Assert `--optimize` not used with cuda device (#8569) 2022-07-15 16:01:01 +02:00
Colin Wong f8722b4429
Raise error on suffix-less model path (#8561)
Raise error on invalid model
2022-07-13 11:13:01 +02:00
Glenn Jocher 574ceedfc5
Add `thop>=0.1.0` (#8558) 2022-07-12 14:49:54 +02:00
曾逸夫(Zeng Yifu) fbd3020525
Add TensorRT dependencies (#8553)
Update requirements.txt
2022-07-12 13:19:25 +02:00
Glenn Jocher 04146371b9
Update metrics.py with IoU protected divides (#8550) 2022-07-12 01:58:25 +02:00
Glenn Jocher a84cd02387
CIoU protected divides (#8546)
Protected divides in IOU function to resolve https://github.com/ultralytics/yolov5/issues/8539
2022-07-11 16:07:11 +02:00
Glenn Jocher 7dafd1cb29
val.py `assert ncm == nc` fix (#8545) 2022-07-11 15:09:42 +02:00
Colin Wong 526e650553
Fix `LoadImages()` with dataset YAML lists (#8517)
* Fix LoadImages with dataset yaml lists

* Update dataloaders.py

* Update dataloaders.py

* Simplify/refactor PR

* Update dataloaders.py

Co-authored-by: Colin Wong <noreply@brains4drones.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-07-08 14:32:40 +02:00
Glenn Jocher c215e87393
XML export `--half` fix (#8522)
Improved error reporting for https://github.com/ultralytics/yolov5/issues/8519
2022-07-08 13:49:20 +02:00
Glenn Jocher 63ba0cb18a
Add `--half` arguments to export.py Usage examples (#8516) 2022-07-08 00:46:56 +02:00
Colin Wong be42a24d23
Properly expose `batch_size` from OpenVINO similarly to TensorRT (#8514)
Properly expose `batch_size` from OpenVINO

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-07-07 23:53:09 +02:00
Glenn Jocher f17444abcd
Simplify benchmarks.py assertions (#8515) 2022-07-07 23:46:55 +02:00
Glenn Jocher 3e54651fca
Add `--hard-fail` argument to benchmarks for CI errors (#8513)
* Add `--hard-fail` list argument to benchmarks for CI

Will cause CI to fail on a benchmark failure for given indices.

* Update ci-testing.yml

* Attempt Failure (CI should fail)

* Update benchmarks.py

* Update export.py

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

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

* Update benchmarks.py

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

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

* Update ci-testing.yml

* Update benchmarks.py

* Update benchmarks.py

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-07-07 23:41:34 +02:00
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