Commit Graph

1045 Commits (1ae91940abe9ca3e064784bb18c12271ab3157b4)

Author SHA1 Message Date
Glenn Jocher c725511bfc
Refactor for simplification (#9054)
* Refactor for simplification

* cleanup

* [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-08-21 01:34:03 +02:00
Glenn Jocher a409ec7953
AutoBatch protect from negative batch sizes (#9048)
* AutoBatch protect from negative batch sizes

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

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

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

* cleanup

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

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-08-20 16:29:08 +02:00
Glenn Jocher 4a8ab3bc42
VOC `names` dictionary fix (#9034)
* VOC names dictionary fix

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

* Update dataloaders.py

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-19 15:07:04 +02:00
Glenn Jocher 61adf017f2
`torch.empty()` for speed improvements (#9025)
`torch.empty()` for speed improvement

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-18 20:12:33 +02:00
Glenn Jocher d40cd0d454
Improved `Profile()` inference timing (#9024)
* Improved `Profile()` class

* Update predict.py

* Update val.py

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

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

* Update val.py

* Update AutoShape

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-08-18 19:55:38 +02:00
Glenn Jocher 20049be2e7
EMA FP32 assert classification bug fix (#9016)
* Return EMA float on classification val

* verbose val fix

* EMA check
2022-08-18 14:06:15 +02:00
Glenn Jocher 0922bc2082
DockerHub tag update Usage example (#9005)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-17 22:50:08 +02:00
Ayush Chaurasia 64e0757edf
[Classify]: Allow inference on dirs and videos (#9003)
* allow image dirs

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

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

* Update predict.py

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

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

* Update dataloaders.py

* Update predict.py

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

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

* Update predict.py

* Update predict.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-08-17 22:41:43 +02:00
Glenn Jocher e83b422a69
Update dataset `names` from array to dictionary (#9000)
* Migrate dataset names to dictionary

* fix check

* backwards compat

* predict fix

* val fix

* Keep dataset stats behavior identical

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-17 17:52:53 +02:00
Glenn Jocher 7c9486e16f
Update `attempt_download(release='v6.2')` (#8998)
* Update attempt_download(release='v6.2')

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

* Update README.md

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-17 15:48:17 +02:00
Glenn Jocher d3ea0df8b9
New YOLOv5 Classification Models (#8956)
* Update

* Logger step fix: Increment step with epochs (#8654)

* enhance

* revert

* allow training from scratch

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

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

* Update --img argument from train.py 

single line

* fix image size from 640 to 128

* suport custom dataloader and augmentation

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

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

* format

* Update dataloaders.py

* Single line return, single line comment, remove unused argument

* address PR comments

* fix spelling

* don't augment eval set

* use fstring

* update augmentations.py

* new maning convention for transforms

* reverse if statement, inline ops

* reverse if statement, inline ops

* updates

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

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

* update dataloaders

* Remove additional if statement

* Remove is_train as redundant

* Cleanup

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

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

* Cleanup2

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

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

* Update classifier.py

* Update augmentations.py

* fix: imshow clip warning

* update

* Revert ToTensorV2 removal

* Update classifier.py

* Update normalize values, revert uint8

* normalize image using cv2

* remove dedundant comment

* Update classifier.py

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

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

* replace print with logger

* commit steps

* [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>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Allow logging models from GenericLogger (#8676)

* enhance

* revert

* allow training from scratch

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

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

* Update --img argument from train.py 

single line

* fix image size from 640 to 128

* suport custom dataloader and augmentation

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

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

* format

* Update dataloaders.py

* Single line return, single line comment, remove unused argument

* address PR comments

* fix spelling

* don't augment eval set

* use fstring

* update augmentations.py

* new maning convention for transforms

* reverse if statement, inline ops

* reverse if statement, inline ops

* updates

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

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

* update dataloaders

* Remove additional if statement

* Remove is_train as redundant

* Cleanup

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

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

* Cleanup2

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

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

* Update classifier.py

* Update augmentations.py

* fix: imshow clip warning

* update

* Revert ToTensorV2 removal

* Update classifier.py

* Update normalize values, revert uint8

* normalize image using cv2

* remove dedundant comment

* Update classifier.py

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

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

* replace print with logger

* commit steps

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

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

* support final model logging

* update

* update

* update

* update

* remove curses

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

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

* Update classifier.py

* Update __init__.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>

* Update

* Update

* Update

* Update

* Update dataset download

* Update dataset download

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Pass imgsz to classify_transforms()

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Cos scheduler

* Cos scheduler

* Remove unused args

* Update

* Add seed

* Add seed

* Update

* Update

* Add run(), main()

* Merge master

* Merge master

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Create YOLOv5 BaseModel class (#8829)

* Create BaseModel

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

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

* fix

* Hub load device fix

* Update

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Add experiment

* Merge master

* Attach names

* weight decay = 1e-4

* weight decay = 5e-5

* update smart_optimizer console printout

* fashion-mnist fix

* Merge master

* Update Table

* Update Table

* Remove destroy process group

* add kwargs to forward()

* fuse fix for resnet50

* nc, names fix for resnet50

* nc, names fix for resnet50

* ONNX CPU inference fix

* revert

* cuda

* if augment or visualize

* if augment or visualize

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

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

* New smart_inference_mode()

* Update README

* Refactor into /classify dir

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

* reset defaults

* reset defaults

* fix gpu predict

* warmup

* ema half fix

* spacing

* remove data

* remove cache

* remove denormalize

* save run settings

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

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

* verbose false on initial plots

* new save_yaml() function

* Update ci-testing.yml

* Path(data) CI fix

* Separate classification CI

* fix val

* fix val

* fix val

* smartCrossEntropyLoss

* skip validation on hub load

* autodownload with working dir root

* str(data)

* Dataset usage example

* im_show normalize

* im_show normalize

* add imagenet simple names to multibackend

* Add validation speeds

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

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

* 24-space names

* Update bash scripts

* Update permissions

* Add bash script arguments

* remove verbose

* TRT data fix

* names generator fix

* optimize if names

* update usage

* Add local loading

* Verbose=False

* update names printing

* Add Usage examples

* Add Usage examples

* Add Usage examples

* Add Usage examples

* named_children

* reshape_classifier_outputs

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

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

* update

* update

* fix CI

* fix incorrect class substitution

* fix incorrect class substitution

* remove denormalize

* ravel fix

* cleanup

* update opt file printing

* update opt file printing

* update defaults

* add opt to checkpoint

* Add warning

* Add comment

* plot half bug fix

* Use NotImplementedError

* fix export shape report

* Fix TRT load

* cleanup CI

* profile comment

* CI fix

* Add cls models

* avoid inplace error

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

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

* Fix usage examples

* Update README

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

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

* Update README

* Update README

* Update README

* Update README

* Update README

* Update README

* Update README

* Update README

* Update README

* Update README

* Update README

* Update README

* Update README

* Update README

* Update README

* Update README

Co-authored-by: Ayush Chaurasia <ayush.chaurarsia@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-08-17 11:59:01 +02:00
Victor Sonck 3456fe65c6
Fix torchvision dependency for ClearML logging (#8993)
* Replace torchvision annotator with native local Annotator

* Add colored bounding boxes and rewrite for efficiency

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

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

* Fix pep8 issue

* Update clearml_utils.py

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

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

* Update clearml_utils.py

* Reduced conf_threshold to 0.25 to match defaults

The 0.25 default conf threshold value is used a default throughout YOLOv5 (i.e. in detect.py) and also in other tools like CoreML

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-08-17 11:51:07 +02:00
Glenn Jocher 464c2c6713
Colab and Kaggle loggers removeHandler (#8985)
Resolve duplicate outputs in colab. Also optimizes Colab and Kaggle environment checks.

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-16 16:49:32 +02:00
Michel Promonet 4d05472d2b
Allow multiple-model serving from Flask REST API (#8973)
* allow to serve multiple models using flask restapi

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

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

* Cleanup

* Update restapi.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-08-15 23:42:25 +02:00
Glenn Jocher d7bc5d7773
Add `.tar` support for datasets (#8963) 2022-08-14 23:06:42 +02:00
Glenn Jocher 7639e4c7ef
Fix windows LOGGER with emojis output (#8958)
* Fix duplicate LOGGER output

* Update general.py
2022-08-14 00:12:09 +02:00
Glenn Jocher dc38cd03f4
New `smart_inference_mode()` conditional decorator (#8957)
New smart_inference_mode()
2022-08-13 20:38:51 +02:00
Glenn Jocher 6aed0a7c00
GFLOPs computation fix for classification models (#8954)
* GFLOPs computation fix for classification models

Improved robustness in reading input channel count

* Update torch_utils.py

* Update torch_utils.py
2022-08-13 16:38:11 +02:00
Kalen Michael 11a76bb4f5
Allow train to use zipped content (#8940)
* fix: added transparent image and empty alt to social bar

* fix: remove underlines

* fix: hide underlines for all social links

* fix: always unzip into folder
2022-08-13 03:39:09 +02:00
Glenn Jocher 7ab1f50633
Scope `torchvision.utils.draw_bounding_boxes` import (#8915)
* Scope `torchvision.utils.draw_bounding_boxes` import

Quick fix for https://github.com/ultralytics/yolov5/issues/8898#issuecomment-1208851874 until a more permanent fix is implemented

* Update clearml_utils.py
2022-08-09 20:29:25 +02:00
Code-Bat b551098d59
About "os.R_OK" in general.py (#8909)
The notes says "Return True if directory has write permissions", however, the code below is "os.R_OK", I think "os.W_OK" is preferred.
2022-08-09 16:59:36 +02:00
Glenn Jocher f5335f22bb
Capitalize YouTube (#8903) 2022-08-08 20:36:18 +02:00
Glenn Jocher 8f28ea4945
emoji-safe default logging (#8888)
* emoji-safe default logging

* implement everywhere
2022-08-06 12:30:08 +02:00
Glenn Jocher 20f1b7ea08
`smart_optimizer()` improved reporting (#8887)
Update smart_optimizer() weight_decay reporting
2022-08-06 11:30:54 +02:00
Victor Sonck 378bde4bba
ClearML experiment tracking integration (#8620)
* Add titles to matplotlib plots

* Add ClearML Experiment Tracking integration.

* Add ClearML Data Version Management automatic download when requested

* Add ClearML Hyperparameter Optimization

* ClearML save period integration

* Fix wandb breaking when used with ClearML dataset

* Fix wandb breaking when used with ClearML resume and dataset

* Add ClearML documentation

* fixed small bug in clearml integration that misreports epoch number

* Final ClearMl additions before refactor

* Add correct epoch reporting

* Add remote execution and autoscaling docs for ClearML integration

* Added images to clearml integration docs

* fixed logo alignment bug and added hpo screenshot clearml

* Fixed small epoch number bug in clearml integration

* Remove saved model flush clearml

* Cleanup clearml readme section

* Cleaned up clearml logger docstring

* Remove resume readme section clearml

* Clearml integration cleanup

* Updated ClearML documentation

* Added dark vs light icons ClearML Readme

* Clearml Readme styling

* Add better gifs

* Fixed gif file size

* Add better images in tutorial notebook

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

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

* Addressed comments in PR #8620

* Fixed circular import

* Fixed circular import

* Update tutorial.ipynb

* Update tutorial.ipynb

* Inline comment

* Restructured tutorial notebook

* Add correct ClearML link to README

* Update tutorial.ipynb

* Update general.py

* Update __init__.py

* Update __init__.py

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

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

* Update __init__.py

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

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

* Update __init__.py

* Update README.md

* Update __init__.py

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

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

* spelling

* Update tutorial.ipynb

* notebook cutt.ly links

* Update README.md

* Update README.md

* cutt.ly links in tutorial

* Removed labels as they show up on last subplot only

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-08-05 20:50:49 +02:00
Glenn Jocher bc9fcb1767
HUBDatasetStats() preview images to 50 quality (#8880)
@kalenmike should represent a 30% filesize reduction vs 75 quality
2022-08-05 14:45:41 +02:00
Glenn Jocher 84e7748564
Update dataloaders.py remove `float64` shapes (#8865)
May help https://github.com/ultralytics/yolov5/issues/8862
2022-08-04 17:06:08 +02:00
Glenn Jocher a75a1105a1
Self-contained checkpoint `--resume` (#8839)
* Single checkpoint resume

* Update train.py

* Add hyp

* Add hyp

* Add hyp

* FIX

* avoid resume on url data

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

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

* avoid resume on url data

* avoid resume on url data

* Update

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-08-03 21:28:22 +02:00
Glenn Jocher 08c8c3e00a
New `smart_resume()` (#8838)
* New `smart_resume()`

* Update torch_utils.py

* Update torch_utils.py

* Update torch_utils.py

* fix
2022-08-02 15:13:58 +02:00
Glenn Jocher ba140e5685
RUN git clone instead of COPY to `/usr/src/app` (#8827)
Update
2022-08-01 21:45:31 +02:00
Glenn Jocher 39ce8ca19a
Remove `assert not is_docker()` from GitHub checks (#8813)
* Update

* Update
2022-08-01 03:01:44 +02:00
Amir Pourmand afa403a809
Check git status on upstream `ultralytics` or `origin` dynamically (#8694)
* Add remote ultralytics and check git status with that

* Simplify

* Update general.py

* Update general.py

* s fix

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-07-31 18:17:38 +02:00
Glenn Jocher 555976b346
FROM nvcr.io/nvidia/pytorch:22.07-py3 (#8808) 2022-07-31 15:23:57 +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
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 2e1291fdce.
2022-07-26 19:00:48 +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 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 b17629e54f
Update warning emojis (#8678) 2022-07-22 15:23:22 +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
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 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 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
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 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
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
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 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
Glenn Jocher 898332433a
Update cache comments (#8414)
* Update cache comments

For better readability

* Update dataloaders.py
2022-06-30 16:19:22 +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 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 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
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
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 632559b1e6
Add Dockerfile descriptions (#8031) 2022-05-29 20:43:01 +02:00
Glenn Jocher 5580b27daf
`check_requirements()` "" Windows double quote (#8016) 2022-05-28 11:13:44 +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 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 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
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 15057d2a34
Add `check_yaml()` to benchmarks.py (#7916)
Locate file in subdirectories.
2022-05-21 19:39:19 +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
Glenn Jocher 9a7f289eed
Update Dockerfile-arm64 (#7860)
* Update Dockerfile-arm64

* Update docker.yml
2022-05-17 16:35:12 +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 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 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 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
Glenn Jocher aa7a0e91b1
Update `on_train_end` callback (#7716) 2022-05-05 21:25:13 -07:00
Glenn Jocher d4ea61e043
FROM nvcr.io/nvidia/pytorch:22.04-py3 (#7680)
* FROM nvcr.io/nvidia/pytorch:22.04-py3

* Update Docker

* Update Docker

* Update Docker

* Update Docker

* Update TRT auto-install

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

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

* Cleanup

* Cleanup

* Cleanup cpu

* Cleanup cpu

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-05-03 13:47:30 -07:00
Glenn Jocher e305aba686
Pin Docker-cpu `FROM ubuntu:20.04` (#7677) 2022-05-02 23:27:24 -07:00
Glenn Jocher c4862fcd31
Update Dockerfile-cpu to force python3.9 (#7675)
* Update

* Update

* Do not install torch

* Pillow>9.1

* Update Dockerfile-cpu

* Update Dockerfile-cpu

* Update Dockerfile-cpu

* Update Dockerfile-cpu

* Update Dockerfile-cpu

* Update Dockerfile-cpu

* Update Dockerfile-cpu

* Update Dockerfile-cpu

* Update Dockerfile-cpu

* Update Dockerfile

* fix emoji

* reduce scipy

* add libpython3.9

* Update Dockerfile
2022-05-02 20:53:02 -07:00
SylvanDing 5743deb9df
Update plot.py (#7654)
fix bug in issue #7650
2022-04-30 20:01:21 -07:00
Glenn Jocher 1a3ecb8b38
`increment_path()` robustness improvements (#7628)
Improved robustness to filename edge cases like `data/images/zidane.23.jpg` that currently fail. May resolve https://github.com/ultralytics/yolov5/issues/7432
2022-04-28 14:00:43 -07:00
Glenn Jocher b53917de8d
Remove `tqdm.auto` (#7599) 2022-04-26 15:00:01 -07:00
Glenn Jocher e54e758cfb
Add PyTorch-only benchmark arg (#7564)
Usage:
```
python utils/benchmarks.py --weights yolov5s.pt --img 640 --pt-only
```
2022-04-24 20:03:23 -07:00
Glenn Jocher 7043872f25
PyTorch Hub `_verbose=False` fix2 (#7550)
* PyTorch Hub `_verbose=False` fix2

* Update downloads.py

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

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

* Update hubconf.py

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

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

* Update

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

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

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-04-23 11:26:25 -07:00
Glenn Jocher 404b4fefbe
Update restapi.py (#7309)
* Update restapi.py

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

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

* Update restapi.py

* Update restapi.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-04-22 16:19:21 -07:00
Glenn Jocher 3a89377c04
Improve availability of YOLOv5 in Russia (#7545)
* Add redundant weights download mirrors

This PR seeks to improve access worldwide to YOLOv5 weights. Universal access to AI for all is our core value, and we are against any censorship or restriction efforts.

I've uploaded the official YOLOv5 v6.1 weights to a primary backup bucket on GCP and to secondary backup on Google Drive at https://drive.google.com/drive/folders/1EFQTEUeXWSFww0luse2jB9M1QNZQGwNl. Autodownload with try the first two locations (GitHuB release assets and GCP bucket), and point users to the Google Drive folder if the first two fail.

* [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-04-22 16:07:33 -07:00
Ayush Chaurasia 4cac1cfc8f
Add `--noplots` flag to suppress figures and images logging (#7534)
* support nomedia

* support nomedia for validation

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

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

* Update train.py

* Revert no plot evolve

evolve plots do not contain any images

* Revert plot_results

contains no media

* Update wandb_utils.py

* sync-bn cleanup

* Cleanup

* Rename nomedia -> noplots

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-04-22 15:04:08 -07:00
Glenn Jocher f62609eb52
Update check_requirements() with `cmds=()` argument (#7543) 2022-04-22 14:31:05 -07:00
Powercube7 4b284a12c7
Update downloads.py current release (#7541)
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-04-22 13:44:54 -07:00
Zengyf-CVer c264795f50
Add mdformat to precommit checks and update other version (#7529)
* Update .pre-commit-config.yaml

* [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 CONTRIBUTING.md

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

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

* Update README.md

* Update README.md

* Update README.md

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-04-22 13:36:27 -07:00
Glenn Jocher b804b36bc4
Add Docker `--file` argument to build (#7527) 2022-04-21 20:31:26 -07:00
Glenn Jocher 918d7b2b3f
Refactor Dockerfiles to `utils/docker` (#7510)
* Refactor Docker files

* Refactor Docker files

* Update Dockerfile
2022-04-20 14:23:55 -07:00
Joseph Kocherhans b77c8d9d72
Added `YOLOv5_AUTOINSTALL` environment variable (#7505)
* Added a way to skip dependency auto-installation.

Setting the environment variable `YOLOv5_AUTOINSTALL=False` will
skip installing any missing dependencies as if the user had passed
`install=False` to `check_requirements`.

* Cleanup

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-04-20 12:08:22 -07:00
Glenn Jocher ab5b917494
`check_fonts()` download to `CONFIG_DIR` fix (#7489)
Follows https://github.com/ultralytics/yolov5/pull/7488. Correct bug where fonts were downloading to current working directory rather than global CONFIG_DIR
2022-04-19 17:50:02 -07:00
Glenn Jocher c9042dc2ad
Improved non-latin `Annotator()` plotting (#7488)
* Improved non-latin labels Annotator plotting

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

* Update train.py

* Update train.py

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

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

* add progress arg

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-04-19 17:32:15 -07:00
Glenn Jocher c9a3b14a74
Disable `pbar` for DDP ranks > 0 (#7440) 2022-04-16 15:12:38 +02:00
Glenn Jocher 014acde79d
Update `git_describe()` (#7402)
* Update `git_describe()`

Add .git path check to avoid `fatal: not a git repository (or any of the parent directories): .git` printout

* Update general.py
2022-04-12 17:26:53 +02:00
Ayush Chaurasia 74aaab3312
Add version warning for wandb (#7385)
* add version warning

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

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

* Cleanup

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

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

* Update __init__.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>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-04-12 11:46:56 +02:00
Glenn Jocher 1993efd59e
Swap `unsafe_chunk()` for `chunk()` (#7362)
Eliminates all unsafe function in YOLOv5 out of an abundance of caution.
2022-04-10 13:53:28 +02:00
Glenn Jocher 406ee528f0
Loss and IoU speed improvements (#7361)
* Loss speed improvements

* bbox_iou speed improvements

* bbox_ioa speed improvements

* box_iou speed improvements

* box_iou speed improvements
2022-04-10 13:46:07 +02:00
Glenn Jocher 698a5d7f26
Add `python benchmarks.py --test` for export-only (#7350)
* Test exports

* Fix precommit
2022-04-09 01:32:16 +02:00
Glenn Jocher 446e6f563a
Rename 'MacOS' to 'macOS' (#7349) 2022-04-08 23:05:15 +02:00
Glenn Jocher 5f941a84ef
Print dataset scan only `if RANK in (-1, 0)` (#7337)
* Print dataset scan only `if RANK in (-1, 0)`

* [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-04-07 16:44:08 +02:00
Glenn Jocher 676e10cf1a
Simplify callbacks.py return (#7333)
* Simplify callbacks.py return

* Indent args (pytorch convention)

* [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-04-07 16:15:01 +02:00
Nick Martin a88a81469a
Copy wandb param dict before training to avoid overwrites (#7317)
* Copy wandb param dict before training to avoid overwrites.

Copy the hyperparameter dict retrieved from wandb configuration before passing it to `train()`. Training overwrites parameters in the dictionary (eg scaling obj/box/cls gains), which causes the values reported in wandb to not match the input values. This is confusing as it makes it hard to reproduce a run, and also throws off wandb's Bayesian sweep algorithm.

* Cleanup

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-04-06 18:35:33 +02:00
Glenn Jocher 245d6459a9
Add callbacks (#7315)
* Add `on_train_start()` callback

* Update

* Update
2022-04-06 17:23:34 +02:00
Glenn Jocher 32661f75ac
Add `retry=3` to `download()` (#7313)
* Add `retry=3` to `download()`

* Update general.py

* Update general.py

* Update general.py

* Update VOC.yaml

* Update VisDrone.yaml
2022-04-06 13:12:41 +02:00
Glenn Jocher f735458987
Use `tqdm.auto` (#7311) 2022-04-06 12:20:24 +02:00
Max Strobel 741fac815e
fix: disable usage of root logger (#7296)
* fix: disable usage of root logger

`logging.basicConfig` configures Python's root logger. This prohibits
fine control of logging, overwrites logging configuration done outside
the package, and is not best practice. Instead, the used logger is now
configured directly, and the root logger is untouched.

Example:
    If yolov5 is used as part of another project with some sophisticated
    logging, the internal `logging.basicConfig` call overwrites all the
    external configuration.

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

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

* Update general.py

* Update general.py

* Comment kaggle

* Uncomment kaggle

Co-authored-by: Maximilian Strobel <Maximilian.Strobel@infineon.com>
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-04-05 17:38:13 +02:00
Glenn Jocher 5f97001ed4
Context manager `open(file) as f` fixes (#7289)
* Flask context manager `open()` fix

* Additional read context manager fixes
2022-04-05 12:54:25 +02:00
Glenn Jocher 2181ef371e
Update `cv2.imread()` patch with flags argument (#7287) 2022-04-05 11:49:32 +02:00
pre-commit-ci[bot] 7882950577
[pre-commit.ci] pre-commit suggestions (#7279)
* [pre-commit.ci] pre-commit suggestions

updates:
- [github.com/asottile/pyupgrade: v2.31.0 → v2.31.1](https://github.com/asottile/pyupgrade/compare/v2.31.0...v2.31.1)
- [github.com/pre-commit/mirrors-yapf: v0.31.0 → v0.32.0](https://github.com/pre-commit/mirrors-yapf/compare/v0.31.0...v0.32.0)

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

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

* Update yolo.py

* Update activations.py

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

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

* Update activations.py

* Update tf.py

* 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>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-04-04 22:47:00 +02:00
Glenn Jocher 779efbb9ca Update 2022-04-03 21:21:55 +02:00
Glenn Jocher ffcbd8ca97
Export with official `nn.SiLU()` (#7256)
* Update

* Update time_limit
2022-04-03 18:45:05 +02:00
Zengyf-CVer dda669a12c
Fix Flask REST API (#7210)
* Update restapi.py

* Update restapi.py

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

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

* Cleanup

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

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

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-04-03 13:19:26 +02:00
Glenn Jocher a19406b39d
Update minimum Python>=3.7.0 (#7247) 2022-04-02 15:05:00 +02:00
Glenn Jocher 37675e110f
Fix `www.youtube.com` hostname (#7242)
* Fix `www.youtube.com` hostname

* Update datasets.py
2022-04-01 21:38:49 +02:00
Glenn Jocher 2c3221844b
CLI `fire` prep updates (#7229)
* CLI fire prep updates

* revert unintentional TF export change
2022-03-31 17:11:43 +02:00
Jirka Borovec c3d5ac151e
precommit: yapf (#5494)
* precommit: yapf

* align isort

* fix

# Conflicts:
#	utils/plots.py

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

* Update setup.cfg

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

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

* Update setup.cfg

* Update setup.cfg

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

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

* Update wandb_utils.py

* Update augmentations.py

* Update setup.cfg

* Update yolo.py

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

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

* Update val.py

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

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

* simplify colorstr

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

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

* val run fix

* export.py last comma

* Update export.py

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

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

* Update hubconf.py

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

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

* PyTorch Hub tuple fix

* PyTorch Hub tuple fix2

* PyTorch Hub tuple fix3

* Update setup

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-03-31 16:52:34 +02:00
Glenn Jocher 3373aab56c
NMS unused variable fix (#7161)
* NMS unused variable fix

* Update general.py
2022-03-26 16:52:58 +01:00
Glenn Jocher 26bfd44465
Adjust NMS time limit warning to batch size (#7156) 2022-03-26 11:45:28 +01:00
Zengyf-CVer a4c661873f
Fix `detect.py --view-img` for non-ASCII paths (#7093)
* Update detect.py

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

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

* Update general.py

* Update detect.py

* Update general.py

* Update general.py

* Update general.py

* Update general.py

* Update general.py

* Update general.py

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

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

* Update general.py

* Update general.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-03-25 13:40:55 +01:00
RcINS d115bbf509
Fix `cv2.imwrite` on non-ASCII paths (#7139)
* Fix imwrite on non-ASCII paths

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

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

* Update general.py

* Update __init__.py

* Update __init__.py

* Update datasets.py

* Update hubconf.py

* Update detect.py

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

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

* Update general.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-03-25 13:25:30 +01:00
yeshanliu bc3ed957ce
`np.fromfile()` Chinese image paths fix (#6979)
* 🎉 🆕 now can read Chinese image path. 

use "cv2.imdecode(np.fromfile(f, np.uint8), cv2.IMREAD_COLOR)" instead of "cv2.imread(f)" for Chinese image path.

* Update datasets.py

* Update __init__.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-03-23 15:35:15 +01:00
Glenn Jocher c3ae4e4af6
Multi-threaded VisDrone and VOC downloads (#7108)
* Multi-threaded VOC download

* Update VOC.yaml

* Update

* Update general.py

* Update general.py
2022-03-23 01:19:37 +01:00
Glenn Jocher 6134ec5d94
Model summary `pathlib` fix (#7104)
Stems not working correctly for YOLOv5l with current .rstrip() implementation. After fix:
```
YOLOv5l summary: 468 layers, 46563709 parameters, 46563709 gradients, 109.3 GFLOPs
```
2022-03-22 20:05:07 +01:00
Glenn Jocher ee0b3b2a95
Update benchmarks significant digits (#7103) 2022-03-22 18:02:35 +01:00
Glenn Jocher 05aae17333
`torch.split()` 1.7.0 compatibility fix (#7102)
* Update loss.py

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

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

* Update loss.py

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-03-22 17:36:05 +01:00
Glenn Jocher a600baed8e
Update model summary to display model name (#7101) 2022-03-22 15:41:19 +01:00
Glenn Jocher a2d617ece9
Update loss for FP16 `tobj` (#7088) 2022-03-21 19:18:34 +01:00
Glenn Jocher 6f128031d0
Update loss.py with `if self.gr < 1:` (#7087)
* Update loss.py with `if self.gr < 1:`

* Update loss.py
2022-03-21 18:35:36 +01:00
Glenn Jocher 9cd89b75cc
Fix2 `check_anchor_order()` in pixel-space not grid-space (#7067)
Follows https://github.com/ultralytics/yolov5/pull/7060 which provided only a partial solution to this issue. #7060 resolved occurences in yolo.py, this applies the same fix in autoanchor.py.
2022-03-20 18:55:13 +01:00
Glenn Jocher 178c109576
Add non-zero `da` `check_anchor_order()` condition (#7066) 2022-03-20 18:37:27 +01:00
Glenn Jocher 9e75cbf4c1
Update __init__.py (#7065) 2022-03-20 18:17:04 +01:00
Glenn Jocher e278fd63ec
Update W&B message to `LOGGER.info()` (#7064) 2022-03-20 18:15:22 +01:00
Glenn Jocher f327eee614
Fix `check_anchor_order()` in pixel-space not grid-space (#7060)
* Update `check_anchor_order()`

Use mean area per output layer for added stability.

* Check in pixel-space not grid-space fix
2022-03-20 16:27:51 +01:00
Philip Gutjahr 529fbc1814
Use PIL to eliminate chroma subsampling in crops (#7008)
* use pillow to save higher-quality jpg (w/o color subsampling)

* Cleanup and doc issue

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-03-20 15:46:29 +01:00
Glenn Jocher 9f4d11379b
Fix incomplete URL substring sanitation (#7056)
Resolves code scanning alert in https://github.com/ultralytics/yolov5/issues/7055
2022-03-20 14:18:05 +01:00
Glenn Jocher b0ba101ac0
`ComputeLoss()` indexing/speed improvements (#7048)
* device as class attribute

* Update loss.py

* Update loss.py

* improve zeros

* tensor split
2022-03-20 01:04:48 +01:00
Max Strobel 7c6a33564a
fix: add default PIL font as fallback (#7010)
* fix: add default font as fallback

Add default font as fallback if the downloading of the Arial.ttf font
fails for some reason, e.g. no access to public internet.

* Update plots.py

Co-authored-by: Maximilian Strobel <Maximilian.Strobel@infineon.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-03-17 16:37:09 +01:00
Glenn Jocher 3f634d43c8
Conditional `Timeout()` by OS (disable on Windows) (#7013)
* Conditional `Timeout()` by OS (disable on Windows)

* Update general.py
2022-03-16 15:33:54 +01:00
Glenn Jocher c09fb2aa95
Update TQDM bar format (#6988) 2022-03-15 16:32:56 +01:00
Glenn Jocher 932dc78496
YOLOv5 Export Benchmarks for GPU (#6963)
* Add benchmarks.py GPU support

* Updates

* Updates

* Updates

* Updates

* Add --half

* Add TRT requirements

* Cleanup

* Add TF to warmup types

* Update export.py

* Update export.py

* Update benchmarks.py
2022-03-14 15:07:13 +01:00
Glenn Jocher caf7ad0500
Allow 3-point segments (#6938)
May resolve https://github.com/ultralytics/yolov5/issues/6931
2022-03-10 18:41:47 +01:00
Glenn Jocher 6dd82c0252
Move `git_describe()` to general.py (#6918)
* Move `git_describe()` to general.py

* Move `git_describe()` to general.py
2022-03-09 18:22:53 +01:00
Glenn Jocher e6e36aac10
Update bytes to GB with bitshift (#6886) 2022-03-07 19:26:37 +01:00
Glenn Jocher 4728840745
Update `--cache disk` deprecate `*_npy/` dirs (#6876)
* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Cleanup

* Cleanup
2022-03-06 16:16:17 +01:00
Glenn Jocher 8a66ebad44
Add `*.ts` to `VID_FORMATS` (#6859) 2022-03-04 14:10:13 +01:00
Glenn Jocher 601dbb83f0
AutoAnchor improved initialization robustness (#6854)
* Update AutoAnchor

* Update AutoAnchor

* [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-03-04 10:32:18 +01:00
Louis Combaldieu bcc92e2169
Update sweep.yaml (#6825)
* Update sweep.yaml

Changed focal loss gamma search range between 1 and 4

* Update sweep.yaml

lowered the min value to match default
2022-03-04 09:39:23 +01:00
Glenn Jocher 63ddb6f0d0
Update autoanchor.py (#6794)
* Update autoanchor.py

* Update autoanchor.py
2022-02-26 19:15:12 +01:00
Glenn Jocher 0f819919ad
Update EMA decay `tau` (#6769)
* Update EMA

* Update EMA

* ratio invert

* fix ratio invert

* fix2 ratio invert

* warmup iterations to 100

* ema_k

* implement tau

* implement tau
2022-02-25 12:33:09 +01:00
Glenn Jocher c161557563
Default `OMP_NUM_THREADS=8` (#6770) 2022-02-25 00:09:14 +01:00
Glenn Jocher 2692e67c5f
Updated VOC hyperparameters (#6732)
* Update hyps

* Update hyp.VOC.yaml

* Update pathlib

* Update hyps

* Update hyps

* Update hyps

* Update hyps
2022-02-22 12:11:18 +01:00
Glenn Jocher c43f135571
Update `nw` to `max(nd, 1)` (#6714) 2022-02-20 21:47:46 +01:00
Glenn Jocher 4de8b24881
Suppress `torch` AMP-CPU warnings (#6706)
This is a torch bug, but they seem unable or unwilling to fix it so I'm creating a suppression in YOLOv5. 

Resolves https://github.com/ultralytics/yolov5/issues/6692
2022-02-19 16:48:33 +01:00
Samuel Yvon 0365379016
Fix floating point in number of workers `nw` (#6701)
Integer division by a float yields a (rounded) float. This causes
the dataloader to crash when creating a range.
2022-02-18 21:06:21 +01:00
Glenn Jocher 2e5c67e537
Robust `scipy.cluster.vq.kmeans` too few points (#6668)
* Handle `scipy.cluster.vq.kmeans` too few points

Resolves #6664

* Update autoanchor.py

* Cleanup
2022-02-17 12:55:03 +01:00
Glenn Jocher 1ff43702a8
Validate with 2x `--workers` single-GPU/CPU fix (#6659)
Fix for #6658 for single-GPU and CPU training use cases
2022-02-16 14:50:37 +01:00
Glenn Jocher 6769021901
Validate with 2x `--workers` (#6658) 2022-02-16 14:44:44 +01:00
imyhxy ca0a00784d
Fixed wandb logger KeyError (#6637) 2022-02-14 17:08:36 +01:00
Glenn Jocher 538930023c
Fix ConfusionMatrix scale `vmin=0.0` (#6638)
Fix attempt for https://github.com/ultralytics/yolov5/issues/6626
2022-02-14 14:54:55 +01:00
Glenn Jocher a45e472358
YOLOv5 Export Benchmarks (#6613)
* Add benchmarks.py

* Update

* Add requirements

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* dataset autodownload from root

* Update

* Redirect to /dev/null

* sudo --help

* Cleanup

* Add exports pd df

* Updates

* Updates

* Updates

* Cleanup

* dir handling fix

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

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

* Cleanup

* Cleanup2

* Cleanup3

* Cleanup model_type

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-02-12 16:05:43 +01:00
Ayush Chaurasia 96d8f86085
W&B: don't log media in evolve (#6617) 2022-02-12 13:04:50 +01:00
Ayush Chaurasia 51f7750aad
W&B: Improve resume stability (#6611)
* log best.pt metrics at train end

* update

* Update __init__.py

* flush callbacks when using evolve

* remember batch size on resuming

* Update train.py

* improve stability of resume

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-02-12 13:03:09 +01:00
Glenn Jocher b40bdd6b2d
YouTube dependency fix `youtube_dl==2020.12.2` (#6612)
Per https://github.com/ultralytics/yolov5/issues/5860#issuecomment-1035320018 by @hdnh2006
2022-02-11 13:46:20 +01:00
or-toledano cb2ad9f685
Fix `ROOT / data` when running W&B `log_dataset()` (#6606)
* Fix missing data folder when running log_dataset

* Use ROOT/'data'

* PEP8 whitespace
2022-02-10 16:17:47 +01:00
Glenn Jocher c21da596f3
Fix `hyp_evolve.yaml` indexing bug (#6604)
* Fix `hyp_evolve.yaml` indexing bug

Bug caused hyp_evolve.yaml to display latest generation result rather than best generation result.

* Update plots.py

* Update general.py

* Update general.py

* Update general.py
2022-02-10 14:51:29 +01:00
Glenn Jocher 364b7c5111
Fix YouTube dislike button bug in `pafy` package (#6603)
Per https://github.com/ultralytics/yolov5/issues/6583#issuecomment-1034421945 by @alicera
2022-02-10 13:13:44 +01:00
Glenn Jocher 9c513ca629
Add `DATASETS_DIR` global in general.py (#6578) 2022-02-08 22:20:44 +01:00
Glenn Jocher f627bc53f8
Fix `plot_labels()` colored histogram bug (#6574)
* Fix `plot_labels()` colored histogram bug

* Cleanup
2022-02-08 14:03:50 +01:00