# Driver Attention Detection Based on Improved YOLOv5
## 5 Experimental Results
### Analysis of Experimental Results  
The comparison experiments of various models on the same VOC dataset are shown in Table 1. Compared with other mainstream one-stage detection algorithms YOLOv4 and YOLOv7, the improved YOLOv5 model has an average precision higher by 1.1% and 0.8%, respectively, and also has certain improvements in detection speed. Although the improved FPS has decreased to 55 f/s, it still maintains high recognition rate and real-time detection compared to the newer YOLOv7 algorithm. In addition, in terms of model size, the improved YOLOv5 is only 17.5 MB compared to YOLOv4 and YOLOv7 algorithms, which is much smaller than the other two algorithms, reducing deployment costs and facilitating rapid deployment of the model in car systems and other application scenarios.  
The various improvement strategies were trained and tested on the VOC dataset, and the impact of different improvement strategies on the original model is shown in Table 2. After introducing the Swin Transformer module, the model had a larger receptive field to perceive global information, and the detection accuracy was improved. Improving the backbone network and connection method resulted in a decrease in detection speed but improved detection accuracy for small objects. Additionally, the detection accuracy of the three types of distracted behavior was also improved to some extent, as shown in Table 3.  
As shown in Table 3, compared with the unimproved model, the detection accuracy of three types of distracted behavior and facial recognition improved. The detection accuracy of smoking increased by approximately 4%, the detection accuracy of mobile phone usage increased by approximately 3%, the detection accuracy of drinking water increased by approximately 0.9%, and the facial recognition accuracy increased by approximately 1.8%. In addition, to intuitively understand the detection performance of the improved model, three types of distracted behavior that appear in the actual driving dataset were detected in both the YOLOv5 model and the improved model, and the original images and the detection results before and after improvement were visualized as shown in Figure 9. From the experimental results, it can be concluded that the improved model has higher accuracy in detecting small targets such as cigarettes and mobile phones and has higher applicability in detecting distracted behavior that leads to attention diversion during actual driving processes.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Network Model** & **mAP/\%** & **FPS/(f/s)** & **Size (MB)** \\ \hline YOLOv4 & 85.2 & 24 & 244 \\ YOLOv5s & 83.9 & 63.3 & 13.7 \\ YOLOv7 & 85.5 & 49 & 71.3 \\ Improved YOLOv5 & 86.3 & 55 & 17.5 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Performance comparison of different network models.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Swin Transformer** & **Backbone Improvement** & **Neck Improvement** & **mAP/\%** & **FPS/(f/s)** & **Size (MB)** \\ \hline - & - & - & 83.9 & 63.3 & 13.7 \\ \(\surd\) & - & - & 84.2 & 58.1 & 13.8 \\ - & \(\surd\) & \(\surd\) & 84.6 & 59 & 17.4 \\ \(\surd\) & \(\surd\) & \(\surd\) & 86.3 & 55 & 17.5 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Ablation experiment.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Distracted Behavior** & **Before AP/\%** & **Improved AP/\%** \\ \hline face & 93.2 & 95 \\ smoke & 61.8 & 65.8 \\ drink & 95.8 & 96.7 \\ phone & 84.7 & 87.7 \\ \hline \hline \end{tabular}
\end{table}
Table 3: The precision comparison of distraction behavior before and after improvement.