A catenary wire dropper defect detection method based on semi-supervised learning
By using a semi-supervised learning approach and optimizing the loss function with an unbiased teacher model and pseudo-labeled data, the problems of high annotation cost and low detection accuracy in catenary dropper inspection are solved, achieving efficient and low-cost defect detection.
Patent Information
- Application Number
- CN202511493382.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-20
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2045-10-20
AI Technical Summary
Existing methods for detecting defects in overhead contact line droppers rely on a large amount of labeled data, resulting in high labeling costs and low reliability and accuracy in detection.
We employ a semi-supervised learning approach, constructing an unbiased teacher model by collecting a small number of labeled and a large number of unlabeled drop wire images. We train the model using pseudo-labeled and soft-labeled data, and optimize the loss function by combining a label propagation algorithm and an adaptive attention mechanism to improve detection accuracy and reliability.
It effectively reduces the workload of manual annotation, lowers annotation costs, improves the reliability and accuracy of detection, and enhances the generalization performance of detection.
Smart Images

Figure CN120953293B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of overhead contact line inspection, and more specifically to a method for detecting defects in overhead contact line droppers based on semi-supervised learning. Background Technology
[0002] Droppers are a key component of the overhead contact system in electrified railways. In the overhead contact system, the chain suspension structure suspends the contact wire from the catenary cable via droppers, forming multiple suspension supports and improving the elasticity and uniformity of the contact wire. The height of the contact wire can be precisely controlled by adjusting the length of the droppers to adapt to different track conditions. In actual operation, defect detection of the overhead contact system droppers is necessary to ensure safety.
[0003] Existing methods for detecting defects in overhead contact line droppers mainly include fully supervised learning methods and unsupervised learning methods. Fully supervised learning relies on a large amount of labeled data and requires professional knowledge, resulting in high labeling costs. Unsupervised learning has lower reliability and detection accuracy. Summary of the Invention
[0004] In view of this, the present invention provides a method for detecting defects in overhead contact line droppers based on semi-supervised learning, in order to solve the problems of high labeling cost, low reliability and low detection accuracy of existing technologies.
[0005] A method for detecting defects in overhead contact line droppers based on semi-supervised learning, comprising:
[0006] Step S1: Collect a first number of first contact wire dropper images with marked defects and a second number of second contact wire dropper images without marked defects, wherein the second number is greater than the first number;
[0007] Step S2: Preprocess and normalize the first and second catenary dropper images respectively, and extract the graphic data in the images to obtain the processed first and second catenary dropper images. Construct an labeled dataset using the processed first catenary dropper images and an unlabeled dataset using the processed second catenary dropper images.
[0008] Step S3: Construct an unbiased teacher semi-supervised learning model. Use the processed first catenary dropper image to train the model and obtain the initial model. During the training process, the teacher model in the initial model generates pseudo-label data using the processed second catenary dropper image. The student model in the initial model is jointly trained using the processed first catenary dropper image and the pseudo-label data generated by the teacher model. The teacher model is updated using the exponential moving average algorithm.
[0009] Step S4: Input the processed second catenary dropper image into the initial model, construct a similarity matrix, form an undirected weighted graph, and iteratively propagate the label through a label propagation algorithm to propagate the label of the processed first catenary dropper image to the processed second catenary dropper image. Then, filter the pseudo-label data based on the set probability threshold to obtain soft labels, and normalize the soft labels to obtain soft label data.
[0010] Step S5: Calculate the supervised loss using pseudo-labeled data and the unsupervised loss using soft-labeled data. Obtain the total loss function based on the supervised and unsupervised losses. Introduce an adaptive attention mechanism to dynamically adjust the weighting coefficients of the supervised and unsupervised losses. Use the gradient descent optimization algorithm to minimize the total loss function, thereby obtaining a well-trained semi-supervised learning model.
[0011] Step S6: Use the trained semi-supervised learning model to perform defect detection on the contact wire dropper image to be detected, and obtain the detection results.
[0012] The contact wire dropper defect detection method based on semi-supervised learning provided by the present invention has the following beneficial effects:
[0013] (1) The present invention collects a small number of first contact wire images with marked defects, marks the defect type and location information, and collects a large number of second contact wire images with unmarked defects. By preprocessing the collected images, processed first contact wire images and processed second contact wire images are obtained, which effectively reduces the workload of manual marking and lowers the marking cost.
[0014] (2) This invention constructs an unbiased teacher semi-supervised learning model, which uses the processed first contact wire dropper image for model training, and can learn the basic features of the contact wire dropper image. However, the unlabeled defect image may contain unlabeled potential defects. This invention analyzes and learns the unlabeled defect image. The teacher model uses the processed second contact wire dropper image to generate pseudo-label data and inputs the processed second contact wire dropper image into the initial model to construct a similarity matrix and form an undirected weighted graph. Through the label propagation algorithm, iterative propagation can propagate the label of the processed first contact wire dropper image to the processed second contact wire dropper image, thereby effectively combining the unlabeled defect image and the labeled defect image to improve the reliability of detection.
[0015] (3) This invention uses pseudo-label data to calculate supervised loss and soft-label data to calculate unsupervised loss. Based on supervised loss and unsupervised loss, the total loss function is obtained. The gradient descent optimization algorithm is used to minimize the total loss function, which can make the total loss more accurate, thereby improving detection accuracy and enhancing generalization performance. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the method for detecting defects in overhead contact line droppers based on semi-supervised learning, as provided in an embodiment of the present invention. Detailed Implementation
[0017] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain embodiments of the present invention, and should not be construed as limiting the present invention.
[0018] Please see Figure 1 The present invention provides a method for detecting defects in overhead contact line droppers based on semi-supervised learning, comprising steps S1 to S6:
[0019] Step S1: Collect a first number of first contact wire dropper images with marked defects and a second number of second contact wire dropper images without marked defects, wherein the second number is greater than the first number.
[0020] In this embodiment, a small number of first contact wire dropper images with marked defects can be collected from manual annotation or historical inspection reports. The first contact wire dropper images are marked with the location and type of the existing defects.
[0021] Numerous images of unmarked defects in the second contact wire can be obtained through on-site camera or drone inspections.
[0022] Step S2 involves preprocessing and normalizing the first and second overhead contact line dropper images, and extracting the text and image data from the images to obtain the processed first and second overhead contact line dropper images.
[0023] In this embodiment, the first contact wire dropper image can be preprocessed by manual review to correct erroneous annotations.
[0024] Preprocessing techniques such as noise reduction, deletion, random selection, and brightness adjustment can be used for the images of the second contact wire droppers.
[0025] Then, normalization operations are performed on both the first and second overhead contact line dropper images, and the graphic and textual data present in the images are extracted to obtain the processed first and second overhead contact line dropper images.
[0026] Finally, an labeled dataset was constructed using the processed first catenary dropper image, and an unlabeled dataset was constructed using the processed second catenary dropper image.
[0027] Step S3: Construct an unbiased teacher semi-supervised learning model. Use the processed first catenary dropper image to train the model and obtain the initial model. During the training process, the teacher model in the initial model generates pseudo-label data using the processed second catenary dropper image. The student model in the initial model is jointly trained using the processed first catenary dropper image and the pseudo-label data generated by the teacher model. The teacher model is updated using the exponential moving average algorithm.
[0028] In constructing the unbiased teacher semi-supervised learning model, ResNet or EfficientNet is used as the backbone network. Simultaneously, low-resolution and high-resolution features are extracted to output multi-scale feature maps. Enhanced feature maps are generated through feature pyramid networks or dilated convolutions to cover the resolution scale range of the original image from 1 / 4 to 1 / 32. Feature maps of different scales are aligned with spatial resolution through upsampling or downsampling operations, and feature fusion is achieved through element-wise addition or channel concatenation.
[0029] During training, the teacher model in the initial model takes the second catenary dropper image, which has undergone weak data augmentation such as slight cropping, boundary cropping, and non-uniform cropping, as input to generate predicted bounding boxes. The results with confidence scores greater than the confidence threshold are selected as pseudo-label data through non-maximum suppression and confidence threshold. To alleviate class imbalance, the classification branch adopts Focal Loss, and to avoid pseudo-label localization noise, the regression branch relies on the labeled dataset.
[0030] The student model is jointly trained using images of the first contact wire droppers that have been strongly augmented with random scaling, random rotation, or color jitter, and combined with pseudo-label data generated by the teacher model. The teacher model is dynamically updated using the exponential moving average (EMA) algorithm.
[0031] In step S3, the student model satisfies the following equation:
[0032]
[0033] in, The loss function for joint training of the student models. The loss is calculated based on the processed first contact wire dropper image. For unsupervised loss weights, The loss is calculated based on the pseudo-label data;
[0034] To prevent fluctuations in single-round iterations, the teacher model update must satisfy the following formula:
[0035]
[0036] in, The coefficient for the exponential moving average algorithm is usually set to 0.999; The parameters of the teacher model in the current iteration round, For the parameters of the student model, These are the updated teacher model parameters.
[0037] Step S4: Input the processed second catenary dropper image into the initial model, construct a similarity matrix, form an undirected weighted graph, and perform iterative propagation through a label propagation algorithm to propagate the labels of the processed first catenary dropper image to the processed second catenary dropper image. Then, filter the pseudo-label data based on the set probability threshold to obtain soft labels, and normalize the soft labels to obtain soft label data.
[0038] Specifically, step S4 includes:
[0039] Step S4.1: Input the processed second catenary dropper image into the initial model, convert the processed second catenary dropper image into a feature vector matrix, and then use the Gaussian kernel function to calculate the similarity between images, thereby constructing a similarity matrix and forming an undirected weighted graph. The formula for calculating the similarity is as follows:
[0040]
[0041] in, It is the first The processed second contact wire dropper image and the first Similarity between the processed images of the second contact wire droppers It is the first The feature vector of the processed second contact wire dropper image It is the first The feature vector of the processed second contact wire dropper image It is a parameter that controls the rate of similarity decay;
[0042] Step S4.2: Create a label matrix. For nodes that have been labeled in the label matrix, set their corresponding rows to one-hot encoding. For nodes that have not been labeled in the label matrix, initialize their corresponding rows to all zeros. Then, iteratively propagate the labels of the processed first catenary dropper image to the processed second catenary dropper image through the label propagation algorithm.
[0043] Step S4.3: When the label propagation algorithm reaches the preset maximum number of iterations or the label matrix converges, stop the iteration, set a probability threshold p (e.g., 0.9), filter out the pseudo-label data output by the teacher model with a predicted probability not less than p, and use the softmax function to normalize the filtered pseudo-label data so that the sum of the label row elements of each node is 1, thus obtaining soft label data.
[0044] In step S4.2, iterative propagation using the label propagation algorithm satisfies the following equation:
[0045]
[0046] in, For the first The label matrix after the next iteration For the first The label matrix after the next iteration For the initial label matrix, For the propagation coefficient, This is a propagation matrix constructed based on the similarity matrix.
[0047] Step S5: Calculate the supervised loss using pseudo-labeled data and the unsupervised loss using soft-labeled data. Obtain the total loss function based on the supervised and unsupervised losses. Introduce an adaptive attention mechanism to dynamically adjust the weighting coefficients of the supervised and unsupervised losses. Use the gradient descent optimization algorithm to minimize the total loss function, thereby obtaining a trained semi-supervised learning model.
[0048] In step S5, the supervision loss is calculated using the cross-entropy loss method, as shown in the following expression:
[0049]
[0050] in, It's about model parameters. The supervised loss function, It is the number of samples in the labeled dataset. It is the cross-entropy loss function. It is the first in the labeled dataset One labeled sample, yes The predicted output, Is with The corresponding real tags;
[0051] Unsupervised loss is calculated using self-supervised learning, and the expression is:
[0052]
[0053] in, It's about model parameters. The unsupervised loss function, This is the number of samples in the unlabeled dataset. It is the loss function for self-supervised learning. It is the first in the unlabeled dataset One unlabeled sample, yes The predicted output;
[0054] The expression for the total loss function is:
[0055]
[0056] in, For the total loss function, and These are the weighting coefficients.
[0057] It should be noted that spatial attention is introduced after feature fusion to focus on areas where defects may occur. Combined with channel attention, the weights of different feature channels are dynamically adjusted to suppress background noise, strengthen defect-related features, and generate an attention weight map. This attention weight map is then multiplied by the original feature map to obtain a weighted feature map. Finally, all scale features are fused through a 1×1 convolution. The attention weights are dynamically adjusted based on the supervised and unsupervised signals in the semi-supervised learning process. Specifically, the weighting coefficients of supervised and unsupervised losses are dynamically adjusted based on model uncertainty, data distribution, and the training phase, as shown in the following formula:
[0058]
[0059]
[0060] in, for Constantly monitor the weighting factor of the loss. for Constantly monitor the weighting factor of the loss. for The weighting coefficient of unsupervised loss at each moment. This is the weight update control constant, used to control the speed or step size of the weighted coefficient update; its value is between 0 and 1. This is the activation function.
[0061] In step S5, the gradient descent optimization algorithm is used to minimize the total loss function while satisfying the following equation:
[0062] ;
[0063]
[0064]
[0065]
[0066] in, Is with The corresponding real tags, Indicates partial derivative, It is the total loss function with respect to parameters gradient, It is the total loss function with respect to parameters gradient, and These are the adjusted parameters. This is the learning rate.
[0067] Repeat the gradient descent process to optimize until the preset number of iterations is reached, the gradient approaches 0, or the total loss function value is less than the set threshold. This will give you a well-trained semi-supervised learning model.
[0068] Step S6: Use the trained semi-supervised learning model to perform defect detection on the contact wire dropper image to be detected, and obtain the detection results.
[0069] In summary, the contact wire dropper defect detection method based on semi-supervised learning according to the above embodiments has the following beneficial effects:
[0070] (1) The present invention collects a small number of first contact wire images with marked defects, marks the defect type and location information, and collects a large number of second contact wire images with unmarked defects. By preprocessing the collected images, processed first contact wire images and processed second contact wire images are obtained, which effectively reduces the workload of manual marking and lowers the marking cost.
[0071] (2) This invention constructs an unbiased teacher semi-supervised learning model, which uses the processed first contact wire dropper image for model training, and can learn the basic features of the contact wire dropper image. However, the unlabeled defect image may contain unlabeled potential defects. This invention analyzes and learns the unlabeled defect image. The teacher model uses the processed second contact wire dropper image to generate pseudo-label data and inputs the processed second contact wire dropper image into the initial model to construct a similarity matrix and form an undirected weighted graph. Through the label propagation algorithm, iterative propagation can propagate the label of the processed first contact wire dropper image to the processed second contact wire dropper image, thereby effectively combining the unlabeled defect image and the labeled defect image to improve the reliability of detection.
[0072] (3) This invention uses pseudo-label data to calculate supervised loss and soft-label data to calculate unsupervised loss. Based on supervised loss and unsupervised loss, the total loss function is obtained. The gradient descent optimization algorithm is used to minimize the total loss function, which can make the total loss more accurate, thereby improving detection accuracy and enhancing generalization performance.
[0073] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.
Claims
1. A method for detecting defects in overhead contact line droppers based on semi-supervised learning, characterized in that, include: Step S1: Collect a first number of first contact wire dropper images with marked defects and a second number of second contact wire dropper images without marked defects, wherein the second number is greater than the first number; Step S2: Preprocess and normalize the first and second contact wire images respectively, and extract the graphic data in the images to obtain the processed first and second contact wire images. Step S3: Construct an unbiased teacher semi-supervised learning model. Use the processed first catenary dropper image to train the model and obtain the initial model. During the training process, the teacher model in the initial model generates pseudo-label data using the processed second catenary dropper image. The student model in the initial model is jointly trained using the processed first catenary dropper image and the pseudo-label data generated by the teacher model. The teacher model is updated using the exponential moving average algorithm. Step S4: Input the processed second catenary dropper image into the initial model, construct a similarity matrix, form an undirected weighted graph, and iteratively propagate the label through a label propagation algorithm to propagate the label of the processed first catenary dropper image to the processed second catenary dropper image. Then, filter the pseudo-label data based on the set probability threshold to obtain soft labels, and normalize the soft labels to obtain soft label data. Step S5: Calculate the supervised loss using pseudo-labeled data and the unsupervised loss using soft-labeled data. Obtain the total loss function based on the supervised and unsupervised losses. Introduce an adaptive attention mechanism to dynamically adjust the weighting coefficients of the supervised and unsupervised losses. Use the gradient descent optimization algorithm to minimize the total loss function, thereby obtaining a well-trained semi-supervised learning model. Step S6: Use the trained semi-supervised learning model to perform defect detection on the contact wire dropper image to be detected, and obtain the detection result; Specifically, step S4 includes: Step S4.1: Input the processed second catenary dropper image into the initial model, convert the processed second catenary dropper image into a feature vector matrix, and then use the Gaussian kernel function to calculate the similarity between images, thereby constructing a similarity matrix and forming an undirected weighted graph. The formula for calculating the similarity is as follows: in, It is the first The processed second contact wire dropper image and the first Similarity between the processed images of the second contact wire droppers It is the first The feature vector of the processed second contact wire dropper image It is the first The feature vector of the processed second contact wire dropper image It is a parameter that controls the rate of similarity decay; Step S4.2: Create a label matrix. For nodes that have been labeled in the label matrix, set their corresponding rows to one-hot encoding. For nodes that have not been labeled in the label matrix, initialize their corresponding rows to all zeros. Then, iteratively propagate the labels of the processed first catenary dropper image to the processed second catenary dropper image through the label propagation algorithm. Step S4.3: When the label propagation algorithm reaches the preset maximum number of iterations or the label matrix converges, stop the iteration, set a probability threshold p, filter out the pseudo-label data output by the teacher model with a prediction probability not less than p, and use the softmax function to normalize the filtered pseudo-label data to obtain soft label data.
2. The method for detecting defects in overhead contact line droppers based on semi-supervised learning according to claim 1, characterized in that, In step S3, when constructing the semi-supervised learning model of the unbiased teacher, enhanced feature maps are generated through feature pyramid network or dilated convolution to cover the resolution scale range of the original image from 1 / 4 to 1 / 32. Feature maps of different scales are aligned with spatial resolution through upsampling or downsampling operations, and feature fusion is achieved by element-wise addition or channel concatenation. During training, the teacher model in the initial model takes the cropped image of the second contact wire as input to generate predicted bounding boxes. It then uses nonmaximum suppression and a confidence threshold to filter out results with a confidence level greater than the confidence threshold as pseudo-label data. The student model uses the first contact wire image, which has been randomly scaled, randomly rotated, or color-dithered, in conjunction with the pseudo-label data generated by the teacher model for joint training. The teacher model is then dynamically updated using an exponential moving average algorithm.
3. The method for detecting defects in overhead contact line droppers based on semi-supervised learning according to claim 2, characterized in that, In step S3, the student model satisfies the following equation: in, The loss function for joint training of the student models. The loss is calculated based on the processed first contact wire dropper image. For unsupervised loss weights, The loss is calculated based on the pseudo-label data; The teacher model satisfies the following formula: in, These are the coefficients of the exponential moving average algorithm. The parameters of the teacher model in the current iteration round, For the parameters of the student model, These are the updated teacher model parameters.
4. The method for detecting defects in overhead contact line droppers based on semi-supervised learning according to claim 3, characterized in that, In step S4.2, iterative propagation using the label propagation algorithm satisfies the following equation: in, For the first The label matrix after the next iteration For the first The label matrix after the next iteration For the initial label matrix, For the propagation coefficient, This is a propagation matrix constructed based on the similarity matrix.
5. The method for detecting defects in overhead contact line droppers based on semi-supervised learning according to claim 4, characterized in that, In step S5, the monitoring loss is calculated using the following formula: in, It's about model parameters. The supervised loss function, It is the number of samples in the labeled dataset. It is the cross-entropy loss function. It is the first in the labeled dataset One labeled sample, yes The predicted output, Is with The corresponding real tags; The unsupervised loss is calculated using the following formula: in, It's about model parameters. The unsupervised loss function, This is the number of samples in the unlabeled dataset. It is the loss function for self-supervised learning. It is the first in the unlabeled dataset One unlabeled sample, yes The predicted output; The expression for the total loss function is: in, For the total loss function, The weighting factor for monitoring losses, is the weighting coefficient for unsupervised loss.
6. The method for detecting defects in overhead contact line droppers based on semi-supervised learning according to claim 5, characterized in that, In step S5, an adaptive attention mechanism is introduced to dynamically adjust the weighting coefficients of supervised and unsupervised losses, satisfying the following equation: in, for Constantly monitor the weighting factor of the loss. for Constantly monitor the weighting factor of the loss. for The weighting coefficient of unsupervised loss at each moment. To update the control constants for weights, This is the activation function.
7. The method for detecting defects in overhead contact line droppers based on semi-supervised learning according to claim 6, characterized in that, In step S5, the gradient descent optimization algorithm is used to minimize the total loss function while satisfying the following equation: ; in, Is with The corresponding real tags, Indicates partial derivative, It is the total loss function with respect to parameters gradient, It is the total loss function with respect to parameters gradient, and These are the adjusted parameters. This is the learning rate.
Citation Information
Patent Citations
Semi-supervised bearing surface defect detection method based on improved YOLOv7
CN118799267A
Catenary dropper unsupervised defect detection method based on convolution automatic encoder
CN119444716A