|
|
10 mesi fa | |
|---|---|---|
| assets | 10 mesi fa | |
| docker | 10 mesi fa | |
| examples | 10 mesi fa | |
| logs | 10 mesi fa | |
| tests | 10 mesi fa | |
| ultralytics | 10 mesi fa | |
| LICENSE | 10 mesi fa | |
| README.md | 10 mesi fa | |
| app.py | 10 mesi fa | |
| mkdocs.yml | 10 mesi fa | |
| pyproject.toml | 10 mesi fa | |
| requirements.txt | 10 mesi fa |
Comparison with popular methods in terms of latency-accuracy (left) and FLOPs-accuracy (right) trade-offs
2025/02/20: Any computer or edge device?. Support yolov12 now.
2025/02/20: ONNX CPP Version. Train a yolov12 model on a custom dataset?
2025/02/19: arXiv version is public. Demo is available.
Abstract
Enhancing the network architecture of the YOLO framework has been crucial for a long time but has focused on CNN-based improvements despite the proven superiority of attention mechanisms in modeling capabilities. This is because attention-based models cannot match the speed of CNN-based models. This paper proposes an attention-centric YOLO framework, namely YOLOv12, that matches the speed of previous CNN-based ones while harnessing the performance benefits of attention mechanisms.
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.
| Model | size (pixels) | mAPval 50-95 | Speed T4 TensorRT10 | params (M) | FLOPs (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 |