Ultralytics YOLO11 Modes
ΠΠ²Π΅Π΄Π΅Π½ΠΈΠ΅
Ultralytics YOLO11 is not just another object detection model; it's a versatile framework designed to cover the entire lifecycle of machine learning modelsβfrom data ingestion and model training to validation, deployment, and real-world tracking. Each mode serves a specific purpose and is engineered to offer you the flexibility and efficiency required for different tasks and use-cases.
Π‘ΠΌΠΎΡΡΠΈ: Ultralytics Π Π΅ΠΆΠΈΠΌΡ Π‘Π°ΠΌΠΎΡΡΠΈΡΠ΅Π»Ρ: Train, Validate, Predict, Export & Benchmark.
Π Π΅ΠΆΠΈΠΌΡ Ρ ΠΏΠ΅ΡΠ²ΠΎΠ³ΠΎ Π²Π·Π³Π»ΡΠ΄Π°
Understanding the different modes that Ultralytics YOLO11 supports is critical to getting the most out of your models:
- Π Π΅ΠΆΠΈΠΌ ΡΡΠ΅Π½ΠΈΡΠΎΠ²ΠΊΠΈ: Π£ΡΠΎΡΠ½ΠΈ ΡΠ²ΠΎΡ ΠΌΠΎΠ΄Π΅Π»Ρ Π½Π° ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»ΡΡΠΊΠΈΡ ΠΈΠ»ΠΈ ΠΏΡΠ΅Π΄Π²Π°ΡΠΈΡΠ΅Π»ΡΠ½ΠΎ Π·Π°Π³ΡΡΠΆΠ΅Π½Π½ΡΡ Π½Π°Π±ΠΎΡΠ°Ρ Π΄Π°Π½Π½ΡΡ .
- Π Π΅ΠΆΠΈΠΌ Val: ΠΠΎΠ½ΡΡΠΎΠ»ΡΠ½Π°Ρ ΡΠΎΡΠΊΠ° ΠΏΠΎΡΠ»Π΅ ΡΡΠ΅Π½ΠΈΡΠΎΠ²ΠΊΠΈ Π΄Π»Ρ ΠΏΡΠΎΠ²Π΅ΡΠΊΠΈ ΡΠ°Π±ΠΎΡΠΎΡΠΏΠΎΡΠΎΠ±Π½ΠΎΡΡΠΈ ΠΌΠΎΠ΄Π΅Π»ΠΈ.
- Π Π΅ΠΆΠΈΠΌ Predict: Π Π°ΡΠΊΡΠΎΠΉ ΠΏΡΠ΅Π΄ΡΠΊΠ°Π·Π°ΡΠ΅Π»ΡΠ½ΡΡ ΡΠΈΠ»Ρ ΡΠ²ΠΎΠ΅ΠΉ ΠΌΠΎΠ΄Π΅Π»ΠΈ Π½Π° ΡΠ΅Π°Π»ΡΠ½ΡΡ Π΄Π°Π½Π½ΡΡ .
- Export mode: Make your model deployment-ready in various formats.
- Π Π΅ΠΆΠΈΠΌ ΡΠ»Π΅ΠΆΠ΅Π½ΠΈΡ: Π Π°ΡΡΠΈΡΡ ΡΠ²ΠΎΡ ΠΌΠΎΠ΄Π΅Π»Ρ ΠΎΠ±Π½Π°ΡΡΠΆΠ΅Π½ΠΈΡ ΠΎΠ±ΡΠ΅ΠΊΡΠΎΠ² Π΄ΠΎ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠΉ ΡΠ»Π΅ΠΆΠ΅Π½ΠΈΡ Π² ΡΠ΅Π°Π»ΡΠ½ΠΎΠΌ Π²ΡΠ΅ΠΌΠ΅Π½ΠΈ.
- Π Π΅ΠΆΠΈΠΌ Π±Π΅Π½ΡΠΌΠ°ΡΠΊΠ°: ΠΡΠΎΠ°Π½Π°Π»ΠΈΠ·ΠΈΡΡΠΉ ΡΠΊΠΎΡΠΎΡΡΡ ΠΈ ΡΠΎΡΠ½ΠΎΡΡΡ ΡΠ²ΠΎΠ΅ΠΉ ΠΌΠΎΠ΄Π΅Π»ΠΈ Π² ΡΠ°Π·Π»ΠΈΡΠ½ΡΡ ΡΡΠ΅Π΄Π°Ρ ΡΠ°Π·Π²Π΅ΡΡΡΠ²Π°Π½ΠΈΡ.
This comprehensive guide aims to give you an overview and practical insights into each mode, helping you harness the full potential of YOLO11.
ΠΠΎΠ΅Π·Π΄
Train mode is used for training a YOLO11 model on a custom dataset. In this mode, the model is trained using the specified dataset and hyperparameters. The training process involves optimizing the model's parameters so that it can accurately predict the classes and locations of objects in an image.
ΠΡΠ»
Val mode is used for validating a YOLO11 model after it has been trained. In this mode, the model is evaluated on a validation set to measure its accuracy and generalization performance. This mode can be used to tune the hyperparameters of the model to improve its performance.
ΠΡΠ΅Π΄ΡΠΊΠ°Π·ΡΠ²Π°ΠΉ
Predict mode is used for making predictions using a trained YOLO11 model on new images or videos. In this mode, the model is loaded from a checkpoint file, and the user can provide images or videos to perform inference. The model predicts the classes and locations of objects in the input images or videos.
ΠΡΠ΅Π΄ΡΠΊΠ°Π·Π°ΡΡ ΠΏΡΠΈΠΌΠ΅ΡΡ
ΠΠΊΡΠΏΠΎΡΡ
Export mode is used for exporting a YOLO11 model to a format that can be used for deployment. In this mode, the model is converted to a format that can be used by other software applications or hardware devices. This mode is useful when deploying the model to production environments.
ΠΡΠΈΠΌΠ΅ΡΡ ΡΠΊΡΠΏΠΎΡΡΠ°
Π’ΡΠ΅ΠΊ
Track mode is used for tracking objects in real-time using a YOLO11 model. In this mode, the model is loaded from a checkpoint file, and the user can provide a live video stream to perform real-time object tracking. This mode is useful for applications such as surveillance systems or self-driving cars.
ΠΠ΅Π½ΡΠΌΠ°ΡΠΊ
Benchmark mode is used to profile the speed and accuracy of various export formats for YOLO11. The benchmarks provide information on the size of the exported format, its mAP50-95
metrics (for object detection, segmentation, and pose) or accuracy_top5
metrics (for classification), and the inference time in milliseconds per image across various formats like ONNX, OpenVINO, TensorRT, and others. This information can help users choose the optimal export format for their specific use case based on their requirements for speed and accuracy.
ΠΡΠΈΠΌΠ΅ΡΡ ΡΡΠ°Π»ΠΎΠ½ΠΎΠ²
ΠΠΠΠ ΠΠ‘Π« Π ΠΠ’ΠΠΠ’Π«
How do I train a custom object detection model with Ultralytics YOLO11?
Training a custom object detection model with Ultralytics YOLO11 involves using the train mode. You need a dataset formatted in YOLO format, containing images and corresponding annotation files. Use the following command to start the training process:
ΠΡΠΈΠΌΠ΅Ρ
ΠΠ° Π±ΠΎΠ»Π΅Π΅ ΠΏΠΎΠ΄ΡΠΎΠ±Π½ΡΠΌΠΈ ΠΈΠ½ΡΡΡΡΠΊΡΠΈΡΠΌΠΈ ΡΡ ΠΌΠΎΠΆΠ΅ΡΡ ΠΎΠ±ΡΠ°ΡΠΈΡΡΡΡ ΠΊ ΡΡΠΊΠΎΠ²ΠΎΠ΄ΡΡΠ²Ρ ΠΏΠΎ ΡΡΠ΅Π½ΠΈΡΠΎΠ²ΠΊΠ°ΠΌUltralytics .
What metrics does Ultralytics YOLO11 use to validate the model's performance?
Ultralytics YOLO11 uses various metrics during the validation process to assess model performance. These include:
- mAP (ΡΡΠ΅Π΄Π½ΡΡ ΡΡΠ΅Π΄Π½ΡΡ ΡΠΎΡΠ½ΠΎΡΡΡ): ΠΠ΄Π΅ΡΡ ΠΎΡΠ΅Π½ΠΈΠ²Π°Π΅ΡΡΡ ΡΠΎΡΠ½ΠΎΡΡΡ ΠΎΠ±Π½Π°ΡΡΠΆΠ΅Π½ΠΈΡ ΠΎΠ±ΡΠ΅ΠΊΡΠΎΠ².
- IOU (Intersection over Union): ΠΠ·ΠΌΠ΅ΡΡΠ΅Ρ ΠΏΠ΅ΡΠ΅ΠΊΡΡΡΠΈΠ΅ ΠΌΠ΅ΠΆΠ΄Ρ ΠΏΡΠ΅Π΄ΡΠΊΠ°Π·Π°Π½Π½ΡΠΌΠΈ ΠΈ ΠΈΡΡΠΈΠ½Π½ΡΠΌΠΈ Π³ΡΠ°Π½ΠΈΡΠ°ΠΌΠΈ.
- Precision and Recall: Precision measures the ratio of true positive detections to the total detected positives, while recall measures the ratio of true positive detections to the total actual positives.
Π’Ρ ΠΌΠΎΠΆΠ΅ΡΡ Π²ΡΠΏΠΎΠ»Π½ΠΈΡΡ ΡΠ»Π΅Π΄ΡΡΡΡΡ ΠΊΠΎΠΌΠ°Π½Π΄Ρ, ΡΡΠΎΠ±Ρ Π·Π°ΠΏΡΡΡΠΈΡΡ ΠΏΡΠΎΠ²Π΅ΡΠΊΡ:
ΠΡΠΈΠΌΠ΅Ρ
ΠΠΎΠ΄ΡΠΎΠ±Π½Π΅Π΅ ΠΎΠ± ΡΡΠΎΠΌ ΡΠΈΡΠ°ΠΉ Π² ΡΡΠΊΠΎΠ²ΠΎΠ΄ΡΡΠ²Π΅ ΠΏΠΎ Π²Π°Π»ΠΈΠ΄Π°ΡΠΈΠΈ.
How can I export my YOLO11 model for deployment?
Ultralytics YOLO11 offers export functionality to convert your trained model into various deployment formats such as ONNX, TensorRT, CoreML, and more. Use the following example to export your model:
ΠΡΠΈΠΌΠ΅Ρ
ΠΠΎΠ΄ΡΠΎΠ±Π½ΡΠ΅ ΡΠ°Π³ΠΈ Π΄Π»Ρ ΠΊΠ°ΠΆΠ΄ΠΎΠ³ΠΎ ΡΠΎΡΠΌΠ°ΡΠ° ΡΠΊΡΠΏΠΎΡΡΠ° ΠΌΠΎΠΆΠ½ΠΎ Π½Π°ΠΉΡΠΈ Π² ΡΡΠΊΠΎΠ²ΠΎΠ΄ΡΡΠ²Π΅ ΠΏΠΎ ΡΠΊΡΠΏΠΎΡΡΡ.
What is the purpose of the benchmark mode in Ultralytics YOLO11?
Benchmark mode in Ultralytics YOLO11 is used to analyze the speed and accuracy of various export formats such as ONNX, TensorRT, and OpenVINO. It provides metrics like model size, mAP50-95
Π΄Π»Ρ ΠΎΠ±Π½Π°ΡΡΠΆΠ΅Π½ΠΈΡ ΠΎΠ±ΡΠ΅ΠΊΡΠΎΠ², Π° ΡΠ°ΠΊΠΆΠ΅ Π²ΡΠ΅ΠΌΡ Π²ΡΠ²ΠΎΠ΄Π° Π΄Π»Ρ ΡΠ°Π·Π»ΠΈΡΠ½ΡΡ
Π°ΠΏΠΏΠ°ΡΠ°ΡΠ½ΡΡ
ΡΡΡΠ°Π½ΠΎΠ²ΠΎΠΊ, ΡΡΠΎ ΠΏΠΎΠΌΠΎΠΆΠ΅Ρ ΡΠ΅Π±Π΅ Π²ΡΠ±ΡΠ°ΡΡ Π½Π°ΠΈΠ±ΠΎΠ»Π΅Π΅ ΠΏΠΎΠ΄Ρ
ΠΎΠ΄ΡΡΠΈΠΉ ΡΠΎΡΠΌΠ°Ρ Π΄Π»Ρ ΡΠ²ΠΎΠΈΡ
ΠΏΠΎΡΡΠ΅Π±Π½ΠΎΡΡΠ΅ΠΉ Π² ΡΠ°Π·Π²Π΅ΡΡΡΠ²Π°Π½ΠΈΠΈ.
ΠΡΠΈΠΌΠ΅Ρ
ΠΠ° Π±ΠΎΠ»Π΅Π΅ ΠΏΠΎΠ΄ΡΠΎΠ±Π½ΠΎΠΉ ΠΈΠ½ΡΠΎΡΠΌΠ°ΡΠΈΠ΅ΠΉ ΠΎΠ±ΡΠ°ΡΠ°ΠΉΡΡ ΠΊ ΡΡΠΊΠΎΠ²ΠΎΠ΄ΡΡΠ²Ρ ΠΏΠΎ Π±Π΅Π½ΡΠΌΠ°ΡΠΊΠ°ΠΌ.
How can I perform real-time object tracking using Ultralytics YOLO11?
Real-time object tracking can be achieved using the track mode in Ultralytics YOLO11. This mode extends object detection capabilities to track objects across video frames or live feeds. Use the following example to enable tracking:
ΠΡΠΈΠΌΠ΅Ρ
ΠΠΎΠ΄ΡΠΎΠ±Π½ΡΠ΅ ΠΈΠ½ΡΡΡΡΠΊΡΠΈΠΈ ΠΌΠΎΠΆΠ½ΠΎ Π½Π°ΠΉΡΠΈ Π² ΡΡΠΊΠΎΠ²ΠΎΠ΄ΡΡΠ²Π΅ ΠΏΠΎ ΡΡΠ΅ΠΊΡ.