YOLOv12 is a real-time object detection model introduced in 2025 by Yunjie Tian, Qixiang Ye, and David Doermann. It was presented in the paper YOLOv12: Attention-Centric Real-Time Object Detectors and was later associated with NeurIPS 2025.
YOLOv12 introduces an attention-centric YOLO architecture designed to combine the modeling strengths of attention mechanisms with the fast inference traditionally associated with CNN-based YOLO models.
Its main goals include:
- Real-time object detection
- Attention-based feature modeling
- High detection accuracy
- Low inference latency
- Efficient use of parameters
- Reduced computational requirements
- Flexible model scaling
What Is YOLOv12?
YOLOv12 is a real-time object detection framework that places attention mechanisms at the center of its architecture.
Earlier YOLO generations primarily relied on convolutional neural networks because CNNs generally provide efficient inference.
Attention mechanisms can provide stronger feature modeling, but they traditionally introduce additional computational cost.
YOLOv12 was specifically designed to reduce this tradeoff by creating an attention-centric architecture capable of maintaining competitive real-time speed.
Why YOLOv12 Uses Attention
Attention mechanisms allow a neural network to focus more strongly on important visual relationships within an image.
Instead of treating every feature interaction equally, attention can help the model understand which visual information should receive greater emphasis.
For object detection, this can help improve:
- Feature relationships
- Object representation
- Spatial understanding
- Detection accuracy
- Complex scene analysis
YOLOv12 attempts to achieve these benefits while preserving the speed expected from a YOLO-style detector.
Attention-Centric Architecture
The central concept behind YOLOv12 is its attention-centric network design.
Rather than treating attention as a small optional component, YOLOv12 integrates attention deeply into the architecture.
The researchers designed the model to address a key challenge:
How can attention-based architectures achieve the speed required for real-time object detection?
YOLOv12 attempts to answer this by carefully designing its attention operations and overall network structure for efficient inference.
YOLOv12 Model Variants
The official YOLOv12 repository provides five main object detection model sizes:
- YOLO12n
- YOLO12s
- YOLO12m
- YOLO12l
- YOLO12x
All standard detection models are evaluated using a 640-pixel input resolution in the repository benchmark table.
These variants provide different balances between:
- Detection accuracy
- Inference speed
- Parameter count
- FLOPs
- GPU requirements
YOLO12n
YOLO12n is the Nano model.
The current Turbo benchmark in the official repository reports:
- 40.4 mAP50-95
- 1.60 ms T4 TensorRT10 latency
- 2.5 million parameters
- 6.0 GFLOPs
- 640-pixel input size
YOLO12n is intended for applications where low latency and reduced computation are important.
YOLO12s
YOLO12s is the Small model.
The official Turbo results report:
- 47.6 mAP50-95
- 2.42 ms latency
- 9.1 million parameters
- 19.4 GFLOPs
- 640-pixel input size
It provides a balance between lightweight deployment and stronger detection accuracy.
YOLO12m
YOLO12m is the Medium variant.
The repository reports:
- 52.5 mAP50-95
- 4.27 ms latency
- 19.6 million parameters
- 59.8 GFLOPs
- 640-pixel input size
This model targets applications that need higher accuracy while maintaining fast inference.
YOLO12l
YOLO12l is the Large model.
The current repository results report:
- 53.8 mAP50-95
- 5.83 ms latency
- 26.5 million parameters
- 82.4 GFLOPs
- 640-pixel input size
It offers greater model capacity than the Nano, Small, and Medium variants.
YOLO12x
YOLO12x is the Extra-Large model.
The official Turbo benchmark reports:
- 55.4 mAP50-95
- 10.38 ms latency
- 59.3 million parameters
- 184.6 GFLOPs
- 640-pixel input size
Among the five standard Turbo detection models, YOLO12x provides the highest reported mAP in the repository benchmark table.
YOLOv12 Detection Performance
The current Turbo benchmark in the official repository reports the following results:
| Model | Input Size | mAP50-95 | T4 TensorRT10 Speed | Parameters | FLOPs |
|---|---|---|---|---|---|
| YOLO12n | 640 | 40.4 | 1.60 ms | 2.5M | 6.0G |
| YOLO12s | 640 | 47.6 | 2.42 ms | 9.1M | 19.4G |
| YOLO12m | 640 | 52.5 | 4.27 ms | 19.6M | 59.8G |
| YOLO12l | 640 | 53.8 | 5.83 ms | 26.5M | 82.4G |
| YOLO12x | 640 | 55.4 | 10.38 ms | 59.3M | 184.6G |
These figures come from the current default Turbo results published in the YOLOv12 repository.
YOLOv12 vs YOLOv10 and YOLO11
The original paper reports that YOLOv12-N achieved 40.6% mAP with approximately 1.64 ms latency on a T4 GPU in its v1.0 benchmark.
According to the authors, this represented an improvement of:
- 2.1 percentage points over YOLOv10-N
- 1.2 percentage points over YOLO11-N
while maintaining comparable inference speed.
The current repository also provides updated Turbo checkpoints with slightly different reported values.
YOLOv12 vs RT-DETR
The YOLOv12 paper also compares the model against end-to-end DETR-based detectors.
The authors report that YOLOv12-S outperformed RT-DETR-R18 and RT-DETRv2-R18 while running approximately 42% faster, using about 36% of the computation and 45% of the parameters in their benchmark comparison.
This comparison highlights YOLOv12’s focus on balancing attention-based modeling with deployment efficiency.
YOLOv12 Object Detection
YOLOv12 performs real-time object detection by processing an image and producing predictions describing:
- Object location
- Bounding boxes
- Object classes
- Detection confidence
A typical workflow includes:
- Load an image.
- Resize it to the model input size.
- Extract and process visual features.
- Apply attention-based feature modeling.
- Generate object predictions.
- Predict bounding boxes.
- Predict object classes.
- Filter final detections.
YOLOv12 Training
The official repository provides training through the Ultralytics-style Python API.
The repository’s example configuration trains YOLOv12 using:
- 600 epochs
- 640-pixel image size
- batch size 256
- Multi-GPU training
- Mosaic augmentation
- Scale augmentation
- MixUp settings depending on model size
- Copy-paste augmentation settings depending on model size
The training configuration can be adjusted according to hardware, dataset size, and model variant.
Custom Dataset Training
YOLOv12 can be trained on custom datasets using the training workflow included in the repository.
A custom detection dataset generally requires:
- Training images
- Validation images
- Bounding box annotations
- Object class names
- Dataset configuration
This allows YOLOv12 to be adapted for specialized applications such as:
- Vehicle detection
- Industrial inspection
- Wildlife monitoring
- Agriculture
- Security systems
- Manufacturing
- Retail analytics
- Robotics
YOLOv12 Validation
The repository provides validation through the model API.
The official examples load a pretrained YOLOv12 checkpoint and evaluate it using COCO configuration.
Validation can be used to measure metrics such as:
- Precision
- Recall
- mAP50
- mAP50-95
These metrics help developers evaluate how accurately a trained detector identifies and localizes objects.
YOLOv12 Prediction
YOLOv12 supports direct prediction through the Python API.
The repository demonstrates loading a model and running detection on an image through the Ultralytics YOLO interface.
This makes it possible to integrate YOLOv12 into Python-based computer vision applications.
YOLOv12 Export
YOLOv12 can be exported for optimized inference.
The official repository demonstrates export to:
- TensorRT engine format
- ONNX
Model export is useful when deploying YOLOv12 outside the original Python training environment.
YOLOv12 and TensorRT
YOLOv12 supports TensorRT deployment.
The official performance benchmarks use TensorRT 10 on an NVIDIA T4 GPU for their latency measurements.
TensorRT can help improve inference performance on compatible NVIDIA GPUs through optimized execution.
YOLOv12 and ONNX
The repository also supports exporting YOLOv12 models to ONNX.
ONNX can be useful for:
- Cross-platform deployment
- C++ applications
- Edge systems
- Alternative inference engines
- Production applications
YOLOv12 Turbo
A faster YOLOv12-Turbo version was released in March 2025.
The repository currently identifies the Turbo models as its default detection models.
The Turbo models provide updated speed, parameter, FLOP, and mAP results compared with the earlier v1.0 release.
YOLOv12 Instance Segmentation
The official repository added instance segmentation models in June 2025.
Available segmentation model sizes include:
- YOLOv12n-seg
- YOLOv12s-seg
- YOLOv12m-seg
- YOLOv12l-seg
- YOLOv12x-seg
The repository reports both bounding-box mAP and mask mAP for these models.
YOLOv12 Segmentation Performance
The official repository reports the following segmentation mask mAP50-95 results:
- YOLOv12n-seg: 32.8
- YOLOv12s-seg: 38.6
- YOLOv12m-seg: 42.3
- YOLOv12l-seg: 43.2
- YOLOv12x-seg: 44.2
Instance segmentation allows the model to identify the shape of individual objects rather than only producing rectangular bounding boxes.
YOLOv12 Image Classification
YOLOv12 classification models were released in July 2025.
Available classification variants include:
- YOLOv12n-cls
- YOLOv12s-cls
- YOLOv12m-cls
- YOLOv12l-cls
- YOLOv12x-cls
These models use a 224-pixel image size in the official classification benchmark.
YOLOv12 Classification Performance
The official repository reports top-1 classification accuracy values of:
- YOLOv12n-cls: 71.7%
- YOLOv12s-cls: 76.4%
- YOLOv12m-cls: 78.8%
- YOLOv12l-cls: 79.5%
- YOLOv12x-cls: 80.1%
The repository also provides top-5 accuracy, inference speed, parameter count, and FLOPs for each variant.
YOLOv12 Installation
The repository recommends creating a dedicated Python environment and installing the project dependencies.
Its current example uses:
- Python 3.11
- Supervision
- Flash Attention
- Repository requirements
- Editable package installation
This setup prepares the environment for training, validation, prediction, and export.
Flash Attention
The current installation instructions include Flash Attention as part of the recommended YOLOv12 environment.
Efficient attention implementations are important for YOLOv12 because its architecture depends more heavily on attention mechanisms than earlier primarily CNN-based YOLO models.
YOLOv12 Demo
The repository includes an app.py demonstration application.
It can be launched locally and accessed through a browser-based interface.
This provides a simple way to experiment with YOLOv12 predictions without building a separate frontend.
YOLOv12 Repository Structure
The official repository includes directories and files such as:
assetsdockerexampleslogstestsultralyticsapp.pypyproject.tomlrequirements.txt
The repository states that its implementation is based on the Ultralytics codebase.
YOLOv12 Licensing
The repository currently uses the AGPL-3.0 license.
Developers planning commercial deployment should review the license terms and ensure their usage complies with the applicable requirements.
Advantages of YOLOv12
Attention-Centric Design
YOLOv12 makes attention mechanisms a central part of the detector architecture.
High Detection Accuracy
The authors report strong detection accuracy compared with several popular real-time detectors.
Competitive Real-Time Speed
YOLOv12 is specifically designed to retain real-time performance despite using attention-heavy modeling.
Multiple Model Sizes
Nano through Extra-Large variants allow users to select a model appropriate for their hardware.
Segmentation Support
The project now provides dedicated instance segmentation checkpoints.
Classification Support
Dedicated image classification models are also available.
Export Support
YOLOv12 supports TensorRT and ONNX export through the provided workflow.
YOLOv12 Limitations
Attention Can Be Computationally Expensive
Attention-based architectures can require more memory and computation than simple convolutional designs. YOLOv12 specifically attempts to reduce this disadvantage, but hardware and runtime optimization still matter.
Larger Models Require Stronger Hardware
YOLO12l and YOLO12x have significantly higher FLOPs and parameter counts than the Nano and Small variants.
Performance Depends on Deployment Environment
Actual inference latency depends on:
- GPU
- Precision
- Runtime
- Input size
- Model variant
- Export format
The repository’s published latency values are specifically measured using T4 TensorRT10 benchmarks.
YOLOv12 Use Cases
YOLOv12 can be used for applications such as:
- Real-time object detection
- Vehicle detection
- Person detection
- Traffic monitoring
- Security systems
- Industrial inspection
- Robotics
- Drone vision
- Manufacturing
- Agriculture
- Wildlife monitoring
- Instance segmentation
- Image classification
- Computer vision research
YOLOv12 Release
The original YOLOv12 paper was submitted to arXiv on February 18, 2025.
The repository subsequently received several updates, including YOLOv12-Turbo, segmentation models, and classification models.
YOLOv12 Naming
The paper and repository use the name:
YOLOv12
The individual model checkpoints are commonly labeled:
- YOLO12n
- YOLO12s
- YOLO12m
- YOLO12l
- YOLO12x
So the model family is referred to as YOLOv12, while individual checkpoint names use the shorter YOLO12 form.
Why YOLOv12 Is Important
YOLOv12 represents a notable change in YOLO architecture design.
Earlier real-time YOLO detectors largely prioritized convolution-based architectures because they provide efficient inference.
YOLOv12 instead demonstrates that attention mechanisms can become a central component of a real-time detector while maintaining competitive speed.
Its major contributions include:
- Attention-centric real-time detection
- Improved attention efficiency
- Competitive speed-to-accuracy performance
- Multiple model scales
- Turbo variants
- Instance segmentation
- Image classification
- ONNX and TensorRT export
Frequently Asked Questions
What is YOLOv12?
YOLOv12 is an attention-centric real-time object detector introduced in 2025.
Who created YOLOv12?
YOLOv12 was introduced by:
- Yunjie Tian
- Qixiang Ye
- David Doermann
What is the YOLOv12 paper called?
The paper is titled:
YOLOv12: Attention-Centric Real-Time Object Detectors.
When was YOLOv12 introduced?
The paper was submitted to arXiv on February 18, 2025.
What makes YOLOv12 different?
Its main distinction is an architecture centered around attention mechanisms while still targeting real-time inference.
What YOLOv12 detection models are available?
The standard model family includes:
- YOLO12n
- YOLO12s
- YOLO12m
- YOLO12l
- YOLO12x
What is YOLOv12-Turbo?
YOLOv12-Turbo is a faster version released in March 2025 and is currently presented as the default detection family in the repository.
Does YOLOv12 support segmentation?
Yes. Instance segmentation models were released in June 2025.
Does YOLOv12 support classification?
Yes. Classification models were released in July 2025.
What image size does YOLOv12 use?
The standard detection benchmark uses 640-pixel inputs, while the classification models are benchmarked at 224 pixels.
Can YOLOv12 be trained on custom datasets?
Yes. The repository includes a standard training workflow that can be configured for custom datasets.
Does YOLOv12 support ONNX?
Yes. ONNX export is included in the official repository workflow.
Does YOLOv12 support TensorRT?
Yes. The project supports TensorRT engine export, and its published speed benchmarks use TensorRT10 on an NVIDIA T4 GPU.
What is the smallest YOLOv12 detection model?
YOLO12n is the Nano model. The current Turbo version has approximately 2.5 million parameters and 6.0 GFLOPs.
Which YOLOv12 model has the highest reported detection mAP?
Among the current Turbo n/s/m/l/x models, YOLO12x has the highest repository-reported mAP50-95 at 55.4.
Is YOLOv12 suitable for real-time detection?
Yes. Real-time performance is one of the central design goals of YOLOv12.
Conclusion
YOLOv12 introduces an attention-centric approach to real-time object detection, aiming to combine the modeling capability of attention mechanisms with the low latency traditionally associated with convolution-based YOLO detectors.
The project provides multiple model sizes ranging from YOLO12n to YOLO12x, along with Turbo variants, instance segmentation models, classification models, custom training support, and ONNX and TensorRT export workflows.
Its emphasis on attention efficiency makes YOLOv12 an important development in the evolution of real-time YOLO architectures.