A Comprehensive Review of YOLO Architectures in Computer Vision: From YOLOv1 to YOLOv8 and YOLO-NAS

YOLO has become a central real-time object detection system for robotics, driverless cars, and video monitoring applications. We present a comprehensive analysis of YOLO's evolution, examining the innovations and contributions in each iteration from the original YOLO up to YOLOv8, YOLO-NAS, and YOLO with Transformers. We start by describing the standard metrics and postprocessing; then, we discuss the major changes in network architecture and training tricks for each model. Finally, we summarize the essential lessons from YOLO's development and provide a perspective on its future, highlighting potential research directions to enhance real-time object detection systems.


Introduction
Real-time object detection has emerged as a critical component in numerous applications, spanning various fields such as autonomous vehicles, robotics, video surveillance, and augmented reality.Among the different object detection algorithms, the YOLO (You Only Look Once) framework has stood out for its remarkable balance of speed and accuracy, enabling the rapid and reliable identification of objects in images.Since its inception, the YOLO family has evolved through multiple iterations, each building upon the previous versions to address limitations and enhance performance (see Figure 1).This paper aims to provide a comprehensive review of the YOLO framework's development, from the original YOLOv1 to the latest YOLOv8, elucidating the key innovations, differences, and improvements across each version.
In addition to the YOLO framework, the field of object detection and image processing has developed several other notable methods.Techniques such as R-CNN (Region-based Convolutional Neural Networks) [1] and its successors, Fast R-CNN [2] and Faster R-CNN [3], have played a pivotal role in advancing the accuracy of object detection.These methods rely on a two-stage process, where selective search generates region proposals, and convolutional neural networks classify and refine these regions.Another significant approach is the Single-Shot MultiBox Detector (SSD) [4], which, similar to YOLO, focuses on speed and efficiency by eliminating the need for a separate region proposal step.Additionally, methods like Mask R-NN [5] have extended capabilities to instance segmentation, enabling precise object localization and pixel-level segmentation.These developments, alongside others such as RetinaNet [6] and EfficientDet [7], have collectively contributed to the diverse landscape of object detection algorithms.Each method presents unique tradeoffs between speed, accuracy, and complexity, catering to different application needs and computational constraints.Other great reviews include [8,9,10].However, the review from [8] covers until YOLOv3, and [9] covers until YOLOv4, leaving behind the most recent developments.Our paper, different from [10], shows in-depth architectures for most YOLO architectures presented and covers other variations, such as YOLOX, PP-YOLOs, YOLO with transformers, and YOLO-NAS.This paper begins by exploring the foundational concepts and architecture of the original YOLO model, which set the stage for subsequent advances in the YOLO family.Following this, we dive into the refinements and enhancements introduced in each version, ranging from YOLOv2 to YOLOv8.These improvements encompass various aspects such as network design, loss function modifications, anchor box adaptations, and input resolution scaling.By examining these developments, we aim to offer a holistic understanding of the YOLO framework's evolution and its implications for object detection.
In addition to discussing the specific advancements of each YOLO version, the paper highlights the tradeoffs between speed and accuracy that have emerged throughout the framework's development.This underscores the importance of considering the context and requirements of specific applications when selecting the most appropriate YOLO model.Finally, we envision the future directions of the YOLO framework, touching upon potential avenues for further research and development that will shape the ongoing progress of real-time object detection systems.

YOLO Applications Across Diverse Fields
YOLO's real-time object detection capabilities have been invaluable in autonomous vehicle systems, enabling quick identification and tracking of various objects such as vehicles, pedestrians [11,12], bicycles, and other obstacles [13,14,15,16].These capabilities have been applied in numerous fields, including action recognition [17] in video sequences for surveillance [18], sports analysis [19], and human-computer interaction [20].
YOLO models have been used in agriculture to detect and classify crops [21,22], pests, and diseases [23], assisting in precision agriculture techniques and automating farming processes.They have also been adapted for face detection tasks in biometrics, security, and facial recognition systems [24,25].
In the medical field, YOLO has been employed for cancer detection [26,27], skin segmentation [28], and pill identification [29], leading to improved diagnostic accuracy and more efficient treatment processes.In remote sensing, it has been used for object detection and classification in satellite and aerial imagery, aiding in land use mapping, urban planning, and environmental monitoring [30,31,32,33].
Security systems have integrated YOLO models for real-time monitoring and analysis of video feeds, allowing rapid detection of suspicious activities [34], social distancing, and face mask detection [35].The models have also been applied in surface inspection to detect defects and anomalies, enhancing quality control in manufacturing and production processes [36,37,38].
In traffic applications, YOLO models have been utilized for tasks such as license plate detection [39] and traffic sign recognition [40], contributing to developing intelligent transportation systems and traffic management solutions.They have been employed in wildlife detection and monitoring to identify endangered species for biodiversity conservation and ecosystem management [41].Lastly, YOLO has been widely used in robotic applications [42,43] and object detection from drones [44,45].Figure 2 shows a bibliometric network visualization of all the papers found in Scopus with the word YOLO in the title and filtered by object detection keyword.Then, we manually filtered all the papers related to applications.

Object Detection Metrics and Non-Maximum Suppression (NMS)
The Average Precision (AP), traditionally called Mean Average Precision (mAP), is the commonly used metric for evaluating the performance of object detection models.It measures the average precision across all categories, providing a single value to compare different models.The COCO dataset makes no distinction between AP and mAP.In the rest of this paper, we will refer to this metric as AP.
In YOLOv1 and YOLOv2, the dataset utilized for training and benchmarking was PASCAL VOC 2007, and VOC 2012 [46].However, from YOLOv3 onwards, the dataset used is Microsoft COCO (Common Objects in Context) [47].The AP is calculated differently for these datasets.The following sections will discuss the rationale behind AP and explain how it is computed.

How AP works?
The AP metric is based on precision-recall metrics, handling multiple object categories, and defining a positive prediction using Intersection over Union (IoU).
Precision and Recall: Precision measures the accuracy of the model's positive predictions, while recall measures the proportion of actual positive cases that the model correctly identifies.There is often a trade-off between precision and recall; for example, increasing the number of detected objects (higher recall) can result in more false positives (lower precision).To account for this trade-off, the AP metric incorporates the precision-recall curve that plots precision against recall for different confidence thresholds.This metric provides a balanced assessment of precision and recall by considering the area under the precision-recall curve.
Handling multiple object categories: Object detection models must identify and localize multiple object categories in an image.The AP metric addresses this by calculating each category's average precision (AP) separately and then taking the mean of these APs across all categories (that is why it is also called mean average precision).This approach ensures that the model's performance is evaluated for each category individually, providing a more comprehensive assessment of the model's overall performance.
Intersection over Union: Object detection aims to accurately localize objects in images by predicting bounding boxes.The AP metric incorporates the Intersection over Union (IoU) measure to assess the quality of the predicted bounding boxes.IoU is the ratio of the intersection area to the union area of the predicted bounding box and the ground truth bounding box (see Figure 3).It measures the overlap between the ground truth and predicted bounding boxes.The COCO benchmark considers multiple IoU thresholds to evaluate the model's performance at different levels of localization accuracy.

Computing AP
The AP is computed differently in the VOC and in the COCO datasets.In this section, we describe how it is computed on each dataset.

VOC Dataset
This dataset includes 20 object categories.To compute the AP in VOC, we follow the next steps: 1.For each category, calculate the precision-recall curve by varying the confidence threshold of the model's predictions.2. Calculate each category's average precision (AP) using an interpolated 11-point sampling of the precision-recall curve.3. Compute the final average precision (AP) by taking the mean of the APs across all 20 categories.

Microsoft COCO Dataset
This dataset includes 80 object categories and uses a more complex method for calculating AP.Instead of using an 11-point interpolation, it uses a 101-point interpolation, i.e., it computes the precision for 101 recall thresholds from 0 to 1 in increments of 0.01.Also, the AP is obtained by averaging over multiple IoU values instead of just one, except for a common AP metric called AP 50 , which is the AP for a single IoU threshold of 0.5.The steps for computing AP in COCO are the following: 1.For each category, calculate the precision-recall curve by varying the confidence threshold of the model's predictions.
3. Calculate AP at different Intersection over Union (IoU) thresholds, typically from 0.5 to 0.95 with a step size of 0.05.A higher IoU threshold requires a more accurate prediction to be considered a true positive.
4. For each IoU threshold, take the mean of the APs across all 80 categories.
5. Finally, compute the overall AP by averaging the AP values calculated at each IoU threshold.
The differences in AP calculation make it hard to directly compare the performance of object detection models across the two datasets.The current standard uses the COCO AP due to its more fine-grained evaluation of how well a model performs at different IoU thresholds.

Non-Maximum Suppression (NMS)
Non-Maximum Suppression (NMS) is a post-processing technique used in object detection algorithms to reduce the number of overlapping bounding boxes and improve the overall detection quality.Object detection algorithms typically generate multiple bounding boxes around the same object with different confidence scores.NMS filters out redundant and irrelevant bounding boxes, keeping only the most accurate ones.Algorithm 1 describes the procedure.Figure 4 shows the typical output of an object detection model containing multiple overlapping bounding boxes and the output after NMS.end for 14: end while We are ready to start describing the different YOLO models.

YOLO: You Only Look Once
YOLO by Joseph Redmon et al. was published in CVPR 2016 [48].It presented for the first time a real-time end-to-end approach for object detection.The name YOLO stands for "You Only Look Once," referring to the fact that it was able to accomplish the detection task with a single pass of the network, as opposed to previous approaches that either used sliding windows followed by a classifier that needed to run hundreds or thousands of times per image or the more advanced methods that divided the task into two-steps, where the first step detects possible regions with objects or regions proposals and the second step run a classifier on the proposals.Also, YOLO used a more straightforward output based only on regression to predict the detection outputs as opposed to Fast R-CNN [2] that used two separate outputs, a classification for the probabilities and a regression for the boxes coordinates.

How YOLOv1 works?
YOLOv1 unified the object detection steps by detecting all the bounding boxes simultaneously.To accomplish this, YOLO divides the input image into a S × S grid and predicts B bounding boxes of the same class, along with its confidence for C different classes per grid element.Each bounding box prediction consists of five values: P c, bx, by, bh, bw where P c is the confidence score for the box that reflects how confident the model is that the box contains an object and how accurate the box is.The bx and by coordinates are the centers of the box relative to the grid cell, and bh and bw are the height and width of the box relative to the full image.The output of YOLO is a tensor of S × S × (B × 5 + C) optionally followed by non-maximum suppression (NMS) to remove duplicate detections.
Figure 5 shows a simplified output vector considering a three-by-three grid, three classes, and a single class per grid for eight values.In this simplified case, the output of YOLO would be 3 × 3 × 8.
YOLOv1 achieved an average precision (AP) of 63.4 on the PASCAL VOC2007 dataset.YOLOv1 architecture comprises 24 convolutional layers followed by two fully-connected layers that predict the bounding box coordinates and probabilities.All layers used leaky rectified linear unit activations [49] except for the last one that used a linear activation function.Inspired by GoogLeNet [50] and Network in Network [51], YOLO uses 1 × 1 convolutional layers to reduce the number of feature maps and keep the number of parameters relatively low.As activation layers, Table 1 describes the YOLOv1 architecture.The authors also introduced a lighter model called Fast YOLO, composed of nine convolutional layers.

YOLOv1 Training
The authors pre-trained the first 20 layers of YOLO at a resolution of 224 × 224 using the ImageNet dataset [52].Then, they added the last four layers with randomly initialized weights and fine-tuned the model with the PASCAL VOC 2007, and VOC 2012 datasets [46] at a resolution of 448 × 448 to increase the details for more accurate object detection.
For augmentations, the authors used random scaling and translations of at most 20% of the input image size, as well as random exposure and saturation with an upper-end factor of 1.5 in the HSV color space.
YOLOv1 used a loss function composed of multiple sum-squared errors, as shown in Figure 6.In the loss function, λ coord = 5 is a scale factor that gives more importance to the bounding boxes predictions, and λ noobj = 0.5 is a scale factor that decreases the importance of the boxes that do not contain objects.
The first two terms of the loss represent the localization loss; it computes the error in the predicted bounding boxes locations (x, y) and sizes (w, h).Note that these errors are only computed in the boxes containing objects (represented by the 1 obj ij ), only penalizing if an object is present in that grid cell.The third and fourth loss terms represent the confidence loss; the third term measures the confidence error when the object is detected in the box (1 obj ij ) and the fourth term measures the confidence error when the object is not detected in the box (1 noobj ij ).Since most boxes are empty, this loss is weighted down by the λ noobj term.The final loss component is the classification loss that measures the squared error of the class conditional probabilities for each class only if the object appears in the cell (1 obj i ).
Figure 6: YOLO cost function: includes localization loss for bounding box coordinates, confidence loss for object presence or absence, and classification loss for category prediction accuracy.

YOLOv1 Strengths and Limitations
The simple architecture of YOLO, along with its novel full-image one-shot regression, made it much faster than the existing object detectors allowing real-time performance.
However, while YOLO performed faster than any object detector, the localization error was larger compared with state-of-the-art methods such as Fast R-CNN [2].There were three major causes of this limitation: 1.It could only detect at most two objects of the same class in the grid cell, limiting its ability to predict nearby objects.
2. It struggled to predict objects with aspect ratios not seen in the training data.
3. It learned from coarse object features due to the down-sampling layers.
5 YOLOv2: Better, Faster, and Stronger YOLOv2 was published in CVPR 2017 [53] by Joseph Redmon and Ali Farhadi.It included several improvements over the original YOLO, to make it better, keeping the same speed and also stronger -capable of detecting 9000 categories!-.The improvements were the following: 1. Batch normalization on all convolutional layers improved convergence and acts as a regularizer to reduce overfitting.With all these improvements, YOLOv2 achieved an average precision (AP) of 78.6% on the PASCAL VOC2007 dataset compared to the 63.4% obtained by YOLOv1.

YOLOv2 Architecture
The backbone architecture used by YOLOv2 is called Darknet-19, containing 19 convolutional layers and five maxpooling layers.Similar to the architecture of YOLOv1, it is inspired in the Network in Network [51] using 1 × 1 convolutions between the 3 × 3 to reduce the number of parameters.In addition, as mentioned above, they use batch normalization to regularize and help convergence.
Table 2 shows the entire Darknet-19 backbone with the object detection head.YOLOv2 predicts five bounding boxes, each with five values and 20 classes when using the PASCAL VOC dataset.
The object classification head replaces the last four convolutional layers with a single convolutional layer with 1000 filters, followed by a global average pooling layer and a Softmax.

YOLO9000 is a stronger YOLOv2
The authors introduced a method for training joint classification and detection in the same paper.It used the detection labeled data from COCO [47] to learn bounding box coordinates and classification data from ImageNet to increase the number of categories it can detect.During training, they combined both datasets such that when a detection training image is used, it backpropagates the detection network, and when a classification training image is used, it backpropagates the classification part of the architecture.The result is a YOLO model capable of detecting more than 9000 categories hence the name YOLO9000.

YOLOv3
YOLOv3 [54] was published in ArXiv in 2018 by Joseph Redmon and Ali Farhadi.It included significant changes and a bigger architecture to be on par with the state-of-the-art while keeping real-time performance.In the following, we described the changes with respect to YOLOv2.
1. Bounding box prediction.Like YOLOv2, the network predicts four coordinates for each bounding box t x , t y , t w , and t h ; however, this time, YOLOv3 predicts an objectness score for each bounding box using logistic regression.This score is 1 for the anchor box with the highest overlap with the ground truth and 0 for the rest anchor boxes.YOLOv3, as opposed to Faster R-CNN [3], assigns only one anchor box to each ground truth object.Also, if no anchor box is assigned to an object, it only incurs in classification loss but not localization loss or confidence loss.
2. Class Prediction.Instead of using a softmax for the classification, they used binary cross-entropy to train independent logistic classifiers and pose the problem as a multilabel classification.This change allows assigning multiple labels to the same box, which may occur on some complex datasets [55] with overlapping labels.For example, the same object can be a Person and a Man.
3. New backbone.YOLOv3 features a larger feature extractor composed of 53 convolutional layers with residual connections.Section 6.1 describes the architecture in more detail.4. Spatial pyramid pooling (SPP) Although not mentioned in the paper, the authors also added to the backbone a modified SPP block [56] that concatenates multiple max pooling outputs without subsampling (stride = 1), each with different kernel sizes k × k where k = 1, 5, 9, 13 allowing a larger receptive field.This version is called YOLOv3-spp and was the best-performed version improving the AP 50 by 2.7%.

5.
Multi-scale Predictions.Similar to Feature Pyramid Networks [57], YOLOv3 predicts three boxes at three different scales.Section 6.2 describes the multi-scale prediction mechanism with more details.
6. Bounding box priors.Like YOLOv2, the authors also use k-means to determine the bounding box priors of anchor boxes.The difference is that in YOLOv2, they used a total of five prior boxes per cell, and in YOLOv3, they used three prior boxes for three different scales.

YOLOv3 Architecture
The architecture backbone presented in YOLOv3 is called Darknet-53.It replaced all max-pooling layers with strided convolutions and added residual connections.In total, it contains 53 convolutional layers.Figure 9 shows the architecture details.

YOLOv3 Multi-Scale Predictions
Besides a larger architecture, an essential feature of YOLOv3 is the multi-scale predictions, i.e., predictions at multiple grid sizes.This helped to obtain finer detailed boxes and significantly improved the prediction of small objects, which was one of the main weaknesses of the previous versions of YOLO.
The multi-scale detection architecture shown in Figure 10 works as follows: the first output marked as y1 is equivalent to the YOLOv2 output, where a 13 × 13 grid defines the output.The second output y2 is composed by concatenating the output after the (Res × 4) of Darknet-53 with the output after (the Res × 8).The feature maps have different sizes, i.e., 13 × 13 and 26 × 26, so there is an upsampling operation before the concatenation.Finally, using an upsampling operation, the third output y3 concatenates the 26 × 26 feature maps with the 52 × 52 feature maps.
For the COCO dataset with 80 categories, each scale provides an output tensor with a shape of where N × N is the size of the feature map (or grid cell), the 3 indicates the boxes per cell and the 4 + 1 include the four coordinates and the objectness score.

YOLOv3 Results
When YOLOv3 was released, the benchmark for object detection had changed from PASCAL VOC to Microsoft COCO [47].Therefore, from here on, all the YOLOs are evaluated in the MS COCO dataset.YOLOv3-spp achieved an average precision AP of 36.2% and AP 50 of 60.6% at 20 FPS, achieving state-of-the-art at the time and 2× faster.7 Backbone, Neck, and Head At this time, the architecture of object detectors started to be described in three parts: the backbone, the neck, and the head.Figure 11 shows a high-level backbone, neck, and head diagram.
The backbone is responsible for extracting useful features from the input image.It is typically a convolutional neural network (CNN) trained on a large-scale image classification task, such as ImageNet.The backbone captures hierarchical features at different scales, with lower-level features (e.g., edges and textures) extracted in the earlier layers and higher-level features (e.g., object parts and semantic information) extracted in the deeper layers.
The neck is an intermediate component that connects the backbone to the head.It aggregates and refines the features extracted by the backbone, often focusing on enhancing the spatial and semantic information across different scales.
The neck may include additional convolutional layers, feature pyramid networks (FPN) [57], or other mechanisms to improve the representation of the features.
The head is the final component of an object detector; it is responsible for making predictions based on the features provided by the backbone and neck.It typically consists of one or more task-specific subnetworks that perform classification, localization, and, more recently, instance segmentation and pose estimation.The head processes the features the neck provides, generating predictions for each object candidate.In the end, a post-processing step, such as non-maximum suppression (NMS), filters out overlapping predictions and retains only the most confident detections.
In the rest of the YOLO models, we will describe the architectures using the backbone, neck, and head.

YOLOv4
Two years passed, and there was no new version of YOLO.It was until April 2020 that Alexey Bochkovskiy, Chien-Yao Wang, and Hong-Yuan Mark Liao released in ArXiv the paper for YOLOv4 [58].At first, it felt odd that different authors presented a new "official" version of YOLO; however, YOLOv4 kept the same YOLO philosophy -real-time, open source, single shot, and darknet framework-and the improvements were so satisfactory that the community rapidly embrace this version as the official YOLOv4.We summarize the main changes of YOLOv4 in the following points: • An Enhanced Architecture with Bag-of-Specials (BoS) Integration.The authors tried multiple architectures for the backbone, such as ResNeXt50 [67], EfficientNet-B3 [68], and Darknet-53.The best-performing architecture was a modification of Darknet-53 with cross-stage partial connections (CSPNet) [69], and Mish activation function [65] as the backbone (see Figure 12.For the neck, they used the modified version of spatial pyramid pooling (SPP) [56] from YOLOv3-spp and multi-scale predictions as in YOLOv3, but with a modified version of path aggregation network (PANet) [70] instead of FPN as well as a modified spatial attention module (SAM) [71].Finally, for the detection head, they use anchors as in YOLOv3.Therefore, the model was called CSPDarknet53-PANet-SPP.The cross-stage partial connections (CSP) added to the Darknet-53 help reduce the computation of the model while keeping the same accuracy.The SPP block, as in YOLOv3-spp increases the receptive field without affecting the inference speed.The modified version of PANet concatenates the features instead of adding them as in the original PANet paper.• Integrating bag-of-freebies (BoF) for an Advanced Training Approach.Apart from the regular augmentations such as random brightness, contrast, scaling, cropping, flipping, and rotation, the authors implemented mosaic augmentation that combines four images into a single one allowing the detection of objects outside their usual context and also reducing the need for a large mini-batch size for batch normalization.For regularization, they used DropBlock [72] that works as a replacement of Dropout [73] but for convolutional neural networks as well as class label smoothing [74,75].For the detector, they added CIoU loss [76] and Cross mini-bath normalization (CmBN) for collecting statistics from the entire batch instead of from single mini-batches as in regular batch normalization [77].• Self-adversarial Training (SAT).To make the model more robust to perturbations, an adversarial attack is performed on the input image to create a deception that the ground truth object is not in the image but keeps the original label to detect the correct object.• Hyperparameter Optimization with Genetic Algorithms.To find the optimal hyperparameters used for training, they use genetic algorithms on the first 10% of periods, and a cosine annealing scheduler [78] to alter the learning rate during training.It starts reducing the learning rate slowly, followed by a quick reduction halfway through the training process ending with a slight reduction.

YOLOv5
YOLOv5 [80] was released a couple of months after YOLOv4 in 2020 by Glen Jocher, founder and CEO of Ultralytics.It uses many improvements described in the YOLOv4 section but developed in Pytorch instead of Darknet.YOLOv5 incorporates an Ultralytics algorithm called AutoAnchor.This pre-training tool checks and adjusts anchor boxes if they are ill-fitted for the dataset and training settings, such as image size.It first applies a k-means function to dataset labels to generate initial conditions for a Genetic Evolution (GE) algorithm.The GE algorithm then evolves these anchors over 1000 generations by default, using CIoU loss [76] and Best Possible Recall as its fitness function.Figure 13 shows the detailed architecture of YOLOv5.

YOLOv5 Architecture
The backbone is a modified CSPDarknet53 that starts with a Stem, a strided convolution layer with a large window size to reduce memory and computational costs; followed by convolutional layers that extract relevant features from the Path aggregation network (PAN) Distance-IoU Non-Maximum Suppression input image.The SPPF (spatial pyramid pooling fast) layer and the following convolution layers process the features at various scales, while the upsample layers increase the resolution of the feature maps.The SPPF layer aims to speed up the computation of the network by pooling features of different scales into a fixed-size feature map.Each convolution is followed by batch normalization (BN) and SiLU activation [81].The neck uses SPPF and a modified CSP-PAN, while the head resembles YOLOv3.
YOLOv5 uses several augmentations such as Mosaic, copy paste [82], random affine, MixUp [83], HSV augmentation, random horizontal flip, as well as other augmentations from the albumentations package [84].It also improves the grid sensitivity to make it more stable to runaway gradients.
YOLOv5 provides five scaled versions: YOLOv5n (nano), YOLOv5s (small), YOLOv5m (medium), YOLOv5l (large), and YOLOv5x (extra large), where the width and depth of the convolution modules vary to suit specific applications and hardware requirements.For instance, YOLOv5n and YOLOv5s are lightweight models targeted for low-resource devices, while YOLOv5x is optimized for high performance, albeit at the expense of speed.10 Scaled-YOLOv4 One year after YOLOv4, the same authors presented Scaled-YOLOv4 [87] in CVPR 2021.Differently from YOLOv4, Scaled YOLOv4 was developed in Pytorch instead of Darknet.The main novelty was the introduction of scaling-up and scaling-down techniques.Scaling up means producing a model that increases accuracy at the expense of a lower speed; on the other hand, scaling down entails producing a model that increases speed sacrificing accuracy.In addition, scaled-down models need less computing power and can run on embedded systems.
The scaled-down architecture was called YOLOv4-tiny; it was designed for low-end GPUs and can run at 46 FPS on a Jetson TX2 or 440 FPS on RTX2080Ti, achieving 22% AP on MS COCO.The scaled-up model architecture was called YOLOv4-large, which included three different sizes P5, P6, and P7.This architecture was designed for cloud GPU and achieved state-of-the-art performance, surpassing all previous models [7,6,88] with 56% AP on MS COCO.
YOLOR [89] was published in ArXiv in May 2021 by the same research team of YOLOv4.It stands for You Only Learn One Representation.In this paper, the authors followed a different approach; they developed a multi-task learning approach that aims to create a single model for various tasks (e.g., classification, detection, pose estimation) by learning a general representation and using sub-networks to create task-specific representations.With the insight that the traditional joint learning method often leads to suboptimal feature generation, YOLOR aims to overcome this by encoding the implicit knowledge of neural networks to be applied to multiple tasks, similar to how humans use past experiences to approach new problems.The results showed that introducing implicit knowledge into the neural network benefits all the tasks.
Evaluated on MS COCO dataset test-dev 2017, YOLOR achieved a AP of 55.4% and AP 50 of 73.3% at 30 FPS on an NVIDIA V100.

YOLOX
YOLOX [90] was published in ArXiv in July 2021 by Megvii Technology.Developed in Pytorch and using YOLOV3 from Ultralytics as starting point, it has five principal changes: an anchor-free architecture, multiple positives, a decoupled head, advanced label assignment, and strong augmentations.It achieved state-of-the-art results in 2021 with an optimal balance between speed and accuracy with 50.1% AP at 68.9% FPS on Tesla V100.In the following, we describe the five main changes of YOLOX with respect to YOLOv3: 1. Anchor-free.Since YOLOv2, all subsequent YOLO versions were anchor-based detectors.YOLOX, inspired by anchor-free state-of-the-art object detectors such as CornerNet [91], CenterNet [92], and FCOS [93], returned to an anchor-free architecture simplifying the training and decoding process.The anchor-free increased the AP by 0.9 points concerning the YOLOv3 baseline.2. Multi positives.To compensate for the large imbalances the lack of anchors produced, the authors use center sampling [93] where they assigned the center 3 × 3 area as positives.This approach increased AP by 2.1 points.3. Decoupled head.In [94,95], it was shown that there could be a misalignment between the classification confidence and localization accuracy.Due to this, YOLOX separates these two into two heads (as shown in Fig. 14), one for classification tasks and the other for regression tasks improving the AP by 1.1 points and speeding up the model convergence.4. Advanced label assignment.In [96], it was shown that the ground truth label assignment could have ambiguities when the boxes of multiple objects overlap and formulate the assigning procedure as an Optimal Transport (OT) problem.YOLOX, inspired by this work, proposed a simplified version called simOTA.This change increased AP by 2.3 points.5. Strong augmentations.YOLOX uses MixUP [83] and Mosaic augmentations.The authors found that ImageNet pretraining was no longer beneficial after using these augmentations.The strong augmentations increased AP by 2.4 points.

YOLOv6
YOLOv6 [97] was published in ArXiv in September 2022 by Meituan Vision AI Department.The network design consists of an efficient backbone with RepVGG or CSPStackRep blocks, a PAN topology neck, and an efficient decoupled head with a hybrid-channel strategy.In addition, the paper introduces enhanced quantization techniques using post-training quantization and channel-wise distillation, resulting in faster and more accurate detectors.Overall, YOLOv6 outperforms previous state-of-the-art models on accuracy and speed metrics, such as YOLOv5, YOLOX, and PP-YOLOE.
Figure 15 shows the detailed architecture of YOLOv6.
The main novelties of this model are summarized below: 1.A new backbone based on RepVGG [98] called EfficientRep that uses higher parallelism than previous YOLO backbones.For the neck, they use PAN [70] enhanced with RepBlocks [98] or CSPStackRep [69] Blocks for the larger models.And following YOLOX, they developed an efficient decoupled head.2. Label assignment using the Task alignment learning approach introduced in TOOD [100].

New classification and regression losses. They used a classification VariFocal loss [101] and an SIoU
[102]/GIoU [103] regression loss.4. A self-distillation strategy for the regression and classification tasks. 5.A quantization scheme for detection using RepOptimizer [104] and channel-wise distillation [105] that helped to achieve a faster detector.
The authors provide eight scaled models, from YOLOv6-N to YOLOv6-L6.Evaluated on MS COCO dataset test-dev 2017, the largest model, achieved an AP of 57.2% at around 29 FPS on an NVIDIA Tesla T4.

YOLOv7
YOLOv7 [106] was published in ArXiv in July 2022 by the same authors of YOLOv4 and YOLOR.At the time, it surpassed all known object detectors in speed and accuracy in the range of 5 FPS to 160 FPS.Like YOLOv4, it was trained using only the MS COCO dataset without pre-trained backbones.YOLOv7 proposed a couple of architecture changes and a series of bag-of-freebies, which increased the accuracy without affecting the inference speed, only the training time.
Figure 16 shows the detailed architecture of YOLOv7.
The architecture changes of YOLOv7 are: • Extended efficient layer aggregation network (E-ELAN).ELAN [108] is a strategy that allows a deep model to learn and converge more efficiently by controlling the shortest longest gradient path.YOLOv7 proposed E-ELAN that works for models with unlimited stacked computational blocks.E-ELAN combines the features of different groups by shuffling and merging cardinality to enhance the network's learning without destroying the original gradient path.• Model scaling for concatenation-based models.Scaling generates models of different sizes by adjusting some model attributes.The architecture of YOLOv7 is a concatenation-based architecture in which standard scaling techniques, such as depth scaling, cause a ratio change between the input channel and the output channel of a transition layer which, in turn, leads to a decrease in the hardware usage of the model.YOLOv7 proposed a new strategy for scaling concatenation-based models in which the depth and width of the block are scaled with the same factor to maintain the optimal structure of the model.
The bag-of-freebies used in YOLOv7 include: • Planned re-parameterized convolution.Like YOLOv6, the architecture of YOLOv7 is also inspired by re-parameterized convolutions (RepConv) [98].However, they found that the identity connection in RepConv destroys the residual in ResNet [61] and the concatenation in DenseNet [109].For this reason, they removed the identity connection and called it RepConvN.
• Coarse label assignment for auxiliary head and fine label assignment for the lead head.The lead head is responsible for the final output, while the auxiliary head assists with the training.
• Batch normalization in conv-bn-activation.This integrates the mean and variance of batch normalization into the bias and weight of the convolutional layer at the inference stage.
• Exponential moving average as the final inference model.

Comparison with YOLOv4 and YOLOR
In this section, we highlight the enhancements of YOLOv7 compared to previous YOLO models developed by the same authors.
Compared to YOLOv4, YOLOv7 achieved a 75% reduction in parameters and a 36% reduction in computation while simultaneously improving the average precision (AP) by 1.5%.
In contrast to YOLOv4-tiny, YOLOv7-tiny managed to reduce parameters and computation by 39% and 49%, respectively, while maintaining the same AP.
Lastly, compared to YOLOR, YOLOv7 reduced the number of parameters and computation by 43% and 15%, respectively, along with a slight 0.4% increase in AP.
Evaluated on MS COCO dataset test-dev 2017, YOLOv7-E6 achieved an AP of 55.9% and AP 50 of 73.5% with an input size of 1280 pixels with a speed of 50 FPS on an NVIDIA V100.15 DAMO-YOLO DAMO-YOLO [110] was published in ArXiv in November 2022 by Alibaba Group.Inspired by the current technologies, DAMO-YOLO included the following: 1.A Neural architecture search (NAS).They used a method called MAE-NAS [111] developed by Alibaba to find an efficient architecture automatically.2. A large neck.Inspired by GiraffeDet [112], CSPNet [69], and ELAN [108], the authors designed a neck that can work in real-time called Efficient-RepGFPN. 3. A small head.The authors found that a large neck and a small neck yield better performance, and they only left one linear layer for classification and one for regression.They called this approach ZeroHead.4. AlignedOTA label assignment.Dynamic label assignment methods, such as OTA [96] and TOOD [100], have gained popularity due to their significant improvements over static methods.However, the misalignment between classification and regression remains a problem, partly because of the imbalance between classification and regression losses.To address this issue, their AlignOTA method introduces focal loss [6] into the classification cost and uses the IoU of prediction and ground truth box as the soft label, enabling the selection of aligned samples for each target and solving the problem from a global perspective.5. Knowledge distillation.Their proposed strategy consists of two stages: the teacher guiding the student in the first stage and the student fine-tuning independently in the second stage.Additionally, they incorporate two enhancements in the distillation approach: the Align Module, which adapts student features to the same resolution as the teacher's, and Channel-wise Dynamic Temperature, which normalizes teacher and student features to reduce the impact of real value differences.
(extra large).YOLOv8 supports multiple vision tasks such as object detection, segmentation, pose estimation, tracking, and classification.

YOLOv8 Architecture
Figure 17 shows the detailed architecture of YOLOv8.YOLOv8 uses a similar backbone as YOLOv5 with some changes on the CSPLayer, now called the C2f module.The C2f module (cross-stage partial bottleneck with two convolutions) combines high-level features with contextual information to improve detection accuracy.
YOLOv8 uses an anchor-free model with a decoupled head to independently process objectness, classification, and regression tasks.This design allows each branch to focus on its task and improves the model's overall accuracy.In the output layer of YOLOv8, they used the sigmoid function as the activation function for the objectness score, representing the probability that the bounding box contains an object.It uses the softmax function for the class probabilities, representing the objects' probabilities belonging to each possible class.
YOLOv8 uses CIoU [76] and DFL [114] loss functions for bounding box loss and binary cross-entropy for classification loss.These losses have improved object detection performance, particularly when dealing with smaller objects.
YOLOv8 also provides a semantic segmentation model called YOLOv8-Seg model.The backbone is a CSPDarknet53 feature extractor, followed by a C2f module instead of the traditional YOLO neck architecture.The C2f module is followed by two segmentation heads, which learn to predict the semantic segmentation masks for the input image.
The model has similar detection heads to YOLOv8, consisting of five detection modules and a prediction layer.The YOLOv8-Seg model has achieved state-of-the-art results on various object detection and semantic segmentation benchmarks while maintaining high speed and efficiency.
YOLOv8 can be run from the command line interface (CLI), or it can also be installed as a PIP package.In addition, it comes with multiple integrations for labeling, training, and deploying.
Evaluated on MS COCO dataset test-dev 2017, YOLOv8x achieved an AP of 53.9% with an image size of 640 pixels (compared to 50.7% of YOLOv5 on the same input size) with a speed of 280 FPS on an NVIDIA A100 and TensorRT.
17 PP-YOLO, PP-YOLOv2, and PP-YOLOE PP-YOLO models have been growing parallel to the YOLO models we described.However, we decided to group them in a single section because they began with YOLOv3 and had been gradually improving upon the previous PP-YOLO version.Nevertheless, these models have been influential in the evolution of YOLO.PP-YOLO [88] similar to YOLOv4 and YOLOv5 was based on YOLOv3.It was published in ArXiv in July 2020 by researchers from Baidu Inc.The authors used the PaddlePaddle [116] deep learning platform, hence its PP name.Following the trend we have seen starting with YOLOv4, PP-YOLO added ten existing tricks to improve the detector's accuracy, keeping the speed unchanged.According to the authors, this paper was not intended to introduce a novel object detector but to show how to build a better detector step by step.Most of the tricks PP-YOLO uses are different from the ones used in YOLOv4, and the ones that overlap use a different implementation.The changes of PP-YOLO concerning YOLOv3 are: 1.A ResNet50-vd backbone replacing the DarkNet-53 backbone with an architecture augmented with deformable convolutions [117] in the last stage and a distilled pre-trained model, which has a higher classification accuracy on ImageNet.This architecture was called ResNet5-vd-dcn.4. DropBlock is applied only to the FPN.
5. An IoU loss is added in another branch along with the L1-loss for bounding box regression.
6.An IoU prediction branch is added to measure localization accuracy along with an IoU aware loss.During inference, YOLOv3 multiplies the classification probability and objectiveness score to compute the final detection, PP-YOLO also multiplies the predicted IoU to consider the localization accuracy.
7. Grid Sensitive approach similar to YOLOv4 is used to improve the bounding box center prediction at the grid boundary.
8. Matrix NMS [118] is used, which can be run in parallel making it faster than traditional NMS. 10.Spatial Pyramid Pooling is used only on the top feature map to increase the receptive field of the backbone.

YOLO-NAS
YOLO-NAS [124] was released in May 2023 by Deci, a company that develops production-grade models and tools to build, optimize, and deploy deep learning models.YOLO-NAS is designed to detect small objects, improve localization accuracy, and enhance the performance-per-compute ratio, making it suitable for real-time edge-device applications.In addition, its open-source architecture is available for research use.
The novelty of YOLO-NAS includes the following: • Quantization aware modules [125] called QSP and QCI that combine re-parameterization for 8-bit quantization to minimize the accuracy loss during post-training quantization.
• Hybrid quantization method to selectively quantize certain parts of a model to balance latency and accuracy instead of standard quantization, where all the layers are affected.
• A pre-training regimen with automatically labeled data, self-distillation, and large datasets.
The AutoNAC system, which was instrumental in creating YOLO-NAS, is versatile and can accommodate any task, the specifics of the data, the environment for making inferences, and the setting of performance goals.It assists users in identifying the most suitable structure that offers the perfect blend of precision and inference speed for their particular use.This technology considers the data and hardware and other elements involved in the inference process, such as compilers and quantization.In addition, RepVGG blocks were incorporated into the model architecture during the NAS process for compatibility with Post-Training Quantization (PTQ).They generated three architectures by varying the depth and positions of the QSP and QCI blocks: YOLO-NASS, YOLO-NASM, and YOLO-NASL (S,M,L for small, medium, and large, respectively).Figure 19 shows the model architecture for YOLO-NASL.The model is pre-trained on Objects365 [126], which contains two million images and 365 categories, then the COCO dataset was used to generate pseudo-labels.Finally, the models are trained with the original 118k train images of the COCO dataset.
At this writing, three YOLO-NAS models have been released in FP32, FP16, and INT8 precisions, achieving an AP of 52.2% on MS COCO with 16-bit precision.

YOLO with Transformers
With the rise of the Transformer [127] taking over most Deep Learning tasks from Language and Audio Processing to Vision, it was natural for Transformers and YOLO to be combined.One of the first attempts at using transformers for object detection was You Only Look at One Sequence or YOLOS [128], turned a pre-trained Vision Transfomer (ViT) [129] from image classification to object detection, achieving 42.0 % AP on MS COCO dataset.The changes made to ViT were two: 1) replace one [CLS] token used in classification with one hundred [DET] tokens for detection, and 2) replace the image classification loss in ViT with a bipartite matching loss similar to the End-to-end object detection with transformers [130].Many works have combined transformers with YOLO-related architectures tailored to specific applications.For example, Zhang et al. [131], motivated by the robustness of Vision Transformers to occlusions, perturbations, and domain shifts, proposed ViT-YOLO, a hybrid architecture that combines CSP-Darknet [58] and multi-head self-attention (MHSA-Darknet) in the backbone along with bidirectional feature pyramid networks (BiFPN) [7] for the neck and multi-scale detection heads like YOLOv3.Their specific use case was for object detection in drone images.Figure 20 shows the detailed architecture of ViT-YOLO.
MSFT-YOLO [132] adds transformer-based modules to the backbone and detection heads intending to detect defects on the steel surface.NRT-YOLO [133] (Nested Residual Transformer) tries to address the problem of tiny objects in remote sensing images.Adding an extra prediction head, feature fusion layers, and a residual transformer module, NRT-YOLO improved YOLOv5l by 5.4% in the DOTA data set [134].
In remote sensing applications, YOLO-SD [135] tried to improve the detection accuracy for small ships in synthetic aperture radar (SAR) images.They started with YOLOX [90] coupled with multi-scale convolution (MSC) to improve the detection at different scales and feature transformer modules to capture global features.The authors showed that these changes improved the accuracy of YOLO-SD compared with YOLOX in the HRSID dataset [136].
Another interesting attempt to combine YOLO with detection transformer (DETR) [130] is the case of DEYO [137] comprising two stages: a YOLOv5-based model followed by a DETR-like model.The first stage generates high-quality query and anchors that input to the second stage.The results show a faster convergence time and better performance than DETR, achieving 52.1% AP in the COCO detection benchmark.

Discussion
This paper examined 16 YOLO versions, ranging from the original YOLO model to the most recent YOLO-NAS.Table 4 provides an overview of the YOLO versions discussed.From this table, we can identify several key patterns: • Anchors: The original YOLO model was relatively simple and did not employ anchors, while the state-of-theart relied on two-stage detectors with anchors.YOLOv2 incorporated anchors, leading to improvements in bounding box prediction accuracy.This trend persisted for five years until YOLOX introduced an anchor-less approach that achieved state-of-the-art results.Since then, subsequent YOLO versions have abandoned the use of anchors.
• Framework: Initially, YOLO was developed using the Darknet framework, with subsequent versions following suit.However, when Ultralytics ported YOLOv3 to PyTorch, the remaining YOLO versions were developed using PyTorch, leading to a surge in enhancements.Another deep learning language utilized is PaddlePaddle, an open-source framework initially developed by Baidu.
• Backbone: The backbone architectures of YOLO models have undergone significant changes over time.
Starting with the Darknet architecture, which comprised simple convolutional and max pooling layers, later models incorporated cross-stage partial connections (CSP) in YOLOv4, reparameterization in YOLOv6 and YOLOv7, and neural architecture search in DAMO-YOLO and YOLO-NAS.
• Performance: While the performance of YOLO models has improved over time, it is worth noting that they often prioritize balancing speed and accuracy rather than solely focusing on accuracy.This tradeoff is essential to the YOLO framework, allowing for real-time object detection across various applications.

Tradeoff between speed and accuracy
The YOLO family of object detection models has consistently focused on balancing speed and accuracy, aiming to deliver real-time performance without sacrificing the quality of detection results.As the YOLO framework has evolved through its various iterations, this tradeoff has been a recurring theme, with each version seeking to optimize these competing objectives differently.In the original YOLO model, the primary focus was on achieving high-speed object detection.The model utilized a single convolutional neural network (CNN) to directly predict object locations and classes from the input image, enabling real-time processing.However, this emphasis on speed led to a compromise in accuracy, mainly when dealing with small objects or objects with overlapping bounding boxes.
Subsequent YOLO versions introduced refinements and enhancements to address these limitations while maintaining the framework's real-time capabilities.For instance, YOLOv2 (YOLO9000) introduced anchor boxes and passthrough layers to improve the localization of objects, resulting in higher accuracy.In addition, YOLOv3 enhanced the model's performance by employing a multi-scale feature extraction architecture, allowing for better object detection across various scales.
The tradeoff between speed and accuracy became more nuanced as the YOLO framework evolved.Models like YOLOv4 and YOLOv5 introduced innovations, such as new network backbones, improved data augmentation techniques, and optimized training strategies.These developments led to significant gains in accuracy without drastically affecting the models' real-time performance.
From YOLOv5, all official YOLO models have fine-tuned the tradeoff between speed and accuracy, offering different model scales to suit specific applications and hardware requirements.For instance, these versions often provide lightweight models optimized for edge devices, trading accuracy for reduced computational complexity and faster processing times.The right graph contrasts the inference latency on an NVIDIA A100 GPU, utilizing TensorRT FP16, with the same mAP performance metric.Here, the tradeoff between the inference speed and the detection accuracy is evident.Lower latency values, indicating faster model inference, typically result in reduced accuracy.Conversely, models with higher latency tend to achieve better performance on the COCO mAP metric.This relationship is pivotal for applications where real-time processing is crucial, and the choice of model is influenced by the requirement to balance speed and accuracy.Incorporation of Latest Techniques.Researchers and developers will continue to refine the YOLO architecture by leveraging state-of-the-art methods in deep learning, data augmentation, and training techniques.This ongoing innovation will likely improve the model's performance, robustness, and efficiency.
Benchmark Evolution.The current benchmark for evaluating object detection models, COCO 2017, may eventually be replaced by a more advanced and challenging benchmark.This mirrors the transition from the VOC 2007 benchmark used in the first two YOLO versions, reflecting the need for more demanding benchmarks as models grow more sophisticated and accurate.
Proliferation of YOLO Models and Applications.As the YOLO framework progresses, we expect to witness an increase in the number of YOLO models released each year, along with a corresponding expansion of applications.As the framework becomes more versatile and powerful, it will likely be employed in more varied domains, from home appliances devices to autonomous cars.
Expansion into New Domains.YOLO models have the potential to expand beyond object detection and segmentation, exploring domains such as object tracking in videos and 3D keypoint estimation.We anticipate YOLO models to transition into multi-modal frameworks, incorporating both vision and language, video, and sound processing.As these models evolve, they may serve as the foundation for innovative solutions catering to a broader spectrum of computer vision and multimedia tasks.
Adaptability to Diverse Hardware.YOLO models will further span hardware platforms, from IoT devices to highperformance computing clusters.This adaptability will enable deploying YOLO models in various contexts, depending on the application's requirements and constraints.In addition, by tailoring the models to suit different hardware specifications, YOLO can be made accessible and effective for more users and industries.

Figure 1 :
Figure 1: A timeline of YOLO versions.

Figure 2 :
Figure 2: Bibliometric network visualization of the main YOLO Applications created with [?].

Figure 3 :
Figure 3: Intersection over Union (IoU).a) The IoU is calculated by dividing the intersection of the two boxes by the union of the boxes; b) examples of three different IoU values for different box locations.

Algorithm 1 5 : 6 : 7 : 8 : 9 :if iou ≥ τ then 11 :
Non-Maximum Suppression Algorithm Require: Set of predicted bounding boxes B, confidence scores S, IoU threshold τ , confidence threshold T Ensure: Set of filtered bounding boxes F 1: F ← ∅ 2: Filter the boxes: B ← {b ∈ B | S(b) ≥ T } 3: Sort the boxes B by their confidence scores in descending order 4: while B ̸ = ∅ do Select the box b with the highest confidence score Add b to the set of final boxes F : F ← F ∪ {b} Remove b from the set of boxes B: B ← B − {b} for all remaining boxes r in B do Calculate the IoU between b and r: iou ← IoU (b, r) 10: Remove r from the set of boxes B: B ← B − {r} 12:

Figure 4 :
Figure 4: Non-Maximum Suppression (NMS).a) Shows the typical output of an object detection model containing multiple overlapping boxes.b) Shows the output after NMS.

Figure 5 :
Figure 5: YOLO output prediction.The figure depicts a simplified YOLO model with a three-by-three grid, three classes, and a single class prediction per grid element to produce a vector of eight values.

2 .
High-resolution classifier.Like YOLOv1, they pre-trained the model with ImageNet at 224 × 224.However, this time, they finetuned the model for ten epochs on ImageNet with a resolution of 448 × 448, improving the network performance on higher resolution input.3. Fully convolutional.They removed the dense layers and used a fully convolutional architecture.4. Use anchor boxes to predict bounding boxes.They use a set of prior boxes or anchor boxes, which are boxes with predefined shapes used to match prototypical shapes of objects as shown in Figure 7. Multiple anchor boxes are defined for each grid cell, and the system predicts the coordinates and the class for every anchor box.The size of the network output is proportional to the number of anchor boxes per grid cell. 5. Dimension Clusters.Picking good prior boxes helps the network learn to predict more accurate bounding boxes.The authors ran k-means clustering on the training bounding boxes to find good priors.They selected five prior boxes providing a good tradeoff between recall and model complexity.6. Direct location prediction.Unlike other methods that predicted offsets [3], YOLOv2 followed the same philosophy and predicted location coordinates relative to the grid cell.The network predicts five bounding boxes for each cell, each with five values t x , t y , t w , t h , and t o , where t o is equivalent to P c from YOLOv1 and the final bounding box coordinates are obtained as shown in Figure 8. 7. Finner-grained features.YOLOv2, compared with YOLOv1, removed one pooling layer to obtain an output feature map or grid of 13 × 13 for input images of 416 × 416.YOLOv2 also uses a passthrough layer that takes the 26 × 26 × 512 feature map and reorganizes it by stacking adjacent features into different channels instead of losing them via a spatial subsampling.This generates 13 × 13 × 2048 feature maps concatenated in the channel dimension with the lower resolution 13 × 13 × 1024 maps to obtain 13 × 13 × 3072 feature maps.See Table2for the architectural details. 8. Multi-scale training.Since YOLOv2 does not use fully connected layers, the inputs can be different sizes.To make YOLOv2 robust to different input sizes, the authors trained the model randomly, changing the input size -from 320 × 320 up to 608 × 608every ten batches.

Figure 7 :
Figure 7: Anchor boxes.YOLOv2 defines multiple anchor boxes for each grid cell.

Figure 8 :
Figure 8: Bounding boxes prediction.The box's center coordinates are obtained with the predicted t x , t y values passing through a sigmoid function and offset by the location of the grid cell c x , c y .The width and height of the final box use the prior width p w and height p h scaled by e tw and e t h respectively, where t w and t h are predicted by YOLOv2.

Figure 9 :
Figure 9: YOLOv3 Darknet-53 backbone.The architecture of YOLOv3 is composed of 53 convolutional layers, each with batch normalization and Leaky ReLU activation.Also, residual connections connect the input of the 1 × 1 convolutions across the whole network with the output of the 3 × 3 convolutions.The architecture shown here consists of only the backbone; it does not include the detection head composed of multi-scale predictions.

Figure 10 :
Figure 10: YOLOv3 Multi-scale detection architecture.The output of the Darknet-53 backbone is branched to three different outputs marked as y1, y2, and y3, each of increased resolution.The final predicted boxes are filtered using Non-maximum suppression.The CBL (Convolution-BatchNorm-Leaky ReLU) blocks comprise one convolution layer with batch normalization and leaky ReLU.The Res blocks comprise one CBL followed by two CBL structures with a residual connection, as shown in Figure 9.

Figure 11 :
Figure11: The architecture of modern object detectors can be described as the backbone, the neck, and the head.The backbone, usually a convolutional neural network (CNN), extracts vital features from the image at different scales.The neck refines these features, enhancing spatial and semantic information.Lastly, the head uses these refined features to make object detection predictions.

Figure 13 :
Figure 13: YOLOv5 Architecture.The architecture uses a modified CSPDarknet53 backbone with a Stem, followed by convolutional layers that extract image features.A spatial pyramid pooling fast (SPPF) layer accelerates computation by pooling features into a fixed-size map.Each convolution has batch normalization and SiLU activation.The network's neck uses SPPF and a modified CSP-PAN, while the head resembles YOLOv3.Diagram based in[85] and[86].

Figure 14 :
Figure 14: Difference between YOLOv3 head and YOLOX decoupled head.For each level of the FPN, they used a 1 × 1 convolution layer to reduce the feature channel to 256 and then added two parallel branches with two 3 × 3 convolution layers each for the class confidence (classification) and localization (regression) tasks.The IoU branch is added to the regression head.

Figure 16 :
Figure 16: YOLOv7 Architecture.Changes in this architecture include the ELAN blocks that combine features of different groups by shuffling and merging cardinality to enhance the model learning and modified RepVGG without identity connection.Diagram based in [107].

2 .
A larger batch size to improve training stability, they went from 64 to 192, along with an updated training schedule and learning rate.

3 .
Maintained moving averages for the trained parameters and use them instead of the final trained values.

Figure 17 : 9 .
Figure 17: YOLOv8 Architecture.The architecture uses a modified CSPDarknet53 backbone.The C2f module replaces the CSPLayer used in YOLOv5.A spatial pyramid pooling fast (SPPF) layer accelerates computation by pooling features into a fixed-size map.Each convolution has batch normalization and SiLU activation.The head is decoupled to process objectness, classification, and regression tasks independently.Diagram based in [115].

Figure 18 :
Figure 18: PP-YOLOE Architecture.The backbone is based on CSPRepResNet, the neck uses a path aggregation network, and the head uses ES layers to form an Efficient Task-aligned Head (ET-head).Diagram based in [123].

Figure 19 :
Figure 19: YOLO-NAS Architecture.The architecture is found automatically via a Neural Architecture Search (NAS) system called AutoNAC to balance latency vs. throughput.They generated three architectures called YOLO-NASS (small), YOLO-NASM (medium), and YOLO-NASL (large), varying the depth and positions of the QSP and QCI blocks.The figure shows the YOLO-NASL architecture.

Figure 20 :
Figure 20: ViT-YOLO Architecture.The backbone MHSA-Darknet combines multi-head self-attention blocks (MHSA-Dark Block) with Cross-Stage Partial connection blocks (CSPDark block).The neck uses BiFPN to aggregate features from different backbone levels, and the head comprises five multi-scale detection heads.

Figure 21 [
138] shows the comparison of the different model scales from YOLOv5 to YOLOv8.The figure presents a comparative analysis of different versions of YOLO models in terms of their complexity and performance.The left graph plots the number of parameters (in millions) against the mean average precision (mAP) on the COCO validation set, ranging from IOU thresholds of 50 to 95.It illustrates a clear trend where an increase in the number of parameters enhances the model's accuracy.Each model includes various scales indicated by n (nano), s (small), m (medium), l (large), and x (extra-large).

Figure 21 :
Figure 21: Performance comparison of YOLO object detection models.The left plot illustrates the relationship between model complexity (measured by the number of parameters) and detection accuracy (COCO mAP50-95).The right plot shows the tradeoff between inference speed (latency on A100 TensorRT FP16) and accuracy for the same models.Each model version is represented by a distinct color, with markers indicating size variants from nano to extra.Plots taken from [138].

Table 1 :
YOLO Architecture.The architecture comprises 24 convolutional layers combining 3 × 3 convolutions with 1 × 1 convolutions for channel reduction.The output is a fully connected layer that generates a grid of 7 × 7 with 30 values for each grid cell to accommodate ten bounding box coordinates (2 boxes) with 20 categories.

Table 2 :
YOLOv2 Architecture.Darknet-19 backbone (layers 1 to 23) plus the detection head composed of the last four convolutional layers and the passthrough layer that reorganizes the features of the 17 th output of 26 × 26 × 512 into 13 × 13 × 2048 followed by concatenation with the 25 th layer.The final convolution generates a grid of 13 × 13 with 125 channels to accommodate 25 predictions (5 coordinates + 20 classes) for five bounding boxes.

Table 3
lists the final selection of BoFs and BoS for the backbone and the detector.Evaluated on MS COCO dataset test-dev 2017, YOLOv4 achieved an AP of 43.5% and AP 50 of 65.7% at more than 50 FPS on an NVIDIA V100.

Table 3 :
YOLOv4 final selection of bag-of-freebies (BoF) and bag-of-specials (BoS).BoF are methods that increase performance with no inference cost but longer training times.On the other hand, BoS are methods that slightly increase the inference cost but significantly improve accuracy.

Table 4 :
Summary of YOLO architectures.The metric reported for YOLO and YOLOv2 were on VOC2007, while the rest are reported on COCO2017.The NAS-YOLO model reported has 16-bit precision.