# MCA-YOLOV5-Light: A Faster, Stronger and Lighter Algorithm for Helmet-Wearing Detection
## 4 Experimental Analysis and Analysis
### Experimental Results and Analysis
#### 4.2.3 Analysis of the Model Pruning Results  
After determining the scaling factor for sparse training \(\gamma=0.005\), to verify the effectiveness of model pruning, this chapter prunes the sparse trained model at rates of 0.5, 0.6, 0.7 and 0.8. Table 3 shows the parameter comparison of the detection model under different channel pruning rates and finally selects the best pruning ratio by the parameter performance. Figure 10: BN layer scale factor \(\gamma\) distribution after sparse training. Figure 9: Distribution of BN layer scaling factor \(\gamma\) before sparse training. Model parameters with different pruning rates were compared. According to Table 3, the number of parameters, algorithm volume and inference time of the four algorithms are reduced at different channel pruning rates. After performing fine-tuning training of the four pruning algorithms, mAP was recovered to 95.1%, 95.3%, 95.8% and 96.1%, respectively. Because the mean average accuracy after fine-tuning is not very different, and there are significant differences in the number of parameters, algorithm volume and inference time, the 80% channel pruning rate is finally selected to obtain a better model compression effect with a small loss of mean average accuracy. Model Comparison Experiment  
To verify the reliability of the algorithms proposed in this chapter, the current more popular target detection algorithms were compared with the algorithms presented in this paper, including Faster R-CNN, SSD, YOLOv3, YOLOv3 + SPP, and YOLOv5s, and the results are shown in Table 4.  
The partial detection results of the MCA-YOLOv5-Light safety helmet detection algorithm on the test sample set are shown in Figure 11. The red rectangular boxes represent the helmet-wearing situation detected by the model, and the blue boxes represent the head without a helmet. As can be seen from Figure 11, our detector can still more accurately detect whether a worker is wearing a helmet in a crowded situation. Compared with the data in Table 4, it is clear that the MCA-YOLOv5-Light helmet-wearing detection algorithm is more effective than several popular target detection algorithms at present. Secondly, although the average mean detection accuracy of the MCA-YOLOv5-Light model was slightly lower compared with the MCA-YOLOv5 model, its model size, number of parameters and inference time were 7.2 times, 7.8 times and 2.1 times that of the MCA-YOLOv5 model, respectively. By comparing the above main evaluation indexes, the overall performance of the helmet-wearing detection algorithm presented in this paper is effective and feasible, especially in terms of the detection speed, which can meet the needs of real-time detection to a greater extent. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Detection Model** & **Hat** & **Person** & **mAP/\%** & **FLOPS** & **Parameters/106** & **Reference Time/ms** & **Model Size/MB** \\ \hline Faster R-CNN & 80.8 & 42.2 & 61.5 & 181.12 & 186 & 291 & 182.1 \\ SSD & 78.8 & 68.2 & 73.5 & 31.75 & 23.75 & 126 & 188 \\ YOLOv3 & 89.12 & 80.7 & 84.9 & 65.86 & 61.9 & 69 & 236 \\ YOLOv3+SPP & 90.5 & 86.3 & 88.41 & 141.45 & 63.0 & 70 & 237.4 \\ YOLOv5s & 93.3 & 91.7 & 92.7 & 17.0 & 7.26 & 36 & 14.8 \\ MCA-YOLOv5 & 96.7 & 95.2 & 96.0 & 21.75 & 7.30 & 37 & 15.2 \\ MCA-YOLOv5-Light & 95.7 & 94.6 & 95.1 & 2.74 & 0.93 & 17.2 & 2.1 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparison of the test results for the different models (Our algorithm compared with other algorithms in terms of computational speed, model size, and mAP). \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Cut Branch Ratio** & **mAP/\%** & **Parameters/106** & **Reference Time/ms** & **Model Size/MB** \\ \hline base (0.00) & 96.0 & 7.30 & 37 & 15.2 \\
0.80 & 89.5 & 0.93 & 17.2 & 2.1 \\
0.70 & 93.2 & 1.67 & 18.5 & 3.6 \\
0.60 & 93.9 & 2.39 & 19.3 & 5.0 \\
0.50 & 94.6 & 2.96 & 20.3 & 6.1 \\ \hline \hline \end{tabular}
\end{table}