Yolov12
[NeurIPS 2025] YOLOv12: Attention-Centric Real-Time Object Detectors
Install / Use
/learn @sunsmarterjie/Yolov12README
Yunjie Tian<sup>1</sup>, Qixiang Ye<sup>2</sup>, David Doermann<sup>1</sup>
<sup>1</sup> University at Buffalo, SUNY, <sup>2</sup> University of Chinese Academy of Sciences.
<p align="center"> <img src="assets/tradeoff_turbo.svg" width=90%> <br> Comparison with popular methods in terms of latency-accuracy (left) and FLOPs-accuracy (right) trade-offs </p> </div>
<a href="https://colab.research.google.com/github/roboflow-ai/notebooks/blob/main/notebooks/train-yolov12-object-detection-model.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a>
Updates
-
2025/06/17: Use this repo for YOLOv12 instead of ultralytics. Their implementation is inefficient, requires more memory, and has unstable training, which are fixed here!
-
2025/07/01: YOLOv12's classification models are released, see code.
-
2025/06/04: YOLOv12's instance segmentation models are released, see code.
-
2025/04/15: Pretrain a YOLOv12 model with LightlyTrain, a novel framework that lets you pretrain any computer vision model on your unlabeled data, with YOLOv12 support. Here is also a Colab tutorial!
-
2025/03/18: Some guys are interested in the heatmap. See this issue.
-
2025/03/09: YOLOv12-turbo is released: a faster YOLOv12 version.
-
2025/02/24: Blogs: ultralytics, LearnOpenCV. Thanks to them!
-
2025/02/22: YOLOv12 TensorRT CPP Inference Repo + Google Colab Notebook.
-
2025/02/22: Android deploy / TensorRT-YOLO accelerates yolo12. Thanks to them!
-
2025/02/20: Any computer or edge device? / ONNX CPP Version. Thanks to them!
-
2025/02/20: Train a yolov12 model on a custom dataset: Blog and Youtube. / Step-by-step instruction. Thanks to them!
-
2025/02/19: arXiv version is public. Demo is available (try Demo2 Demo3 if busy).
YOLOv12 surpasses all popular real-time object detectors in accuracy with competitive speed. For example, YOLOv12-N achieves 40.6% mAP with an inference latency of 1.64 ms on a T4 GPU, outperforming advanced YOLOv10-N / YOLOv11-N by 2.1%/1.2% mAP with a comparable speed. This advantage extends to other model scales. YOLOv12 also surpasses end-to-end real-time detectors that improve DETR, such as RT-DETR / RT-DETRv2: YOLOv12-S beats RT-DETR-R18 / RT-DETRv2-R18 while running 42% faster, using only 36% of the computation and 45% of the parameters.
</details>Main Results
Turbo (default): | Model (det) | size<br><sup>(pixels) | mAP<sup>val<br>50-95 | Speed (ms) <br><sup>T4 TensorRT10<br> | params<br><sup>(M) | FLOPs<br><sup>(G) | | :----------------------------------------------------------------------------------- | :-------------------: | :-------------------:| :------------------------------:| :-----------------:| :---------------:| | YOLO12n | 640 | 40.4 | 1.60 | 2.5 | 6.0 | | YOLO12s | 640 | 47.6 | 2.42 | 9.1 | 19.4 | | YOLO12m | 640 | 52.5 | 4.27 | 19.6 | 59.8 | | YOLO12l | 640 | 53.8 | 5.83 | 26.5 | 82.4 | | YOLO12x | 640 | 55.4 | 10.38 | 59.3 | 184.6 |
v1.0: | Model (det) | size<br><sup>(pixels) | mAP<sup>val<br>50-95 | Speed (ms) <br><sup>T4 TensorRT10<br> | params<br><sup>(M) | FLOPs<br><sup>(G) | | :----------------------------------------------------------------------------------- | :-------------------: | :-------------------:| :------------------------------:| :-----------------:| :---------------:| | YOLO12n | 640 | 40.6 | 1.64 | 2.6 | 6.5 | | YOLO12s | 640 | 48.0 | 2.61 | 9.3 | 21.4 | | YOLO12m | 640 | 52.5 | 4.86 | 20.2 | 67.5 | | YOLO12l | 640 | 53.7 | 6.77 | 26.4 | 88.9 | | YOLO12x | 640 | 55.2 | 11.79 | 59.1 | 199.0 |
Instance segmentation: | Model (seg) | size<br><sup>(pixels) | mAP<sup>box<br>50-95 | mAP<sup>mask<br>50-95 | Speed (ms) <br><sup>T4 TensorRT10<br> | params<br><sup>(M) | FLOPs<br><sup>(G) | | :------------------------------------------------------------------------------------| :--------------------: | :-------------------: | :---------------------: | :--------------------------------:| :------------------: | :-----------------: | | YOLOv12n-seg | 640 | 39.9 | 32.8 | 1.84 | 2.8 | 9.9 | | YOLOv12s-seg | 640 | 47.5 | 38.6 | 2.84 | 9.8 | 33.4 | | YOLOv12m-seg | 640 | 52.4 | 42.3 | 6.27 | 21.9 | 115.1 | | YOLOv12l-seg | 640 | 54.0 | 43.2 | 7.61 | 28.8 | 137.7 | | YOLOv12x-seg | 640
