* A minor correction in a comment
I added the 'h' in 'https' in the link to the label smoothing issue.
Signed-off-by: Kumar Selvakumaran <62794224+kumar-selvakumaran@users.noreply.github.com>
* Auto-format by https://ultralytics.com/actions
---------
Signed-off-by: Kumar Selvakumaran <62794224+kumar-selvakumaran@users.noreply.github.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
* Update dataloaders.py
This is to address (and hopefully fix) this issue: Multi-GPU DDP RAM multiple-cache bug #3818 (https://github.com/ultralytics/yolov5/issues/3818). This was a very serious and "blocking" issue until I could figure out what was going on. The problem was especially bad when running Multi-GPU jobs with 8 GPUs, RAM usage was 8x higher than expected (!), causing repeated OOM failures. Hopefully this fix will help others.
DDP causes each RANK to launch it's own process (one for each GPU) with it's own trainloader, and its own RAM image cache. The DistributedSampler used by DDP (https://github.com/pytorch/pytorch/blob/master/torch/utils/data/distributed.py) will feed only a subset of images (1/WORLD_SIZE) to each available GPU on each epoch, but since the images are shuffled between epochs, each GPU process must still cache all images. So I created a subclass of DistributedSampler called SmartDistributedSampler that forces each GPU process to always sample the same subset (using modulo arithmetic with RANK and WORLD_SIZE) while still allowing random shuffling between epochs. I don't believe this disrupts the overall "randomness" of the sampling, and I haven't noticed any performance degradation.
Signed-off-by: davidsvaughn <davidsvaughn@gmail.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update dataloaders.py
move extra parameter (rank) to end so won't mess up pre-existing positional args
* Update dataloaders.py
removing extra '#'
* Update dataloaders.py
sample from DDP index array (self.idx) in mixup mosaic
* Merging self.indices and self.idx (DDP indices) into single attribute (self.indices).
Also adding SmartDistributedSampler to segmentation dataloader
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Multiply GB displayed by WORLD_SIZE
---------
Signed-off-by: davidsvaughn <davidsvaughn@gmail.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>
* Added ClearML instance segmentation and classification support
* Cleaned up ClearML plot output
* typos
* Log results as plots instead of debug samples
* [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>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* Update selectable device Profile
* [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>
* Fix bug in #12457.
When run 'python.exe segment/predict.py --visualize' will throw AttributeError: 'tuple' object has no attribute 'shape'
* [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>
* 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>
fix: utils/google_app_engine/additional_requirements.txt to reduce vulnerabilities
The following vulnerabilities are fixed by pinning transitive dependencies:
- https://snyk.io/vuln/SNYK-PYTHON-WERKZEUG-6035177
Co-authored-by: snyk-bot <snyk-bot@snyk.io>
* Import Annotator class from `ultralytics` package
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Import Annotator class from `ultralytics` package
* 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>
* update colab link
* fix path check for datasets
* apply yapf
* run precommit hooks
* [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>
* Uninstall `wandb` from notebook environments
Due to undesired behavior in https://www.kaggle.com/code/ultralytics/yolov8/comments#2306977
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* fix import
* [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>
Fix check_requirements() txt not found bug
@AyushExel @kalenmike fixes "requirements.txt" not found warning.
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
* 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>
* 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>