# Enhanced Detection of Subway Insulator Defects Based on Improved YOLOv5
## 4 Experimental Results and Analysis
### Results and Analysis of Ablation and Comparative Studies  
This study aims to authenticate the efficacy of integrating the ECA-Net attention mechanism alongside the GhostNet lightweight module through systematic ablation experiments. These experiments on the test set involve comparative analysis by sequentially excluding specific modules. The evaluation encompasses four distinct models, with the consequential findings delineated in Table 4.  
The data in Table 4 reveal that the foundational YOLOv5 model demonstrated mean average precision of 95.06% across both insulators and their defects. Transitioning YOLOv5's backbone network to the more streamlined GhostNet resulted in a marginal decline in mean average precision by roughly 2.8 pp, and a more pronounced 3.98 pp reduction for insulator defect detection. Despite this, there was a decrease in model complexity, with the model size shrinking to half of its original and a detection speed surge from 30 FPS to 95 FPS, thereby satisfying the prerequisites of embedded edge computing devices. In contrast to the sole enhancement of the GhostNet backbone network, the integration of the ECA-Net attention mechanism into the original YOLOv5 model led to a substantial increase in mean average precision (by approximately 2.68 pp), albeit with a speed reduction to \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Model** & **[EMAIL_ADDRESS]:0.95 (\%)** & \begin{tabular}{c} **[EMAIL_ADDRESS]** \\ **(\%)** \\ \end{tabular} & \begin{tabular}{c} **Insulator** \\ **[EMAIL_ADDRESS]** \\ **(\%)** \\ \end{tabular} & \begin{tabular}{c} **Defect** \\ **[EMAIL_ADDRESS]** \\ **(\%)** \\ \end{tabular} & \
\begin{tabular}{c} **Size (MB)** \\ **(\%)** \\ \end{tabular} &
\begin{tabular}{c} **FPS** \\ **(\%)** \\ \end{tabular} \\ \hline YOLOv5 & 84.62 & 95.06 & 96.83 & 94.09 & 15 & 30 \\ YOLOv5-GhostNet & 81.15 & 92.26 & 96.21 & 90.11 & 7.5 & 95 \\ YOLOv5-ECA & 87.24 & 97.74 & 98.68 & 96.76 & 15 & 24 \\ YOLOv5-GhostNet-ECA & 86.58 & 96.43 & 97.06 & 96.08 & 9 & 90 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparison results of melting experiments. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \(\alpha\) & \(\beta\) & \(\gamma\) & **Normal Insulator AP (\%)** & **Broken Insulator AP (\%)** \\ \hline
0.5 & 1 & 0 & **90.62** & **88.25** \\
0.5 & 1.5 & 1 & 86.33 & 91.48 \\
0.5 & 2 & 1 & 87.79 & 92.14 \\
0.5 & 1.5 & 2 & 79.57 & 87.38 \\
0.5 & 2 & 2 & 80.65 & 87.84 \\
0.75 & 1.5 & 1 & **96.83** & **94.09** \\
0.75 & 2 & 1 & 94.75 & 91.49 \\
0.75 & 1.5 & 2 & 80.23 & 90.44 \\
0.75 & 2 & 2 & 78.19 & 90.86 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Influence of hyperparameters on accuracy. 24 FPS from 30 FPS. This suggests that while the ECA-Net attention mechanism augmented the richness of information captured during the feature extraction phase, it also elevated the computational demands of the algorithm, consequently diminishing its efficiency. Further, when the ECA-Net attention mechanism was superimposed on the YOLOv5-GhostNet framework during the feature fusion phase, there was an approximate 1.4 pp improvement in mean average precision, particularly a nearly 2 pp rise in recognizing insulator defects. Concurrently, the model size contracted to 60 pp of its initial size, and the detection velocity improved from 30 FPS to 90 FPS. These observations indicate the efficacy of the ECA-Net attention mechanism in augmenting target discernment and in more effectively mining requisite feature information. As a result, this research elects to incorporate the attention mechanism within the feature fusion segment of the model. This study utilizes heat maps and result visualizations to further elucidate the influence of ECA-Net on the detection model, as depicted in Figures 8 and 9. In these heat maps, areas of greater luminosity correspond to regions where the network directs more attention.