Commit Graph

55 Commits (c568972d597ee2fa14525a739d8acb284fc19c87)

Author SHA1 Message Date
Paula Derrenger c568972d59
Standardize license headers in Python files (#13490)
* Refactor code for speed and clarity

* Auto-format by https://ultralytics.com/actions

---------

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
2025-01-15 15:31:19 +01:00
Glenn Jocher f44db01005
PyUpgrade 3.8 updates (#13289)
* PyUpgrade 3.8 updates

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

* Auto-format by https://ultralytics.com/actions

---------

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
2024-09-01 17:35:08 +02:00
Glenn Jocher c5ffbbf1c3
Add https://www.reddit.com/r/Ultralytics/ badge (#13284)
* Refactor code for speed and clarity

* Update README.zh-CN.md

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

---------

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
2024-08-26 15:46:32 +02:00
Glenn Jocher b40781b3e3
Update README.md (#13283)
* Update README.md

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

* Auto-format by https://ultralytics.com/actions

---------

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
2024-08-26 02:37:25 +02:00
Glenn Jocher c07b9a8b8c
Apply Ruff Docstring reformat (#13278)
* Apply Ruff Docstring reformat

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

* Auto-format by https://ultralytics.com/actions

* Update export.py

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

---------

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Ultralytics Assistant <135830346+UltralyticsAssistant@users.noreply.github.com>
2024-08-25 05:45:33 +08:00
Ultralytics Assistant 3ec95f9e3d
Update header line in Python files (#13072)
* Add license line to .github/ISSUE_TEMPLATE/bug-report.yml

* Add license line to .github/ISSUE_TEMPLATE/config.yml

* Add license line to .github/ISSUE_TEMPLATE/feature-request.yml

* Add license line to .github/ISSUE_TEMPLATE/question.yml

* Add license line to .github/dependabot.yml

* Add license line to .github/workflows/ci-testing.yml

* Add license line to .github/workflows/cla.yml

* Add license line to .github/workflows/codeql-analysis.yml

* Add license line to .github/workflows/docker.yml

* Add license line to .github/workflows/format.yml

* Add license line to .github/workflows/greetings.yml

* Add license line to .github/workflows/links.yml

* Add license line to .github/workflows/merge-main-into-prs.yml

* Add license line to .github/workflows/stale.yml

* Add license line to benchmarks.py

* Add license line to classify/predict.py

* Add license line to classify/train.py

* Add license line to classify/val.py

* Add license line to data/Argoverse.yaml

* Add license line to data/GlobalWheat2020.yaml

* Add license line to data/ImageNet.yaml

* Add license line to data/ImageNet10.yaml

* Add license line to data/ImageNet100.yaml

* Add license line to data/ImageNet1000.yaml

* Add license line to data/Objects365.yaml

* Add license line to data/SKU-110K.yaml

* Add license line to data/VOC.yaml

* Add license line to data/VisDrone.yaml

* Add license line to data/coco.yaml

* Add license line to data/coco128-seg.yaml

* Add license line to data/coco128.yaml

* Add license line to data/hyps/hyp.Objects365.yaml

* Add license line to data/hyps/hyp.VOC.yaml

* Add license line to data/hyps/hyp.no-augmentation.yaml

* Add license line to data/hyps/hyp.scratch-high.yaml

* Add license line to data/hyps/hyp.scratch-low.yaml

* Add license line to data/hyps/hyp.scratch-med.yaml

* Add license line to data/xView.yaml

* Add license line to detect.py

* Add license line to export.py

* Add license line to hubconf.py

* Add license line to models/common.py

* Add license line to models/experimental.py

* Add license line to models/hub/anchors.yaml

* Add license line to models/hub/yolov3-spp.yaml

* Add license line to models/hub/yolov3-tiny.yaml

* Add license line to models/hub/yolov3.yaml

* Add license line to models/hub/yolov5-bifpn.yaml

* Add license line to models/hub/yolov5-fpn.yaml

* Add license line to models/hub/yolov5-p2.yaml

* Add license line to models/hub/yolov5-p34.yaml

* Add license line to models/hub/yolov5-p6.yaml

* Add license line to models/hub/yolov5-p7.yaml

* Add license line to models/hub/yolov5-panet.yaml

* Add license line to models/hub/yolov5l6.yaml

* Add license line to models/hub/yolov5m6.yaml

* Add license line to models/hub/yolov5n6.yaml

* Add license line to models/hub/yolov5s-LeakyReLU.yaml

* Add license line to models/hub/yolov5s-ghost.yaml

* Add license line to models/hub/yolov5s-transformer.yaml

* Add license line to models/hub/yolov5s6.yaml

* Add license line to models/hub/yolov5x6.yaml

* Add license line to models/segment/yolov5l-seg.yaml

* Add license line to models/segment/yolov5m-seg.yaml

* Add license line to models/segment/yolov5n-seg.yaml

* Add license line to models/segment/yolov5s-seg.yaml

* Add license line to models/segment/yolov5x-seg.yaml

* Add license line to models/tf.py

* Add license line to models/yolo.py

* Add license line to models/yolov5l.yaml

* Add license line to models/yolov5m.yaml

* Add license line to models/yolov5n.yaml

* Add license line to models/yolov5s.yaml

* Add license line to models/yolov5x.yaml

* Add license line to pyproject.toml

* Add license line to segment/predict.py

* Add license line to segment/train.py

* Add license line to segment/val.py

* Add license line to train.py

* Add license line to utils/__init__.py

* Add license line to utils/activations.py

* Add license line to utils/augmentations.py

* Add license line to utils/autoanchor.py

* Add license line to utils/autobatch.py

* Add license line to utils/aws/resume.py

* Add license line to utils/callbacks.py

* Add license line to utils/dataloaders.py

* Add license line to utils/downloads.py

* Add license line to utils/flask_rest_api/example_request.py

* Add license line to utils/flask_rest_api/restapi.py

* Add license line to utils/general.py

* Add license line to utils/google_app_engine/app.yaml

* Add license line to utils/loggers/__init__.py

* Add license line to utils/loggers/clearml/clearml_utils.py

* Add license line to utils/loggers/clearml/hpo.py

* Add license line to utils/loggers/comet/__init__.py

* Add license line to utils/loggers/comet/comet_utils.py

* Add license line to utils/loggers/comet/hpo.py

* Add license line to utils/loggers/wandb/wandb_utils.py

* Add license line to utils/loss.py

* Add license line to utils/metrics.py

* Add license line to utils/plots.py

* Add license line to utils/segment/augmentations.py

* Add license line to utils/segment/dataloaders.py

* Add license line to utils/segment/general.py

* Add license line to utils/segment/loss.py

* Add license line to utils/segment/metrics.py

* Add license line to utils/segment/plots.py

* Add license line to utils/torch_utils.py

* Add license line to utils/triton.py

* Add license line to val.py

* Auto-format by https://ultralytics.com/actions

* Update ImageNet1000.yaml

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

* Auto-format by https://ultralytics.com/actions

---------

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2024-06-08 22:29:29 +02:00
Glenn Jocher 41603da162
Add docstrings to YOLOv5 functions (#12760)
* Add docstrings to top level files

* Auto-format by https://ultralytics.com/actions

* Add docstrings

* Auto-format by https://ultralytics.com/actions

* Add docstrings

* Auto-format by https://ultralytics.com/actions

* Add docstrings

* Add docstrings

* Auto-format by https://ultralytics.com/actions

* Add docstrings

* Add docstrings

* Auto-format by https://ultralytics.com/actions

* Add docstrings

* Auto-format by https://ultralytics.com/actions

* Add docstrings

* Auto-format by https://ultralytics.com/actions

* Add docstrings

* Auto-format by https://ultralytics.com/actions

* Add docstrings

* Auto-format by https://ultralytics.com/actions

* Add docstrings

* Auto-format by https://ultralytics.com/actions

* Add docstrings

* Add docstrings

* Auto-format by https://ultralytics.com/actions

* Add docstrings

* Auto-format by https://ultralytics.com/actions

* Add docstrings

* Auto-format by https://ultralytics.com/actions

* Add docstrings

* Auto-format by https://ultralytics.com/actions

* Add docstrings

* Auto-format by https://ultralytics.com/actions

* Add docstrings

* Auto-format by https://ultralytics.com/actions

* Add docstrings

* Auto-format by https://ultralytics.com/actions

* Update activations.py

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

* Auto-format by https://ultralytics.com/actions

---------

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
2024-02-25 14:04:01 +01:00
Paula Derrenger ad97dc6a6d
Update Actions with Lychee and GitHub Token (#12592)
* Add Ultralytics Actions

* Auto-format by Ultralytics actions

* Update format.yml

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

---------

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2024-01-08 01:29:14 +01:00
Glenn Jocher 34cf749958
Update LICENSE to AGPL-3.0 (#11359)
* Update LICENSE to AGPL-3.0

This pull request updates the license of the YOLOv5 project from GNU General Public License v3.0 (GPL-3.0) to GNU Affero General Public License v3.0 (AGPL-3.0).

We at Ultralytics have decided to make this change in order to better protect our intellectual property and ensure that any modifications made to the YOLOv5 source code will be shared back with the community when used over a network.

AGPL-3.0 is very similar to GPL-3.0, but with an additional clause to address the use of software over a network. This change ensures that if someone modifies YOLOv5 and provides it as a service over a network (e.g., through a web application or API), they must also make the source code of their modified version available to users of the service.

This update includes the following changes:
- Replace the `LICENSE` file with the AGPL-3.0 license text
- Update the license reference in the `README.md` file
- Update the license headers in source code files

We believe that this change will promote a more collaborative environment and help drive further innovation within the YOLOv5 community.

Please review the changes and let us know if you have any questions or concerns.


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

* Update headers to AGPL-3.0

---------

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2023-04-14 14:36:16 +02:00
Glenn Jocher 7a972e86c4
Update .pre-commit-config.yaml (#11009)
* Update .pre-commit-config.yaml

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 __init__.py

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

* Update .pre-commit-config.yaml

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

* Pre-commit updates

* Pre-commit updates

---------

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>
2023-02-18 01:06:24 +01:00
ZhuGeRoastedFish 3a059125dd
Fx confusion-matrix xlabel typo (#10692)
fix confusion-matrix xlabel typo

Signed-off-by: ZhuGeRoastedFish <77224640+ZhuGeRoastedFish@users.noreply.github.com>

Signed-off-by: ZhuGeRoastedFish <77224640+ZhuGeRoastedFish@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2023-01-14 14:43:27 +01:00
Hu Ye e808f2267d
Eliminate unused `ConfusionMatrix.matrix()` method (#10309)
* fix bug in confusion_matrix

Signed-off-by: Hu Ye <xiaohuzc@gmail.com>

* Update metrics.py

* Update metrics.py

* Update metrics.py

Signed-off-by: Hu Ye <xiaohuzc@gmail.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-11-29 19:32:34 -08:00
Glenn Jocher 31c1f11186
`bbox_iou()` optimizations (#10296)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-11-25 15:28:50 -08:00
Glenn Jocher 078059c5b3
Update IoU functions (#10123)
Remove box area function and support expandable bbox_iou() calls.

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-11-10 18:32:34 +01:00
Glenn Jocher 78ed31c95a
IoU `eps` adjustment (#10051)
IoU eps adjustment

Unify h1 and h2 with eps values

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-11-06 15:06:18 +01:00
Glenn Jocher e3ff780676
Allow PyTorch Hub results to display in notebooks (#9825)
* Allow PyTorch Hub results to display in notebooks

* fix CI

* fix CI

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

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

* fix CI

* fix CI

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

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

* fix CI

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

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

* fix CI

* fix CI

* fix CI

* fix CI

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

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

* fix CI

* fix CI

* fix CI

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-17 14:34:33 +02:00
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
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 15e82d2967
Update `TryExcept(msg='...')`` (#9261) 2022-09-02 16:24:30 +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 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
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
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
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
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
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 8a4175cde0
Add smoothing to curve plots and max F1 index (#7798)
@sergiossm
2022-05-13 13:53:21 +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
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
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 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
Jirka Borovec cba4303d32
Fix 6 Flake8 issues (#6541)
* F541

* F821

* F841

* E741

* E302

* E722

* Apply suggestions from code review

* Update general.py

* Update datasets.py

* Update export.py

* Update plots.py

* Update plots.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-02-05 15:22:59 +01:00
Chen Gen affa284352
Refactor/reduce G/C/D/IoU `if: else` statements (#6087)
* Refactor the code to reduece else

* Update metrics.py

* Cleanup

Co-authored-by: Cmos <gen.chen@ubisoft.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-12-30 13:59:29 -08:00
JieLi afa5cfb0f8
Reduce G/D/CIoU logic operations (#6074)
Consider that the default value is CIOU,adjust the order of judgment could reduce the number of judgments.
And “elif CIoU:” didn't need 'if'.

Co-authored-by: 李杰 <360751194@qq.comqq.com>
2021-12-23 11:53:00 +01:00
Glenn Jocher 36d12a500e
Explicitly compute TP, FP in val.py (#5727) 2021-11-20 01:04:56 +01:00
NauchtanRobotics 0be58f16f0
Adjust legend labels for classes without instances (#5174)
* legend-labels Adjust legend labels for classes without instances.

* #5158 Re-indexed series names: only classes containing data.

* #5158 Re-indexed series names: only classes containing data.

* Cleanup

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2021-10-14 11:57:00 -07:00
Glenn Jocher bb5ebc290e
Close `matplotlib` plots after opening (#4612)
* Close plots

* Replace fig.close() for plt.close()
2021-08-30 17:22:21 +02:00
Glenn Jocher 8ac96b7975
Fix for AP calculation limits 0.0 - 1.0 (#4563)
This PR brings alignment in AP computation practices with Detectron2 and MMDetection. 

Problem first noted by @yusiyoh in https://github.com/ultralytics/yolov5/issues/4546
2021-08-27 13:23:29 +02:00
Glenn Jocher 24bea5e4b7
Standardize headers and docstrings (#4417)
* Implement new headers

* Reformat 1

* Reformat 2

* Reformat 3 - math

* Reformat 4 - yaml
2021-08-14 21:17:51 +02:00
Glenn Jocher c6c88dc601
Copy-Paste augmentation for YOLOv5 (#3845)
* Copy-paste augmentation initial commit

* if any segments

* Add obscuration rejection

* Add copy_paste hyperparameter

* Update comments
2021-07-01 00:35:04 +02:00
Glenn Jocher 5ea771d93d
Move IoU functions to metrics.py (#3820) 2021-06-29 13:18:13 +02:00
Glenn Jocher e8c5237403
ConfusionMatrix `normalize=True` fix (#3587) 2021-06-11 11:46:05 +02:00
Glenn Jocher ec2da4a82c
Add ConfusionMatrix `normalize=True` flag (#3586) 2021-06-11 11:37:08 +02:00
Glenn Jocher 095197bd4a
Ignore Seaborn plot warnings (#3576)
* Ignore Seaborn plot warnings

* Update plots.py

* Update metrics.py
2021-06-10 13:51:29 +02:00
Michael Heilig d48a34dca7
bug fix: switched rows and cols for correct detections in confusion matrix (#2883) 2021-04-22 00:49:55 +02:00
Ryan Avery 2c56ad5436
Confusion matrix background axis swap (#2114) 2021-03-02 16:09:52 -08:00
Glenn Jocher f639e14e4d
Metric-Confidence plots feature addition (#2057)
* Metric-Confidence plots feature addition

* cleanup

* Metric-Confidence plots feature addition

* cleanup

* Update run-once lines

* cleanup

* save all 4 curves to wandb
2021-01-27 17:10:53 -08:00
Glenn Jocher 0bb43953eb
Reinstate PR curve sentinel values (#1645) 2020-12-08 17:40:49 -08:00