Commit Graph

1060 Commits (3a059125dd7b01c76b7a02b59814ed5bc32d9ac4)

Author SHA1 Message Date
Glenn Jocher ca9c993d6c
Standardize warnings with `WARNING ⚠️ ...` (#9467)
* Standardize warnings

* [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-09-18 16:15:25 +02:00
Glenn Jocher 95cef1ae6b
Optimize imports (#9464)
* Optimize imports

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

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

* Reformat

* [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-09-18 12:42:23 +02:00
Junjie Zhang 8ae81a6c87
Fix cutout bug (#9452)
* fix cutout bug

Signed-off-by: Junjie Zhang <46258221+Oswells@users.noreply.github.com>

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

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

Signed-off-by: Junjie Zhang <46258221+Oswells@users.noreply.github.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-09-18 12:27:43 +02:00
Glenn Jocher afb9860522
Add Paddle exports to benchmarks (#9459)
* Add Paddle exports to benchmarks

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

* Update plots.py

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

* Update common.py

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-09-18 00:17:31 +02:00
Glenn Jocher 6a9fffd19a
Update general.py (#9454)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-09-17 15:42:24 +02:00
Glenn Jocher 4a4308001c
Do not move downloaded zips (#9455)
* Do not move downloaded zips

Prevent multiple downloads on HUB of same dataset

@kalenmike 

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

* Update general.py

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-09-17 15:19:43 +02:00
Glenn Jocher 5e1a9553fb
AutoBatch `cudnn.benchmark=True` fix (#9448)
* AutoBatch `cudnn.benchmark=True` fix

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

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

* Update autobatch.py

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

* Update autobatch.py

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

* Update general.py

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-09-16 21:46:07 +02:00
Hoyeong-GenGenAI c7a2d6bcf4
Fix tick labels for background FN/FP (#9414)
* Fix tick labels for background FN/FP

In the confusion matrix.

* Remove FP/FN from the background labels of the confusion matrix

* Update metrics.py

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-09-16 11:53:18 +02:00
Ayush Chaurasia f9869f7ffd
YOLOv5 segmentation model support (#9052)
* [pre-commit.ci] auto fixes from pre-commit.com hooks

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

* Fix duplicate plots.py

* Fix check_font()

* # torch.use_deterministic_algorithms(True)

* update doc detect->predict

* Resolve precommit for segment/train and segment/val

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

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

* Resolve precommit for utils/segment

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

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

* Resolve precommit min_wh

* Resolve precommit utils/segment/plots

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

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

* Resolve precommit utils/segment/general

* Align NMS-seg closer to NMS

* restore deterministic init_seeds code

* remove easydict dependency

* update

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

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

* restore output_to_target mask

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

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

* update

* cleanup

* Remove unused ImageFont import

* Unified NMS

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

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

* DetectMultiBackend compatibility

* segment/predict.py update

* update plot colors

* fix bbox shifted

* sort bbox by confidence

* enable overlap by default

* Merge detect/segment output_to_target() function

* Start segmentation CI

* fix plots

* Update ci-testing.yml

* fix training whitespace

* optimize process mask functions (can we merge both?)

* Update predict/detect

* Update plot_images

* Update plot_images_and_masks

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

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

* fix

* Add train to CI

* fix precommit

* fix precommit CI

* fix precommit pycocotools

* fix val float issues

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

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

* fix masks float float issues

* suppress errors

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

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

* fix no-predictions plotting bug

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

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

* Add CSV Logger

* fix val len(plot_masks)

* speed up evaluation

* fix process_mask

* fix plots

* update segment/utils build_targets

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

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

* optimize utils/segment/general crop()

* optimize utils/segment/general crop() 2

* minor updates

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

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

* torch.where revert

* downsample only if different shape

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

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

* loss cleanup

* loss cleanup 2

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

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

* loss cleanup 3

* update project names

* Rename -seg yamls from _underscore to -dash

* prepare for yolov5n-seg.pt

* precommit space fix

* add coco128-seg.yaml

* update coco128-seg comments

* cleanup val.py

* Major val.py cleanup

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

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

* precommit fix

* precommit fix

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

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

* optional pycocotools

* remove CI pip install pycocotools (auto-installed now)

* seg yaml fix

* optimize mask_iou() and masks_iou()

* threaded fix

* Major train.py update

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

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

* Major segments/val/process_batch() update

* yolov5/val updates from segment

* process_batch numpy/tensor fix

* opt-in to pycocotools with --save-json

* threaded pycocotools ops for 2x speed increase

* Avoid permute contiguous if possible

* Add max_det=300 argument to both val.py and segment/val.py

* fix onnx_dynamic

* speed up pycocotools ops

* faster process_mask(upsample=True) for predict

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

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

* eliminate permutations for process_mask(upsample=True)

* eliminate permute-contiguous in crop(), use native dimension order

* cleanup comment

* Add Proto() module

* fix class count

* fix anchor order

* broadcast mask_gti in loss for speed

* Cleanup seg loss

* faster indexing

* faster indexing fix

* faster indexing fix2

* revert faster indexing

* fix validation plotting

* Loss cleanup and mxyxy simplification

* Loss cleanup and mxyxy simplification 2

* revert validation plotting

* replace missing tanh

* Eliminate last permutation

* delete unneeded .float()

* Remove MaskIOULoss and crop(if HWC)

* Final v6.3 SegmentationModel architecture updates

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

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

* Add support for TF export

* remove debugger trace

* add call

* update

* update

* Merge master

* Merge master

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

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

* Update dataloaders.py

* Restore CI

* Update dataloaders.py

* Fix TF/TFLite export for segmentation model

* Merge master

* Cleanup predict.py mask plotting

* cleanup scale_masks()

* rename scale_masks to scale_image

* cleanup/optimize plot_masks

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

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

* Add Annotator.masks()

* Annotator.masks() fix

* Update plots.py

* Annotator mask optimization

* Rename crop() to crop_mask()

* Do not crop in predict.py

* crop always

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

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

* Merge master

* Add vid-stride from master PR

* Update seg model outputs

* Update seg model outputs

* Add segmentation benchmarks

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

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

* Add segmentation benchmarks

* Add segmentation benchmarks

* Add segmentation benchmarks

* Fix DetectMultiBackend for OpenVINO

* update Annotator.masks

* fix val plot

* revert val plot

* clean up

* revert pil

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

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

* Fix CI error

* fix predict log

* remove upsample

* update interpolate

* fix validation plot logging

* Annotator.masks() cleanup

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

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

* Remove segmentation_model definition

* Restore 0.99999 decimals

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>
Co-authored-by: Laughing-q <1185102784@qq.com>
Co-authored-by: Jiacong Fang <zldrobit@126.com>
2022-09-16 00:12:46 +02:00
Glenn Jocher 23701eac7a
AMP Check fix (#9367)
Resolves https://github.com/ultralytics/yolov5/issues/9365

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-09-11 13:56:51 +03:00
Glenn Jocher 2b5c9a83ec
labels.jpg names fix (#9361)
Partially resolves https://github.com/ultralytics/yolov5/issues/9360

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-09-10 22:24:46 +03:00
Katteria e3e5122f82
Add PaddlePaddle export and inference (#9240)
* Add PaddlePaddle Model Export

Test on Yolov5 DockerEnviroment with paddlepaddle-gpu v2.2

Signed-off-by: Katteria <39751846+kisaragychihaya@users.noreply.github.com>

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

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

* Cleanup Paddle Export

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

* Update common.py

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

* Update export.py

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

* Update export.py

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

* Update export.py

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

* Update export.py

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

* Use PyTorch2Paddle

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

* Paddle no longer requires ONNX

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

* Update export.py

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

* Update export.py

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

* Update benchmarks.py

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

* Add inference code of PaddlePaddle

Signed-off-by: Katteria <39751846+kisaragychihaya@users.noreply.github.com>

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

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

* Update common.py

Signed-off-by: Katteria <39751846+kisaragychihaya@users.noreply.github.com>

* Update common.py

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

* Add paddlepaddle-gpu install if cuda

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

* Update common.py

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

* Update common.py

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

* Update common.py

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

Signed-off-by: Katteria <39751846+kisaragychihaya@users.noreply.github.com>
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>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-09-10 12:20:46 +03:00
Glenn Jocher 57ef676af2
Update `check_requirements()` multiple string (#9356)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-09-10 12:14:31 +03:00
Glenn Jocher e9ddc5b527
Update `check_requirements(args, cmds='')` (#9355)
* Update `check_requirements(args, cmds='')`

* [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-09-10 12:00:16 +03:00
Glenn Jocher 24bf9cceb4
Update `check_requirements()` single install (#9353)
* Update `check_requirements()` single install

Faster install and better conflict resolution with single installation

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

* Update

* Update

* Update

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-09-10 11:11:56 +03:00
黄不盈 8aa196ce08
Add dilated conv support (#9347)
* added dilate conv support

* added dilate conv support

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

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

* Update common.py

* Update common.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-09-10 00:16:07 +03:00
Dhruv Nair 5f075eedf2
Comet changes (#9328)
* add link to comte tutorial from  main README

* fix prediction interval bug
2022-09-08 18:17:14 +03:00
Dhruv Nair 903b239f13
Comet Logging and Visualization Integration (#9232)
* add comet to logger interface

* add comet logger

* add support for updated parameters

* clean up offline logger creation

* update callback args for comet logger

* add comet optimizer

* add optimizer config

* add comet README

* update tutorial notebook with Comet section

* add option to log class level metrics

* add support for class level metrics and confusion matrix

* handle errors when adding files to artifacts

* fix typo

* clean resume workflow

* updates for HPO

* update comet README

* fix typo in comet README

* update code snippets in comet README

* update comet links in tutorial

* updated links

* change optimizer batch size param and update comet README image

* update comet section in tutorial

* use prexisting cmd line flags to configure logger

* update artifact upload/download flow

* remove come remove comet logger specific cmd line args

* move downloading weights into comet logger code

* remove extra argparse

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

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

* change checkpoint logging flow to follow offline logger

* update resume flow

* add comet logger to remote dataset property

* update cmd line args in hpo

* set types for integer/float env variables

* update README

* fix typo in README

* default to always logging model predictions

* Update tutorial.ipynb

* Update train.py

* Add Comet to Integrations table

* Update README.md

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

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

Co-authored-by: Ayush Chaurasia <ayush.chaurarsia@gmail.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-09-07 18:28:46 +03:00
Glenn Jocher 5a134e0653
Replace deprecated `np.int` with `int` (#9307)
Per 
```
/content/yolov5/utils/dataloaders.py:458: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
```

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-09-07 10:11:30 +03:00
VELC 1aea74cddb
Add new `--vid-stride` inference parameter for videos (#9256)
* fps feature/skip frame added

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

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

* predict.py updates

* Update dataloaders.py

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

* Update dataloaders.py

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

* remove unused attribute

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

* Cleanup

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

* Update predict.py

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

* Update detect.py

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

* Update dataloaders.py

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

* Rename skip_frame to vid_stride

* cleanup

* cleanup2

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>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-09-04 17:15:53 +02:00
Glenn Jocher e45d335bbc
Update benchmarks CI with `--hard-fail` min metric floor (#9276)
* Update benchmarks CI with min metric floor

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

* Update ci-testing.yml

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

* Update benchmarks.py

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

* Update benchmarks.py

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

* Update benchmarks.py

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

* Update benchmarks.py

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-09-04 16:35:16 +02:00
Glenn Jocher 7aa263c5f2
Update DetectMultiBackend for tuple outputs 2 (#9275)
* Update DetectMultiBackend for tuple outputs 2

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

* Update

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

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

* Update

* Update

* Update

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-09-04 15:39:57 +02:00
Victor Sonck 5cb9fe612a
Make sure best.pt model file is preserved ClearML (#9265)
* Make sure best.pt model file is preserved ClearML

* [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-09-03 20:49:25 +02:00
Glenn Jocher 15e82d2967
Update `TryExcept(msg='...')`` (#9261) 2022-09-02 16:24:30 +02:00
Glenn Jocher 5d4787baab
`cudnn.benchmark = True` on Seed 0 (#9259)
* `cudnn.benchmark = True` on Seed 0

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

* Update general.py

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

* Update general.py

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-09-02 16:05:23 +02:00
Glenn Jocher ffdb58b0e0
Move `cudnn.benchmarks(True)` to LoadStreams (#9258)
* Move cudnn.benchmarks(True) to LoadStreams

* Update dataloaders.py

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

* Move cudnn.benchmarks(True) to LoadStreams

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-09-02 14:12:10 +02:00
Glenn Jocher 9da6d0f9f5
Add LoadImages._cv2_rotate() (#9249)
Optional manual rotation code per iPhone rotation issue in https://github.com/ultralytics/yolov5/issues/8493

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-09-01 22:30:26 +02:00
Glenn Jocher ea98199041
Update general.py (#9252)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-09-01 19:36:27 +02:00
Ayush Chaurasia 2d082a07bd
Refactor Loggers : Move code outside train.py (#9241)
* update

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

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

* update

* update

* [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-09-01 19:17:36 +02:00
Glenn Jocher c91d1db716
Update dataloaders.py (#9250)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-09-01 14:30:21 +02:00
Glenn Jocher 223c59dbe0
Add `url_getsize()` function (#9247)
* Add `url_getsize()` function

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

* Update downloads.py

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

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-09-01 12:13:53 +02:00
Glenn Jocher 55b009616b
Python check warning emoji (#9238)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-31 18:53:46 +02:00
spacewalk01 79e181a83b
Add support for *`.pfm` images (#9230)
add support for pfm image
2022-08-31 17:31:13 +02:00
Yannick Merkli 5f1000a499
Remove usage of `pathlib.Path.unlink(missing_ok=...)` (#9227)
remove usage of pathlib.Path.unlink(missing_ok=...)

Co-authored-by: Yannick Merkli <ymerkli@latticeflow.ai>
2022-08-30 21:57:36 +02:00
Glenn Jocher 6e7a7ae7ed
New `LetterBox(size)` `CenterCrop(size)`, `ToTensor()` transforms (#9213)
* New LetterBox transform

YOLOv5 LetterBox class for image preprocessing, i.e. T.Compose([T.ToTensor(), LetterBox(size)])

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

* Update augmentations.py

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

* Update augmentations.py

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

* Update augmentations.py

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

* cleanup

* cleanup

* cleanup

* cleanup

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-30 15:17:58 +02:00
Glenn Jocher 5fb267f3e5
Duplicate segment verification fix (#9225)
Solution by @Laughing-q  to resolve duplicate segment verification bug in https://github.com/ultralytics/yolov5/pull/9052#issuecomment-1231426638

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-30 13:40:51 +02:00
Glenn Jocher 91a81d48fa
Default AutoBatch 0.8 fraction (#9212) 2022-08-29 20:41:54 +02:00
Glenn Jocher 3c64d89104
AutoBatch protect from extreme batch sizes (#9209)
If < 1 or > 1024 set output to default batch size 16.

May partially address https://github.com/ultralytics/yolov5/issues/9156

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-29 20:06:00 +02:00
Glenn Jocher da22e01a68
`check_font()` fstring update (#9208)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-29 18:10:19 +02:00
Glenn Jocher fef1913d28
`check_font()` on notebook init (#9200)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-29 15:12:15 +02:00
Glenn Jocher f65081c436
Add `check_git_status(..., branch='master')` argument (#9199)
Add check_git_status(branch='master') argument

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-29 15:00:55 +02:00
HighMans cf5d9cbc33
ClearML's set_report_period's time is defined in minutes not seconds. (#9186)
* ClearML's set_report_period's time is defined in minutes not seconds.

https://clear.ml/docs/latest/docs/references/sdk/hpo_optimization_hyperparameteroptimizer/#set_report_period

set_report_period function takes in time in terms of minutes, not seconds.

Signed-off-by: HighMans <42877729+HighMans@users.noreply.github.com>

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

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

Signed-off-by: HighMans <42877729+HighMans@users.noreply.github.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-08-29 14:58:55 +02:00
Glenn Jocher e57275a2d8
Skip AMP check on MPS (#9189)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-29 02:00:42 +02:00
Glenn Jocher 13530402f8
Fix AutoAnchor MPS bug (#9188)
Resolves https://github.com/ultralytics/yolov5/issues/8862

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-29 01:51:41 +02:00
Glenn Jocher 53711bacea
Update Dockerfile-arm64 to libpython3-dev (#9187)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-28 22:14:21 +02:00
Glenn Jocher 985e000d81
Update Dockerfile-cpu to libpython3-dev (#9185)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-28 21:48:58 +02:00
Glenn Jocher f58fe6b6c1
Update Dockerfile-cpu (#9184)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-28 21:36:05 +02:00
HighMans ffbce3858a
Fix confidence threshold for ClearML debug images (#9174)
* Fix confidence threshold

The confidence is converted to a percentage on line 144, but it is being compared to a default conf_threshold value of a decimal value instead of percent value.

Signed-off-by: HighMans <42877729+HighMans@users.noreply.github.com>

* Revert "Fix confidence threshold"

This reverts commit f84a09967f.

* Fix confidence comparison

Fix the confidence percentage is being compared to a decimal value.

Signed-off-by: HighMans <42877729+HighMans@users.noreply.github.com>
2022-08-27 01:39:11 +02:00
Glenn Jocher cff9717d73
Comment EMA assert (#9173)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-26 20:06:26 +02:00
Glenn Jocher 729dc169ba
Fixed Classify offsets (#9155) 2022-08-25 15:04:27 +02:00
Glenn Jocher d07ddc6996
New TryExcept decorator (#9154)
* New TryExcept 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-08-25 14:34:26 +02:00
Glenn Jocher f0e5a608f5
Add CSV logging to GenericLogger (#9128)
Enable CSV logging for Classify training.

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-24 12:31:50 +02:00
Ayush Chaurasia f8816f58b7
Infer Loggers project name (#9117)
* smart project name inference

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

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

* 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>
2022-08-24 12:15:37 +02:00
Glenn Jocher 51c9f92297
Streaming Classification support (#9106)
* Streaming Classification support

* Streaming Classification support

* Streaming Classification support
2022-08-23 17:54:51 +02:00
Glenn Jocher 48e56d3c9b
Add optional `transforms` argument to LoadStreams() (#9105)
* Add optional `transforms` argument to LoadStreams()

Prepare for streaming classification support

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

* Cleanup

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

* fix

* batch size > 1 fix

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-23 14:37:46 +02:00
Glenn Jocher d0fa0042bd
New `@try_export` decorator (#9096)
* New export decorator

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

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

* New export decorator

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

* rename fcn to func

* rename to @try_export

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-08-23 13:06:33 +02:00
Glenn Jocher eab35f66f9
Install `torch` latest stable (#9092)
Install torch 1.12.1 stable 

GPU assignment issues in 1.13 nightly that comes with image

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-22 22:18:01 +02:00
Glenn Jocher 0abae780b3
Remove unused Timeout import (#9073)
* Remove unused Timeout import

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

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-22 00:04:30 +02:00
Glenn Jocher db2ee5fa0c
De-thread TensorBoard graph logging (#9071)
* De-thread TensorBoard graph logging

Issues with Classification models

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

* Update __init__.py

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-21 17:07:56 +02:00
Glenn Jocher 8665d557c1
Threaded TensorBoard graph logging (#9070)
* Log TensorBoard graph on pretrain_routine_end

* fix
2022-08-21 16:51:50 +02:00
0zppd 87e8deadd5
zero-mAP fix remove `torch.empty()` forward pass in `.train()` mode (#9068)
* Fix Zero Map Issue

Signed-off-by: 0zppd <111682241+0zppd@users.noreply.github.com>

* Update __init__.py

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

Signed-off-by: 0zppd <111682241+0zppd@users.noreply.github.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-21 15:40:28 +02:00
Glenn Jocher e0700cce77
Daemon `plot_labels()` for faster start (#9057)
* Daemon `plot_labels()` for faster start

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

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

* Update train.py

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

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-21 03:47:37 +02:00
Glenn Jocher 27fb6fd8fc
zero-mAP fix 3 (#9058)
* zero-mAP fix 3

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

* Update torch_utils.py

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

* Update torch_utils.py

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

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-21 03:22:24 +02:00
Glenn Jocher 841f312f93
zero-mAP fix return `.detach()` to EMA (#9056)
Resolves https://github.com/ultralytics/hub/issues/82

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-21 02:23:39 +02:00
Glenn Jocher 93f63ee33f
Refactor for simplification 2 (#9055)
* Refactor for simplification 2

* Update __init__.py

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-21 02:00:35 +02:00
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