# Seatbelt Detection Algorithm Improved with Lightweight Approach and Attention Mechanism
## 4 Experimental Result
### Ablation Studies and Analysis
Additionally, it mitigates overfitting to a certain extent, enhances the generalization capability, and lowers the quantity of parameters by 48% compared to baseline. Furthermore, when the pruning ratio was increased to 50%, the Params and GFLOPs significantly decreased by 60% and 44%, respectively, while the accuracy and F1 score merely increased by 0.25% and 0.11% compared to the baseline model. The accuracy and F1 score of the model with a 25% pruning ratio were 4% and 4.07% higher, respectively, than the model with a 50% pruning ratio at the expense of a 25% increase in Params and GFLOPs. By comparing the experimental results of a 25% and 50% pruning ratio, the conclusion that a network with a lower pruning factor is more likely to improve precision and performance than a radical one could be drawn. Therefore, the 25% pruning ratio was eventually selected to obtain RST-Net due to the salient differences in the quantity of parameters and network performance. Furthermore, to validate the rationality of triplet attention, a variety of prevalent attention mechanisms commonly used in computer visual scenarios were selected for comparative experiments, including SE, CBAM, CA, Efficient Channel Attention (ECA) [41], and Shuffle Attention (SA) [42]. Table 5 exhibits the experimental results. For the observation of Table 5, it is obvious that the model embedded with TA outperforms the existing prevalent attention modules. The argument that TA can provide better behavior is discussed as follows. The classical channel attention mechanisms such as SE and ECA merely model the interaction among various channels without focusing on the spatial information, leading to inadequate feature extraction and suboptimal performance. Moreover, although CBAM and SA calculate both channel and spatial attention, inter-channel and spatial information failed to be completely utilized. In contrast to these \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multirow{2}{*}{**TA**} & \multicolumn{3}{c}{**Pruning Ratio**} & \multirow{2}{*}{**Accuracy/\%**} & \multirow{2}{*}{**F1 Score/\%**} & \multirow{2}{*}{**Params/M**} & \multirow{2}{*}{**GFLOPs**} \\ \cline{3-4} \cline{6-7}  & & **25\%** & & & & \\ \hline \multirow{4}{*}{ResNet} & \multirow{4}{*}{\(\checkmark\)} & & 94.07 & 25.5 & 4.1 \\  & & & 96.75 & 97.76 & 25.6 & 5.4 \\ \cline{1-1}  & \(\checkmark\) & \(\checkmark\) & 98.25 & 98.25 & 13.2 & 3.1 \\ \cline{1-1}  & \(\checkmark\) & & \(\checkmark\) & 94.25 & 94.18 & 9.9 & 2.3 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Results of ablation experiments for each improvement of RST-Net. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Model** & **Attention Module** & **Accuracy/\%** & **Precision/\%** & **Recall/\%** \\ \hline \multirow{4}{*}{ResNet} & SE & 97 & 97.47 & 95.5 \\  & SA & 95.75 & 96.45 & 95 \\  & ECA & 96 & 95.54 & 96.5 \\ \cline{1-1}  & CBAM & 96.75 & 96.98 & 96.5 \\ \cline{1-1}  & CA & 97.25 & 98.96 & 95.5 \\ \cline{1-1}  & TA & 98.25 & 98.49 & 98 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Comparative experiments based on diverse attention mechanisms. attention mechanisms, TA leverages inter-dimensional information, leading to improved feature representation and enhanced performance.