Commit Graph

427 Commits (fe1d4d9947735473006c68513168fef093ff17ce)

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 86fd1ab270
Apply `ruff==0.9.0` formatting (#13486)
* Refactor code for speed and clarity

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

---------

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
2025-01-10 01:42:04 +01:00
imyhxy 1435a8eed6
Add timing cache to accelerate consequent `.engine` export (#13386)
* fix: typos

* feat: enable timing cache for engine export

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

---------

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
2024-11-08 23:24:30 +01:00
Glenn Jocher 12be49963c
Ultralytics Code Refactor https://ultralytics.com/actions (#13191)
* Refactor code for speed and clarity

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

---------

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
2024-07-16 01:20:57 +02:00
Glenn Jocher ff06328498
Ultralytics Code Refactor https://ultralytics.com/actions (#13175)
* Refactor code for speed and clarity

* Update export.py

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

* Update export.py

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

* Add missing Python function docstrings

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

* Update export.py

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

* Add missing Python function docstrings

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

---------

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
2024-07-08 22:05:56 +02:00
Glenn Jocher 8257e0a68c
Ultralytics Code Refactor https://ultralytics.com/actions (#13174)
Refactor code for speed and clarity
2024-07-08 21:19:04 +02:00
Glenn Jocher b9019671f4
Ultralytics Code Refactor https://ultralytics.com/actions (#13152)
Refactor code for speed and clarity
2024-06-30 12:34:04 +02:00
Glenn Jocher dfdfbcf3d7
Code Refactor `ruff check --fix --extend-select I` (#13093)
* Refactor code for speed and clarity

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

* Update train.py

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>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Ultralytics Assistant <135830346+UltralyticsAssistant@users.noreply.github.com>
2024-06-16 22:39:28 +02: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 574331f984
Replace inline comments with docstrings (#12764)
* Add docstrings

* Add docstrings

* Add docstrings

* Add docstrings

* Add docstrings

* Add docstrings

* Add docstrings

* Add docstrings

* Add docstrings

* Add docstrings

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

* Add docstrings

* Add docstrings

* Add docstrings

* Add docstrings

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

* Update plots.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>
2024-02-26 23:16:32 +01: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
Glenn Jocher 22e9afef74
Python refactor and simplification (#12624)
* Python code cleanup

* Auto-format by Ultralytics actions

---------

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
2024-01-13 22:34:05 +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
Shayan Mousavinia 66edf38933
improving evolve (#11348)
* improving evole in train.py

Signed-off-by: Shayan Mousavinia <45814390+ShAmoNiA@users.noreply.github.com>

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

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

* fix gen_ranges value in mutation part.

Signed-off-by: Shayan Mousavinia <45814390+ShAmoNiA@users.noreply.github.com>

* fix invalid syntax in line 532

remove on tab from "else" 

Signed-off-by: Shayan Mousavinia <45814390+ShAmoNiA@users.noreply.github.com>

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

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

* Update train.py

Signed-off-by: Shayan Mousavinia <45814390+ShAmoNiA@users.noreply.github.com>

* Update train.py

Signed-off-by: Shayan Mousavinia <45814390+ShAmoNiA@users.noreply.github.com>

* fix range index

Signed-off-by: Shayan Mousavinia <45814390+ShAmoNiA@users.noreply.github.com>

* Update train.py

fix population size
add crossover min and max rate

Signed-off-by: Shayan Mousavinia <45814390+ShAmoNiA@users.noreply.github.com>

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

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

* update comments

Signed-off-by: Shayan Mousavinia <45814390+ShAmoNiA@users.noreply.github.com>

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

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

* save population for last generation

The latest version incorporates a significant update whereby all hyper parameters are now stored in the population section of "evolve_population.yaml," located in "yolov5\data\hyps," following the transition to the new generation. This development allows for the continuation of a previously abandoned evolution process by utilizing the former population. Additionally, a new argument, "--evolve_population," has been introduced to enable the relocation of the manual "evolve_population.yaml" to any project directory to load for the aforementioned purpose. This enhancement offers greater flexibility and convenience to the users, making it easier for them to resume their evolutionary process.

Signed-off-by: Shayan Mousavinia <45814390+ShAmoNiA@users.noreply.github.com>

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

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

* Update train.py

Signed-off-by: Shayan Mousavinia <45814390+ShAmoNiA@users.noreply.github.com>

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

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

* remove try - except

Signed-off-by: Shayan Mousavinia <45814390+ShAmoNiA@users.noreply.github.com>

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

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

* Update train.py

Add resume resume_evolve arg for **resume evolve from last generation**.
Population will load from data/hyp by default and load all yaml file form them.


Signed-off-by: Shayan Mousavinia <45814390+ShAmoNiA@users.noreply.github.com>

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

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

* Update train.py

Signed-off-by: Shayan Mousavinia <45814390+ShAmoNiA@users.noreply.github.com>

* Update train.py

Signed-off-by: Shayan Mousavinia <45814390+ShAmoNiA@users.noreply.github.com>

* Update train.py

Signed-off-by: Shayan Mousavinia <45814390+ShAmoNiA@users.noreply.github.com>

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

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

* Update train.py

Signed-off-by: Shayan Mousavinia <45814390+ShAmoNiA@users.noreply.github.com>

* Update train.py

Signed-off-by: Shayan Mousavinia <45814390+ShAmoNiA@users.noreply.github.com>

* Update README.zh-CN.md

Signed-off-by: Shayan Mousavinia <45814390+ShAmoNiA@users.noreply.github.com>

* Update train.py

update pop_size

Signed-off-by: Shayan Mousavinia <45814390+ShAmoNiA@users.noreply.github.com>

---------

Signed-off-by: Shayan Mousavinia <45814390+ShAmoNiA@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-03 08:12:46 +01:00
Aarni Koskela 52db52b927
Add ndjson logging for training (#10970)
* Add ndjson logging for training

This adds support for NDJSON (newline-delimited JSON) metrics logging,
for both console (stdout) output and a file (like the current CSV file).

NDJSON can be easily grepped from the output and/or parsed with e.g. `jq`.

The feature is enabled with the `--ndjson-console` and `--ndjson-file`
switches to `train.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>
2024-01-03 08:06:26 +01:00
Troy cc232e3e35
Increase NCCL timeout to 3 hours (#12345)
* Increase NCCL timeout to 3 hours

When training on a large dataset using DDP, the scanning process will be very long, and it will raise NCCL timeout error. Change the default timeout 30min to 3 hours, same as ultralytics yolov8 (https://github.com/ultralytics/ultralytics/pull/3343)

Signed-off-by: Troy <wudashuo@vip.qq.com>

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

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

---------

Signed-off-by: Troy <wudashuo@vip.qq.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>
2023-11-23 13:12:05 +01:00
Glenn Jocher 459dd49c02
Update setup.cfg (#11814)
* Update setup.cfg

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 .pre-commit-config.yaml

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

* Update export.py

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

* Update downloads.py

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

* Update yolo.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>
2023-07-05 00:42:57 +02:00
Glenn Jocher 98acd111b1
Update Comet integration (#11648)
* Update Comet

* Update Comet

* Update Comet

* Add default Experiment Name

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

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

* Update tutorial.ipynb

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

* Update tutorial.ipynb

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

* Update tutorial.ipynb

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

* Update tutorial.ipynb

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>
2023-06-15 13:49:19 +02:00
Glenn Jocher 5deff1471d
Add `ultralytics` pip package (#11529)
* Add ultralytics pip package

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

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

* Add requirements.txt locations

* Update requirements.txt

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>
2023-05-14 21:44:53 +02:00
Glenn Jocher be61a64c47
Update links to https://docs.ultralytics.com (#11412)
* Update links

* [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>
2023-04-21 23:47:29 +02: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
imyhxy 81f81d3e97
Fixed randrange warnings in Python>=3.10 (#11161)
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2023-03-23 20:30:10 +01: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
Aarni Koskela a2de5c5bf6
Subprocess improvements (#10973)
* Use list-form arguments for subprocess.run calls where possible

Augments #10944

* Deduplicate curl code

* Avoid eval() to parse integer

---------

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2023-02-13 18:00:31 +04:00
Glenn Jocher 238da321cb
Security3 (#10944)
* Security improvements

* Security improvements

* [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>
2023-02-09 17:58:24 +04:00
Yonghye Kwon 10e93d295f
Set a seed of generator with an option for more randomness when training several models with different seeds (#10486)
* set seed with parameter

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>

* make seed to be a large number

* set seed with a parameter

* set a seed of dataloader with opt for more randomness

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-12-19 10:27:34 +01:00
Glenn Jocher 40bb8030f8
Scope gitpyhon import in `check_git_info()` (#10221)
* Scope gitpyhon import in `check_git_info()`

* [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-11-19 14:22:07 +01:00
Glenn Jocher 0307954e4e
Add git info to cls, seg checkpoints (#10217) 2022-11-19 03:32:21 +01:00
Glenn Jocher 9286336cb4
Add `git` info to training checkpoints (#9655)
* Add git status on train checkpoints

* Update

* Update

* Update

* Update

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

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

* 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>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-11-19 03:16:17 +01:00
Glenn Jocher 0322bb3196
New global `TQDM_BAR_FORMAT` (#10211)
* New global TQDM_BAR_FORMAT

* [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-11-18 21:39:13 +01:00
Glenn Jocher fde7758468
YOLOv5 AutoCache Update (#10027)
* AutoCache

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

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

* AutoCache

* AutoCache

* AutoCache

* AutoCache

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-11-04 15:30:12 +01:00
Glenn Jocher 02b8a4c21b
Update default `--epochs 100` (#10024)
* Update default `--epochs 100`

@AyushExel @kalenmike updating default Detection and Segmentation trainings to 100 epochs

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

* Update train.py

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

* Update README.md

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

* Update README_cn.md

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-11-03 17:58:15 +01:00
Glenn Jocher acff977af3
Logger Cleanup (#9828) 2022-10-17 15:30:42 +02:00
Glenn Jocher 209be932de
Fix segment evolution keys (#9742)
* Update

* Cleanup
2022-10-09 23:51:29 +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
robinned 3cd66b1c38
Train.py line 486 typo fix (#9330)
fixed issue

Signed-off-by: robinned <78896580+robinned@users.noreply.github.com>

Signed-off-by: robinned <78896580+robinned@users.noreply.github.com>
Co-authored-by: Ayush Chaurasia <ayush.chaurarsia@gmail.com>
2022-09-08 22:00:54 +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
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 06831aa9e9
Improved Usage example docstrings (#9075)
* Updated Usage examples

* Update detect.py

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

* Update predict.py

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-22 01:06:29 +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
Glenn Jocher 0b8639a40a
Rename 'labels' to 'instances' (#9066)
* Rename labels to instances

* Rename labels to instances

* align val
2022-08-21 15:50:02 +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 fdcb92a938
Update train.py `import val as validate` (#9037)
* Update train.py `import val as validate`

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-19 16:54:58 +02:00
Glenn Jocher 781401ec70
Default --data `imagenette160` training (fastest) (#9033)
* Default --data `imagenette160` training (fastest)

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

* Update train.py

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

* Update train.py

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

* Update train.py

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

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-19 15:06:37 +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 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
Yana fd004f5648
Fix bug with resume (#8912)
* Fix bug with resume

* restore del on resume=false

* Update train.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-17 00:58:30 +02:00
Glenn Jocher f1214f237d
Remove DDP `destroy_process_group()` on train end (#8935)
May resolve https://github.com/ultralytics/yolov5/issues/7307
2022-08-13 03:57:31 +02:00
黄不盈 c962db2749
Fix anchor incorrectly initialized (#8891)
* Fix anchor incorrectly initialized

Using --noautoanchor and --evolve simultaneously leads to anchor incorrectly initialized. --noautoanchor denotes anchors don't need to evolve, thus removing anchors from hyp will fix it.

* Update train.py

* Update train.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
2022-08-08 17:15:18 +02:00
Glenn Jocher 20f1b7ea08
`smart_optimizer()` improved reporting (#8887)
Update smart_optimizer() weight_decay reporting
2022-08-06 11:30:54 +02:00