Auto-format by https://ultralytics.com/actions
parent
c6c6f3dd07
commit
866e022e21
38
README.md
38
README.md
|
@ -104,8 +104,8 @@ results = model(img)
|
||||||
|
|
||||||
# Process the results (options: .print(), .show(), .save(), .crop(), .pandas())
|
# Process the results (options: .print(), .show(), .save(), .crop(), .pandas())
|
||||||
results.print() # Print results to console
|
results.print() # Print results to console
|
||||||
results.show() # Display results in a window
|
results.show() # Display results in a window
|
||||||
results.save() # Save results to runs/detect/exp
|
results.save() # Save results to runs/detect/exp
|
||||||
```
|
```
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
@ -221,8 +221,8 @@ Explore Ultralytics' key integrations with leading AI platforms. These collabora
|
||||||
<img src="https://github.com/ultralytics/assets/raw/main/partners/logo-neuralmagic.png" width="10%" alt="Neural Magic logo"></a>
|
<img src="https://github.com/ultralytics/assets/raw/main/partners/logo-neuralmagic.png" width="10%" alt="Neural Magic logo"></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
| Ultralytics HUB 🚀 | W&B | Comet ⭐ NEW | Neural Magic |
|
| Ultralytics HUB 🚀 | W&B | Comet ⭐ NEW | Neural Magic |
|
||||||
| :--------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------: |
|
| :--------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------: |
|
||||||
| Streamline YOLO workflows: Label, train, and deploy effortlessly with [Ultralytics HUB](https://www.ultralytics.com/hub). Try now! | Track experiments, hyperparameters, and results seamlessly with [Weights & Biases](https://docs.wandb.ai/guides/integrations/ultralytics/). | Free forever, [Comet](https://bit.ly/yolov5-readme-comet) lets you save YOLOv5 models, resume training, and interactively visualize and debug predictions. | Run YOLOv5 inference up to 6x faster on CPUs with [Neural Magic DeepSparse](https://bit.ly/yolov5-neuralmagic). |
|
| Streamline YOLO workflows: Label, train, and deploy effortlessly with [Ultralytics HUB](https://www.ultralytics.com/hub). Try now! | Track experiments, hyperparameters, and results seamlessly with [Weights & Biases](https://docs.wandb.ai/guides/integrations/ultralytics/). | Free forever, [Comet](https://bit.ly/yolov5-readme-comet) lets you save YOLOv5 models, resume training, and interactively visualize and debug predictions. | Run YOLOv5 inference up to 6x faster on CPUs with [Neural Magic DeepSparse](https://bit.ly/yolov5-neuralmagic). |
|
||||||
|
|
||||||
## ⭐ Ultralytics HUB
|
## ⭐ Ultralytics HUB
|
||||||
|
@ -256,18 +256,18 @@ YOLOv5 is designed for simplicity and ease of use. We prioritize real-world perf
|
||||||
|
|
||||||
This table shows the performance metrics for various YOLOv5 models trained on the COCO dataset.
|
This table shows the performance metrics for various YOLOv5 models trained on the COCO dataset.
|
||||||
|
|
||||||
| Model | Size<br><sup>(pixels) | mAP<sup>val<br>50-95 | mAP<sup>val<br>50 | Speed<br><sup>CPU b1<br>(ms) | Speed<br><sup>V100 b1<br>(ms) | Speed<br><sup>V100 b32<br>(ms) | Params<br><sup>(M) | FLOPs<br><sup>@640 (B) |
|
| Model | Size<br><sup>(pixels) | mAP<sup>val<br>50-95 | mAP<sup>val<br>50 | Speed<br><sup>CPU b1<br>(ms) | Speed<br><sup>V100 b1<br>(ms) | Speed<br><sup>V100 b32<br>(ms) | Params<br><sup>(M) | FLOPs<br><sup>@640 (B) |
|
||||||
| ----------------------------------------------------------------------------------------------- | --------------------- | -------------------- | ----------------- | ---------------------------- | ----------------------------- | ------------------------------ | ------------------ | ---------------------- |
|
| ------------------------------------------------------------------------------------------------------ | --------------------- | -------------------- | ----------------- | ---------------------------- | ----------------------------- | ------------------------------ | ------------------ | ---------------------- |
|
||||||
| [YOLOv5n](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5n.pt) | 640 | 28.0 | 45.7 | **45** | **6.3** | **0.6** | **1.9** | **4.5** |
|
| [YOLOv5n](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5n.pt) | 640 | 28.0 | 45.7 | **45** | **6.3** | **0.6** | **1.9** | **4.5** |
|
||||||
| [YOLOv5s](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5s.pt) | 640 | 37.4 | 56.8 | 98 | 6.4 | 0.9 | 7.2 | 16.5 |
|
| [YOLOv5s](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5s.pt) | 640 | 37.4 | 56.8 | 98 | 6.4 | 0.9 | 7.2 | 16.5 |
|
||||||
| [YOLOv5m](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5m.pt) | 640 | 45.4 | 64.1 | 224 | 8.2 | 1.7 | 21.2 | 49.0 |
|
| [YOLOv5m](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5m.pt) | 640 | 45.4 | 64.1 | 224 | 8.2 | 1.7 | 21.2 | 49.0 |
|
||||||
| [YOLOv5l](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5l.pt) | 640 | 49.0 | 67.3 | 430 | 10.1 | 2.7 | 46.5 | 109.1 |
|
| [YOLOv5l](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5l.pt) | 640 | 49.0 | 67.3 | 430 | 10.1 | 2.7 | 46.5 | 109.1 |
|
||||||
| [YOLOv5x](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5x.pt) | 640 | 50.7 | 68.9 | 766 | 12.1 | 4.8 | 86.7 | 205.7 |
|
| [YOLOv5x](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5x.pt) | 640 | 50.7 | 68.9 | 766 | 12.1 | 4.8 | 86.7 | 205.7 |
|
||||||
| | | | | | | | | |
|
| | | | | | | | | |
|
||||||
| [YOLOv5n6](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5n6.pt) | 1280 | 36.0 | 54.4 | 153 | 8.1 | 2.1 | 3.2 | 4.6 |
|
| [YOLOv5n6](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5n6.pt) | 1280 | 36.0 | 54.4 | 153 | 8.1 | 2.1 | 3.2 | 4.6 |
|
||||||
| [YOLOv5s6](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5s6.pt) | 1280 | 44.8 | 63.7 | 385 | 8.2 | 3.6 | 12.6 | 16.8 |
|
| [YOLOv5s6](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5s6.pt) | 1280 | 44.8 | 63.7 | 385 | 8.2 | 3.6 | 12.6 | 16.8 |
|
||||||
| [YOLOv5m6](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5m6.pt) | 1280 | 51.3 | 69.3 | 887 | 11.1 | 6.8 | 35.7 | 50.0 |
|
| [YOLOv5m6](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5m6.pt) | 1280 | 51.3 | 69.3 | 887 | 11.1 | 6.8 | 35.7 | 50.0 |
|
||||||
| [YOLOv5l6](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5l6.pt) | 1280 | 53.7 | 71.3 | 1784 | 15.8 | 10.5 | 76.8 | 111.4 |
|
| [YOLOv5l6](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5l6.pt) | 1280 | 53.7 | 71.3 | 1784 | 15.8 | 10.5 | 76.8 | 111.4 |
|
||||||
| [YOLOv5x6](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5x6.pt)<br>+ [[TTA]][tta] | 1280<br>1536 | 55.0<br>**55.8** | 72.7<br>**72.7** | 3136<br>- | 26.2<br>- | 19.4<br>- | 140.7<br>- | 209.8<br>- |
|
| [YOLOv5x6](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5x6.pt)<br>+ [[TTA]][tta] | 1280<br>1536 | 55.0<br>**55.8** | 72.7<br>**72.7** | 3136<br>- | 26.2<br>- | 19.4<br>- | 140.7<br>- | 209.8<br>- |
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
@ -347,13 +347,11 @@ python segment/predict.py --weights yolov5m-seg.pt --source data/images/bus.jpg
|
||||||
|
|
||||||
```python
|
```python
|
||||||
# Load model from PyTorch Hub (Note: Inference support might vary)
|
# Load model from PyTorch Hub (Note: Inference support might vary)
|
||||||
model = torch.hub.load(
|
model = torch.hub.load("ultralytics/yolov5", "custom", "yolov5m-seg.pt")
|
||||||
"ultralytics/yolov5", "custom", "yolov5m-seg.pt"
|
|
||||||
)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|  |  |
|
|  |  |
|
||||||
| :---------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------: |
|
| :-----------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------: |
|
||||||
|
|
||||||
### Export
|
### Export
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Run YOLOv5 benchmarks on all supported export formats.
|
Run YOLOv5 benchmarks on all supported export formats.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Run YOLOv5 classification inference on images, videos, directories, globs, YouTube, webcam, streams, etc.
|
Run YOLOv5 classification inference on images, videos, directories, globs, YouTube, webcam, streams, etc.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Train a YOLOv5 classifier model on a classification dataset.
|
Train a YOLOv5 classifier model on a classification dataset.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Validate a trained YOLOv5 classification model on a classification dataset.
|
Validate a trained YOLOv5 classification model on a classification dataset.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Run YOLOv5 detection inference on images, videos, directories, globs, YouTube, webcam, streams, etc.
|
Run YOLOv5 detection inference on images, videos, directories, globs, YouTube, webcam, streams, etc.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Export a YOLOv5 PyTorch model to other formats. TensorFlow exports authored by https://github.com/zldrobit.
|
Export a YOLOv5 PyTorch model to other formats. TensorFlow exports authored by https://github.com/zldrobit.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""
|
"""
|
||||||
PyTorch Hub models https://pytorch.org/hub/ultralytics_yolov5.
|
PyTorch Hub models https://pytorch.org/hub/ultralytics_yolov5.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""Common modules."""
|
"""Common modules."""
|
||||||
|
|
||||||
import ast
|
import ast
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""Experimental modules."""
|
"""Experimental modules."""
|
||||||
|
|
||||||
import math
|
import math
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""
|
"""
|
||||||
TensorFlow, Keras and TFLite versions of YOLOv5
|
TensorFlow, Keras and TFLite versions of YOLOv5
|
||||||
Authored by https://github.com/zldrobit in PR https://github.com/ultralytics/yolov5/pull/1127.
|
Authored by https://github.com/zldrobit in PR https://github.com/ultralytics/yolov5/pull/1127.
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""
|
"""
|
||||||
YOLO-specific modules.
|
YOLO-specific modules.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Run YOLOv5 segmentation inference on images, videos, directories, streams, etc.
|
Run YOLOv5 segmentation inference on images, videos, directories, streams, etc.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Train a YOLOv5 segment model on a segment dataset Models and datasets download automatically from the latest YOLOv5
|
Train a YOLOv5 segment model on a segment dataset Models and datasets download automatically from the latest YOLOv5
|
||||||
release.
|
release.
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Validate a trained YOLOv5 segment model on a segment dataset.
|
Validate a trained YOLOv5 segment model on a segment dataset.
|
||||||
|
|
||||||
|
|
1
train.py
1
train.py
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Train a YOLOv5 model on a custom dataset. Models and datasets download automatically from the latest YOLOv5 release.
|
Train a YOLOv5 model on a custom dataset. Models and datasets download automatically from the latest YOLOv5 release.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""utils/initialization."""
|
"""utils/initialization."""
|
||||||
|
|
||||||
import contextlib
|
import contextlib
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""Activation functions."""
|
"""Activation functions."""
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""Image augmentation functions."""
|
"""Image augmentation functions."""
|
||||||
|
|
||||||
import math
|
import math
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""AutoAnchor utils."""
|
"""AutoAnchor utils."""
|
||||||
|
|
||||||
import random
|
import random
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""Auto-batch utils."""
|
"""Auto-batch utils."""
|
||||||
|
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""Callback utils."""
|
"""Callback utils."""
|
||||||
|
|
||||||
import threading
|
import threading
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""Dataloaders and dataset utils."""
|
"""Dataloaders and dataset utils."""
|
||||||
|
|
||||||
import contextlib
|
import contextlib
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""Download utils."""
|
"""Download utils."""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""Perform test request."""
|
"""Perform test request."""
|
||||||
|
|
||||||
import pprint
|
import pprint
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""Run a Flask REST API exposing one or more YOLOv5s models."""
|
"""Run a Flask REST API exposing one or more YOLOv5s models."""
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""General utils."""
|
"""General utils."""
|
||||||
|
|
||||||
import contextlib
|
import contextlib
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""Logging utils."""
|
"""Logging utils."""
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
|
@ -8,11 +8,11 @@
|
||||||
|
|
||||||
[ClearML](https://clear.ml/) is an [open-source](https://github.com/clearml/clearml) MLOps platform designed to streamline your machine learning workflow and save you valuable time ⏱️. Integrating ClearML with Ultralytics YOLOv5 allows you to leverage a powerful suite of tools:
|
[ClearML](https://clear.ml/) is an [open-source](https://github.com/clearml/clearml) MLOps platform designed to streamline your machine learning workflow and save you valuable time ⏱️. Integrating ClearML with Ultralytics YOLOv5 allows you to leverage a powerful suite of tools:
|
||||||
|
|
||||||
- **Experiment Management:** 🔨 Track every [YOLOv5](https://docs.ultralytics.com/models/yolov5/) training run, including parameters, metrics, and outputs. See the [Ultralytics ClearML integration guide](https://docs.ultralytics.com/integrations/clearml/) for more details.
|
- **Experiment Management:** 🔨 Track every [YOLOv5](https://docs.ultralytics.com/models/yolov5/) training run, including parameters, metrics, and outputs. See the [Ultralytics ClearML integration guide](https://docs.ultralytics.com/integrations/clearml/) for more details.
|
||||||
- **Data Versioning:** 🔧 Version and easily access your custom training data using the integrated ClearML Data Versioning Tool, similar to concepts in [DVC integration](https://docs.ultralytics.com/integrations/dvc/).
|
- **Data Versioning:** 🔧 Version and easily access your custom training data using the integrated ClearML Data Versioning Tool, similar to concepts in [DVC integration](https://docs.ultralytics.com/integrations/dvc/).
|
||||||
- **Remote Execution:** 🔦 [Remotely train and monitor](https://docs.ultralytics.com/hub/cloud-training/) your YOLOv5 models using ClearML Agent.
|
- **Remote Execution:** 🔦 [Remotely train and monitor](https://docs.ultralytics.com/hub/cloud-training/) your YOLOv5 models using ClearML Agent.
|
||||||
- **Hyperparameter Optimization:** 🔬 Achieve optimal [Mean Average Precision (mAP)](https://docs.ultralytics.com/guides/yolo-performance-metrics/) using ClearML's [Hyperparameter Optimization](https://docs.ultralytics.com/guides/hyperparameter-tuning/) capabilities.
|
- **Hyperparameter Optimization:** 🔬 Achieve optimal [Mean Average Precision (mAP)](https://docs.ultralytics.com/guides/yolo-performance-metrics/) using ClearML's [Hyperparameter Optimization](https://docs.ultralytics.com/guides/hyperparameter-tuning/) capabilities.
|
||||||
- **Model Deployment:** 🔭 Turn your trained YOLOv5 model into an API with just a few commands using ClearML Serving, complementing [Ultralytics deployment options](https://docs.ultralytics.com/guides/model-deployment-options/).
|
- **Model Deployment:** 🔭 Turn your trained YOLOv5 model into an API with just a few commands using ClearML Serving, complementing [Ultralytics deployment options](https://docs.ultralytics.com/guides/model-deployment-options/).
|
||||||
|
|
||||||
You can choose to use only the experiment manager or combine multiple tools into a comprehensive MLOps pipeline.
|
You can choose to use only the experiment manager or combine multiple tools into a comprehensive MLOps pipeline.
|
||||||
|
|
||||||
|
@ -28,10 +28,12 @@ ClearML requires communication with a server to track experiments and data. You
|
||||||
Follow these steps to get started:
|
Follow these steps to get started:
|
||||||
|
|
||||||
1. Install the `clearml` Python package:
|
1. Install the `clearml` Python package:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install clearml
|
pip install clearml
|
||||||
```
|
```
|
||||||
*Note: This package is included in the `requirements.txt` of YOLOv5.*
|
|
||||||
|
_Note: This package is included in the `requirements.txt` of YOLOv5._
|
||||||
|
|
||||||
2. Connect the ClearML SDK to your server. [Create credentials](https://app.clear.ml/settings/workspace-configuration) (Settings -> Workspace -> Create new credentials), then run the following command and follow the prompts:
|
2. Connect the ClearML SDK to your server. [Create credentials](https://app.clear.ml/settings/workspace-configuration) (Settings -> Workspace -> Create new credentials), then run the following command and follow the prompts:
|
||||||
```bash
|
```bash
|
||||||
|
@ -62,17 +64,17 @@ python train.py --project my_yolo_project --name experiment_001 --img 640 --batc
|
||||||
|
|
||||||
ClearML automatically captures comprehensive information about your training run:
|
ClearML automatically captures comprehensive information about your training run:
|
||||||
|
|
||||||
- Source code and uncommitted changes
|
- Source code and uncommitted changes
|
||||||
- Installed Python packages
|
- Installed Python packages
|
||||||
- Hyperparameters and configuration settings
|
- Hyperparameters and configuration settings
|
||||||
- Model checkpoints (use `--save-period n` to save every `n` epochs)
|
- Model checkpoints (use `--save-period n` to save every `n` epochs)
|
||||||
- Console output logs
|
- Console output logs
|
||||||
- Performance metrics ([mAP_0.5](https://docs.ultralytics.com/guides/yolo-performance-metrics/), mAP_0.5:0.95, [precision, recall](https://docs.ultralytics.com/guides/yolo-performance-metrics/), [losses](https://docs.ultralytics.com/reference/utils/loss/), [learning rates](https://www.ultralytics.com/glossary/learning-rate), etc.)
|
- Performance metrics ([mAP_0.5](https://docs.ultralytics.com/guides/yolo-performance-metrics/), mAP_0.5:0.95, [precision, recall](https://docs.ultralytics.com/guides/yolo-performance-metrics/), [losses](https://docs.ultralytics.com/reference/utils/loss/), [learning rates](https://www.ultralytics.com/glossary/learning-rate), etc.)
|
||||||
- System details (machine specs, runtime, creation date)
|
- System details (machine specs, runtime, creation date)
|
||||||
- Generated plots (e.g., label correlogram, [confusion matrix](https://www.ultralytics.com/glossary/confusion-matrix))
|
- Generated plots (e.g., label correlogram, [confusion matrix](https://www.ultralytics.com/glossary/confusion-matrix))
|
||||||
- Images with bounding boxes per epoch
|
- Images with bounding boxes per epoch
|
||||||
- Mosaic augmentation previews per epoch
|
- Mosaic augmentation previews per epoch
|
||||||
- Validation images per epoch
|
- Validation images per epoch
|
||||||
|
|
||||||
This wealth of information 🤯 can be visualized in the ClearML UI. You can customize table views, sort experiments by metrics like mAP, and directly compare multiple runs. This detailed tracking enables advanced features like hyperparameter optimization and remote execution.
|
This wealth of information 🤯 can be visualized in the ClearML UI. You can customize table views, sort experiments by metrics like mAP, and directly compare multiple runs. This detailed tracking enables advanced features like hyperparameter optimization and remote execution.
|
||||||
|
|
||||||
|
@ -133,7 +135,8 @@ clearml-data add --files .
|
||||||
# Finalize and upload the dataset version
|
# Finalize and upload the dataset version
|
||||||
clearml-data close
|
clearml-data close
|
||||||
```
|
```
|
||||||
*Tip: Use `--parent <parent_dataset_id>` with `clearml-data create` to link versions and avoid re-uploading unchanged files.*
|
|
||||||
|
_Tip: Use `--parent <parent_dataset_id>` with `clearml-data create` to link versions and avoid re-uploading unchanged files._
|
||||||
|
|
||||||
### Run Training Using a ClearML Dataset
|
### Run Training Using a ClearML Dataset
|
||||||
|
|
||||||
|
@ -168,8 +171,8 @@ ClearML Agent allows you to execute experiments on remote machines (e.g., powerf
|
||||||
|
|
||||||
Learn more about ClearML Agent:
|
Learn more about ClearML Agent:
|
||||||
|
|
||||||
- [YouTube Introduction](https://www.youtube.com/watch?v=MX3BrXnaULs)
|
- [YouTube Introduction](https://www.youtube.com/watch?v=MX3BrXnaULs)
|
||||||
- [Official Documentation](https://clear.ml/docs/latest/docs/clearml_agent)
|
- [Official Documentation](https://clear.ml/docs/latest/docs/clearml_agent)
|
||||||
|
|
||||||
Turn any machine into a ClearML agent by running:
|
Turn any machine into a ClearML agent by running:
|
||||||
|
|
||||||
|
@ -201,7 +204,7 @@ if RANK in {-1, 0}:
|
||||||
# Check if ClearML logger is active and enqueue the task
|
# Check if ClearML logger is active and enqueue the task
|
||||||
if loggers.clearml:
|
if loggers.clearml:
|
||||||
# Specify the queue name for the remote agent
|
# Specify the queue name for the remote agent
|
||||||
loggers.clearml.task.execute_remotely(queue_name="my_remote_queue") # <------ ADD THIS LINE
|
loggers.clearml.task.execute_remotely(queue_name="my_remote_queue") # <------ ADD THIS LINE
|
||||||
# data_dict might be populated by ClearML if using a ClearML dataset
|
# data_dict might be populated by ClearML if using a ClearML dataset
|
||||||
data_dict = loggers.clearml.data_dict
|
data_dict = loggers.clearml.data_dict
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""Main Logger class for ClearML experiment tracking."""
|
"""Main Logger class for ClearML experiment tracking."""
|
||||||
|
|
||||||
import glob
|
import glob
|
||||||
|
|
|
@ -29,10 +29,12 @@ pip install comet_ml
|
||||||
You can configure Comet in two ways:
|
You can configure Comet in two ways:
|
||||||
|
|
||||||
1. **Environment Variables:** Set your credentials directly in your environment.
|
1. **Environment Variables:** Set your credentials directly in your environment.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
export COMET_API_KEY=<Your Comet API Key>
|
export COMET_API_KEY=<Your Comet API Key>
|
||||||
export COMET_PROJECT_NAME=<Your Comet Project Name> # Defaults to 'yolov5' if not set
|
export COMET_PROJECT_NAME=<Your Comet Project Name> # Defaults to 'yolov5' if not set
|
||||||
```
|
```
|
||||||
|
|
||||||
Find your API key in your [Comet Account Settings](https://www.comet.com/docs/v2/guides/getting-started/quickstart/#get-an-api-key?utm_source=yolov5&utm_medium=partner&utm_campaign=partner_yolov5_2022&utm_content=github_readme).
|
Find your API key in your [Comet Account Settings](https://www.comet.com/docs/v2/guides/getting-started/quickstart/#get-an-api-key?utm_source=yolov5&utm_medium=partner&utm_campaign=partner_yolov5_2022&utm_content=github_readme).
|
||||||
|
|
||||||
2. **Configuration File:** Create a `.comet.config` file in your working directory with the following content:
|
2. **Configuration File:** Create a `.comet.config` file in your working directory with the following content:
|
||||||
|
@ -200,7 +202,7 @@ To use a dataset stored in Comet Artifacts, update the `path` in your dataset `y
|
||||||
# contents of artifact.yaml
|
# contents of artifact.yaml
|
||||||
path: "comet://<workspace_name>/<artifact_name>:<artifact_version_or_alias>"
|
path: "comet://<workspace_name>/<artifact_name>:<artifact_version_or_alias>"
|
||||||
train: images/train # Adjust subdirectory if needed
|
train: images/train # Adjust subdirectory if needed
|
||||||
val: images/val # Adjust subdirectory if needed
|
val: images/val # Adjust subdirectory if needed
|
||||||
|
|
||||||
# Other dataset configurations...
|
# Other dataset configurations...
|
||||||
```
|
```
|
||||||
|
@ -259,8 +261,8 @@ python utils/loggers/comet/hpo.py \
|
||||||
Execute multiple sweep trials concurrently using the `comet optimizer` command:
|
Execute multiple sweep trials concurrently using the `comet optimizer` command:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
comet optimizer -j <num_workers> utils/loggers/comet/hpo.py \
|
comet optimizer -j \
|
||||||
utils/loggers/comet/optimizer_config.json
|
utils/loggers/comet/optimizer_config.json < num_workers > utils/loggers/comet/hpo.py
|
||||||
```
|
```
|
||||||
|
|
||||||
Replace `<num_workers>` with the desired number of parallel processes.
|
Replace `<num_workers>` with the desired number of parallel processes.
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""Loss functions."""
|
"""Loss functions."""
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""Model validation metrics."""
|
"""Model validation metrics."""
|
||||||
|
|
||||||
import math
|
import math
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""Plotting utils."""
|
"""Plotting utils."""
|
||||||
|
|
||||||
import contextlib
|
import contextlib
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""Image augmentation functions."""
|
"""Image augmentation functions."""
|
||||||
|
|
||||||
import math
|
import math
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""Dataloaders."""
|
"""Dataloaders."""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""Model validation metrics."""
|
"""Model validation metrics."""
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""PyTorch utils."""
|
"""PyTorch utils."""
|
||||||
|
|
||||||
import math
|
import math
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""Utils to interact with the Triton Inference Server."""
|
"""Utils to interact with the Triton Inference Server."""
|
||||||
|
|
||||||
import typing
|
import typing
|
||||||
|
|
1
val.py
1
val.py
|
@ -1,5 +1,4 @@
|
||||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Validate a trained YOLOv5 detection model on a detection dataset.
|
Validate a trained YOLOv5 detection model on a detection dataset.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue