YOLOv12: Attention-Centric Real-Time Object Detectors

Yunjie TianQixiang YeDavid S. Doermann

article2025NeurIPS2,346 citations

Introduces YOLOv12, an attention-centric real-time object detector that achieves CNN-level inference speed while delivering superior accuracy over prior YOLO models and RT-DETR with significantly lower computational cost.

Listen

Real-time object detection powers critical computer vision applications such as autonomous driving and robotics, where algorithms must identify objects accurately within strict millisecond-level timeframes. Historically, real-time frameworks have relied almost exclusively on convolutional neural networks because attention mechanismswhich offer superior visual modeling and contextual understandingsuffer from heavy computational overhead and memory access bottlenecks that make them roughly three times slower under equivalent workloads. The article addresses this long-standing trade-off by demonstrating that an attention-centric architecture can match the low latency and efficiency of leading convolutional detectors while significantly surpassing them in detection accuracy.

To bridge this performance gap, the article introduces YOLOv12, a new family of real-time object detectors developed in five model scales ranging from Nano to Extra-Large. The framework incorporates three key innovations: an Area Attention module that reduces the computational burden of attention by simply segmenting feature maps without complex windowing, a Residual Efficient Layer Aggregation Network architecture to stabilize model training and streamline feature aggregation, and tailored design optimizations such as integrating FlashAttention, leveraging convolutional batch normalization, and removing standard positional encodings. The researchers evaluated the models across standard object detection benchmarks using standard 640-by-640 image resolutions and compared them against modern industry baselines, including YOLOv10, YOLOv11, and the real-time transformer series RT-DETR.

Across all model sizes, YOLOv12 achieved state-of-the-art accuracy with competitive inference speeds. The smallest variant, YOLOv12-Nano, reached a 40.6% mean Average Precision score at an inference latency of 1.64 milliseconds on a standard GPU, outperforming YOLOv10-Nano by 2.1 percentage points and YOLOv11-Nano by 1.2 percentage points. The small model variant achieved a 48.0% accuracy score while running 42% faster than comparable real-time transformer baselines, requiring 64% fewer computations and 55% fewer parameters. Furthermore, across medium, large, and extra-large scales, YOLOv12 consistently maintained higher accuracy than prior models without incurring computational or parameter penalties, demonstrating clear foreground object perception and boundary delineation.

These findings prove that attention mechanisms can replace traditional convolutions in latency-sensitive systems without sacrificing speed or deployment feasibility. For operational teams, this translates into higher detection reliability and fewer visual errors without requiring additional computing infrastructure or compromising operational timelines. Decision-makers evaluating real-time computer vision pipelines can consider adopting YOLOv12 as a drop-in architectural replacement, particularly when transitioning existing models to achieve immediate accuracy gains. Organizations should verify that their target hardware supports FlashAttention-compatible graphics processing unitssuch as modern Turing, Ampere, Ada Lovelace, or Hopper architecturessince older hardware may not realize the full speed benefits documented in the article.

No sufficiently relevant recommendations were found.

Cover for YOLOv12: Attention-Centric Real-Time Object Detectors

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.

Table of Contents

  • 1 Introduction
  • 2 Related Work
  • 3 Approach
  • 3.1 Efficiency Analysis
  • 3.2 Area Attention
  • 3.3 Residual Efficient Layer Aggregation Networks
  • 3.4 Architectural Improvements
  • 4 Experiment
  • 4.1 Experimental Setup
  • 4.2 Comparison with State-of-the-arts
  • 4.3 Ablation Studies
  • 4.4 Speed Comparison
  • 4.5 Diagnosis & Visualization
  • 5 Conclusion
  • 6 Limitations
  • 7 More Details
  • References

Knowls

  1. Knowl 1 — Area Attention (A2) Mechanism

    model/method

    Area Attention reduces the quadratic computational complexity of standard self-attention while maintaining a large receptive field without window-partitioning and window-shifting overhead.

    Given a 2D feature map of spatial resolution (H,W)(H, W) with total tokens n=HimesWn = H imes W, head dimension dd, and head count hh, standard global multi-head self-attention requires 2n2hd2n^2hd operations. Area Attention divides the feature map into ll equal segments along either the vertical axis (segments of size ( rac{H}{l}, W)) or the horizontal axis (segments of size (H, rac{W}{l})) using a tensor reshape operation.

    With l=4l = 4 (the default setting), the sequence length within each partition becomes n/ln / l. Computing self-attention independently within each of the ll segments reduces the computational cost from 2n2hd2n^2hd to:

    O(l×2(nl)2hd)=O(2ln2hd)=12n2hd\mathcal{O}\left(l \times 2\left(\frac{n}{l}\right)^2 hd\right) = \mathcal{O}\left(\frac{2}{l}n^2hd\right) = \frac{1}{2}n^2hd

    This yields a 4×4\times theoretical reduction in attention operations compared to standard global self-attention while maintaining a receptive field of 1/l=1/41/l = 1/4 of the spatial feature map.

  2. Knowl 2 — Residual Efficient Layer Aggregation Networks (R-ELAN)

    model/method

    Residual Efficient Layer Aggregation Networks (R-ELAN) addresses training instability and non-convergence in large attention-centric YOLO models through two architectural modifications to the ELAN framework:

    1. Block-Level Residual Connection with Scaling: A residual shortcut connects the input of the R-ELAN block directly to its output, modulated by a fixed scaling factor α=0.01\alpha = 0.01:

    y=αx+Aggregate(x)y = \alpha \cdot x + \text{Aggregate}(x)

    where xx is the input feature map and Aggregate(x)\text{Aggregate}(x) is the aggregated output of the inner block sequence. This block-level scaling stabilizes optimization across deep stacks, whereas applying layer scaling inside individual attention modules fails to resolve large-model non-convergence and introduces latency overhead.

    1. Bottleneck Feature Integration: Instead of splitting the feature map after an initial transition layer and processing one branch before concatenation, R-ELAN applies a single initial 1×11 \times 1 convolution transition layer to project channel dimensions to a single feature map. This intermediate representation is processed sequentially through stacked Area Attention blocks and concatenated before the scaled residual addition, reducing both parameter count and FLOPs while preserving feature aggregation.
  3. Knowl 3 — YOLOv12 Attention-Centric Architectural Adaptations

    model/method

    YOLOv12 adapts Vision Transformer attention modules to real-time object detection requirements through specific architectural modifications:

    • Hierarchical Backbone: Retains a 4-stage hierarchical structure rather than a plain ViT backbone. The first two stages are purely convolutional (inherited from YOLOv11), while subsequent stages use R-ELAN blocks with Area Attention. The final stage replaces the three-block stack of prior YOLO designs with a single R-ELAN block.
    • Position Perceiver: In place of absolute (APE) or relative (RPE) positional encodings, a 7×77 \times 7 depthwise separable convolution is applied to attention value tensor VV and added to the attention output:

    Output=Attention(Q,K,V)+SeparableConv7×7(V)\text{Output} = \text{Attention}(Q, K, V) + \text{SeparableConv}_{7\times 7}(V)

    • Convolutional Projections and Batch Normalization: Replaces linear projections and Layer Normalization (nn.Linear + LN) with 2D convolutions and Batch Normalization (nn.Conv2d + BN) to exploit GPU kernel optimization for structured visual tensors.
    • Reduced MLP Expansion Ratio: Reduces the Feed-Forward Network (FFN) expansion ratio from the conventional 4.04.0 to 1.21.2 for large/extra-large models (and 2.02.0 for Nano/Small/Medium models), shifting computational allocation toward attention operations.
    • I/O Optimization: Integrates FlashAttention to avoid intermediate attention matrix read/write operations between GPU SRAM and High Bandwidth Memory (HBM).
  4. Knowl 4 — MS COCO 2017 Detection Benchmark Comparison

    data/table

    Object detection performance and inference speed comparison of YOLOv12 variants against real-time CNN-based and DETR-based detectors on the MS COCO 2017 validation set at 640×640640 \times 640 input resolution. Latency is measured on an NVIDIA Tesla T4 GPU using TensorRT FP16.

    Method FLOPs (G) #Param. (M) AP50:95val\text{AP}_{50:95}^{\text{val}} (%) AP50val\text{AP}_{50}^{\text{val}} (%) AP75val\text{AP}_{75}^{\text{val}} (%) Latency (ms)
    YOLOv6-3.0-N 11.4 4.7 37.0 52.7 2.69
    Gold-YOLO-N 12.1 5.6 39.6 55.7 2.92
    YOLOv8-N 8.7 3.2 37.4 52.6 40.5 1.77
    YOLOv10-N 6.7 2.3 38.5 53.8 41.7 1.84
    YOLO11-N 6.5 2.6 39.4 55.3 42.8 1.50
    YOLOv12-N 6.5 2.6 40.6 56.7 43.8 1.64
    YOLOv6-3.0-S 45.3 18.5 44.3 61.2 3.42
    Gold-YOLO-S 46.0 21.5 45.4 62.5 3.82
    YOLOv8-S 28.6 11.2 45.0 61.8 48.7 2.33
    RT-DETR-R18 60.0 20.0 46.5 63.8 4.58
    RT-DETRv2-R18 60.0 20.0 47.9 64.9 4.58
    YOLOv9-S 26.4 7.1 46.8 63.4 50.7
    YOLOv10-S 21.6 7.2 46.3 63.0 50.4 2.49
    YOLO11-S 21.5 9.4 46.9 63.9 50.6 2.50
    YOLOv12-S 21.4 9.3 48.0 65.0 51.8 2.61
    YOLOv6-3.0-M 85.8 34.9 49.1 66.1 5.63
    Gold-YOLO-M 87.5 41.3 49.8 67.0 6.38
    YOLOv8-M 78.9 25.9 50.3 67.2 54.7 5.09
    RT-DETR-R34 100.0 36.0 48.9 66.8 6.32
    RT-DETRv2-R34 100.0 36.0 49.9 67.5 6.32
    YOLOv9-M 76.3 20.0 51.4 68.1 56.1
    YOLOv10-M 59.1 15.4 51.1 68.1 55.8 4.74
    YOLO11-M 68.0 20.1 51.5 68.5 55.7 4.70
    YOLOv12-M 67.5 20.2 52.5 69.6 57.1 4.86
    YOLOv6-3.0-L 150.7 59.6 51.8 69.2 9.02
    Gold-YOLO-L 151.7 75.1 51.8 68.9 10.65
    YOLOv8-L 165.2 43.7 53.0 69.8 57.7 8.06
    RT-DETR-R50 136.0 42.0 53.1 71.3 6.90
    RT-DETRv2-R50 136.0 42.0 53.4 71.6 6.90
    YOLOv9-C 102.1 25.3 53.0 70.2 57.8
    YOLOv10-B 92.0 19.1 52.5 69.6 57.2 5.74
    YOLOv10-L 120.3 24.4 53.2 70.1 58.1 7.28
    YOLO11-L 86.9 25.3 53.3 70.1 58.2 6.20
    YOLOv12-L 88.9 26.4 53.7 70.7 58.5 6.77
    YOLOv8-X 257.8 68.2 54.0 71.0 58.8 12.83
    RT-DETR-R101 259.0 76.0 54.3 72.7 13.50
    RT-DETRv2-R101 259.0 76.0 54.3 72.8 13.50
    YOLOv10-X 160.4 29.5 54.4 71.3 59.3 10.70
    YOLO11-X 194.9 56.9 54.6 71.6 59.5 11.30
    YOLOv12-X 199.0 59.1 55.2 72.0 60.2 11.79

    YOLOv12 outperforms all prior YOLO and RT-DETR baselines in detection accuracy across every model scale while preserving low inference latency.

  5. Knowl 5 — Ablation of R-ELAN Components and Scaling Factors

    data/table

    Ablation study analyzing the contributions of feature re-aggregation (Re-Aggre.), residual block connections (Resi.), and residual scaling factors across small (N), large (L), and extra-large (X) scales on MS COCO.

    Model Vanilla Re-Aggre. Resi. Scaling Convergence FLOPs (G) #Param. (M) AP50:95val\text{AP}_{50:95}^{\text{val}} (%)
    YOLOv12-N ×\times ×\times 6.9 2.7 40.8
    ×\times ×\times 6.5 2.6 40.6
    ×\times ×\times 0.1 6.5 2.6 40.3
    YOLOv12-L ×\times ×\times ×\times
    ×\times ×\times ×\times
    ×\times 0.1 88.9 26.4 53.3
    ×\times 0.01 88.9 26.4 53.7
    ×\times ×\times 0.01 94.3 27.8 53.8
    YOLOv12-X ×\times ×\times ×\times
    ×\times ×\times ×\times
    ×\times 0.1 ×\times
    ×\times 0.01 199.0 59.1 55.2
    ×\times ×\times 0.01 211.3 62.3 55.3

    The ablation indicates:

    1. Small models (N) converge without residual connections, and adding residual scaling causes a minor accuracy drop (40.8%40.3%40.8\% \to 40.3\%).
    2. Large models (L, X) fail to train without residual connections. For YOLOv12-X, convergence requires setting the scaling factor to 0.010.01 (a scaling factor of 0.10.1 fails to converge).
    3. Re-aggregating features reduces FLOPs and parameters across all scales with negligible impact on detection accuracy.
  6. Knowl 6 — Ablation of Area Attention Inference Latency

    data/table

    Inference latency (in ms) of YOLOv12 with and without Area Attention across GPU and CPU hardware backends without FlashAttention, evaluated at 640×640640 \times 640 resolution.

    Model Area Attention CUDA FP32 (ms) CUDA FP16 (ms) CPU (ms)
    RTX 3080 RTX A5000 RTX 3080 RTX A5000 i7-10700K
    YOLOv12-N ×\times 2.7 2.5 1.5 1.5 62.9
    2.0 2.0 1.3 1.3 31.4
    YOLOv12-S ×\times 5.1 4.4 2.5 2.2 130.0
    3.5 3.1 1.7 1.7 78.4
    YOLOv12-X ×\times 26.4 21.9 11.1 10.4 804.2
    18.2 14.3 7.1 6.7 512.5

    Area Attention provides consistent latency reductions across all model scales and execution environments, reducing CPU inference time by 36%50%36\%\text{--}50\% and GPU FP32 latency by 25%35%25\%\text{--}35\%.

  7. Knowl 7 — Architectural Design Diagnostics of YOLOv12

    empirical result

    Empirical diagnostic evaluations on YOLOv12-N and YOLOv12-L (trained for 600 epochs on MS COCO) demonstrate the following design behaviors:

    • Convolution vs. Linear Layers in Attention: Implementing attention projections with 2D convolutions and Batch Normalization (Conv+BN) yields 40.6%40.6\% AP50:95\text{AP}_{50:95} at 1.64 ms1.64\text{ ms}, outperforming Linear+LN (40.5%40.5\%, 1.68 ms1.68\text{ ms}), Linear+BN (39.5%39.5\%, 1.70 ms1.70\text{ ms}), and Conv+LN (40.3%40.3\%, 1.66 ms1.66\text{ ms}).
    • Hierarchical Backbone Requirement: Replacing the hierarchical 4-stage backbone with a plain ViT architecture causes detection accuracy to drop from 40.6%40.6\% to 38.3%38.3\% AP50:95\text{AP}_{50:95}. Omitting stage 1 or stage 4 drops performance to 40.1%40.1\% and 39.8%39.8\%, respectively.
    • Position Perceiver Kernel Size: Varying the kernel size of the separable convolution applied to VV gives 40.4%40.4\% (3×33 \times 3), 40.4%40.4\% (5×55 \times 5), 40.6%40.6\% (7×77 \times 7, 1.64 ms1.64\text{ ms}), and 40.7%40.7\% (9×99 \times 9, 1.79 ms1.79\text{ ms}). The 7×77 \times 7 kernel provides the optimal speed-accuracy tradeoff.
    • Positional Encoding Elimination: Omitting positional embeddings entirely achieves higher accuracy (40.6%40.6\%) and lower latency (1.64 ms1.64\text{ ms}) compared to Absolute Positional Encoding (40.5%40.5\%, 1.69 ms1.69\text{ ms}) and Relative Positional Embedding (40.3%40.3\%, 1.76 ms1.76\text{ ms}).
    • MLP Expansion Ratio: On YOLOv12-L under matched FLOP budgets, reducing the MLP expansion ratio from 4.04.0 to 1.21.2 increases AP50:95\text{AP}_{50:95} from 53.1%53.1\% to 53.8%53.8\%, confirming the benefit of allocating compute toward attention.
    • FlashAttention Acceleration: FlashAttention reduces TensorRT FP16 latency from 1.92 ms1.92\text{ ms} to 1.64 ms1.64\text{ ms} on YOLOv12-N and from 3.02 ms3.02\text{ ms} to 2.61 ms2.61\text{ ms} on YOLOv12-S without affecting accuracy.
  8. Knowl 8 — Cross-GPU Inference Latency Comparisons

    data/table

    Inference latency (reported as FP32 / FP16 in milliseconds) across NVIDIA RTX 3080, RTX A5000, and RTX A6000 GPUs on 640×640640 \times 640 inputs for YOLOv9, YOLOv10, YOLOv11, and YOLOv12 across multiple model scales.

    Model Scale FLOPs (G) RTX 3080 (ms) A5000 (ms) A6000 (ms)
    YOLOv9 T 8.2 2.4 / 1.5 2.4 / 1.6 2.3 / 1.7
    S 26.4 3.7 / 1.9 3.4 / 2.0 3.5 / 1.9
    M 76.3 6.5 / 2.8 5.5 / 2.6 5.2 / 2.6
    C 102.1 8.0 / 2.9 6.4 / 2.7 6.0 / 2.7
    E 189.0 17.2 / 6.7 14.2 / 6.3 13.1 / 5.9
    YOLOv10 N 6.7 1.6 / 1.0 1.6 / 1.0 1.6 / 1.0
    S 21.6 2.8 / 1.4 2.4 / 1.4 2.4 / 1.3
    M 59.1 5.7 / 2.5 4.5 / 2.4 4.2 / 2.2
    B 92.0 6.8 / 2.9 5.5 / 2.6 5.2 / 2.8
    YOLOv11 N 6.5 1.6 / 1.0 1.6 / 1.0 1.5 / 0.9
    S 21.5 2.8 / 1.3 2.4 / 1.4 2.4 / 1.3
    M 68.0 5.6 / 2.3 4.5 / 2.2 4.4 / 2.1
    L 86.9 7.4 / 3.0 5.9 / 2.7 5.8 / 2.7
    X 194.9 15.2 / 5.3 10.7 / 4.7 9.1 / 4.0
    YOLOv12 N 6.5 1.7 / 1.1 1.7 / 1.0 1.7 / 1.1
    S 21.4 2.9 / 1.5 2.5 / 1.5 2.5 / 1.4
    M 67.5 5.8 / 1.5 4.6 / 2.4 4.4 / 2.2
    L 88.9 7.9 / 3.3 6.2 / 3.1 6.0 / 3.0
    X 199.0 15.6 / 5.6 11.0 / 5.2 9.5 / 4.4

    YOLOv12 achieves inference latency on par with recent pure CNN architectures (YOLOv10, YOLOv11) across multiple desktop and workstation GPUs.

  9. Knowl 9 — Training Setup and Hyperparameters for YOLOv12

    experimental setup

    All YOLOv12 models are trained from scratch on the MS COCO 2017 dataset on 8×8 \times NVIDIA RTX A6000 GPUs using the following configuration:

    • Optimization: SGD optimizer, momentum =0.937= 0.937, weight decay =5×104= 5 \times 10^{-4}, batch size =32×8=256= 32 \times 8 = 256, trained for 600600 epochs.
    • Learning Rate Schedule: Linear decay from an initial learning rate η0=102\eta_0 = 10^{-2} to ηf=104\eta_f = 10^{-4}, preceded by 33 warm-up epochs (warm-up momentum =0.8= 0.8, warm-up bias learning rate =0.0= 0.0).
    • Loss Function Gains: Bounding box loss gain =7.5= 7.5, classification loss gain =0.5= 0.5, distribution focal loss (DFL) gain =1.5= 1.5.
    • Data Augmentations: HSV saturation (0.70.7), HSV value (0.40.4), HSV hue (0.0150.015), translation (0.10.1), scale augmentation (0.50.5 for N, 0.90.9 for S/M/L/X), Mosaic (1.01.0), Mixup (0.00.0 for N, 0.050.05 for S, 0.150.15 for M/L, 0.20.2 for X), Copy-paste (0.10.1 for N, 0.150.15 for S, 0.40.4 for M, 0.50.5 for L, 0.60.6 for X). Mosaic augmentation is disabled during the final 1010 training epochs.
  10. Knowl 10 — Hardware Limitations for FlashAttention Support

    limitation

    YOLOv12 requires FlashAttention to avoid memory access bottlenecks in its attention operations. As a result, deployment with optimal low latency is constrained to NVIDIA GPU architectures supported by FlashAttention, specifically Turing, Ampere, Ada Lovelace, and Hopper architectures (e.g., T4, Quadro RTX series, RTX 20/30/40 series, RTX A5000/6000, A30/40, A100, and H100). On GPUs or devices lacking FlashAttention kernel support, attention memory access overhead leads to increased wall-clock latency.

Coverage note — Qualitative feature activation heatmaps comparing YOLOv10, YOLOv11, and YOLOv12 (Figure 5) were omitted as they duplicate the quantitative perception conclusions captured in the ablation and benchmark tables.

References

  1. 1.Hangbo Bao, Li Dong, Songhao Piao, and Furu Wei. Beit: Bert pre-training of image transformers. arXiv preprint arXiv:2106.08254, 2021. 6, 9
  2. 2.Srinadh Bhojanapalli, Chulhee Yun, Ankit Singh Rawat, Sashank Reddi, and Sanjiv Kumar. Low-rank bottleneck in multi-head attention models. In International conference on machine learning, pages 864–873. PMLR, 2020. 4
  3. 3.Alexey Bochkovskiy, Chien-Yao Wang, and Hong-Yuan Mark Liao. Yolov4: Optimal speed and accuracy of object detection. arXiv preprint arXiv:2004.10934, 2020. 1, 2, 6, 11
  4. 4.Daniel Bogdoll, Maximilian Nitsche, and J Marius Zöllner. Anomaly detection in autonomous driving: A survey. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 4488–4499, 2022. 1
  5. 5.Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. Advances in neural information processing systems, 33:1877–1901, 2020. 3
  6. 6.Alexander Buslaev, Vladimir I Iglovikov, Eugene Khvedchenya, Alex Parinov, Mikhail Druzhinin, and Alexandr A Kalinin. Albumentations: fast and flexible image augmentations. Information, 11(2):125, 2020. 11
  7. 7.Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In European conference on computer vision, pages 213–229. Springer, 2020. 2
  8. 8.Kean Chen, Weiyao Lin, Jianguo Li, John See, Ji Wang, and Junni Zou. Ap-loss for accurate one-stage object detection. IEEE Transactions on Pattern Analysis and Machine Intelligence, 43(11):3782–3798, 2020. 1
  9. 9.Yuming Chen, Xinbin Yuan, Ruiqi Wu, Jiabao Wang, Qibin Hou, and Ming-Ming Cheng. Yolo-ms: rethinking multiscale representation learning for real-time object detection. arXiv preprint arXiv:2308.05480, 2023. 2
  10. 10.Krzysztof Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane, Tamas Sarlos, Peter Hawkins, Jared Davis, Afroz Mohiuddin, Lukasz Kaiser, et al. Rethinking attention with performers. arXiv preprint arXiv:2009.14794, 2020. 4
  11. 11.Krzysztof Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane, Tamas Sarlos, Peter Hawkins, Jared Davis, Afroz Mohiuddin, Lukasz Kaiser, et al. Rethinking attention with performers. arXiv preprint arXiv:2009.14794, 2020. 3, 4
  12. 12.Xiangxiang Chu, Zhi Tian, Yuqing Wang, Bo Zhang, Haibing Ren, Xiaolin Wei, Huaxia Xia, and Chunhua Shen. Twins: Revisiting the design of spatial attention in vision transformers. Advances in Neural Information Processing Systems, 34:9355–9366, 2021. 3
  13. 13.Tri Dao. Flashattention-2: Faster attention with better parallelism and work partitioning. arXiv preprint arXiv:2307.08691, 2023. 2, 3, 7, 11
  14. 14.Tri Dao, Dan Fu, Stefano Ermon, Atri Rudra, and Christopher Ré. Flashattention: Fast and memory-efficient exact attention with io-awareness. Advances in Neural Information Processing Systems, 35:16344–16359, 2022. 2, 3, 7, 11
  15. 15.Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: pre-training of deep bidirectional transformers for language understanding. In North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 4171–4186, 2019. 3
  16. 16.Xiaoyi Dong, Jianmin Bao, Dongdong Chen, Weiming Zhang, Nenghai Yu, Lu Yuan, Dong Chen, and Baining Guo. Cswin transformer: A general vision transformer backbone with cross-shaped windows. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12124–12134, 2022. 2, 4
  17. 17.Douglas Henke Dos Reis, Daniel Welfer, Marco Antonio De Souza Leite Cuadros, and Daniel Fernando Tello Gamarra. Mobile robot navigation using an object recognition software with rgbd images and the yolo algorithm. Applied Artificial Intelligence, 33(14):1290–1305, 2019. 1
  18. 18.Alexey Dosovitskiy. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929, 2020. 6
  19. 19.Yuxin Fang, Wen Wang, Binhui Xie, Quan Sun, Ledell Wu, Xinggang Wang, Tiejun Huang, Xinlong Wang, and Yue Cao. Eva: Exploring the limits of masked visual representation learning at scale. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 19358–19369, 2023. 3, 6
  20. 20.Yuxin Fang, Quan Sun, Xinggang Wang, Tiejun Huang, Xinlong Wang, and Yue Cao. Eva-02: A visual representation for neon genesis. Image and Vision Computing, 149:105171, 2024. 1
  21. 21.Yuxin Fang, Quan Sun, Xinggang Wang, Tiejun Huang, Xinlong Wang, and Yue Cao. Eva-02: A visual representation for neon genesis. Image and Vision Computing, 149:105171, 2024. 1, 6
  22. 22.Chengjian Feng, Yujie Zhong, Yu Gao, Matthew R Scott, and Weilin Huang. Tood: Task-aligned one-stage object detection. In 2021 IEEE/CVF International Conference on Computer Vision (ICCV), pages 3490–3499. IEEE Computer Society, 2021. 1
  23. 23.Zheng Ge, Songtao Liu, Zeming Li, Osamu Yoshie, and Jian Sun. Ota: Optimal transport assignment for object detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 303–312, 2021. 1
  24. 24.Jocher Glenn. Yolov8. https://github.com/ultralytics/ultralytics/tree/main, 2023. 1, 2, 5, 6, 9, 11
  25. 25.Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dollár, and Ross Girshick. Masked autoencoders are scalable vision learners. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 16000–16009, 2022. 1, 6, 9
  26. 26.Jonathan Ho, Nal Kalchbrenner, Dirk Weissenborn, and Tim Salimans. Axial attention in multidimensional transformers. arXiv preprint arXiv:1912.12180, 2019. 2
  27. 27.Zilong Huang, Xinggang Wang, Lichao Huang, Chang Huang, Yunchao Wei, and Wenyu Liu. Ccnet: Criss-cross attention for semantic segmentation. In Proceedings of the IEEE/CVF international conference on computer vision, pages 603–612, 2019. 2, 4
  28. 28.Glenn Jocher. yolov11. https://github.com/ultralytics, 2024. 1, 2, 4, 5, 6, 7, 8, 9, 10, 11
  29. 29.Glenn Jocher, K Nishimura, T Mineeva, and RJAM Vilariño. yolov5. https://github.com/ultralytics/yolov5/tree, 2, 2020. 1, 2, 6
  30. 30.Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and François Fleuret. Transformers are rnns: Fast autoregressive transformers with linear attention. In International conference on machine learning, pages 5156–5165. PMLR, 2020. 4
  31. 31.Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and François Fleuret. Transformers are rnns: Fast autoregressive transformers with linear attention. In International conference on machine learning, pages 5156–5165. PMLR, 2020. 3
  32. 32.Chuyi Li, Lulu Li, Yifei Geng, Hongliang Jiang, Meng Cheng, Bo Zhang, Zaidan Ke, Xiaoming Xu, and Xiangxiang Chu. Yolov6 v3. 0: A full-scale reloading. arXiv preprint arXiv:2301.05586, 2023. 1, 2, 5, 6
  33. 33.Feng Li, Hao Zhang, Shilong Liu, Jian Guo, Lionel M Ni, and Lei Zhang. Dn-detr: Accelerate detr training by introducing query denoising. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 13619–13627, 2022. 2
  34. 34.Shuai Li, Chenhang He, Ruihuang Li, and Lei Zhang. A dual weighting label assignment scheme for object detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 9387–9396, 2022. 1
  35. 35.Xiang Li, Wenhai Wang, Lijun Wu, Shuo Chen, Xiaolin Hu, Jun Li, Jinhui Tang, and Jian Yang. Generalized focal loss: Learning qualified and distributed bounding boxes for dense object detection. Advances in Neural Information Processing Systems, 33:21002–21012, 2020. 1
  36. 36.Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In Computer Vision–ECCV 2014: 13th European Conference, Zurich, Switzerland, September 6-12, 2014, Proceedings, Part V 13, pages 740–755. Springer, 2014. 6, 10
  37. 37.Shilong Liu, Feng Li, Hao Zhang, Xiao Yang, Xianbiao Qi, Hang Su, Jun Zhu, and Lei Zhang. Dab-detr: Dynamic anchor boxes are better queries for detr. arXiv preprint arXiv:2201.12329, 2022. 2
  38. 38.Yue Liu, Yunjie Tian, Yuzhong Zhao, Hongtian Yu, Lingxi Xie, Yaowei Wang, Qixiang Ye, Jianbin Jiao, and Yunfan Liu. Vmamba: Visual state space model. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. 2, 3
  39. 39.Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. In Proceedings of the IEEE/CVF international conference on computer vision, pages 10012–10022, 2021. 2, 3, 4
  40. 40.Wenyu Lv, Yian Zhao, Qinyao Chang, Kui Huang, Guanzhong Wang, and Yi Liu. Rt-detrv2: Improved baseline with bag-of-freebies for real-time detection transformer. arXiv preprint arXiv:2407.17140, 2024. 2, 6
  41. 41.Wenyu Lv, Yian Zhao, Qinyao Chang, Kui Huang, Guanzhong Wang, and Yi Liu. Rt-detrv2: Improved baseline with bag-of-freebies for real-time detection transformer. arXiv preprint arXiv:2407.17140, 2024. 5, 6
  42. 42.Depu Meng, Xiaokang Chen, Zejia Fan, Gang Zeng, Houqiang Li, Yuhui Yuan, Lei Sun, and Jingdong Wang. Conditional detr for fast training convergence. In Proceedings of the IEEE/CVF international conference on computer vision, pages 3651–3660, 2021. 2
  43. 43.Kemal Oksuz, Baris Can Cam, Emre Akbas, and Sinan Kalkan. A ranking-based, balanced loss function unifying classification and localisation in object detection. Advances in Neural Information Processing Systems, 33:15534–15545, 2020. 1
  44. 44.Kemal Oksuz, Baris Can Cam, Emre Akbas, and Sinan Kalkan. Rank & sort loss for object detection and instance segmentation. In Proceedings of the IEEE/CVF international conference on computer vision, pages 3009–3018, 2021. 1
  45. 45.J Redmon. You only look once: Unified, real-time object detection. In Proceedings of the IEEE conference on computer vision and pattern recognition, 2016. 1, 2, 6
  46. 46.Joseph Redmon. Yolov3: An incremental improvement. arXiv preprint arXiv:1804.02767, 2018.
  47. 47.Joseph Redmon and Ali Farhadi. Yolo9000: better, faster, stronger. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7263–7271, 2017. 1, 2, 6
  48. 48.Hamid Rezatofighi, Nathan Tsoi, JunYoung Gwak, Amir Sadeghian, Ian Reid, and Silvio Savarese. Generalized intersection over union: A metric and a loss for bounding box regression. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 658–666, 2019. 1
  49. 49.Zhuoran Shen, Mingyuan Zhang, Haiyu Zhao, Shuai Yi, and Hongsheng Li. Efficient attention: Attention with linear complexities. In Proceedings of the IEEE/CVF winter conference on applications of computer vision, pages 3531–3539, 2021. 3, 4
  50. 50.Yunjie Tian, Lingxi Xie, Jihao Qiu, Jianbin Jiao, Yaowei Wang, Qi Tian, and Qixiang Ye. Fast-itpn: Integrally pretrained transformer pyramid network with token migration. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2024. 1, 3
  51. 51.Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. In International conference on machine learning, pages 10347–10357. PMLR, 2021. 6
  52. 52.Hugo Touvron, Matthieu Cord, Alexandre Sablayrolles, Gabriel Synnaeve, and Hervé Jégou. Going deeper with image transformers. In Proceedings of the IEEE/CVF international conference on computer vision, pages 32–42, 2021. 4
  53. 53.Ao Wang, Hui Chen, Lihao Liu, Kai Chen, Zijia Lin, Jungong Han, and Guiguang Ding. Yolov10: Real-time end-to-end object detection. arXiv preprint arXiv:2405.14458, 2024. 1, 2, 5, 6, 7, 8, 9, 10, 11
  54. 54.Chengcheng Wang, Wei He, Ying Nie, Jianyuan Guo, Chuanjian Liu, Yunhe Wang, and Kai Han. Gold-yolo: Efficient object detector via gather-and-distribute mechanism. Advances in Neural Information Processing Systems, 36, 2024. 2, 5, 6
  55. 55.Chien-Yao Wang, Hong-Yuan Mark Liao, Yueh-Hua Wu, Ping-Yang Chen, Jun-Wei Hsieh, and I-Hau Yeh. Cspnet: A new backbone that can enhance learning capability of cnn. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition workshops, pages 390–391, 2020. 2, 4
  56. 56.Chien-Yao Wang, Hong-Yuan Mark Liao, and I-Hau Yeh. Designing network design strategies through gradient path analysis. arXiv preprint arXiv:2211.04800, 2022. 2, 4
  57. 57.Chien-Yao Wang, Alexey Bochkovskiy, and Hong-Yuan Mark Liao. Yolov7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 7464–7475, 2023. 1, 2, 4, 6, 11
  58. 58.Chien-Yao Wang, I-Hau Yeh, and Hong-Yuan Mark Liao. Yolov9: Learning what you want to learn using programmable gradient information. arXiv preprint arXiv:2402.13616, 2024. 1, 2, 4, 5, 6, 7, 8, 9, 11
  59. 59.Jianfeng Wang, Lin Song, Zeming Li, Hongbin Sun, Jian Sun, and Nanning Zheng. End-to-end object detection with fully convolutional network. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 15849–15858, 2021. 1
  60. 60.Sinong Wang, Belinda Z Li, Madian Khabsa, Han Fang, and Hao Ma. Linformer: Self-attention with linear complexity. arXiv preprint arXiv:2006.04768, 2020. 3, 4
  61. 61.Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. In Proceedings of the IEEE/CVF international conference on computer vision, pages 568–578, 2021. 2
  62. 62.Enze Xie, Junsong Chen, Yuyang Zhao, Jincheng Yu, Ligeng Zhu, Yujun Lin, Zhekai Zhang, Muyang Li, Junyu Chen, Han Cai, et al. Sana 1.5: Efficient scaling of training-time and inference-time compute in linear diffusion transformer. arXiv preprint arXiv:2501.18427, 2025. 3
  63. 63.Yunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan, Glenn Fung, Yin Li, and Vikas Singh. Nyströmformer: A nyström-based algorithm for approximating self-attention. In Proceedings of the AAAI Conference on Artificial Intelligence, pages 14138–14148, 2021. 4
  64. 64.Qihang Yu, Yingda Xia, Yutong Bai, Yongyi Lu, Alan L Yuille, and Wei Shen. Glance-and-gaze vision transformer. Advances in Neural Information Processing Systems, 34: 12992–13003, 2021. 3
  65. 65.Hongyi Zhang. mixup: Beyond empirical risk minimization. arXiv preprint arXiv:1710.09412, 2017. 11
  66. 66.Yian Zhao, Wenyu Lv, Shangliang Xu, Jinman Wei, Guanzhong Wang, Qingqing Dang, Yi Liu, and Jie Chen. Detrs beat yolos on real-time object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 16965–16974, 2024. 2, 5, 6
  67. 67.Zhaohui Zheng, Ping Wang, Wei Liu, Jinze Li, Rongguang Ye, and Dongwei Ren. Distance-iou loss: Faster and better learning for bounding box regression. In Proceedings of the AAAI conference on artificial intelligence, pages 12993–13000, 2020. 1
  68. 68.Dingfu Zhou, Jin Fang, Xibin Song, Chenye Guan, Junbo Yin, Yuchao Dai, and Ruigang Yang. Iou loss for 2d/3d object detection. In 2019 international conference on 3D vision (3DV), pages 85–94. IEEE, 2019. 1
  69. 69.Benjin Zhu, Jianfeng Wang, Zhengkai Jiang, Fuhang Zong, Songtao Liu, Zeming Li, and Jian Sun. Autoassign: Differentiable label assignment for dense object detection. arXiv preprint arXiv:2007.03496, 2020. 1
  70. 70.Lianghui Zhu, Bencheng Liao, Qian Zhang, Xinlong Wang, Wenyu Liu, and Xinggang Wang. Vision mamba: Efficient visual representation learning with bidirectional state space model. arXiv preprint arXiv:2401.09417, 2024. 3
  71. 71.Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, and Jifeng Dai. Deformable detr: Deformable transformers for end-to-end object detection. arXiv preprint arXiv:2010.04159, 2020. 2, 11

Citation

MLA
Tian, Y., et al. “YOLOv12: Attention-Centric Real-Time Object Detectors”. arXiv, 2025, http://arxiv.org/abs/2502.12524v1.
APA
Tian, Y., Ye, Q., & Doermann, D. (2025). YOLOv12: Attention-Centric Real-Time Object Detectors. arXiv. http://arxiv.org/abs/2502.12524v1
Chicago
Tian, Y., Q. Ye, and D. Doermann. 2025. “YOLOv12: Attention-Centric Real-Time Object Detectors”. arXiv. http://arxiv.org/abs/2502.12524v1.
Harvard
Tian, Y., Ye, Q. and Doermann, D. (2025) “YOLOv12: Attention-Centric Real-Time Object Detectors”, arXiv [Preprint]. Available at: http://arxiv.org/abs/2502.12524v1.
Vancouver
1. Tian Y, Ye Q, Doermann D (2025) YOLOv12: Attention-Centric Real-Time Object Detectors. arXiv

BibTeX

@article{tian2025yolov12,
  title = {YOLOv12: Attention-Centric Real-Time Object Detectors},
  author = {Tian, Yunjie and Ye, Qixiang and Doermann, David},
  year = {2025},
  journal = {arXiv},
  url = {http://arxiv.org/abs/2502.12524v1},
  eprint = {2502.12524}
}
Metadata:arXiv

Source Code

This paper has an official code repository available. Click below to access the source code.

View Repository

Access the Paper

This paper is available from its original source. Click below to access the PDF.

Open PDF

License: Authors