diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml
index d798cbec18..359db69ddb 100644
--- a/.github/workflows/docker.yaml
+++ b/.github/workflows/docker.yaml
@@ -54,7 +54,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
- max-parallel: 6
+ max-parallel: 10
matrix:
include:
- dockerfile: "Dockerfile"
@@ -82,6 +82,15 @@ jobs:
# tags: "latest-conda"
# platforms: "linux/amd64"
steps:
+ - name: Cleanup toolcache
+ # Free up to 10GB of disk space per https://github.com/ultralytics/ultralytics/pull/14894
+ run: |
+ echo "Free space before deletion:"
+ df -h /
+ rm -rf /opt/hostedtoolcache
+ echo "Free space after deletion:"
+ df -h /
+
- name: Checkout repo
uses: actions/checkout@v4
with:
@@ -133,7 +142,7 @@ jobs:
uses: nick-invision/retry@v3
with:
timeout_minutes: 120
- retry_wait_seconds: 30
+ retry_wait_seconds: 60
max_attempts: 2 # retry once
command: |
docker build \
diff --git a/.gitignore b/.gitignore
index 1b68ec6b2c..1c0c5fbea6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,6 +26,9 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST
+requirements.txt
+setup.py
+ultralytics.egg-info
# PyInstaller
# Usually these files are written by a python script from a template
diff --git a/docs/en/datasets/classify/caltech101.md b/docs/en/datasets/classify/caltech101.md
index 451c4cc97e..6a75f66ac8 100644
--- a/docs/en/datasets/classify/caltech101.md
+++ b/docs/en/datasets/classify/caltech101.md
@@ -46,7 +46,7 @@ To train a YOLO model on the Caltech-101 dataset for 100 epochs, you can use the
```bash
# Start training from a pretrained *.pt model
- yolo detect train data=caltech101 model=yolov8n-cls.pt epochs=100 imgsz=416
+ yolo classify train data=caltech101 model=yolov8n-cls.pt epochs=100 imgsz=416
```
## Sample Images and Annotations
@@ -108,7 +108,7 @@ To train an Ultralytics YOLO model on the Caltech-101 dataset, you can use the p
```bash
# Start training from a pretrained *.pt model
- yolo detect train data=caltech101 model=yolov8n-cls.pt epochs=100 imgsz=416
+ yolo classify train data=caltech101 model=yolov8n-cls.pt epochs=100 imgsz=416
```
For more detailed arguments and options, refer to the model [Training](../../modes/train.md) page.
diff --git a/docs/en/datasets/classify/caltech256.md b/docs/en/datasets/classify/caltech256.md
index 6c6cf4a65a..c7b367cc63 100644
--- a/docs/en/datasets/classify/caltech256.md
+++ b/docs/en/datasets/classify/caltech256.md
@@ -57,7 +57,7 @@ To train a YOLO model on the Caltech-256 dataset for 100 epochs, you can use the
```bash
# Start training from a pretrained *.pt model
- yolo detect train data=caltech256 model=yolov8n-cls.pt epochs=100 imgsz=416
+ yolo classify train data=caltech256 model=yolov8n-cls.pt epochs=100 imgsz=416
```
## Sample Images and Annotations
@@ -116,7 +116,7 @@ To train a YOLO model on the Caltech-256 dataset for 100 epochs, you can use the
```bash
# Start training from a pretrained *.pt model
- yolo detect train data=caltech256 model=yolov8n-cls.pt epochs=100 imgsz=416
+ yolo classify train data=caltech256 model=yolov8n-cls.pt epochs=100 imgsz=416
```
### What are the most common use cases for the Caltech-256 dataset?
diff --git a/docs/en/datasets/classify/cifar10.md b/docs/en/datasets/classify/cifar10.md
index 513f838319..b4742cbcb7 100644
--- a/docs/en/datasets/classify/cifar10.md
+++ b/docs/en/datasets/classify/cifar10.md
@@ -60,7 +60,7 @@ To train a YOLO model on the CIFAR-10 dataset for 100 epochs with an image size
```bash
# Start training from a pretrained *.pt model
- yolo detect train data=cifar10 model=yolov8n-cls.pt epochs=100 imgsz=32
+ yolo classify train data=cifar10 model=yolov8n-cls.pt epochs=100 imgsz=32
```
## Sample Images and Annotations
@@ -114,7 +114,7 @@ To train a YOLO model on the CIFAR-10 dataset using Ultralytics, you can follow
```bash
# Start training from a pretrained *.pt model
- yolo detect train data=cifar10 model=yolov8n-cls.pt epochs=100 imgsz=32
+ yolo classify train data=cifar10 model=yolov8n-cls.pt epochs=100 imgsz=32
```
For more details, refer to the model [Training](../../modes/train.md) page.
diff --git a/docs/en/datasets/classify/cifar100.md b/docs/en/datasets/classify/cifar100.md
index 5110564ef0..4a8ba4bd8b 100644
--- a/docs/en/datasets/classify/cifar100.md
+++ b/docs/en/datasets/classify/cifar100.md
@@ -49,7 +49,7 @@ To train a YOLO model on the CIFAR-100 dataset for 100 epochs with an image size
```bash
# Start training from a pretrained *.pt model
- yolo detect train data=cifar100 model=yolov8n-cls.pt epochs=100 imgsz=32
+ yolo classify train data=cifar100 model=yolov8n-cls.pt epochs=100 imgsz=32
```
## Sample Images and Annotations
@@ -107,7 +107,7 @@ You can train a YOLO model on the CIFAR-100 dataset using either Python or CLI c
```bash
# Start training from a pretrained *.pt model
- yolo detect train data=cifar100 model=yolov8n-cls.pt epochs=100 imgsz=32
+ yolo classify train data=cifar100 model=yolov8n-cls.pt epochs=100 imgsz=32
```
For a comprehensive list of available arguments, please refer to the model [Training](../../modes/train.md) page.
diff --git a/docs/en/datasets/classify/fashion-mnist.md b/docs/en/datasets/classify/fashion-mnist.md
index 21373268e1..656473edf5 100644
--- a/docs/en/datasets/classify/fashion-mnist.md
+++ b/docs/en/datasets/classify/fashion-mnist.md
@@ -74,7 +74,7 @@ To train a CNN model on the Fashion-MNIST dataset for 100 epochs with an image s
```bash
# Start training from a pretrained *.pt model
- yolo detect train data=fashion-mnist model=yolov8n-cls.pt epochs=100 imgsz=28
+ yolo classify train data=fashion-mnist model=yolov8n-cls.pt epochs=100 imgsz=28
```
## Sample Images and Annotations
@@ -117,7 +117,7 @@ To train an Ultralytics YOLO model on the Fashion-MNIST dataset, you can use bot
=== "CLI"
```bash
- yolo detect train data=fashion-mnist model=yolov8n-cls.pt epochs=100 imgsz=28
+ yolo classify train data=fashion-mnist model=yolov8n-cls.pt epochs=100 imgsz=28
```
For more detailed training parameters, refer to the [Training page](../../modes/train.md).
diff --git a/docs/en/datasets/classify/imagenet.md b/docs/en/datasets/classify/imagenet.md
index e563568026..53aabccef0 100644
--- a/docs/en/datasets/classify/imagenet.md
+++ b/docs/en/datasets/classify/imagenet.md
@@ -59,7 +59,7 @@ To train a deep learning model on the ImageNet dataset for 100 epochs with an im
```bash
# Start training from a pretrained *.pt model
- yolo train data=imagenet model=yolov8n-cls.pt epochs=100 imgsz=224
+ yolo classify train data=imagenet model=yolov8n-cls.pt epochs=100 imgsz=224
```
## Sample Images and Annotations
@@ -120,7 +120,7 @@ To use a pretrained Ultralytics YOLO model for image classification on the Image
```bash
# Start training from a pretrained *.pt model
- yolo train data=imagenet model=yolov8n-cls.pt epochs=100 imgsz=224
+ yolo classify train data=imagenet model=yolov8n-cls.pt epochs=100 imgsz=224
```
For more in-depth training instruction, refer to our [Training page](../../modes/train.md).
diff --git a/docs/en/datasets/classify/imagenet10.md b/docs/en/datasets/classify/imagenet10.md
index d7bf55e483..a079986cce 100644
--- a/docs/en/datasets/classify/imagenet10.md
+++ b/docs/en/datasets/classify/imagenet10.md
@@ -45,7 +45,7 @@ To test a deep learning model on the ImageNet10 dataset with an image size of 22
```bash
# Start training from a pretrained *.pt model
- yolo train data=imagenet10 model=yolov8n-cls.pt epochs=5 imgsz=224
+ yolo classify train data=imagenet10 model=yolov8n-cls.pt epochs=5 imgsz=224
```
## Sample Images and Annotations
@@ -104,7 +104,7 @@ To test your deep learning model on the ImageNet10 dataset with an image size of
```bash
# Start training from a pretrained *.pt model
- yolo train data=imagenet10 model=yolov8n-cls.pt epochs=5 imgsz=224
+ yolo classify train data=imagenet10 model=yolov8n-cls.pt epochs=5 imgsz=224
```
Refer to the [Training](../../modes/train.md) page for a comprehensive list of available arguments.
diff --git a/docs/en/datasets/classify/imagenette.md b/docs/en/datasets/classify/imagenette.md
index b667192aec..9a2a128ff6 100644
--- a/docs/en/datasets/classify/imagenette.md
+++ b/docs/en/datasets/classify/imagenette.md
@@ -47,7 +47,7 @@ To train a model on the ImageNette dataset for 100 epochs with a standard image
```bash
# Start training from a pretrained *.pt model
- yolo detect train data=imagenette model=yolov8n-cls.pt epochs=100 imgsz=224
+ yolo classify train data=imagenette model=yolov8n-cls.pt epochs=100 imgsz=224
```
## Sample Images and Annotations
@@ -82,7 +82,7 @@ To use these datasets, simply replace 'imagenette' with 'imagenette160' or 'imag
```bash
# Start training from a pretrained *.pt model with ImageNette160
- yolo detect train data=imagenette160 model=yolov8n-cls.pt epochs=100 imgsz=160
+ yolo classify train data=imagenette160 model=yolov8n-cls.pt epochs=100 imgsz=160
```
!!! Example "Train Example with ImageNette320"
@@ -103,7 +103,7 @@ To use these datasets, simply replace 'imagenette' with 'imagenette160' or 'imag
```bash
# Start training from a pretrained *.pt model with ImageNette320
- yolo detect train data=imagenette320 model=yolov8n-cls.pt epochs=100 imgsz=320
+ yolo classify train data=imagenette320 model=yolov8n-cls.pt epochs=100 imgsz=320
```
These smaller versions of the dataset allow for rapid iterations during the development process while still providing valuable and realistic image classification tasks.
@@ -140,7 +140,7 @@ To train a YOLO model on the ImageNette dataset for 100 epochs, you can use the
```bash
# Start training from a pretrained *.pt model
- yolo detect train data=imagenette model=yolov8n-cls.pt epochs=100 imgsz=224
+ yolo classify train data=imagenette model=yolov8n-cls.pt epochs=100 imgsz=224
```
For more details, see the [Training](../../modes/train.md) documentation page.
diff --git a/docs/en/datasets/classify/imagewoof.md b/docs/en/datasets/classify/imagewoof.md
index 2a439425f8..5a76d97fc2 100644
--- a/docs/en/datasets/classify/imagewoof.md
+++ b/docs/en/datasets/classify/imagewoof.md
@@ -44,7 +44,7 @@ To train a CNN model on the ImageWoof dataset for 100 epochs with an image size
```bash
# Start training from a pretrained *.pt model
- yolo detect train data=imagewoof model=yolov8n-cls.pt epochs=100 imgsz=224
+ yolo classify train data=imagewoof model=yolov8n-cls.pt epochs=100 imgsz=224
```
## Dataset Variants
@@ -113,7 +113,7 @@ To train a Convolutional Neural Network (CNN) model on the ImageWoof dataset usi
=== "CLI"
```bash
- yolo detect train data=imagewoof model=yolov8n-cls.pt epochs=100 imgsz=224
+ yolo classify train data=imagewoof model=yolov8n-cls.pt epochs=100 imgsz=224
```
For more details on available training arguments, refer to the [Training](../../modes/train.md) page.
diff --git a/docs/en/datasets/classify/mnist.md b/docs/en/datasets/classify/mnist.md
index 8f8ad1265d..ae9be2bceb 100644
--- a/docs/en/datasets/classify/mnist.md
+++ b/docs/en/datasets/classify/mnist.md
@@ -52,7 +52,7 @@ To train a CNN model on the MNIST dataset for 100 epochs with an image size of 3
```bash
# Start training from a pretrained *.pt model
- cnn detect train data=mnist model=yolov8n-cls.pt epochs=100 imgsz=28
+ yolo classify train data=mnist model=yolov8n-cls.pt epochs=100 imgsz=28
```
## Sample Images and Annotations
@@ -113,7 +113,7 @@ To train a model on the MNIST dataset using Ultralytics YOLO, you can follow the
```bash
# Start training from a pretrained *.pt model
- cnn detect train data=mnist model=yolov8n-cls.pt epochs=100 imgsz=28
+ yolo classify train data=mnist model=yolov8n-cls.pt epochs=100 imgsz=28
```
For a detailed list of available training arguments, refer to the [Training](../../modes/train.md) page.
diff --git a/docs/en/datasets/obb/index.md b/docs/en/datasets/obb/index.md
index b0b548b0d5..f7708a10a0 100644
--- a/docs/en/datasets/obb/index.md
+++ b/docs/en/datasets/obb/index.md
@@ -50,7 +50,7 @@ To train a model using these OBB formats:
```bash
# Train a new YOLOv8n-OBB model on the DOTAv2 dataset
- yolo detect train data=DOTAv1.yaml model=yolov8n.pt epochs=100 imgsz=640
+ yolo obb train data=DOTAv1.yaml model=yolov8n-obb.pt epochs=100 imgsz=640
```
## Supported Datasets
@@ -125,7 +125,7 @@ Training a YOLOv8 model with OBBs involves ensuring your dataset is in the YOLO
```bash
# Train a new YOLOv8n-OBB model on the custom dataset
- yolo detect train data=your_dataset.yaml model=yolov8n.pt epochs=100 imgsz=640
+ yolo obb train data=your_dataset.yaml model=yolov8n-obb.yaml epochs=100 imgsz=640
```
This ensures your model leverages the detailed OBB annotations for improved detection accuracy.
diff --git a/docs/en/datasets/pose/coco.md b/docs/en/datasets/pose/coco.md
index 589614f8b3..52fce86c03 100644
--- a/docs/en/datasets/pose/coco.md
+++ b/docs/en/datasets/pose/coco.md
@@ -71,7 +71,7 @@ To train a YOLOv8n-pose model on the COCO-Pose dataset for 100 epochs with an im
```bash
# Start training from a pretrained *.pt model
- yolo detect train data=coco-pose.yaml model=yolov8n-pose.pt epochs=100 imgsz=640
+ yolo pose train data=coco-pose.yaml model=yolov8n-pose.pt epochs=100 imgsz=640
```
## Sample Images and Annotations
@@ -133,7 +133,7 @@ Training a YOLOv8 model on the COCO-Pose dataset can be accomplished using eithe
```bash
# Start training from a pretrained *.pt model
- yolo detect train data=coco-pose.yaml model=yolov8n.pt epochs=100 imgsz=640
+ yolo pose train data=coco-pose.yaml model=yolov8n-pose.pt epochs=100 imgsz=640
```
For more details on the training process and available arguments, check the [training page](../../modes/train.md).
diff --git a/docs/en/datasets/pose/coco8-pose.md b/docs/en/datasets/pose/coco8-pose.md
index f8f4d46073..49295ac483 100644
--- a/docs/en/datasets/pose/coco8-pose.md
+++ b/docs/en/datasets/pose/coco8-pose.md
@@ -44,7 +44,7 @@ To train a YOLOv8n-pose model on the COCO8-Pose dataset for 100 epochs with an i
```bash
# Start training from a pretrained *.pt model
- yolo detect train data=coco8-pose.yaml model=yolov8n-pose.pt epochs=100 imgsz=640
+ yolo pose train data=coco8-pose.yaml model=yolov8n-pose.pt epochs=100 imgsz=640
```
## Sample Images and Annotations
@@ -105,7 +105,7 @@ To train a YOLOv8n-pose model on the COCO8-Pose dataset for 100 epochs with an i
=== "CLI"
```bash
- yolo detect train data=coco8-pose.yaml model=yolov8n.pt epochs=100 imgsz=640
+ yolo pose train data=coco8-pose.yaml model=yolov8n-pose.pt epochs=100 imgsz=640
```
For a comprehensive list of training arguments, refer to the model [Training](../../modes/train.md) page.
diff --git a/docs/en/datasets/pose/index.md b/docs/en/datasets/pose/index.md
index 29179d8c68..57c20dcb7c 100644
--- a/docs/en/datasets/pose/index.md
+++ b/docs/en/datasets/pose/index.md
@@ -82,7 +82,7 @@ The `train` and `val` fields specify the paths to the directories containing the
```bash
# Start training from a pretrained *.pt model
- yolo detect train data=coco8-pose.yaml model=yolov8n-pose.pt epochs=100 imgsz=640
+ yolo pose train data=coco8-pose.yaml model=yolov8n-pose.pt epochs=100 imgsz=640
```
## Supported Datasets
diff --git a/docs/en/datasets/pose/tiger-pose.md b/docs/en/datasets/pose/tiger-pose.md
index ec838b5ddb..d1e338ccac 100644
--- a/docs/en/datasets/pose/tiger-pose.md
+++ b/docs/en/datasets/pose/tiger-pose.md
@@ -126,7 +126,7 @@ To train a YOLOv8n-pose model on the Tiger-Pose dataset for 100 epochs with an i
```bash
# Start training from a pretrained *.pt model
- yolo task=pose mode=train data=tiger-pose.yaml model=yolov8n.pt epochs=100 imgsz=640
+ yolo task=pose mode=train data=tiger-pose.yaml model=yolov8n-pose.pt epochs=100 imgsz=640
```
### What configurations does the `tiger-pose.yaml` file include?
diff --git a/docs/en/datasets/segment/coco.md b/docs/en/datasets/segment/coco.md
index dd77b2102c..e02b677115 100644
--- a/docs/en/datasets/segment/coco.md
+++ b/docs/en/datasets/segment/coco.md
@@ -69,7 +69,7 @@ To train a YOLOv8n-seg model on the COCO-Seg dataset for 100 epochs with an imag
```bash
# Start training from a pretrained *.pt model
- yolo detect train data=coco-seg.yaml model=yolov8n-seg.pt epochs=100 imgsz=640
+ yolo segment train data=coco-seg.yaml model=yolov8n-seg.pt epochs=100 imgsz=640
```
## Sample Images and Annotations
@@ -131,7 +131,7 @@ To train a YOLOv8n-seg model on the COCO-Seg dataset for 100 epochs with an imag
```bash
# Start training from a pretrained *.pt model
- yolo detect train data=coco-seg.yaml model=yolov8n.pt epochs=100 imgsz=640
+ yolo segment train data=coco-seg.yaml model=yolov8n-seg.pt epochs=100 imgsz=640
```
### What are the key features of the COCO-Seg dataset?
diff --git a/docs/en/datasets/segment/coco8-seg.md b/docs/en/datasets/segment/coco8-seg.md
index 55006b1712..bcca4a2641 100644
--- a/docs/en/datasets/segment/coco8-seg.md
+++ b/docs/en/datasets/segment/coco8-seg.md
@@ -44,7 +44,7 @@ To train a YOLOv8n-seg model on the COCO8-Seg dataset for 100 epochs with an ima
```bash
# Start training from a pretrained *.pt model
- yolo detect train data=coco8-seg.yaml model=yolov8n-seg.pt epochs=100 imgsz=640
+ yolo segment train data=coco8-seg.yaml model=yolov8n-seg.pt epochs=100 imgsz=640
```
## Sample Images and Annotations
@@ -106,7 +106,7 @@ To train a **YOLOv8n-seg** model on the COCO8-Seg dataset for 100 epochs with an
```bash
# Start training from a pretrained *.pt model
- yolo detect train data=coco8-seg.yaml model=yolov8n.pt epochs=100 imgsz=640
+ yolo segment train data=coco8-seg.yaml model=yolov8n-seg.pt epochs=100 imgsz=640
```
For a thorough explanation of available arguments and configuration options, you can check the [Training](../../modes/train.md) documentation.
diff --git a/docs/en/datasets/segment/index.md b/docs/en/datasets/segment/index.md
index 27cb43741f..f9228c0812 100644
--- a/docs/en/datasets/segment/index.md
+++ b/docs/en/datasets/segment/index.md
@@ -84,7 +84,7 @@ The `train` and `val` fields specify the paths to the directories containing the
```bash
# Start training from a pretrained *.pt model
- yolo detect train data=coco8-seg.yaml model=yolov8n-seg.pt epochs=100 imgsz=640
+ yolo segment train data=coco8-seg.yaml model=yolov8n-seg.pt epochs=100 imgsz=640
```
## Supported Datasets
diff --git a/docs/en/models/sam-2.md b/docs/en/models/sam-2.md
index 001bd89b60..ef76f8a3cf 100644
--- a/docs/en/models/sam-2.md
+++ b/docs/en/models/sam-2.md
@@ -6,10 +6,6 @@ keywords: SAM 2, Segment Anything, video segmentation, image segmentation, promp
# SAM 2: Segment Anything Model 2
-!!! Note "🚧 SAM 2 Integration In Progress 🚧"
-
- The SAM 2 features described in this documentation are currently not enabled in the `ultralytics` package. The Ultralytics team is actively working on integrating SAM 2, and these capabilities should be available soon. We appreciate your patience as we work to implement this exciting new model.
-
SAM 2, the successor to Meta's [Segment Anything Model (SAM)](sam.md), is a cutting-edge tool designed for comprehensive object segmentation in both images and videos. It excels in handling complex visual data through a unified, promptable model architecture that supports real-time processing and zero-shot generalization.
![SAM 2 Example Results](https://github.com/facebookresearch/segment-anything-2/raw/main/assets/sa_v_dataset.jpg?raw=true)
@@ -105,10 +101,6 @@ pip install ultralytics
## How to Use SAM 2: Versatility in Image and Video Segmentation
-!!! Note "🚧 SAM 2 Integration In Progress 🚧"
-
- The SAM 2 features described in this documentation are currently not enabled in the `ultralytics` package. The Ultralytics team is actively working on integrating SAM 2, and these capabilities should be available soon. We appreciate your patience as we work to implement this exciting new model.
-
The following table details the available SAM 2 models, their pre-trained weights, supported tasks, and compatibility with different operating modes like [Inference](../modes/predict.md), [Validation](../modes/val.md), [Training](../modes/train.md), and [Export](../modes/export.md).
| Model Type | Pre-trained Weights | Tasks Supported | Inference | Validation | Training | Export |
diff --git a/docs/en/quickstart.md b/docs/en/quickstart.md
index 93ccaaa3e7..6a5a21dba4 100644
--- a/docs/en/quickstart.md
+++ b/docs/en/quickstart.md
@@ -162,8 +162,8 @@ The Ultralytics command line interface (CLI) allows for simple single-line comma
yolo TASK MODE ARGS
```
- - `TASK` (optional) is one of ([detect](tasks/detect.md), [segment](tasks/segment.md), [classify](tasks/classify.md), [pose](tasks/pose.md))
- - `MODE` (required) is one of ([train](modes/train.md), [val](modes/val.md), [predict](modes/predict.md), [export](modes/export.md), [track](modes/track.md))
+ - `TASK` (optional) is one of ([detect](tasks/detect.md), [segment](tasks/segment.md), [classify](tasks/classify.md), [pose](tasks/pose.md), [obb](tasks/obb.md))
+ - `MODE` (required) is one of ([train](modes/train.md), [val](modes/val.md), [predict](modes/predict.md), [export](modes/export.md), [track](modes/track.md), [benchmark](modes/benchmark.md))
- `ARGS` (optional) are `arg=value` pairs like `imgsz=640` that override defaults.
See all `ARGS` in the full [Configuration Guide](usage/cfg.md) or with the `yolo cfg` CLI command.
diff --git a/docs/en/reference/data/converter.md b/docs/en/reference/data/converter.md
index d1b63f2f0e..2854e7d228 100644
--- a/docs/en/reference/data/converter.md
+++ b/docs/en/reference/data/converter.md
@@ -23,6 +23,10 @@ keywords: Ultralytics, data conversion, YOLO models, COCO, DOTA, YOLO bbox2segme