A Review of YOLOv12: Attention-Based Enhancements vs. Previous Versions

Rahima Khanam * and Muhammad Hussain Department of Computer Science, Huddersfield University, Queensgate, Huddersfield HD1 3DH, UK; * Correspondence: [email protected]; · 2025

Read A Review of YOLOv12: Attention-Based Enhancements vs. Previous Versions by Rahima Khanam * and Muhammad Hussain Department of Computer Science, Huddersfield University, Queensgate, Huddersfield HD1 3DH, UK; * Correspondence: [email protected]; (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2504-11995.txt.

Introduction

Rahima Khanam and Muhammad Hussain review the twelfth version of the YOLO object detector and its new attention machinery, in work from twenty twenty-five. YOLO models spot objects in one pass and lead real time vision. Attention boosts accuracy but usually costs too much speed for the family.

Version twelve threads the needle with area attention, a cheaper self attention form. A residual aggregation network sharpens feature mixing, and a fast attention library trims memory traffic. The review benchmarks the model against past YOLO versions and rival detectors. Accuracy, speed, and compute all improved together. The authors credit a finer balance of delay against precision.

Catalog record

CREATORRahima Khanam * and Muhammad Hussain Department of Computer Science, Huddersfield University, Queensgate, Huddersfield HD1 3DH, UK; * Correspondence: [email protected];
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE52 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2504-11995

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

A Review of YOLOv12: Attention-Based Enhancements vs. Previous Versions Rahima Khanam * and Muhammad Hussain Department of Computer Science, Huddersfield University, Queensgate, Huddersfield HD1 3DH, UK; * Correspondence: [email protected]; Abstract The YOLO (You Only Look Once) series has been a leading framework in real-time object detection, consistently improving the balance between speed and accuracy. However, integrating attention mechanisms into YOLO has been challenging due to their high computational overhead. YOLOv12 introduces a novel approach that successfully incorporates attention-based enhancements while preserving real-time performance. This paper provides a comprehensive review of YOLOv12’s architectural innovations, including Area Attention for computationally efficient self-attention, Residual Efficient Layer Aggregation Networks for improved feature aggregation, and FlashAttention for optimized memory access. Additionally, we benchmark YOLOv12 against prior YOLO versions and competing object detectors, analyzing its improvements in accuracy, inference speed, and computational efficiency. Through this analysis, we demonstrate how YOLOv12 advances real-time object detection by refining the latency-accuracy trade-off and optimizing computational resources. K eywords Area Attention; Attention Mechanism; Computer Vision; FlashAttention; Object Detection; R-ELAN; Real-Time Image processing; YOLO; YOLOV12; YOLO Evolution 1 Introduction Real-time object detection is a cornerstone of modern computer vision, playing a pivotal role in applications such as autonomous driving [ 1 , 2 , 3 , 4 ] , robotics [ 5 , 6 , 7 ] , and video surveillance [ 8 , 9 , 10 ] . These domains demand not only high accuracy but also low-latency performance to ensure real-time decision-making. Among the various object detection frameworks, the YOLO (You Only Look Once) series has emerged as a dominant solution [ 11 ] , striking a balance between speed and precision by continuously refining convolutional neural network (CNN) architectures [ 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 ] . However, a fundamental challenge in CNN-based detectors lies in their limited ability to capture long-range dependencies, which are crucial for understanding spatial relationships in complex scenes. This limitation has led to increased research into attention mechanisms, particularly Vision Transformers (ViTs) [ 22 , 23 ] , which excel at global feature modeling. Despite their advantages, ViTs suffer from quadratic computational complexity [ 24 ] and inefficient memory access [ 25 , 26 ] , making them impractical for real-time deployment. To address these limitations, YOLOv12 [ 27 ] introduces an attention-centric approach that integrates key innovations to enhance efficiency while maintaining real-time performance. By embedding attention mechanisms within the YOLO framework, it successfully bridges the gap between CNN-based and transformer-based detectors without compromising speed. This is achieved through several architectural enhancements that optimize computational efficiency, improve feature aggregation, and refine attention mechanisms: 1. Area Attention (A2) : A novel mechanism that partitions spatial regions to reduce the complexity of self-attention, preserving a large receptive field while improving computational efficiency. This enables attention-based models to compete with CNNs in speed. 2. Residual Efficient Layer Aggregation Networks (R-ELAN) : An enhancement over traditional ELAN, designed to stabilize training in large-scale models by introducing residual shortcuts and a revised feature aggregation strategy, ensuring better gradient flow and optimization. 3. Architectural Streamlining : Several structural refinements, including the integration of FlashAttention for efficient memory access, the removal of positional encoding to simplify computations, and an optimized MLP ratio to balance performance and inference speed. This review systematically examines the key architectural advancements in YOLOv12, including the integration of attention mechanisms, feature aggregation strategies, and computational optimizations. To provide a structured analysis, the paper is organized as follows: Section 2 outlines the technical evolution of YOLO architectures, highlighting the advancements leading to YOLOv12. Section 3 details the architectural design of YOLOv12, describing its backbone, feature extraction process, and detection head. Section 4 explores the model’s key innovations, including the A2 module, R-ELAN, and additional enhancements for improved efficiency. Section 5 presents a benchmark evaluation, comparing YOLOv12’s performance with previous YOLO versions and state-of-the-art object detectors. Section 6 discusses the various computer vision tasks supported by YOLOv12. Section 7 provides a broader discussion on model efficiency, deployment considerations, and the impact of YOLOv12 in real-world applications. Section 8 addresses current challenges and outlines future research directions. Finally, Section 9 concludes the paper by summarizing YOLOv12’s contributions to real-time object detection and its potential for further advancements in the field. 2 Technical Evolution of YOLO Architectures The You Only Look Once (YOLO) series has revolutionized real-time object detection through continuous architectural innovation and performance optimization. The evolution of YOLO can be traced through distinct versions, each introducing significant advancements. YOLOv1 (2015) [ 11 ] , developed by Joseph Redmon et al., introduced the concept of single-stage object detection, prioritizing speed over accuracy. It divided the image into a grid and predicted bounding boxes and class probabilities directly from each grid cell, enabling real-time inference. This method significantly reduced the computational overhead compared to two-stage detectors, albeit with some trade-offs in localization accuracy. YOLOv2 (2016) [ 12 ] , also by Joseph Redmon, enhanced detection capabilities with the introduction of anchor boxes, batch normalization, and multi-scale training. Anchor boxes allowed the model to predict bounding boxes of various shapes and sizes, improving its ability to detect diverse objects. Batch normalization stabilized training and improved convergence, while multi-scale training made the model more robust to varying input resolutions. YOLOv3 (2018) [ 13 ] , again by Joseph Redmon, further improved accuracy with the Darknet-53 backbone, Feature Pyramid Networks (FPN), and logistic classifiers. Darknet-53 provided a deeper and more powerful feature extractor, while FPN enabled the model to leverage multi-scale features for improved detection of small objects. Logistic classifiers replaced softmax for class prediction, allowing for multi-label classification. YOLOv4 (2020) [ 14 ] , developed by Alexey Bochkovskiy et al., incorporated CSPDarknet, Mish activation, PANet, and Mosaic augmentation. CSPDarknet reduced computational costs while maintaining performance, Mish activation improved gradient flow, PANet enhanced feature fusion, and Mosaic augmentation increased data diversity. YOLOv5 (2020) [ 15 ] , developed by Ultralytics, marked a pivotal shift by introducing a PyTorch implementation. This significantly simplified training and deployment, making YOLO more accessible to a wider audience. It also featured auto-anchor learning, which dynamically adjusted anchor box sizes during training, and incorporated advancements in data augmentation. The transition from Darknet to PyTorch was a major change, and greatly contributed to the models popularity. YOLOv6 (2022) [ 16 ] , developed by Meituan, focused on efficiency with the EfficientRep backbone, Neural Architecture Search (NAS), and RepOptimizer. EfficientRep optimized the model’s architecture for speed and accuracy, NAS automated the search for optimal hyperparameters, and RepOptimizer reduced inference time through structural re-parameterization. YOLOv7 (2022) [ 17 ] , developed by Wang et al., further improved efficiency through Extended Efficient Layer Aggregation Network (E-ELAN) and re-parameterized convolutions. E-ELAN enhanced feature integration and learning capacity, while re-parameterized convolutions reduced computational overhead. YOLOv8 (2023) [ 18 ] , also developed by Ultralytics, introduced C2f modules, task-specific detection heads, and anchor-free detection. C2f modules enhanced feature fusion and gradient flow, task-specific detection heads allowed for more specialized detection tasks, and anchor-free detection eliminated the need for predefined anchor boxes, simplifying the detection process. YOLOv9 (2024) [ 19 ] , developed by Chien-Yao Wang et al., introduces Generalized Efficient Layer

Read the complete text