# A Comprehensive Analysis of Real-Time Car Safety Belt Detection Using the YOLOv7 Algorithm
## 3 Materials and Methods
### Model Selection  
The YOLO algorithm, which was introduced in 2015, utilizes a methodology that treats object detection as a regression problem. This involves the division of bounding boxes and the corresponding class probabilities into separate spatial entities ([PERSON], 2015). In essence, the processes of classification and bounding box location calculation occur concurrently. The algorithm initiates by dividing the image into a grid of dimensions N \(\times\) N. Subsequently, for each cell within the grid, it makes predictions regarding the locations of the bounding boxes, the confidence level of an object's presence, and the probability of its class. Consequently, the algorithm accomplishes the entire process of object detection and classification in a single traversal of the image. The YOLO project is currently undergoing active development, resulting in the release of newer and more advanced versions over the past few years. These versions have demonstrated improvements in the speed and performance of the algorithm ([PERSON], 2015). These enhancements have been achieved through modifications to the algorithm's architecture or the incorporation of additional capabilities. Figure 6 illustrates the chronological development of the YOLO algorithm since its inception in 2015. Each subsequent iteration is assigned a distinct version identifier, and at present, the prevailing edition of YOLO is YOLO-NAS, constituting the ninth official release. The case study described in this research paper utilizes the YOLOv7 algorithm ([PERSON] et al., 2018). The rationale for this is that, although newer iterations of the YOLO algorithm have been devised, YOLOv7 has emerged as the most recent version favoured by researchers across a range of applications, \begin{table}
\begin{tabular}{l c} \hline \hline  & **Parameter** & **Configuration** \\ \hline Image size & 640 \(\times\) 640 \\ Batch size & 4 \\ Epochs & Initial setting was 300, and final setting, due to manual \\  & early stopping technique, was 30 \\ Learning rate & 0.01 \\ Weight decay & 0.0005 \\ Optimizer & Adam \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Hyperparameter configuration. as evidenced in the existing body of literature. The YOLO algorithm demonstrates significant efficacy in the domain of automobile-related image tasks due to its exceptional inference speeds, which enable near-real-time image classification, and its ability to achieve high classification performance metrics. Indeed, it would not be an exaggeration to assert that, at present, this algorithm stands as the sole solution that provides a harmonious balance between speed and performance for tasks involving simultaneous object detection. Figure 6 depicts the historical evolution of the YOLO algorithm. The selection of the YOLOv7 algorithm was based on its proven ability to achieve a balance between speed and accuracy. This aligns with our main goal of accurately detecting the real-time status of the safety belt. The YOLOv7 model is a highly adaptable and multi-functional model utilized in the field of computer vision. It exhibits the ability to execute a wide range of tasks, including object detection, classification, instance segmentation, and pose estimation [10]. YOLOv7 occupies a fundamental position within the YOLO series, as referenced in the scholarly literature [24]. The methodology integrates various techniques, such as the extended efficient long-range attention network (E-ELAN), model scaling through concatenation-based models [25], and convolution reparameterization [10]. These techniques enhance the model's resilience and effectiveness in addressing the safety belt detection task. The integration of various strategies in YOLOv7 achieves a favourable equilibrium between the efficiency of object detection and the accuracy of the results. The detection concept of YOLOv7 exhibits resemblances with YOLOv4 and YOLOv5, as observed in other network models belonging to the YOLO series. The architectural depiction of YOLOv7 can be located in the citation provided as Reference [10].