2147 Commits

Author SHA1 Message Date
Glenn Jocher
ec4de43a8a
Update Colab Notebook CI (#8798)
* Update Colab Notebook CI

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

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

* Created using Colaboratory

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

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

* Update tutorial.ipynb

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-07-30 21:11:19 +02:00
Glenn Jocher
56f5cb5a28
Print hubconf.py args (#8800) 2022-07-30 21:02:26 +02:00
Glenn Jocher
9111246208
Add hubconf.py argparser (#8799)
* Add hubconf.py argparser

* Add hubconf.py argparser
2022-07-30 21:00:28 +02:00
Glenn Jocher
e34ae8837b
ci-testing.yml Windows-friendly ENV variables (#8794)
Per https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
2022-07-30 14:04:03 +02:00
Glenn Jocher
52d3a9aee1
Fix detect.py --update list bug (#8783)
Fix detect.py --update

Resolves https://github.com/ultralytics/yolov5/issues/8776
2022-07-29 17:07:24 +02:00
Glenn Jocher
e309a85586
Add val.py no label warning (#8782)
Help resolve confusion around zero-metrics val.py results when no labels are found in https://github.com/ultralytics/yolov5/issues/8753
2022-07-29 14:45:29 +02:00
jbutle55
567397d67a
Fix confusion matrix update when no predictions are made (#8748)
* Fix confusion matrix update when no predictions are made

* Update metrics.py

* Simply confusion matrix changes

* Simply confusion matrix fix

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-07-29 14:06:23 +02:00
Colin Wong
587a3a37c5
Dynamic batch size support for TensorRT (#8526)
* Dynamic batch size support for TensorRT

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

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

* Update export.py

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

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

* Fix optimization profile when batch size is 1

* Warn users if they use batch-size=1 with dynamic

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

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

* More descriptive assertion error

* Fix syntax

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

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

* pre-commit formatting sucked

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

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

* Update export.py

Co-authored-by: Colin Wong <noreply@brains4drones.com>
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-29 13:51:16 +02:00
Glenn Jocher
3e858633b2
Revert protobuf<=3.20.1 (#8742)
Resolve #8012 (again)
2022-07-27 17:27:44 +02:00
Max Strobel
0b5ac224ae
fix: broken `is_docker` check (#8711)
Checking if ``/workspace`` exists is not a reliable method to check if
the process runs in a docker container.

Reusing the logic from the npm "is-docker" package to check if the
process runs in a container.
References: https://github.com/sindresorhus/is-docker/blob/main/index.js

Fixes #8710.

Co-authored-by: Maximilian Strobel <Maximilian.Strobel@infineon.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-07-26 19:02:44 +02:00
Glenn Jocher
c775a296a7
Revert "Fix BGR->RGB Bug in albumentations #8641" (#8727)
Revert "Fix BGR->RGB Bug in albumentations #8641 (#8695)"

This reverts commit 2e1291fdce26b3cff213e9e7ee8c196fa263b688.
2022-07-26 19:00:48 +02:00
Glenn Jocher
d5116bbe9c
coremltools>=5.2 for CoreML export (#8725) 2022-07-26 17:50:49 +02:00
UnglvKitDe
2e1291fdce
Fix BGR->RGB Bug in albumentations #8641 (#8695)
* Fix BGR->RGB Bug in albumentations https://github.com/ultralytics/yolov5/issues/8641

* Change transform methode from cv2 to numpy

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

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

* Simplify

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

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

* Update augmentations.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-26 13:52:56 +02:00
Glenn Jocher
b367860196
New HUBDatasetStats() class (#8716)
* New `HUBDatasetStats()` class

Usage examples:
```
from utils.dataloaders import *

stats = HUBDatasetStats('coco128.yaml', autodownload=True)  # method 1
stats = HUBDatasetStats('path/to/coco128_with_yaml.zip')  # method 1

stats.get_json(save=False)
stats.process_images()
```

@kalenmike

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

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

* Update dataloaders.py

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

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

* Update dataloaders.py

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

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

* Update dataloaders.py

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

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

* 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-07-25 18:20:01 +02:00
Glenn Jocher
a6f197ae79
Update dataloaders.py (#8714)
* Update dataloaders.py

* Update dataloaders.py
2022-07-25 16:52:28 +02:00
Glenn Jocher
7215a0fb41
Avoid cv2 window init code on Windows (#8712)
Resolves https://github.com/ultralytics/yolov5/issues/8642
2022-07-25 13:57:05 +02:00
Glenn Jocher
0ab303b044
Remove else: from load_image() (#8692) 2022-07-25 00:02:09 +02:00
Glenn Jocher
916bdb1d61
Faster crop saving (#8696)
Faster crops

Following https://github.com/ultralytics/yolov5/issues/8641#issuecomment-1193190325
2022-07-23 23:30:30 +02:00
Glenn Jocher
b510957650
Move .dockerignore to root (#8690) 2022-07-23 18:50:19 +02:00
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