# Seatbelt Detection Algorithm Improved with Lightweight Approach and Attention Mechanism
## 4 Experimental Result
### Model Comparations  
For the windshield detection scenario, single-stage detection models such as YOLOv3 [43], YOLOv3-tiny, YOLOv-s, and YOLOv5 were utilized to train model weights under an identical environment and dataset. The comparison between these models and the GM-YOLOv7 network primarily focused on [EMAIL_ADDRESS]:0.95, Params, and GFLOPs, which are crucial comparison indicators. Table 6 displays the comparison results of diverse detectors. From Table 6, by comparing the [EMAIL_ADDRESS]:0.95, the proposed lightweight network outperforms YOLOv3-tiny, YOLOv-s, and YOLOv5-s by 22.4%, 4.6%, and 4.2%, respectively. This reveals that the GM-YOLOv7 network effectively utilizes the feature extraction of the improved ELAN at the expense of minimal computation overhead. The proposed network achieves the greatest detection performance in terms of [EMAIL_ADDRESS]:0.95 while preserving the minimum Params and GFLOPs. Compared to the widely used YOLOv5-s, GM-YOLOv7 demonstrates improved performance while considerably decreasing the Params and GFLOPs by 31% and 38%, respectively, enabling the algorithm to be more appropriate for deployment in mobile devices. Through contrasting the above principal evaluation indexes, GM-YOLOv7 exhibits significant advantages over other popular networks in the light of detection precision, Params, and GFLOPs, making it a reliable and effective choice for windshield detection tasks. For the seatbelt detection scenario, experimental comparisons between the proposed network and multiple CNNs, including AlexNet, DenseNet, EfficientNet [45], ResNeXt [46], and Wide ResNet [47], were conducted. Table 7 displays the results of these experiments. From Table 7, it is beyond dispute that RST-Net is more efficient than several prominent algorithms, providing powerful support for practical applications. Although the Recall of RST-Net was lower than Wide ResNet by a small amount, its Params and GFLOPs were merely 0.19 times and 0.2 times that of Wide ResNet, respectively. Additionally, RST-Net achieves an F1 score that is 10.72% higher than AlexNet, 1.48% higher than ResNeXt, and 1.04% higher than Wide ResNet, while its Params and GFLOPs were considerably smaller than the above models. Furthermore, when contrasting the major performance indexes comprehensively, RST-Net demonstrates preferable performance, especially in the light of the Params, further substantiating the efficiency of the improvements proposed in this study. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Network** & **[EMAIL_ADDRESS]\%** & **[EMAIL_ADDRESS]:0.95\%** & **Params/M** & **GFLOPs** & **Size/MB** \\ \hline YOLOv3-tiny & 98.4 & 61.8 & 8.7 & 13.0 & 16.6 \\ YOLOv5-s & 99.0 & 79.6 & 8.8 & 26.5 & 68.0 \\ YOLOv5-s & 99.2 & 80.0 & 7.0 & 15.8 & 14.4 \\ YOLOv7-tiny & 99.5 & 81.1 & 6.0 & 13.0 & 12.3 \\ GM-YOLOv7 & 99.3 & 84.2 & 4.8 & 9.8 & 9.9 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Comparison of windshield detection results of various networks. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Model** & **Accuracy/\%** & **Precision/\%** & **Recall/\%** & **F1 Score/\%** & **Params/M** & **GFLOPs** \\ \hline AlexNet & 86.74 & 82.67 & 93 & 87.53 & 61.1 & 0.93 \\ DenseNet & 97.75 & 97.99 & 97.50 & 97.74 & 20.0 & 5.7 \\ EfficientNet & 97.50 & 97.98 & 97 & 97.49 & 12.2 & 1.3 \\ ResNeXt & 96.75 & 96.06 & 97.50 & 96.77 & 25.0 & 5.6 \\ Wide ResNet & 97.25 & 95.22 & 99.5 & 97.21 & 68.9 & 15.0 \\ RST-Net & 98.25 & 98.49 & 98 & 98.25 & 13.2 & 3.1 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Comparison of seatbelt detection results of multiple models. Additionally, to verify the merit of RST-Net for seatbelt detection, Gradient-weighted Class Activation Mapping (Grad-CAM) [48] was employed to depict visualization results of various models employed in this chapter. Figure 10 displays visualization results. The first three rows show a driver that wore a seatbelt, and the last three rows exhibit a situation where a driver did not use a seatbelt.