# Enhanced Detection of Subway Insulator Defects Based on Improved YOLOv5
###### Abstract
However, the applicability of this method diminishes within the confines of railway tunnels, especially those of subway systems, areas that current research scarcely addresses. However, the rapid advancements in deep learning technology herald new opportunities for the accurate and efficient detection of insulator defects within subway environments. This burgeoning field shows substantial promise in overcoming the limitations of existing methods, potentially redefining the standards for insulator inspection in subway catenary systems. Currently, insulation detection algorithms predominantly fall into two categories: two-stage and one-stage detection algorithms. The former, exemplified by models such as the Region-Based Convolutional Neural Network (R-CNN) [4], Fast R-CNN [5], Faster R-CNN [6], and Mask R-CNN, initiates the detection process by generating region proposals on the input image, followed by feature extraction and classification. Despite their efficacy, these models are often encumbered by extensive computational requirements, resulting in substantial sizes and slow processing speeds that impede real-time application. Conversely, one-stage algorithms--including models like Single-Shot MultiBox Detector (SSD) [7; 8], RetinaNet, and the You Only Look Once (YOLO) [9; 10; 11] series--streamline the detection process by addressing object localization as a regression problem, eliminating the need to generate region proposals. This approach significantly enhances the detection speed. Nonetheless, a limitation arises when these algorithms are deployed for small target detection, where a compromise in detection accuracy is often observed. Given the critical balance between speed and accuracy in real-time applications, there is an imperative to optimize one-stage algorithms. [PERSON] et al. [12] modified the sliding window ratio and implemented a hard sample adversarial generation strategy to enhance the efficiency of insulation detection using the Faster R-CNN network, but the enhanced model's detection speed remained limited at 1.2 frames per second (FPS). [PERSON] et al. [13] introduced an insulation identification technique merging an attention mechanism with Faster R-CNN to augment the recognition accuracy; however, the additional network parameters reduced the model's detection velocity. Aiming for meticulous insulation defect detection, [PERSON] et al. [14] and his team devised a thorough multi-level perception approach based on the SSD algorithm, although this method necessitated an extended duration for image processing. YOLOv3, a seminal model in the YOLO series, boasts substantial merits in detection speed and accuracy. [PERSON] et al. [15] introduced an ameliorated YOLOv3-inspired insulation recognition algorithm, integrating YOLOv3 with dense blocks to refine the feature extraction network and employing a multi-level feature mapping module to enhance the network's feature fusion capabilities. [PERSON] et al. [16] put forth a GIOU-YOLOv3 method for insulation detection and positioning, substituting the original loss function with the GIOU loss function to refine the insulation detection accuracy without escalating the model size, although substantial insulation target omissions were observed in the test results. [PERSON] et al. [17] suggested an enhanced YOLOv4 method for power insulation defect detection, incorporating a weight coefficient in the balanced cross-entropy to amplify the loss function's impact, and augmenting the network depth with additional convolution layers surrounding the spatial pyramid structure. While experimental analyses demonstrated the method's proficiency in insulation defect identification, the efficiency did not meet optimal standards. In 2020, Ultralytics unveiled YOLOv5 [18], combining a focus structure, Generalized Intersection over Union (GIoU) Loss [19], and a feature pyramid structure, potentially addressing issues related to complex backgrounds, diminutive targets, and overlapping objects in conventional images. [PERSON] et al.