# Enhanced Detection of Subway Insulator Defects Based on Improved YOLOv5
## 4 Experimental Results and Analysis
### Results and Analysis of Ablation and Comparative Studies
Figure 8b highlights that the YOLOv5-GhostNet model fails to allocate sufficient attention to insulators, leading to suboptimal detection results and diminished confidence levels, especially for smaller insulators. Conversely, Figure 8c,d indicate that incorporating the ECA-Net mechanism enables the algorithm to concentrate more precisely on the intended targets. Specifically, the YOLOv5-GhostNet-ECA configuration succeeds in reliably identifying insulators, even against complex backdrops. When compared to the original YOLOv5 algorithm shown in Figure 8a, there is an enhancement in both the attention allocated and the detection accuracy pertaining to smaller targets. The visualization results in Figure 9 reveal that while both the original and YOLOv5-GhostNet models demonstrate decent detection capabilities and substantial confidence levels for insulators, they underperform in identifying defects and smaller insulators, as evidenced by their lower confidence scores. Notably, the streamlined parameter set of the  
Figure 8: Thermal map comparison for insulator detection: (**a**) YOLOv5; (**b**) YOLOv5-GhostNet; (**c**) YOLOv5-ECA; (**d**) YOLOv5-GhostNet-ECA. YOLOv5-GhostNet model correlates with a marked reduction in accuracy for diminutive targets. The integration of the ECA-Net attention mechanism noticeably amplifies the detection accuracy for minor defects. Consequently, the algorithm proposed herein exhibits a discernible accuracy enhancement relative to the original model. To assess the efficacy and reliability of the proposed algorithm, it was benchmarked against an array of established algorithms on the test set, encompassing single-stage detectors such as YOLOv3, YOLOv4, YOLOv5, YOLOv8, and SSD, as well as the two-stage detector Faster R-CNN. Experimental comparisons, detailed in Table 5, were meticulously conducted, ensuring accuracy in the use of professional terminology. Figure 9: Comparative detection results with different algorithms (red boxes indicate insulators and pink boxes indicate defects): (**a**) YOLOv5; (**b**) YOLOv5-GhostNet; (**c**) YOLOv5-ECA; (**d**) YOLOv5-GhostNet-ECA. The prevalent standard for real-time detection is a detection speed exceeding 30 FPS. Table 5 illustrates that while Faster R-CNN offers satisfactory accuracy, its extensive model size and high parameter count drastically reduce the detection speed, rendering it unsuitable for real-time defect detection in insulators. The SSD algorithm, although fast, compromises on accuracy and possesses a larger model. Both YOLOv3 and YOLOv4 fall below the 30 FPS threshold, with accuracies inferior to YOLOv5. Contrasting with Faster R-CNN and SSD, the algorithm developed in this study shows a marginal reduction in mean average precision--1.75 pp and 7.36 pp, respectively. However, it boasts a model size that is 57.6 times smaller than that of Faster R-CNN and 9.7 times smaller than SSD's. Furthermore, the detection speeds surpass those of Faster R-CNN and SSD by 78.8 pp and 34.4 pp, respectively. Conclusively, the proposed algorithm stands out among its counterparts, achieving an optimal balance between detection accuracy and speed, thus fulfilling the prerequisites for real-time detection.