1. Introduction
With the rapid urbanization of China, the role and significance of urban rail transport in its public transportation system have become increasingly prominent. As of the end of 2022, 290 urban rail transit lines spanning a total length of 9584 km have been opened in 53 cities across mainland China, with the subway system accounting for the majority at 78.3%. Guangzhou city has the third-longest metro line in China and its total metro mileage is 621 km. The daily average passenger flow of the Guangzhou Metro Line network was more than 8.3 million in the first 9 months of 2023. The subway has emerged as the primary mode of transportation for urban residents, underscoring the criticality of ensuring its safe operation. Consequently, the operation, maintenance, and overhaul of the subway’s bow network system have assumed greater importance. Subway catenary systems, integral to supplying power to electric locomotives through complex interactions between pantographs and overhead contact lines, are characterized by high failure rates due to their complex mechanical and electrical dynamics. Insulators, key components of these electrified railway lines, provide crucial mechanical support and electrical insulation. Nevertheless, these insulators are subject to degradation and defects owing to prolonged exposure to outdoor environments, with challenges stemming from variations in temperature, humidity, and other natural elements. Compromised insulators can lead to substantial service disruptions, triggering not only significant economic setbacks but also detrimental societal consequences [
1]. Given these potential impacts, the rigorous inspection of insulators constitutes a critical measure in ensuring the uninterrupted functionality of contact line transmission systems [
2]. Traditional inspection methodologies typically involve manual examinations or conventional image inspections. However, manual inspection is both hazardous and inefficient, relying primarily on non-motorized vehicles such as railroad flatcars that require multiple individuals to push them along the track. An inspector sits on the herringbone ladder of the flatbed truck and utilizes a flashlight and other light sources to observe and inspect the insulators and other components on the line. After detecting at a certain distance, the inspector is replaced to continue the inspection. This maintenance process is characterized by poor working conditions, high labor intensity, low detection efficiency, and a high risk of misdetection and omission, which can result in operational safety accidents. whereas conventional image processing techniques, which employ edge detection and color features, tend to be sluggish and lack accuracy in defect identification [
3]. For open-air railway settings, drones have emerged as an efficient mechanism to capture insulator images over extensive areas. 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.
Yi 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). Zhao 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, Jiang 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. Liu 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. Yao 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. Liu 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. Jia et al. [
20] formulated a DE-YOLO detection network predicated on YOLOv5, advancing the accuracy of complex background insulation extraction, but its efficacy did not satisfy real-time detection criteria.
In machine learning, loss functions quantify the disparity between a model’s predictions and actual data. Altering these functions can enhance the accuracy and bolster the robustness of various models. Li et al. [
21] innovated within this space by modifying YOLOv5 algorithm’s loss function, implementing dynamic weight adjustments for positive and negative samples to heighten the detection accuracy, albeit at the expense of a reduced detection speed. Tang et al. [
22] introduced an approach that incorporated a triple attention mechanism into the network, employing Complete IoU (CIoU) Loss as the network regression loss function to expedite network convergence. However, this methodology has yet to achieve the benchmarks necessary for real-time detection, indicating a need for further refinements.
Subway insulators, predominantly situated in tunnel environments, present a unique challenge for defect inspection due to the constrained inspection windows—typically in the early hours—and the need for the immediate replacement of defective units upon detection. This practice renders the accumulation of a substantial defective insulator image dataset for training purposes challenging. Compounding this, the elevated humidity levels common in southern locales and the prevalent foggy conditions within tunnels further complicate inspection efforts. Addressing these multifaceted challenges, this study pioneers the construction of a partial contact network model, meticulously mirroring the subway line’s actual structure and dimensions. This innovative approach facilitates the generation of both normal and defective insulator samples, thereby mitigating the issue of sample insufficiency. To enhance the model’s applicability in adverse weather conditions, the dataset is augmented through the integration of a fogging algorithm [
23], ensuring adaptability in fog-prevalent scenarios. Furthermore, acknowledging the necessity for sample equilibrium during model training, the study introduces a Balanced Loss (BL) function [
24]. This strategic function assigns differential weighting to various sample categories—positive, negative, challenging, or straightforward—thereby optimizing the model’s attentiveness to positive and particularly elusive samples. This method effectively addresses the prevalent imbalance among diverse sample types. In the final phase of enhancement, the incorporation of a lightweight GhostNet module [
25] and Efficient Channel Attention Network (ECA-Net) [
26] channel attention mechanism proves instrumental. This dual integration not only curtails the network’s computational demands but also significantly accelerates the detection velocity, all without compromising the fidelity of image information capture. Simultaneously, the model’s propensity for redundant information is minimized, leading to an improvement in the detection accuracy concerning diminutive targets. Pollution, flashover, etc., can also affect the normal operation of insulators. However, for insulator pollution and flashover conditions, their datasets will be more difficult to obtain due to their much lower probability of occurring in the subway system. However, if sufficient datasets can be obtained, the present method will still be applicable.
5. Discussion
This study introduces an enhanced, lightweight algorithm for insulator detection and defect identification based on a modified YOLOv5 framework, addressing the challenges posed by limited sample availability and validating the algorithm’s efficacy in real-world conditions. Initially, a detailed model reflecting the specific network structure and dimensions of subway lines is established, facilitating the generation of artificial samples, including both intact and damaged insulators, to mitigate sample scarcity. Addressing the need for sample equilibrium, the study advocates for a BL function, allocating distinct weights to positive, negative, and particularly challenging samples throughout the training phase, thereby augmenting the model’s sensitivity to positive and hard-to-identify samples. Furthermore, the algorithm innovates by restructuring YOLOv5’s backbone network into GhostNet, enabling more streamlined feature extraction from input images. During the feature fusion phase, the algorithm employs depth-wise separable convolution to optimize the computational efficiency while integrating the ECA-Net attention mechanism, ensuring that critical information is effectively discerned. To equip the model for performance in foggy conditions, the dataset undergoes fog simulation processing. Experimental results indicate that the proposed modifications enhance the mAP from 95.46% to 96.57%, reduce the model size from 15 MB to 9 MB, and boost the detection speed from 30 FPS to 90 FPS in experimental settings, compared to the original YOLOv5 framework. In real-world applications, the mAP witnesses an approximate 2.5 pp increase, demonstrating the practicality of utilizing experimentally derived datasets for real-world detection tasks. Since it is difficult to obtain an insulator defect dataset in real scenarios, the effectiveness of this paper’s method in detecting defects needs to be further tested. The developed algorithm fulfills the accuracy and velocity criteria necessary for insulator defect detection in inspection vehicles, exhibits adaptability to diverse inspection environments, and is suitable for real-time deployment on inspection vehicles. Future investigations will extend to the recognition of other insulator anomalies, including pollution and flashover occurrences.