YOLO11 Tasks, Modes, Usage, Macros and Solutions Updates (#16593)
Signed-off-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
3093fc9ec2
commit
51e93d6111
31 changed files with 541 additions and 541 deletions
|
|
@ -25,16 +25,16 @@ The output of an object detector is a set of bounding boxes that enclose the obj
|
|||
|
||||
!!! tip
|
||||
|
||||
YOLOv8 Detect models are the default YOLOv8 models, i.e. `yolov8n.pt` and are pretrained on [COCO](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/coco.yaml).
|
||||
YOLO11 Detect models are the default YOLO11 models, i.e. `yolo11n.pt` and are pretrained on [COCO](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/coco.yaml).
|
||||
|
||||
## [Models](https://github.com/ultralytics/ultralytics/tree/main/ultralytics/cfg/models/v8)
|
||||
## [Models](https://github.com/ultralytics/ultralytics/tree/main/ultralytics/cfg/models/11)
|
||||
|
||||
YOLOv8 pretrained Detect models are shown here. Detect, Segment and Pose models are pretrained on the [COCO](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/coco.yaml) dataset, while Classify models are pretrained on the [ImageNet](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/ImageNet.yaml) dataset.
|
||||
YOLO11 pretrained Detect models are shown here. Detect, Segment and Pose models are pretrained on the [COCO](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/coco.yaml) dataset, while Classify models are pretrained on the [ImageNet](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/ImageNet.yaml) dataset.
|
||||
|
||||
[Models](https://github.com/ultralytics/ultralytics/tree/main/ultralytics/cfg/models) download automatically from the latest Ultralytics [release](https://github.com/ultralytics/assets/releases) on first use.
|
||||
|
||||
| Model | size<br><sup>(pixels) | mAP<sup>val<br>50-95 | Speed<br><sup>CPU ONNX<br>(ms) | Speed<br><sup>T4 TensorRT10<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>(B) |
|
||||
|--------------------------------------------------------------------------------------|-----------------------|----------------------|--------------------------------|-------------------------------------|--------------------|-------------------|
|
||||
| ------------------------------------------------------------------------------------ | --------------------- | -------------------- | ------------------------------ | ----------------------------------- | ------------------ | ----------------- |
|
||||
| [YOLO11n](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt) | 640 | 39.5 | 56.1 ± 0.8 | 1.5 ± 0.0 | 2.6 | 6.5 |
|
||||
| [YOLO11s](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s.pt) | 640 | 47.0 | 90.0 ± 1.2 | 2.5 ± 0.0 | 9.4 | 21.5 |
|
||||
| [YOLO11m](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m.pt) | 640 | 51.5 | 183.2 ± 2.0 | 4.7 ± 0.1 | 20.1 | 68.0 |
|
||||
|
|
@ -46,7 +46,7 @@ YOLOv8 pretrained Detect models are shown here. Detect, Segment and Pose models
|
|||
|
||||
## Train
|
||||
|
||||
Train YOLOv8n on the COCO8 dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) at image size 640. For a full list of available arguments see the [Configuration](../usage/cfg.md) page.
|
||||
Train YOLO11n on the COCO8 dataset for 100 [epochs](https://www.ultralytics.com/glossary/epoch) at image size 640. For a full list of available arguments see the [Configuration](../usage/cfg.md) page.
|
||||
|
||||
!!! example
|
||||
|
||||
|
|
@ -56,9 +56,9 @@ Train YOLOv8n on the COCO8 dataset for 100 [epochs](https://www.ultralytics.com/
|
|||
from ultralytics import YOLO
|
||||
|
||||
# Load a model
|
||||
model = YOLO("yolov8n.yaml") # build a new model from YAML
|
||||
model = YOLO("yolov8n.pt") # load a pretrained model (recommended for training)
|
||||
model = YOLO("yolov8n.yaml").load("yolov8n.pt") # build from YAML and transfer weights
|
||||
model = YOLO("yolo11n.yaml") # build a new model from YAML
|
||||
model = YOLO("yolo11n.pt") # load a pretrained model (recommended for training)
|
||||
model = YOLO("yolo11n.yaml").load("yolo11n.pt") # build from YAML and transfer weights
|
||||
|
||||
# Train the model
|
||||
results = model.train(data="coco8.yaml", epochs=100, imgsz=640)
|
||||
|
|
@ -68,13 +68,13 @@ Train YOLOv8n on the COCO8 dataset for 100 [epochs](https://www.ultralytics.com/
|
|||
|
||||
```bash
|
||||
# Build a new model from YAML and start training from scratch
|
||||
yolo detect train data=coco8.yaml model=yolov8n.yaml epochs=100 imgsz=640
|
||||
yolo detect train data=coco8.yaml model=yolo11n.yaml epochs=100 imgsz=640
|
||||
|
||||
# Start training from a pretrained *.pt model
|
||||
yolo detect train data=coco8.yaml model=yolov8n.pt epochs=100 imgsz=640
|
||||
yolo detect train data=coco8.yaml model=yolo11n.pt epochs=100 imgsz=640
|
||||
|
||||
# Build a new model from YAML, transfer pretrained weights to it and start training
|
||||
yolo detect train data=coco8.yaml model=yolov8n.yaml pretrained=yolov8n.pt epochs=100 imgsz=640
|
||||
yolo detect train data=coco8.yaml model=yolo11n.yaml pretrained=yolo11n.pt epochs=100 imgsz=640
|
||||
```
|
||||
|
||||
### Dataset format
|
||||
|
|
@ -83,7 +83,7 @@ YOLO detection dataset format can be found in detail in the [Dataset Guide](../d
|
|||
|
||||
## Val
|
||||
|
||||
Validate trained YOLOv8n model [accuracy](https://www.ultralytics.com/glossary/accuracy) on the COCO8 dataset. No arguments are needed as the `model` retains its training `data` and arguments as model attributes.
|
||||
Validate trained YOLO11n model [accuracy](https://www.ultralytics.com/glossary/accuracy) on the COCO8 dataset. No arguments are needed as the `model` retains its training `data` and arguments as model attributes.
|
||||
|
||||
!!! example
|
||||
|
||||
|
|
@ -93,7 +93,7 @@ Validate trained YOLOv8n model [accuracy](https://www.ultralytics.com/glossary/a
|
|||
from ultralytics import YOLO
|
||||
|
||||
# Load a model
|
||||
model = YOLO("yolov8n.pt") # load an official model
|
||||
model = YOLO("yolo11n.pt") # load an official model
|
||||
model = YOLO("path/to/best.pt") # load a custom model
|
||||
|
||||
# Validate the model
|
||||
|
|
@ -107,13 +107,13 @@ Validate trained YOLOv8n model [accuracy](https://www.ultralytics.com/glossary/a
|
|||
=== "CLI"
|
||||
|
||||
```bash
|
||||
yolo detect val model=yolov8n.pt # val official model
|
||||
yolo detect val model=yolo11n.pt # val official model
|
||||
yolo detect val model=path/to/best.pt # val custom model
|
||||
```
|
||||
|
||||
## Predict
|
||||
|
||||
Use a trained YOLOv8n model to run predictions on images.
|
||||
Use a trained YOLO11n model to run predictions on images.
|
||||
|
||||
!!! example
|
||||
|
||||
|
|
@ -123,7 +123,7 @@ Use a trained YOLOv8n model to run predictions on images.
|
|||
from ultralytics import YOLO
|
||||
|
||||
# Load a model
|
||||
model = YOLO("yolov8n.pt") # load an official model
|
||||
model = YOLO("yolo11n.pt") # load an official model
|
||||
model = YOLO("path/to/best.pt") # load a custom model
|
||||
|
||||
# Predict with the model
|
||||
|
|
@ -133,7 +133,7 @@ Use a trained YOLOv8n model to run predictions on images.
|
|||
=== "CLI"
|
||||
|
||||
```bash
|
||||
yolo detect predict model=yolov8n.pt source='https://ultralytics.com/images/bus.jpg' # predict with official model
|
||||
yolo detect predict model=yolo11n.pt source='https://ultralytics.com/images/bus.jpg' # predict with official model
|
||||
yolo detect predict model=path/to/best.pt source='https://ultralytics.com/images/bus.jpg' # predict with custom model
|
||||
```
|
||||
|
||||
|
|
@ -141,7 +141,7 @@ See full `predict` mode details in the [Predict](../modes/predict.md) page.
|
|||
|
||||
## Export
|
||||
|
||||
Export a YOLOv8n model to a different format like ONNX, CoreML, etc.
|
||||
Export a YOLO11n model to a different format like ONNX, CoreML, etc.
|
||||
|
||||
!!! example
|
||||
|
||||
|
|
@ -151,7 +151,7 @@ Export a YOLOv8n model to a different format like ONNX, CoreML, etc.
|
|||
from ultralytics import YOLO
|
||||
|
||||
# Load a model
|
||||
model = YOLO("yolov8n.pt") # load an official model
|
||||
model = YOLO("yolo11n.pt") # load an official model
|
||||
model = YOLO("path/to/best.pt") # load a custom trained model
|
||||
|
||||
# Export the model
|
||||
|
|
@ -161,11 +161,11 @@ Export a YOLOv8n model to a different format like ONNX, CoreML, etc.
|
|||
=== "CLI"
|
||||
|
||||
```bash
|
||||
yolo export model=yolov8n.pt format=onnx # export official model
|
||||
yolo export model=yolo11n.pt format=onnx # export official model
|
||||
yolo export model=path/to/best.pt format=onnx # export custom trained model
|
||||
```
|
||||
|
||||
Available YOLOv8 export formats are in the table below. You can export to any format using the `format` argument, i.e. `format='onnx'` or `format='engine'`. You can predict or validate directly on exported models, i.e. `yolo predict model=yolov8n.onnx`. Usage examples are shown for your model after export completes.
|
||||
Available YOLO11 export formats are in the table below. You can export to any format using the `format` argument, i.e. `format='onnx'` or `format='engine'`. You can predict or validate directly on exported models, i.e. `yolo predict model=yolo11n.onnx`. Usage examples are shown for your model after export completes.
|
||||
|
||||
{% include "macros/export-table.md" %}
|
||||
|
||||
|
|
@ -173,9 +173,9 @@ See full `export` details in the [Export](../modes/export.md) page.
|
|||
|
||||
## FAQ
|
||||
|
||||
### How do I train a YOLOv8 model on my custom dataset?
|
||||
### How do I train a YOLO11 model on my custom dataset?
|
||||
|
||||
Training a YOLOv8 model on a custom dataset involves a few steps:
|
||||
Training a YOLO11 model on a custom dataset involves a few steps:
|
||||
|
||||
1. **Prepare the Dataset**: Ensure your dataset is in the YOLO format. For guidance, refer to our [Dataset Guide](../datasets/detect/index.md).
|
||||
2. **Load the Model**: Use the Ultralytics YOLO library to load a pre-trained model or create a new model from a YAML file.
|
||||
|
|
@ -189,7 +189,7 @@ Training a YOLOv8 model on a custom dataset involves a few steps:
|
|||
from ultralytics import YOLO
|
||||
|
||||
# Load a pretrained model
|
||||
model = YOLO("yolov8n.pt")
|
||||
model = YOLO("yolo11n.pt")
|
||||
|
||||
# Train the model on your custom dataset
|
||||
model.train(data="my_custom_dataset.yaml", epochs=100, imgsz=640)
|
||||
|
|
@ -198,26 +198,26 @@ Training a YOLOv8 model on a custom dataset involves a few steps:
|
|||
=== "CLI"
|
||||
|
||||
```bash
|
||||
yolo detect train data=my_custom_dataset.yaml model=yolov8n.pt epochs=100 imgsz=640
|
||||
yolo detect train data=my_custom_dataset.yaml model=yolo11n.pt epochs=100 imgsz=640
|
||||
```
|
||||
|
||||
For detailed configuration options, visit the [Configuration](../usage/cfg.md) page.
|
||||
|
||||
### What pretrained models are available in YOLOv8?
|
||||
### What pretrained models are available in YOLO11?
|
||||
|
||||
Ultralytics YOLOv8 offers various pretrained models for object detection, segmentation, and pose estimation. These models are pretrained on the COCO dataset or ImageNet for classification tasks. Here are some of the available models:
|
||||
Ultralytics YOLO11 offers various pretrained models for object detection, segmentation, and pose estimation. These models are pretrained on the COCO dataset or ImageNet for classification tasks. Here are some of the available models:
|
||||
|
||||
- [YOLOv8n](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt)
|
||||
- [YOLOv8s](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8s.pt)
|
||||
- [YOLOv8m](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8m.pt)
|
||||
- [YOLOv8l](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8l.pt)
|
||||
- [YOLOv8x](https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8x.pt)
|
||||
- [YOLO11n](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt)
|
||||
- [YOLO11s](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11s.pt)
|
||||
- [YOLO11m](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11m.pt)
|
||||
- [YOLO11l](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11l.pt)
|
||||
- [YOLO11x](https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11x.pt)
|
||||
|
||||
For a detailed list and performance metrics, refer to the [Models](https://github.com/ultralytics/ultralytics/tree/main/ultralytics/cfg/models/v8) section.
|
||||
For a detailed list and performance metrics, refer to the [Models](https://github.com/ultralytics/ultralytics/tree/main/ultralytics/cfg/models/11) section.
|
||||
|
||||
### How can I validate the accuracy of my trained YOLOv8 model?
|
||||
|
||||
To validate the accuracy of your trained YOLOv8 model, you can use the `.val()` method in Python or the `yolo detect val` command in CLI. This will provide metrics like mAP50-95, mAP50, and more.
|
||||
To validate the accuracy of your trained YOLO11 model, you can use the `.val()` method in Python or the `yolo detect val` command in CLI. This will provide metrics like mAP50-95, mAP50, and more.
|
||||
|
||||
!!! example
|
||||
|
||||
|
|
@ -242,9 +242,9 @@ To validate the accuracy of your trained YOLOv8 model, you can use the `.val()`
|
|||
|
||||
For more validation details, visit the [Val](../modes/val.md) page.
|
||||
|
||||
### What formats can I export a YOLOv8 model to?
|
||||
### What formats can I export a YOLO11 model to?
|
||||
|
||||
Ultralytics YOLOv8 allows exporting models to various formats such as ONNX, TensorRT, CoreML, and more to ensure compatibility across different platforms and devices.
|
||||
Ultralytics YOLO11 allows exporting models to various formats such as ONNX, TensorRT, CoreML, and more to ensure compatibility across different platforms and devices.
|
||||
|
||||
!!! example
|
||||
|
||||
|
|
@ -254,7 +254,7 @@ Ultralytics YOLOv8 allows exporting models to various formats such as ONNX, Tens
|
|||
from ultralytics import YOLO
|
||||
|
||||
# Load the model
|
||||
model = YOLO("yolov8n.pt")
|
||||
model = YOLO("yolo11n.pt")
|
||||
|
||||
# Export the model to ONNX format
|
||||
model.export(format="onnx")
|
||||
|
|
@ -263,18 +263,18 @@ Ultralytics YOLOv8 allows exporting models to various formats such as ONNX, Tens
|
|||
=== "CLI"
|
||||
|
||||
```bash
|
||||
yolo export model=yolov8n.pt format=onnx
|
||||
yolo export model=yolo11n.pt format=onnx
|
||||
```
|
||||
|
||||
Check the full list of supported formats and instructions on the [Export](../modes/export.md) page.
|
||||
|
||||
### Why should I use Ultralytics YOLOv8 for object detection?
|
||||
### Why should I use Ultralytics YOLO11 for object detection?
|
||||
|
||||
Ultralytics YOLOv8 is designed to offer state-of-the-art performance for object detection, segmentation, and pose estimation. Here are some key advantages:
|
||||
Ultralytics YOLO11 is designed to offer state-of-the-art performance for object detection, segmentation, and pose estimation. Here are some key advantages:
|
||||
|
||||
1. **Pretrained Models**: Utilize models pretrained on popular datasets like COCO and ImageNet for faster development.
|
||||
2. **High Accuracy**: Achieves impressive mAP scores, ensuring reliable object detection.
|
||||
3. **Speed**: Optimized for real-time inference, making it ideal for applications requiring swift processing.
|
||||
4. **Flexibility**: Export models to various formats like ONNX and TensorRT for deployment across multiple platforms.
|
||||
|
||||
Explore our [Blog](https://www.ultralytics.com/blog) for use cases and success stories showcasing YOLOv8 in action.
|
||||
Explore our [Blog](https://www.ultralytics.com/blog) for use cases and success stories showcasing YOLO11 in action.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue