YOLOv12: Attention-Centric Real-Time Object Detectors

Yunjie Tian, Qixiang Ye, David S. Doermann

arXiv:2502.12524 · 2026-07-27 공개 · arXiv · PDF

transformer object-detection cnn attention-mechanisms rt-detr model-accuracy detr real-time-detection

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.

한국어 요약

한 줄 요약

YOLOv12는 주목 메커니즘 기반의 실시간 객체 탐지 모델로, YOLOv10-N 대비 2.1% mAP 향상과 1.64 ms의 빠른 추론 속도를 달성한다.

핵심 기여도

핵심 아이디어

YOLO 시리즈는 실시간 객체 탐지에서 CNN 기반의 빠른 추론 속도로 우위를 차지했으나, 주목 메커니즘의 모델링 능력은 여전히 뛰어난 것으로 알려져 있었다. 그러나 주목 메커니즘은 **제곱 복잡도**와 **비효율적인 메모리 접근**으로 인해 YOLO 시스템에 적용이 어려웠다. 이에 본 연구는 **A2 모듈**을 통해 주목 메커니즘의 계산 복잡도를 줄이고, **R-ELAN**을 도입하여 대규모 모델의 최적화 문제를 해결함으로써, 주목 메커니즘 기반의 YOLOv12를 제안한다. 또한, **FlashAttention**을 도입해 메모리 접근 문제를 해결하고, **MLP 비율을 4에서 1.2로 낮추어** 주목과 FFN 간 계산 균형을 조정함으로써, YOLO 시스템의 실시간 성능을 유지하면서도 정확도를 향상시켰다.

기술적 접근법

주요 결과

의의 및 한계

YOLOv12는 YOLO 시스템에서 주목 메커니즘의 도입을 성공적으로 시도한 첫 사례로, CNN 기반 모델의 지배적 지위를 흔들며, **정확도-속도-계산량**의 균형을 새롭게 정의한다. 특히, **A2와 R-ELAN**은 주목 메커니즘의 실시간 적용 가능성에 기여하며, **FlashAttention과 MLP 비율 조정**은 YOLO 시스템의 요구사항에 맞춘 구조적 최적화를 보여준다. 그러나, **작은 모델에서 잔차 연결이 성능 저하를 유발**할 수 있으며, **추가적인 사전 학습 없이도 SOTA 성능을 달성**한다는 점은 한계이자 장점으로 볼 수 있다.

실용적 활용

YOLOv12는 **실시간 객체 탐지가 필요한 산업**(예: 자율주행, 보안 감시, 스마트 공장)에서 높은 정확도와 빠른 속도를 동시에 요구하는 상황에 적합하다. 특히, **GPU 자원이 제한된 환경**에서도 뛰어난 성능을 유지할 수 있어, **엣지 기기나 모바일 애플리케이션**에도 유용하게 활용될 수 있다.