# EGS-YOLO: A Fast and Reliable Safety Helmet Detection Method Modified Based on YOLOv7
## 4 Experiment
### Experiment Results
#### 4.4.3 Ablation Experiment  
To evaluate the feasibility of our proposed method, EGS-YOLO, for helmet wear detection, we performed ablation experiments. In these experiments, the device and parameter settings were kept the same. The experimental results are presented in Table 5.  
\begin{table}
\begin{tabular}{l l l l l l} \hline \hline
**Method** & **[EMAIL_ADDRESS] (\%)** & **Params (M)** & **FLOPs (G)** & **Inference (ms)** & **Size (MB)** \\ \hline Baseline & 90.9 & 36.5 & 103.2 & 4.5 & 74.9 \\ +GhostModule & 90.1 & 22.6 & 68.0 & 3.9 & 47.2 \\ +PConv & 90.4 & 24.4 & 72.3 & 4.3 & 50.7 \\ +DSConv & 87.7 & 23.4 & 65.6 & 3.8 & 55.4 \\ +MBConv & 90.5 & 25.3 & 75.0 & 4.9 & 52.7 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Comparison of Experimental Results for Various Lightweight Modules.  
\begin{table}
\begin{tabular}{l l l l l l} \hline \hline
**Method** & **[EMAIL_ADDRESS] (\%)** & **Params (M)** & **FLOPs (G)** & **Inference (ms)** & **Size (MB)** \\ \hline Baseline & 90.9 & 36.5 & 103.2 & 4.5 & 74.9 \\ +SE & 91.6 & 36.8 & 103.6 & 4.5 & 75.5 \\ +CBAM & 91.1 & 36.8 & 103.8 & 14.9 & 75.5 \\ +SimAM & 91.4 & 36.5 & 103.3 & 15.1 & 74.9 \\ +SHUFFLE & 91.1 & 36.5 & 103.3 & 10.1 & 74.9 \\ +CA & 91.2 & 36.8 & 103.8 & 19.5 & 75.4 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Comparison of Experimental Results for Various Attention Mechanisms.  
After introducing GhostModule, the [EMAIL_ADDRESS] of the model is 90.1%, a decrease of 0.8% compared with the baseline. The parameters are 22.6 M, a reduction of 38.1%, the computational complexity is 68.0 GFLOPs, a reduction of 34.1%, and the inference time is 3.9 ms, a reduction of 13.3%. This demonstrates that adopting GhostModule enhances real-time performance and lightens the model to some extent.  
Following the integration of GhostModule, the adoption of EIOU as a loss function was evaluated. Compared with the model only introducing GhostModule, [EMAIL_ADDRESS] increased by 0.6% to 90.7%, while the parameters, computational complexity, and inference time remained unchanged. EIOU loss accelerates network convergence, aiding accurate target localization and improving detection accuracy.  
After replacing GhostModule and embedding the SE attention mechanism, compared with the model that only introduced GhostModule, the [EMAIL_ADDRESS] increased by 0.5% to 90.6%, while the parameters and computational complexity slightly increased, and the inference time remained unchanged. The SE block makes the model more attentive to features of different scales, reducing the impact of cluttered information and enhancing feature extraction without losing detection speed.  
After introducing GhostModule, SE, and EIOU into the model simultaneously, [EMAIL_ADDRESS] is 91.1%, the parameters are 22.9 M, the computational complexity is 68.3 GFLOPs, and the inference time is 3.9 ms. Compared to the model only introducing GhostModule, [EMAIL_ADDRESS] is 1% higher, with the parameters and computational complexity slightly increased, and the inference time unchanged. Compared with YOLOv7, [EMAIL_ADDRESS] increased by 0.2%, the parameters were reduced by 37.3%, the computational complexity decreased by 33.8%, the inference time decreased by 13.3%, and the model weight was reduced by 36.2%. This indicates a slight improvement in accuracy, enhanced real-time performance, and a lighter model.