Skip to content

YOLOv10: Real-Time End-to-End Object Detection

YOLOv10, built on the Ultralytics Python package by researchers at Tsinghua University, introduces a new approach to real-time object detection, addressing both the post-processing and model architecture deficiencies found in previous YOLO versions. By eliminating non-maximum suppression (NMS) and optimizing various model components, YOLOv10 achieves state-of-the-art performance with significantly reduced computational overhead. Extensive experiments demonstrate its superior accuracy-latency trade-offs across multiple model scales.

YOLOv10 consistent dual assignment for NMS-free training



Watch: How to Train YOLOv10 on SKU-110k Dataset using Ultralytics | Retail Dataset

Overview

Real-time object detection aims to accurately predict object categories and positions in images with low latency. The YOLO series has been at the forefront of this research due to its balance between performance and efficiency. However, reliance on NMS and architectural inefficiencies have hindered optimal performance. YOLOv10 addresses these issues by introducing consistent dual assignments for NMS-free training and a holistic efficiency-accuracy driven model design strategy.

Architecture

The architecture of YOLOv10 builds upon the strengths of previous YOLO models while introducing several key innovations. The model architecture consists of the following components:

  1. Backbone: Responsible for feature extraction, the backbone in YOLOv10 uses an enhanced version of CSPNet (Cross Stage Partial Network) to improve gradient flow and reduce computational redundancy.
  2. Neck: The neck is designed to aggregate features from different scales and passes them to the head. It includes PAN (Path Aggregation Network) layers for effective multiscale feature fusion.
  3. One-to-Many Head: Generates multiple predictions per object during training to provide rich supervisory signals and improve learning accuracy.
  4. One-to-One Head: Generates a single best prediction per object during inference to eliminate the need for NMS, thereby reducing latency and improving efficiency.

Key Features

  1. NMS-Free Training: Utilizes consistent dual assignments to eliminate the need for NMS, reducing inference latency.
  2. Holistic Model Design: Comprehensive optimization of various components from both efficiency and accuracy perspectives, including lightweight classification heads, spatial-channel decoupled down sampling, and rank-guided block design.
  3. Enhanced Model Capabilities: Incorporates large-kernel convolutions and partial self-attention modules to improve performance without significant computational cost.

Model Variants

YOLOv10 comes in various model scales to cater to different application needs:

  • YOLOv10-N: Nano version for extremely resource-constrained environments.
  • YOLOv10-S: Small version balancing speed and accuracy.
  • YOLOv10-M: Medium version for general-purpose use.
  • YOLOv10-B: Balanced version with increased width for higher accuracy.
  • YOLOv10-L: Large version for higher accuracy at the cost of increased computational resources.
  • YOLOv10-X: Extra-large version for maximum accuracy and performance.

Performance

YOLOv10 outperforms previous YOLO versions and other state-of-the-art models in terms of accuracy and efficiency. For example, YOLOv10-S is 1.8x faster than RT-DETR-R18 with similar AP on the COCO dataset, and YOLOv10-B has 46% less latency and 25% fewer parameters than YOLOv9-C with the same performance.

ModelInput SizeAPvalFLOPs (G)Latency (ms)
YOLOv10-N64038.56.71.84
YOLOv10-S64046.321.62.49
YOLOv10-M64051.159.14.74
YOLOv10-B64052.592.05.74
YOLOv10-L64053.2120.37.28
YOLOv10-X64054.4160.410.70

Latency measured with TensorRT FP16 on T4 GPU.

Methodology

Consistent Dual Assignments for NMS-Free Training

YOLOv10 employs dual label assignments, combining one-to-many and one-to-one strategies during training to ensure rich supervision and efficient end-to-end deployment. The consistent matching metric aligns the supervision between both strategies, enhancing the quality of predictions during inference.

Holistic Efficiency-Accuracy Driven Model Design

Efficiency Enhancements

  1. Lightweight Classification Head: Reduces the computational overhead of the classification head by using depth-wise separable convolutions.
  2. Spatial-Channel Decoupled Down sampling: Decouples spatial reduction and channel modulation to minimize information loss and computational cost.
  3. Rank-Guided Block Design: Adapts block design based on intrinsic stage redundancy, ensuring optimal parameter utilization.

Accuracy Enhancements

  1. Large-Kernel Convolution: Enlarges the receptive field to enhance feature extraction capability.
  2. Partial Self-Attention (PSA): Incorporates self-attention modules to improve global representation learning with minimal overhead.

Experiments and Results

YOLOv10 has been extensively tested on standard benchmarks like COCO, demonstrating superior performance and efficiency. The model achieves state-of-the-art results across different variants, showcasing significant improvements in latency and accuracy compared to previous versions and other contemporary detectors.

Comparisons

YOLOv10 comparison with SOTA object detectors

Compared to other state-of-the-art detectors:

  • YOLOv10-S / X are 1.8× / 1.3× faster than RT-DETR-R18 / R101 with similar accuracy
  • YOLOv10-B has 25% fewer parameters and 46% lower latency than YOLOv9-C at same accuracy
  • YOLOv10-L / X outperform YOLOv8-L / X by 0.3 AP / 0.5 AP with 1.8× / 2.3× fewer parameters

Here is a detailed comparison of YOLOv10 variants with other state-of-the-art models:

ModelParams
(M)
FLOPs
(G)
mAPval
50-95
Latency
(ms)
Latency-forward
(ms)
YOLOv6-3.0-N4.711.437.02.691.76
Gold-YOLO-N5.612.139.62.921.82
YOLOv8-N3.28.737.36.161.77
YOLOv10-N2.36.739.51.841.79
YOLOv6-3.0-S18.545.344.33.422.35
Gold-YOLO-S21.546.045.43.822.73
YOLOv8-S11.228.644.97.072.33
YOLOv10-S7.221.646.82.492.39
RT-DETR-R1820.060.046.54.584.49
YOLOv6-3.0-M34.985.849.15.634.56
Gold-YOLO-M41.387.549.86.385.45
YOLOv8-M25.978.950.69.505.09
YOLOv10-M15.459.151.34.744.63
YOLOv6-3.0-L59.6150.751.89.027.90
Gold-YOLO-L75.1151.751.810.659.78
YOLOv8-L43.7165.252.912.398.06
RT-DETR-R5042.0136.053.19.209.07
YOLOv10-L24.4120.353.47.287.21
YOLOv8-X68.2257.853.916.8612.83
RT-DETR-R10176.0259.054.313.7113.58
YOLOv10-X29.5160.454.410.7010.60

Usage Examples

For predicting new images with YOLOv10:

Example

from ultralytics import YOLO

# Load a pre-trained YOLOv10n model
model = YOLO("yolov10n.pt")

# Perform object detection on an image
results = model("image.jpg")

# Display the results
results[0].show()
# Load a COCO-pretrained YOLOv10n model and run inference on the 'bus.jpg' image
yolo detect predict model=yolov10n.pt source=path/to/bus.jpg

For training YOLOv10 on a custom dataset:

Example

from ultralytics import YOLO

# Load YOLOv10n model from scratch
model = YOLO("yolov10n.yaml")

# Train the model
model.train(data="coco8.yaml", epochs=100, imgsz=640)
# Build a YOLOv10n model from scratch and train it on the COCO8 example dataset for 100 epochs
yolo train model=yolov10n.yaml data=coco8.yaml epochs=100 imgsz=640

# Build a YOLOv10n model from scratch and run inference on the 'bus.jpg' image
yolo predict model=yolov10n.yaml source=path/to/bus.jpg

Supported Tasks and Modes

The YOLOv10 models series offers a range of models, each optimized for high-performance Object Detection. These models cater to varying computational needs and accuracy requirements, making them versatile for a wide array of applications.

ModelFilenamesTasksInferenceValidationTrainingExport
YOLOv10yolov10n.pt yolov10s.pt yolov10m.pt yolov10l.pt yolov10x.ptObject Detection

Exporting YOLOv10

Due to the new operations introduced with YOLOv10, not all export formats provided by Ultralytics are currently supported. The following table outlines which formats have been successfully converted using Ultralytics for YOLOv10. Feel free to open a pull request if you're able to provide a contribution change for adding export support of additional formats for YOLOv10.

Export FormatExport SupportExported Model InferenceNotes
TorchScriptStandard PyTorch model format.
ONNXWidely supported for deployment.
OpenVINOOptimized for Intel hardware.
TensorRTOptimized for NVIDIA GPUs.
CoreMLLimited to Apple devices.
TF SavedModelTensorFlow's standard model format.
TF GraphDefLegacy TensorFlow format.
TF LiteOptimized for mobile and embedded.
TF Edge TPUSpecific to Google's Edge TPU devices.
TF.jsJavaScript environment for browser use.
PaddlePaddlePopular in China; less global support.
NCNNLayer torch.topk not exists or registered

Conclusion

YOLOv10 sets a new standard in real-time object detection by addressing the shortcomings of previous YOLO versions and incorporating innovative design strategies. Its ability to deliver high accuracy with low computational cost makes it an ideal choice for a wide range of real-world applications.

Citations and Acknowledgements

We would like to acknowledge the YOLOv10 authors from Tsinghua University for their extensive research and significant contributions to the Ultralytics framework:

@article{THU-MIGyolov10,
  title={YOLOv10: Real-Time End-to-End Object Detection},
  author={Ao Wang, Hui Chen, Lihao Liu, et al.},
  journal={arXiv preprint arXiv:2405.14458},
  year={2024},
  institution={Tsinghua University},
  license = {AGPL-3.0}
}

For detailed implementation, architectural innovations, and experimental results, please refer to the YOLOv10 research paper and GitHub repository by the Tsinghua University team.

FAQ

What is YOLOv10 and how does it differ from previous YOLO versions?

YOLOv10, developed by researchers at Tsinghua University, introduces several key innovations to real-time object detection. It eliminates the need for non-maximum suppression (NMS) by employing consistent dual assignments during training and optimized model components for superior performance with reduced computational overhead. For more details on its architecture and key features, check out the YOLOv10 overview section.

How can I get started with running inference using YOLOv10?

For easy inference, you can use the Ultralytics YOLO Python library or the command line interface (CLI). Below are examples of predicting new images using YOLOv10:

Example

from ultralytics import YOLO

# Load the pre-trained YOLOv10-N model
model = YOLO("yolov10n.pt")
results = model("image.jpg")
results[0].show()
yolo detect predict model=yolov10n.pt source=path/to/image.jpg

For more usage examples, visit our Usage Examples section.

Which model variants does YOLOv10 offer and what are their use cases?

YOLOv10 offers several model variants to cater to different use cases:

  • YOLOv10-N: Suitable for extremely resource-constrained environments
  • YOLOv10-S: Balances speed and accuracy
  • YOLOv10-M: General-purpose use
  • YOLOv10-B: Higher accuracy with increased width
  • YOLOv10-L: High accuracy at the cost of computational resources
  • YOLOv10-X: Maximum accuracy and performance

Each variant is designed for different computational needs and accuracy requirements, making them versatile for a variety of applications. Explore the Model Variants section for more information.

How does the NMS-free approach in YOLOv10 improve performance?

YOLOv10 eliminates the need for non-maximum suppression (NMS) during inference by employing consistent dual assignments for training. This approach reduces inference latency and enhances prediction efficiency. The architecture also includes a one-to-one head for inference, ensuring that each object gets a single best prediction. For a detailed explanation, see the Consistent Dual Assignments for NMS-Free Training section.

Where can I find the export options for YOLOv10 models?

YOLOv10 supports several export formats, including TorchScript, ONNX, OpenVINO, and TensorRT. However, not all export formats provided by Ultralytics are currently supported for YOLOv10 due to its new operations. For details on the supported formats and instructions on exporting, visit the Exporting YOLOv10 section.

What are the performance benchmarks for YOLOv10 models?

YOLOv10 outperforms previous YOLO versions and other state-of-the-art models in both accuracy and efficiency. For example, YOLOv10-S is 1.8x faster than RT-DETR-R18 with a similar AP on the COCO dataset. YOLOv10-B shows 46% less latency and 25% fewer parameters than YOLOv9-C with the same performance. Detailed benchmarks can be found in the Comparisons section.

📅 Created 5 months ago ✏️ Updated 1 month ago

Comments