# Automatic Detection of Construction Workers' Helmet Wear Based on Lightweight Deep Learning
## 4 Discussion
### Ablation Experiments  
The effects of different module combinations on the results were further explored in the ablation experiments to verify the rationality and effectiveness of our proposed network. As a fair comparison, except for the parameters of the added modules, such as data set, input image size, relevant hyperparameters, training strategy, and experimental environment, all were the same in the ablation experiments. As shown in Table 2, when the original base algorithm (baseline) extracts features using only the backbone network and outputs results without any module addition, the mAP is only 76.17%. The addition of the multiscale segmentation module significantly increases the mAP to 85.63%, and after adding the feature fusion network and SPP modules, the results increased to 88.49% and 89.77%, respectively. It is worth noting that the output result of the anchor-free method is much better than that of the baseline. However, the mAP decreases to 92.58% while the number of parameters increases significantly compared to the anchor-based method. The results of the ablation experiments show that the proposed network module can effectively improve the detection results when performing the detection task and that it is more efficient and accurate to use the anchor-based assignment strategy than the anchor-free adaptive scale assignment strategy.  
Figure 10: Model loss function graph.  
In addition, to validate the performance of our improved attention mechanism LRCA-Netv2, ablation experiments of the attention mechanism were designed, and their corresponding results are listed in Table 3. All the results are based on the tests of the single model proposed in this paper. There were no differences in the network modules used. The datasets, input image sizes, and relevant hyperparameters are the same, where the baseline is set without adding any attention module. As shown in Figure 11, the models equipped with the attention method improved the detection results. It is noteworthy that the best results were achieved when using the improved method, better than the models using the other attention methods.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline Backbone Feature Extraction & Baseline & \(\surd\) & \(\surd\) & \(\surd\) & \(\surd\) & \(\surd\) \\ \hline Multi-scale Segmentation & & \(\surd\) & \(\surd\) & \(\surd\) & \(\surd\) & \(\surd\) \\ Feature Fusion Network & & & \(\surd\) & \(\surd\) & \(\surd\) & \(\surd\) \\ SPP Module & & & & \(\surd\) & \(\surd\) & \(\surd\) \\ LRCA-Netv2 & & & & & \(\surd\) & \(\surd\) \\ Anchor-free & \(\times\) & \(\times\) & \(\times\) & \(\times\) & \(\surd\) & \(\times\) \\ Anchor-based & \(\surd\) & \(\surd\) & \(\surd\) & \(\surd\) & \(\times\) & \(\surd\) \\ \hline Parameters (Millions) & 3.18 & 3.40 & 9.83 & 10.03 & 28.08 & 11.17 \\ mAP & 76.17\% & 85.63\% & 88.49\% & 89.77\% & 92.58\% & **93.47\%** \\ \hline \end{tabular}
\end{table}
Table 2: Results of ablation experiments using the same data set, where bold numbers indicate the highest mAP, \({}^{\prime\prime}\)\({}^{\prime\prime}\) in each column indicates that the leftmost component is used in the model, and \({}^{\prime\prime}\)\({}^{\prime\prime}\) indicates that the leftmost component is removed. The last number in each column represents the mAP obtained using the corresponding component.  
Figure 11: _Cont._  
\begin{table}
\begin{tabular}{c c c c} \hline
**Settings** & **Input Size** & **Parameters (Millions)** & **mAP (\%)** \\ \hline Baseline & 416 \(\times\) 416 & 10.03 & 89.77 \\ + CBAM & 416 \(\times\) 416 & 11.13 & 91.07 \\ + LRCA-Net & 416 \(\times\) 416 & 11.07 & 92.80 \\ + LRCA-Netv2 & 416 \(\times\) 416 & 11.17 & **93.47** \\ \hline \end{tabular}
\end{table}
Table 3: Experiments on the ablation of attentional mechanisms using the same data set, where bold numbers indicate the highest mAP and \({}^{\prime\prime}\)+\({}^{\prime\prime}\) indicates that a certain attention module has been added to the baseline.