YOLOv12: Attention-Centric Real-Time Object Detectors
Yunjie TianQixiang YeDavid S. Doermann
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.
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 mechanisms—which offer superior visual modeling and contextual understanding—suffer 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 units—such as modern Turing, Ampere, Ada Lovelace, or Hopper architectures—since older hardware may not realize the full speed benefits documented in the article.
- Paper: YOLOv10: Real-Time End-to-End Object Detection, Ao Wang et al. (2024). Reading YOLOv10 provides essential context on eliminating non-maximum suppression in real-time detectors, directly informing YOLOv12's architecture.
- Paper: YOLOv7: Trainable Bag-of-Freebies Sets New State-of-the-Art for Real-Time Object Detectors, Chien-Yao Wang et al. (2023). Reviewing YOLOv7's design choices for speed-accuracy trade-offs helps clarify the baseline architectural strategies that YOLOv12 extends into the attention-centric regime.
- Paper: DETRs Beat YOLOs on Real-time Object Detection, Yian Zhao et al. (2024). Understanding RT-DETR's approach to real-time end-to-end detection establishes the crucial benchmark performance that YOLOv12 ultimately surpasses.
No sufficiently relevant recommendations were found.
