# Application of Various YOLO Models for Computer Vision-Based Real-Time Pothole Detection
## 2 Current State of Object Detection and Classification
### YOLO Architectures  
After appearing the first version of YOLO (i.e., YOLOv1) [31] which complements the two-stage object detectors, it has been well accepted as the top notch deep convolutional neural models for object detection of which inference speed, accuracy, and generalizability are outstanding. The outstanding performance is achieved by handling the object detection as a regression rather than a classification problem using a single neural network. In addition, it may be easily trained to detect various objects. Indeed, it outperforms over other models in inference speed, hence, making it widely used in practical applications. Object detection models may be trained quickly and predictions using them may be obtained in a fraction of seconds, suitable for use in real-time. The detection time could be an important factor for video processing in real time. However, it was not measured in this study, because the study focusses on accuracy, as a metric for model selection. Noteworthy is that YOLOv4 and later versions have been significantly improved in speed and accuracy, all real-time processing.  
Over the latest four years, YOLO has been developed into five versions by accommodating improvement ideas given from the object detection community. The first three versions, i.e., YOLOv1 [31], YOLOv2 [12], and YOLOv3 [13], were developed by the original author of YOLO algorithm. For sure, the YOLOv3 [13] arrived at substantial performance improvements owing to the introduction of multi-scale features (FPN) [32], a better backbone network (Darknet53), and replacement of the SoftMax categorical loss function with the binary cross-entropy loss function. Thereafter, YOLOv4 [14] was released by another research group rather than the original YOLO authors. The overall network architecture of YOLOv4 consisting of three parts (i.e., backbone, neck, and head), which is implemented using YOLOv4 in this study, is shown in Figure 1. The YOLOv4 upgrades several options involved in the YOLOv3 algorithm [13], including the backbone called bags of freebies and bags of specials. It arrives at 43.5% AP (65.7% AP50) for the MS COCO dataset at a real-time speed of 65 FPS on Tesla V100.  
The pothole detector running on the graphics processing unit (GPU) may handle effectively real-time images [33]. However, it may completely eat up computational resource when the detector runs on devices having poor processing capabilities. YOLOv4-tiny [16] network may be used to complement the YOLOv4 which works slow on the confined hardware, hence, satisfying requests in real-time using limited hardware resources. The architecture of the YOLOv4-tiny network, which is implemented in this study, is defined using the attributes and their values shown in Figure 2. In the YOLOv4-tiny, the CSPDarknet53-tiny network plays a role as the backbone network, whereas the CSPDarknet53 network is used in the Yolov4 model.  
Figure 1: Network architecture of YOLOv4.  
The YOLOv4 [14] followed by YOLOv5 [15] was introduced within a month interval. YOLOv5 [15] was welcomed by the object detection community because it is smaller in size, higher in speed, and comparable in performance against to YOLOv4 [14], even if it does not arrive at outstanding algorithmic innovation. The overall network architecture of YOLOv5 consisting of three parts (i.e., backbone, PANet, and output), which was fully implemented using Python (PyTorch), is presented in Figure 3. An ordinary object detector is composed of several parts (i.e., backbones, neck, and heads, etc.). A neck includes either additional blocks (i.e., SPP, ASPP, RFB, SAM), or path-aggregation blocks (i.e., FPN, PAN, NAS-FPN, fully connected FPN, BiFPN, ASFF, SFAM). In YOLOv4, SPP + PAN is used in a neck part. The comparison of SPP + PAN with other blocks in the Neck part is beyond the scope of this study.  
Figure 3: Network architecture of YOLOv5.  
Figure 2: Network architecture of YOLOv4-tiny.