# A Comprehensive Analysis of Real-Time Car Safety Belt Detection Using the YOLOv7 Algorithm
## 4 Performance and Experimental Results
### Model Performance Metrics
The results depicted in Figures 9 and 10 indicate a significant level of efficiency, particularly for the \"buckled\" class, which exhibits an AP of 99.7%. The \"unbuckled\" class also exhibited a high level of efficiency, as evidenced by a performance rate of 99.5%. The mAP of the model was determined to be 99.6%. Figures 9 and 10 present the graphical outcomes pertaining to precision, recall, mAP, AP, and F1 score for both categories. The results of the proposed study were analysed using a confusion matrix. In the matrix, the predicted class is represented by each column, while the true proportions of each class in the dataset are represented by each row, as shown in Figure 11. The analysis of Figure 11's findings illustrates that the model exhibits the utmost level of accuracy in predicting both the \"buckled\" and \"unbuckled\" classes, with a 100% prediction rate. Moreover, this study provides a visual depiction of the fluctuations in the loss values, specifically the Box loss, Objectness loss, and Classification loss. The YOLOv7 model incorporates the Generalized Intersection over Union (GIOU) loss as its chosen loss function for bounding boxes. The Box loss is calculated as the average of the GIOU loss function [29]. A lower value of the loss function signifies a higher level of accuracy. The Objectness loss refers to the mean value of the target detection loss, where a lower value indicates a higher level of accuracy [29]. The Classification loss refers to the average value of the Classification loss metric, where a lower value signifies a higher level of accuracy, as shown in Figure 12. As illustrated in Figure 12, the loss values exhibited a consistent decline, ultimately reaching a stable state after 30 epochs. To prevent overfitting, a manual early stopping technique was randomly employed at the 30 th epoch with satisfactory model performance metrics. Figure 11: The confusion matrix of the proposed study. Figure 10: Precision–recall curve (PR) and F1 score graph. To further demonstrate the superiority of the proposed study, a comparison of results was carried out between the reviewed related studies, as shown in \[\text{Precision}=\frac{\text{TP}}{\text{TP}+\text{FP}} \tag{2}\]0 As demonstrated by the results in Table 4, the proposed model output outperforms almost all the reviewed object detection models. However, [PERSON] and [PERSON] [8] claim to have obtained an accuracy of 99.7%, which is 0.1 higher than our 99.6% mAP rate. However, the proposed model demonstrates the practical advantages of in-cabin detection of the safety belt. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Author(s)** & **Method** & **Results** \\ \hline [PERSON] et al. [3] & Edge detection and HSV & Accuracy@81\% \\ \hline [PERSON] et al. [7] & SSD, CNN, and FV algorithms & Accuracy@91.9\% \\  & [EMAIL_ADDRESS]\% \\ \hline [PERSON] and [PERSON] [8] & YOLOv5 & [EMAIL_ADDRESS]\% \\ \hline [PERSON] [11] & CNN with Alex Net & True positive rate@92\% \\  & & True Negative rate@90\% \\  & & True rate@91\% \\ \hline [PERSON] et al. [12] & CNN and SVM & Average [EMAIL_ADDRESS]\% \\ \hline [PERSON] et al. [18] & CNN & [EMAIL_ADDRESS]\% \\  & & Sensitivity@ 63.51\% \\  & & F1 [EMAIL_ADDRESS]\% \\ \hline Ours & YOLOv7 & mAP @99.6\% \\  & & F1 score@ 98\% \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Result comparison with related studies. Figure 12: The measured losses of the proposed study.