# Seatbelt Detection Algorithm Improved with Lightweight Approach and Attention Mechanism
## 5 Conclusions  
The detection network of seatbelt usage with high precision and compact structure is a prominent and formidable investigation issue in the field of intelligent traffic systems. This paper proposes a high-precision and lightweight seatbelt detection algorithms, GM-YOLOv7 and RST-Net, to address the problems of low detection accuracy and large model parameters in the current work. Firstly, based on the YOLOv7 network, the G-ELAN module and the Mish activation model are added to alleviate the redundant issues of  
Figure 10: Visualization of feature maps produced by various models. (**a**) Original image; (**b**) AlexNet; (**c**) DenseNet; (**d**) EfficientNet; (**e**) ResNeXt; (**f**) Wide ResNet; (**g**) RST-Net.  
parameters and address the problem of insufficient non-linear representation capability. Secondly, channel pruning is applied to the ResNet model at a 25% ratio to optimize the architecture and speed up the inference time without decreasing the model's accuracy. Finally, incorporating the TA mechanism into network weakens the interference of the background on seatbelt features and enhances the capability of feature learning.  
The experimental results reveal that, compared with YOLOX and YOLOv5, the proposed GM-YOLOv7 network could effectively improve target detection and reduce the number of parameters and computational overheads, achieving a mAP of 84.2% and minimum GFLOPs. Meanwhile, the lightweight RST-Net obtained a precision of 98.49% and an F1 score of 98.25%, outperforming the other improved models. Compared with several large-scale networks, the proposed models achieved the best detection performance with the fewest amounts of parameters and computations. Therefore, the experimental analyses verify the rationality and effectiveness of the proposed networks.  
In our future research study, we will pay more attention to image collection for seatbelt detection to further expand the dataset and upgrade the generalization ability of the model. Additionally, although this paper makes a significant contribution by making this algorithm lightweight, the edges or mobile devices and embedded systems maintain a poor real-time performance due to insufficient arithmetic power. Therefore, the focus of future research should be to investigate various techniques, such as knowledge distillation, and the impact of hardware devices on this model's performance to further optimize its structure and upgrade its real-time detection capabilities.  
Conceptualization, L.Q. and J.R.; methodology, L.Q. and J.R.; software, L.Q. and J.R.; validation, J.R. and X.Z.; resources, J.R.; data curation, J.R.; writing--original draft preparation, J.R.; writing--review and editing, J.R., L.Q. and X.Z.; visualization, J.R. and X.Z.; supervision, L.Q. All authors have read and agreed to the published version of the manuscript.  
This research was funded by the National Natural Science Foundation of China (U1504617).  
Not applicable.  
The data used to support the findings of this study are included within the article, further inquiries can be directed to the corresponding author.  
The authors declare no conflicts of interest.