Skip to content
ModelsThatRun

YOLO12

An attention-centric YOLO, five sizes from n to x on COCO's 80 classes, run through Ultralytics, which calls it a community model. AGPL-3.0.

Size

Conditional for size n: code AGPL-3.0-only, weights AGPL-3.0-only. Measured on our RTX 4090: 14.9 ms median, 583 MiB VRAM peak. We scored it 40.3 box AP on COCO val2017. PyTorch weights, 5 MB.

License

Conditional

Code
AGPL-3.0-onlychecked 21 Nov 2026
Weights
AGPL-3.0-onlyall sizes, checked 21 Nov 2026

AGPL-3.0: shipping it in a product means releasing your source, unless you buy an Ultralytics Enterprise license.

On our RTX 4090, measured

14.9ms median

p90 15.7 ms, fp16, batch 1, 640x448

VRAM peak
583 MiB
Status
Runs as is

Phases of one call

Pre-processing
1.3 ms
Network
10.0 ms
Post-processing
1.0 ms

Split by the official package's own timer over 20 calls, with a synchronize after each phase. Its timer leaves out about 3.8 ms of the 16.0 ms call there, such as converting the input and building the result, so the phases don't add up to the median.

Environment, 22 Nov 2026

NVIDIA GeForce RTX 4090, driver 580.173.02, CUDA 13.0, torch 2.14.1+cu130, Python 3.12.9, ultralytics==8.4.189. Baseline 1031 MiB. 10 warm-up + 100 timed. Scope: predict(): pre-processing, forward pass and post-processing; input file decoded beforehand.

TensorRT fp16: 5.8 msour engine, measured

Accuracy

40.3box APmeasured

COCO val2017, box AP, 5,000 images, fp16, pycocotools==2.0.11 · 21 Nov 2026

Paper 40.6 COCO mAP50-95Ultralytics YOLO12 docs, detection performance table (mAPval 50-95)

Weights

PyTorch

Size
5 MB
sha256
419ff3dca37d69bacc93a50fa0c186a1c6f9fe62fae0f108b0872829689e9ca6
Download n weights

Same photos and one score threshold for every model of this task. Failures are marked.

Use it when

You want YOLO12's attention-based design through Ultralytics' API and will deploy it on TensorRT, where its sizes ran 5.8 to 8.3 ms a call against 15 to 23 ms in PyTorch.

Avoid it when

You run it in PyTorch, or need a license without copyleft (AGPL-3.0): l and x took about 23 ms a call there, against 17 to 18 ms for YOLO26 l and x, which also scored higher at every size (x: 57.0 against 54.6 box AP).

Sizes

SizeLatencyVRAMAccuracyWeightsRunsLicense
n14.9 ms640x448583 MiB40.3 box AP, measured40.6 COCO mAP50-95 paper5 MBAs isConditional
s15.3 ms640x448620 MiB47.4 box AP, measured48 COCO mAP50-95 paper18 MBAs isConditional
m16.1 ms640x448727 MiB51.9 box AP, measured52.5 COCO mAP50-95 paper39 MBAs isConditional
l22.7 ms640x448777 MiB53.2 box AP, measured53.7 COCO mAP50-95 paper51 MBAs isConditional
x23.2 ms640x4481.1 GiB54.6 box AP, measured55.2 COCO mAP50-95 paper114 MBAs isConditional

Runtimes

Measured on our RTX 4090. Each row is our own measurement, timed under the same protocol and scored through that runtime. The TensorRT engine is built from the authors' own ONNX export of the released weights, with the settings their docs give. The card at the top and the charts use the PyTorch row.

Runtime, size nLatency (input under it)VRAM peakAccuracy (on that runtime)
PyTorchfp16 · torch 2.14.1+cu13014.9 ms640x448583 MiB40.3 box AP, fp16
TensorRT10.16.1.11 · fp165.8 ms640x640550 MiB40.6 box AP, fp16
How the TensorRT engine was made, 22 Nov 2026

TensorRT 10.16.1.11, runs as is. Exported with ultralytics YOLO.export format=engine quantize=16 imgsz=640 device=0, opset 18; ONNX sha256 82cbcafb7f25…. Engine sha256 28cf1f35a92e…, 8 MB, built in 238 s. Builder settings: api ultralytics==8.4.189, which builds with TensorRT's Python API, flags ["FP16"], other the package's own settings, input 1x3x640x640, static, workspace TensorRT's default. NVIDIA GeForce RTX 4090, driver 580.173.02, CUDA 13.0, torch 2.14.1+cu130, ultralytics==8.4.189. 10 warm-up + 100 timed, median of 3 runs. Scope: predict(): pre-processing, forward pass and post-processing; input file decoded beforehand.

Estimated on other GPUs

Estimate, not measured. Worked out from our RTX 4090 run and NVIDIA's spec sheets. Each kind of GPU work is scaled by that GPU's peak for it: tensor cores at the precision the kernels used, CUDA cores, or memory bandwidth. The CPU's part of each call is kept at what it took on our Intel Core i7-10700K. How we estimate

Where a call's time goes on our RTX 4090: CPU and kernel launches 91%, memory-bound 6%, tensor cores, FP16 (FP32 accumulate) 3%.

GeForce (13)
GPUFitsLatency
GeForce RTX 5090Blackwell, 32 GB GDDR7Yes≈ 14–15 ms
GeForce RTX 5080Blackwell, 16 GB GDDR7Yes≈ 15 ms
GeForce RTX 5070 TiBlackwell, 16 GB GDDR7Yes≈ 15 ms
GeForce RTX 5070Blackwell, 12 GB GDDR7Yes≈ 15–16 ms
GeForce RTX 5060 Ti 16GBBlackwell, 16 GB GDDR7Yes≈ 15–17 ms
GeForce RTX 5060Blackwell, 8 GB GDDR7Yes≈ 16–17 ms
GeForce RTX 4080Ada Lovelace, 16 GB GDDR6XYes≈ 15–16 ms
GeForce RTX 4070 TiAda Lovelace, 12 GB GDDR6XYes≈ 15–16 ms
GeForce RTX 4070Ada Lovelace, 12 GB GDDR6XYes≈ 15–17 ms
GeForce RTX 3090Ampere, 24 GB GDDR6XYes≈ 15–16 ms
GeForce RTX 3080Ampere, 10 GB GDDR6XYes≈ 15–16 ms
GeForce RTX 3070 TiAmpere, 8 GB GDDR6XYes≈ 15–17 ms
GeForce RTX 3070Ampere, 8 GB GDDR6Yes≈ 15–17 ms
Workstation (4)
GPUFitsLatency
RTX PRO 6000 Blackwell Workstation EditionBlackwell, 96 GB GDDR7Yes≈ 14–15 ms
RTX PRO 6000 Blackwell Max-Q Workstation EditionBlackwell, 96 GB GDDR7Yes≈ 14–15 ms
RTX 6000 Ada GenerationAda Lovelace, 48 GB GDDR6Yes≈ 15 ms
RTX A6000Ampere, 48 GB GDDR6Yes≈ 15 ms
Data center (6)
GPUFitsLatency
B200 (HGX, one GPU)Blackwell, 180 GB HBM3EYes≈ 14–15 ms
H200 SXMHopper, 141 GB HBM3eYes≈ 14–15 ms
H100 SXMHopper, 80 GB HBM3Yes≈ 14–15 ms
A100 SXM 80GBAmpere, 80 GB HBM2eYes≈ 14–15 ms
L40SAda Lovelace, 48 GB GDDR6Yes≈ 15 ms
L4Ada Lovelace, 24 GB GDDR6Yes≈ 15–17 ms

CPU only

Measured by us with no GPU on an Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz, 8 cores, 94.2 GiB of memory: the same official code with the GPU hidden, in fp32 on 8 threads. Before it was timed, its output on the timing input was checked against the GPU's. These numbers say what to expect without a GPU. They aren't compared with any GPU's, here or in the charts. How we measure on a CPU

SizeRuntimeLatency on the CPURAM peak
nPyTorch2.14.1 · fp32 · 8 threads35.6 ms640x448820 MiB
nONNX Runtime1.31.1 · fp32 · 8 threads36.4 ms640x640861 MiB
sPyTorch2.14.1 · fp32 · 8 threads67.5 ms640x448876 MiB
sONNX Runtime1.31.1 · fp32 · 8 threads72.6 ms640x640960 MiB
mPyTorch2.14.1 · fp32 · 8 threads154 ms640x4481023 MiB
mONNX Runtime1.31.1 · fp32 · 8 threads173 ms640x6401.1 GiB
lPyTorch2.14.1 · fp32 · 8 threads215 ms640x4481.1 GiB
lONNX Runtime1.31.1 · fp32 · 8 threads242 ms640x6401.2 GiB
xPyTorch2.14.1 · fp32 · 8 threads361 ms640x4481.3 GiB
xONNX Runtime1.31.1 · fp32 · 8 threads467 ms640x6401.6 GiB

ONNX Runtime rows run the authors' own ONNX export with their own ONNX Runtime code, whose pre-processing may differ from the PyTorch code's, so their input can differ too.

From the authors

In their words, with their numbers. Ours are in the cards at the top of this page.

Paper

YOLOv12: Attention-Centric Real-Time Object Detectors

Yunjie Tian, Qixiang Ye, David Doermann

arXiv 2502.12524, 18 Feb 2025

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. More comparisons are shown in Figure 1.

README

Copied from the authors' repository at commit 64d5ffc on 23 Nov 2026. Numbers and license claims in it are theirs, not measured or checked by us. We removed badges, replaced images with links and adjusted headings.

YOLOv12: Attention-Centric Real-Time Object Detectors

Yunjie Tian1, Qixiang Ye2, David Doermann1

1 University at Buffalo, SUNY, 2 University of Chinese Academy of Sciences.

Figure tradeoff turbo
Comparison with popular methods in terms of latency-accuracy (left) and FLOPs-accuracy (right) trade-offs

Figure deploy

Updates

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.

Main Results

Turbo (default):

Model (det)size
(pixels)
mAPval
50-95
Speed (ms)
T4 TensorRT10
params
(M)
FLOPs
(G)
YOLO12n64040.41.602.56.0
YOLO12s64047.62.429.119.4
YOLO12m64052.54.2719.659.8
YOLO12l64053.85.8326.582.4
YOLO12x64055.410.3859.3184.6

v1.0:

Model (det)size
(pixels)
mAPval
50-95
Speed (ms)
T4 TensorRT10
params
(M)
FLOPs
(G)
YOLO12n64040.61.642.66.5
YOLO12s64048.02.619.321.4
YOLO12m64052.54.8620.267.5
YOLO12l64053.76.7726.488.9
YOLO12x64055.211.7959.1199.0

Instance segmentation:

Model (seg)size
(pixels)
mAPbox
50-95
mAPmask
50-95
Speed (ms)
T4 TensorRT10
params
(M)
FLOPs
(G)
YOLOv12n-seg64039.932.81.842.89.9
YOLOv12s-seg64047.538.62.849.833.4
YOLOv12m-seg64052.442.36.2721.9115.1
YOLOv12l-seg64054.043.27.6128.8137.7
YOLOv12x-seg64055.244.215.4364.5308.7

Classification:

Model (cls)size
(pixels)
Acc.
top-1
Acc.
top-5
Speed (ms)
T4 TensorRT10
params
(M)
FLOPs
(G)
YOLOv12n-cls22471.790.51.272.90.5
YOLOv12s-cls22476.493.31.527.21.5
YOLOv12m-cls22478.894.42.0312.74.5
YOLOv12l-cls22479.594.52.7316.86.2
YOLOv12x-cls22480.195.33.6435.513.7

Installation

conda create -n yolov12 python=3.11 supervision flash-attn
conda activate yolov12
git clone https://github.com/sunsmarterjie/yolov12 && cd yolov12
pip install -r requirements.txt
pip install -e .

Validation

yolov12n yolov12s yolov12m yolov12l yolov12x

from ultralytics import YOLO

model = YOLO('yolov12{n/s/m/l/x}.pt')
model.val(data='coco.yaml', save_json=True)

Training

from ultralytics import YOLO

model = YOLO('yolov12n.yaml')

# Train the model
results = model.train(
  data='coco.yaml',
  epochs=600, 
  batch=256, 
  imgsz=640,
  scale=0.5,  # S:0.9; M:0.9; L:0.9; X:0.9
  mosaic=1.0,
  mixup=0.0,  # S:0.05; M:0.15; L:0.15; X:0.2
  copy_paste=0.1,  # S:0.15; M:0.4; L:0.5; X:0.6
  device="0,1,2,3",
)

# Evaluate model performance on the validation set
metrics = model.val()

# Perform object detection on an image
results = model("path/to/image.jpg")
results[0].show()

Prediction

from ultralytics import YOLO

model = YOLO('yolov12{n/s/m/l/x}.pt')
model.predict()

Export

from ultralytics import YOLO

model = YOLO('yolov12{n/s/m/l/x}.pt')
model.export(format="engine", half=True)  # or format="onnx"

Demo

python app.py
# Please visit http://127.0.0.1:7860

Acknowledgement

The code is based on ultralytics. Thanks for their excellent work!

Citation

@article{tian2026yolov12,
  title={Yolov12: Attention-centric real-time object detectors},
  author={Tian, Yunjie and Ye, Qixiang and Doermann, David},
  journal={Advances in neural information processing systems},
  volume={38},
  pages={78433--78457},
  year={2026}
}

Alternatives

Changes

First published . Every model's changes

    • Added, with sizes n, s, m, l, and x

Badge for a README

It says the model ran on our RTX 4090 and links to this page. It carries no number, so it never goes out of date.

ModelsThatRun: ran on RTX 4090
[![ModelsThatRun: ran on RTX 4090](https://modelsthatrun.dev/models/yolo12/badge.svg)](https://modelsthatrun.dev/models/yolo12/)

Something wrong on this page, such as a license or a number? Email us.

⇆
InputOutput