# Seatbelt Detection Algorithm Improved with Lightweight Approach and Attention Mechanism
## 1 Introduction  
In recent times, the number of motor vehicles has increased worldwide, accompanied by an increasing probability of traffic accidents, which are the major cause of accidental fatalities [1]. However, the proper utilization of seatbells could validly lower the incidence of casualties [2]. Although buckling up seatbells properly is a mandatory traffic regulation, a considerable portion of individuals exhibit insufficient awareness about traffic security. Consequently, it is imperative for the relevant departments to regulate and monitor the observance of seatbelt usage. At the contemporary stage, the detection of seatbells is primarily accomplished by manual recognition, which is time-consuming and labor-intensive. With the popularization of graphic processing technology, automatic seatbelt detection algorithms have received considerable attention. These algorithms can be categorized into diverse classes: one is the traditional image detection approach. [PERSON] [3] employed a linear recognition method to locate the region of the seatbelt of a driver by extracting and analyzing relevant features between the vehicle's and the driver's areas. The other is the deep-learning-based algorithm. [PERSON] et al. [4] located the windshield area and identified the seatbelt region by utilizing both Support Vector Machines (SVMs) and Convolution Neural Networks (CNNs). [PERSON] et al. [5] developed an AlexNet-based adaptive weather condition seatbelt detection approach. Research in recent years has been gradually moving towards optimizing the number of model parameters and improving network performance, making the network more suitable for real-time monitoring systems. [PERSON] et al. [6] combined the Squeeze-and-Excitation (SE) [7] module with the DenseNet [8] to extract seatbelt features and improve detection performance. [PERSON] et al. [9] replaced the adaptive average pooling in the Residual Network (ResNet) [10] with Spatial Pyramid Pooling (SPP) and Power Mean Transformation (PMT) to minimize feature loss and improve precision. Both methods initially employed the YOLO series models to detect the windshield area and then utilized the improved CNNs for driver's seatbelt detection. Moreover, [PERSON] et al. [11] employed Faster R-CNN [12] to detect the driver's region accurately, followed by the introduction of AlexNet to identify the seatbelt. Despite the optimizations of these algorithms being helpful to enhance network detection performance, there are still a number of shortcomings: The DenseNet with SE struggles to effectively extract crucial features when the input picture is vague. The construction of ResNet is redundant and the utilization of PMT raises the inference memory overhead and computational complexity. Additionally, Faster R-CNN possesses an intricate structure, consumes considerable computational resources, and is impractical to run on portable or mobile facilities. Therefore, there is still ample scope for advancement in the above networks. This paper aims to tackle the challenges existing in the current seatbelt detection algorithms by proposing an automatic approach (GM-YOLOv7 and RST-Net). Due to the dearth of public driver's seatbelt datasets, this paper constructs a dataset that covers various automobile categories and locations. The major contributions of this paper include the following three aspects:  
1. A lightweight Ghost module [13] is introduced to the YOLOv7-tiny [14] for efficient feature extraction while improving the Efficient Layer Aggregation Network (ELAN) in the backbone to decrease the number of model parameters, computing operations, and overall size. Moreover, the Mish [15] activation function is applied to substitute the Leaky Relu in the neck for feature aggregation, upgrading the network's non-linear capability and detection performance. 2. The lightweight deep learning algorithm is proposed to detect seatblets by employing the channel pruning technique on the basis of ResNet, which effectively reduces the network's size and minimizes the run-time memory footprint.