Railway overhead line system foreign matter detection method based on Swin Transform
By introducing Swin Transformer and related technical means to the railway contact network detection, the RFOID model is designed, which solves the problem of foreign object detection under complex backgrounds, achieves high accuracy and high efficiency detection under complex conditions, and reduces the use of manual detection. rely.
Patent Information
- Application Number
- CN202411031821.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-11-26
AI Technical Summary
The prior art is difficult to accurately detect foreign objects in railway contact networks under complex backgrounds and weather conditions, especially due to changes in light, occlusion, complex structures and messy backgrounds, traditional models perform poorly when identifying foreign objects and rely on manual detection efficiency. Low.
Using the Swin Transformer-based foreign object detection method of railway contact network, combined with cavity convolution, FPN and cascade detector, a Refined Foreign Object Intrusion Detector (RFOID) model was designed to sense hollow volumes through hierarchical visual transformation of shift windows and field of view. The feature pyramid network and cascade detector of integrated blocks and multi-branch fusion improve the model's ability to capture global and local information of the image and improve the accuracy of foreign object detection.
Foreign objects can be accurately detected under complex background and weather conditions, which improves the recognition accuracy of small targets and global context perception ability, significantly improves detection quality and efficiency, and reduces dependence on manual detection.
Smart Images

Figure CN119027645A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for detecting foreign matter in a railway contact network, and in particular to a method for detecting foreign matter in a railway contact network based on a Swin Transformer, belonging to the fields of computer vision and deep learning technology. Background Art
[0002] The railway catenary system is a key component of the railway electric traction power supply system and plays a vital role in the railway system. It is a high-voltage system primarily composed of supporting equipment, contact conductors, load-bearing cables, and droppers. Foreign objects in the catenary, such as bird's nests, kites, balloons, and plastic film, can cause damage to the catenary and potentially lead to train accidents. To improve the stability of the railway catenary, it is essential to monitor the system. Therefore, intelligent methods are needed to support technicians.
[0003] With the development of railways, the demand for safety and performance continues to increase, leading to the emergence of new types of monitoring equipment. Traditionally, this was achieved through laser scanners mounted on the roof of trains. In recent years, high-resolution onboard camera video surveillance systems have become an effective solution, compared to the extremely expensive laser scanners, allowing for direct image and video capture to ensure train safety. However, these large volumes of images and videos must be inspected and evaluated by trained technicians, typically on a frame-by-frame basis. Manually monitoring thousands of miles of railway catenary is not only time-consuming and labor-intensive, but also relies heavily on manual experience, making it impractical. This paper will focus on the automated detection of foreign objects in railway catenary systems.
[0004] Railway images vary significantly in lighting, lighting conditions, occlusions, climate, and foreground and background. First, foreign objects vary in shape and are located in different locations within the catenary system. Most are obscured by the catenary, with only a small portion visible. Second, the catenary structure is complex, with numerous intersecting lines, especially when the foreground and background are intertwined. Identifying foreign objects within the catenary system against complex backgrounds such as mountains, trees, and buildings is also challenging. Traditional models fail to perform well in extremely complex railway scenes. Therefore, research on foreign object detection in railway catenary systems is crucial for train safety. Summary of the Invention
[0005] The present invention proposes a railway contact network foreign object detection method based on Swin Transformer, aiming to realize foreign object detection on the railway contact network under complex weather and background. By introducing Swin Transformer, void convolution, FPN and cascade detector, a new railway contact network foreign object detection model is designed, which enables the railway contact network foreign object detection model to accurately detect foreign objects in the face of complex background and weather.
[0006] The technical solution of the present invention is achieved as follows:
[0007] A railway catenary foreign object detection method based on Swin Transformer is proposed. The method is characterized by introducing Swin Transformer, dilated convolution, FPN, and cascade detectors to innovatively design a railway catenary foreign object detection model called Refined Foreign Object Intrusion Detector (RFOID). The RFOID model includes the following components:
[0008] N1. Swin Transformer: First, the input image or video is processed using a Swin Transformer to extract features from the pixels in the image or each video frame.
[0009] N2, Receptive Field Dilated Convolution Block: To fully extract object edge information and improve small target detection accuracy, the Receptive Field Dilated Convolution Block is introduced. By extracting the feature map output by the backbone, it can better expand the receptive field, thereby facilitating more accurate identification of foreign objects, especially small targets.
[0010] N3. Multi-branch Fusion Feature Pyramid Network: In traditional feature pyramid networks, although feature maps from deep layers have a large receptive field and contain rich semantic information, they often perform poorly on detailed information, especially affecting the detection of small and medium-sized objects. To address this problem, the multi-branch fusion feature pyramid network, designed to improve the perception of global context while maintaining local details through a sophisticated feature fusion strategy, significantly improves the detection of objects of various sizes.
[0011] N4. Cascade Detector: To address the problem that single-stage detectors often perform poorly for objects of varying scales and difficulty, and that a single detector struggles to simultaneously process objects in complex backgrounds, a cascade detector was introduced. Multiple cascaded detectors gradually refine the detection results, with each stage performing more accurate detection based on the output of the previous stage, thereby gradually improving detection quality.
[0012] A railway catenary foreign object detection method based on the Swin Transformer utilizes the RFOID model with a superior hierarchical self-attention mechanism and windowed self-attention operation, improving the model's ability to capture global and local image information. This allows for accurate foreign object detection in complex backgrounds and weather conditions. The method also includes the following steps:
[0013] B1. Image partitioning: Split the input H×W×3 image into N non-overlapping equal-sized blocks and feed them into the subsequent stages as a sequence.
[0014] B2. Feature Extraction: Swin Transformer is selected as the main network in the feature extraction stage to extract features from the input sequence. The algorithm flow formula is as follows:
[0015] x i =W-MSA(LN(x i-1 ))+x i-1
[0016] x i+1 =MLP(LN(x i ))+x i
[0017] x i+2 =SW-MSA(LN(x i+1 ))+x i+1
[0018] x i+3 =MLP(LN(x i+2 ))+x i+2
[0019] Where x is the mapping after each layer processing, LN is layer normalization, MLP is multilayer perceptron, W-MSA is window based multi-head self-attention, and SW-MSA is shifted window-based multi-head self-attention.
[0020] B3. Edge extraction: 3×3 dilated convolutions with three different dilation rates are used, namely 1, 2, and 5. The feature map after this step does not change in size and dimension, effectively enhancing the edge of the target.
[0021] B4. Multi-branch fusion: A multi-branch fusion feature pyramid network is used to fuse feature maps from different branches. This improves the perception of global context while preserving local details, thereby significantly improving the detection of objects of various sizes.
[0022] B5. Cascade detection: The cascade detector consists of three detectors with different thresholds set for detection. Each detector consists of ROI Align, a fully connected layer, a classification score C, and a bounding box regression position coordinate B. During detection, the candidate target area is resampled through the bounding box regression B of the previous stage detector, and the IoU threshold is gradually increased to obtain a new classification score C and bounding box regression B, ultimately improving sample quality and network training effects.
[0023] Through these five steps, the RFOID model can effectively detect foreign objects in the image and generate an image with a detection frame.
[0024] Compared with the prior art, the advantages of the present invention are obvious, mainly manifested in:
[0025] 1. It can accurately detect foreign objects in complex backgrounds and weather conditions;
[0026] 2. Introducing a layered visual transformer using shifted windows to effectively capture the global context of the image;
[0027] 3. A visual field perception hole convolution block is designed to better expand the receptive field, thereby helping to more accurately identify foreign objects, especially small targets;
[0028] 4. Designed a multi-branch fusion feature pyramid network to improve the perception of global context while maintaining local details;
[0029] 5. Introduced cascade detectors to improve detection quality;
[0030] 6. Pictures or videos of production test results. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The present invention has the following Figure 2 Of which:
[0032] Figure 1 is a flow chart of the Refined Foreign Object Intrusion Detector (RFOID) of the present invention;
[0033] Figure 2 This is the network model diagram of the Refined Foreign Object Intrusion Detector of the present invention. DETAILED DESCRIPTION
[0034] like Figure 1 、 2 The present invention presents a railway catenary foreign object detection method based on Swin Transformer. The method is characterized by introducing Swin Transformer, dilated convolution, FPN, and cascade detectors to innovatively design a railway catenary foreign object detection model called Refined Foreign Object Intrusion Detector (RFOID). The RFOID model includes the following components:
[0035] N1. Swin Transformer: First, the input image or video is processed using a Swin Transformer to extract features from the pixels in the image or each video frame.
[0036] N2, Receptive Field Dilated Convolution Block: To fully extract object edge information and improve small target detection accuracy, the Receptive Field Dilated Convolution Block is introduced. By extracting the feature map output by the backbone, it can better expand the receptive field, thereby facilitating more accurate identification of foreign objects, especially small targets.
[0037] N3. Multi-branch Fusion Feature Pyramid Network: In traditional feature pyramid networks, although feature maps from deep layers have a large receptive field and contain rich semantic information, they often perform poorly on detailed information, especially affecting the detection of small and medium-sized objects. To address this problem, the multi-branch fusion feature pyramid network, designed to improve the perception of global context while maintaining local details through a sophisticated feature fusion strategy, significantly improves the detection of objects of various sizes.
[0038] N4. Cascade Detector: To address the problem that single-stage detectors often perform poorly for objects of varying scales and difficulty, and that a single detector struggles to simultaneously process objects in complex backgrounds, a cascade detector was introduced. Multiple cascaded detectors gradually refine the detection results, with each stage performing more accurate detection based on the output of the previous stage, thereby gradually improving detection quality.
[0039] A railway catenary foreign object detection method based on the Swin Transformer utilizes the RFOID model with a superior hierarchical self-attention mechanism and windowed self-attention operation, improving the model's ability to capture global and local image information. This allows for accurate foreign object detection in complex backgrounds and weather conditions. The method also includes the following steps:
[0040] B1. Image partitioning: Split the input H×W×3 image into N non-overlapping equal-sized blocks and feed them into the subsequent stages as a sequence.
[0041] B2. Feature Extraction: Swin Transformer is selected as the main network in the feature extraction stage to extract features from the input sequence. The algorithm flow formula is as follows:
[0042] x i =W-MSA(LN(x i-1 ))+x i-1
[0043] x i+1 =MLP(LN(x i ))+x i
[0044] x i+2 =SW-MSA(LN(x i+1 ))+x i+1
[0045] x i+3 =MLP(LN(xi+2 ))+x i+2
[0046] Where x is the mapping after each layer processing, LN is layer normalization, MLP is multilayer perceptron, W-MSA is window based multi-head self-attention, and SW-MSA is shifted window-based multi-head self-attention.
[0047] B3. Edge extraction: 3×3 dilated convolutions with three different dilation rates are used, namely 1, 2, and 5. The feature map after this step does not change in size and dimension, effectively enhancing the edge of the target.
[0048] B4. Multi-branch fusion: A multi-branch fusion feature pyramid network is used to fuse feature maps from different branches. This improves the perception of global context while preserving local details, thereby significantly improving the detection of objects of various sizes.
[0049] B5. Cascade Detection: The cascade detector consists of three detectors, each with different thresholds. Each detector consists of ROI Align, a fully connected layer, a classification score C, and bounding box regression position coordinates B. During detection, the candidate target area is resampled using the bounding box regression B of the previous detector. The IoU threshold is gradually increased to train a new classification score C and bounding box regression B, ultimately improving sample quality and network training effectiveness. The RFOID model can effectively detect foreign objects in images and generate images with detection boxes.
Claims
1. A railway contact network foreign body detection method based on Swin Transformer, characterized in that By introducing SwinTransformer, dilated convolution, FPN and cascade detector, an innovative railway contact network foreign object detection model named Refined Foreign Object Intrusion Detector (RFOID) is designed. The RFOID model includes the following contents: N1. Swin Transformer: First, the input image or video is processed using a Swin Transformer to extract features from pixels in the image or each video frame. N2, Receptive Field Dilated Convolution Block: In order to fully extract the edge information of the object and improve the detection accuracy of small targets, the receptive field dilated convolution block is introduced. By proposing the feature map of the backbone output, the receptive field can be better expanded, which helps to more accurately identify foreign objects, especially small targets; N3. Multi-branch Fusion Feature Pyramid Network: In traditional feature pyramid networks, although feature maps from deep layers have a large receptive field and contain rich semantic information, they often perform poorly on detail information, especially for the detection of small and medium-sized objects. In order to solve this problem, the multi-branch fusion feature pyramid network designed uses a sophisticated feature fusion strategy to improve the perception of global context while maintaining local detail information, thereby significantly improving the detection effect of objects of various sizes; N4. Cascade Detector: To solve the problem that single-stage detectors are usually unstable for targets of different scales and difficulties, and targets in complex backgrounds cannot be processed well by a single detector at the same time, cascade detectors are introduced. Multiple cascade detectors are used to gradually refine the detection results. The detectors in each stage perform more accurate detection based on the output of the previous stage, thereby gradually improving the detection quality. The railway contact network foreign body detection method based on Swin Transforme uses the RFOID model with a better hierarchical self-attention mechanism and windowed self-attention operation, which improves the model's ability to capture global and local information of the image, so that foreign bodies can be accurately detected in the face of complex backgrounds and weather; the detection method is also characterized by including the following steps: B1. Image partitioning: Split the input H×W×3 image into N non-overlapping small blocks of equal size and input them as a sequence into the subsequent stages; B2. Feature extraction: Swin Transformer is selected as the main network in the feature extraction stage to extract features from the input sequence. The algorithm flow formula is as follows: x i =W-MSA(LN(x i-1 ))+x i-1 x i+1 =MLP(LN(x i ))+x i x i+2 =SW-MSA(LN(x i+1 ))+x i+1 x i+3 =MLP(LN(x i+2 ))+x i+2 Where x is the mapping after each layer is processed, LN is layer normalization, MLP is multilayer perceptron, W-MSA is window based multi-head self-attention, SW-MSA is shifted window-based multi-head self-attention; B3, edge extraction: 3×3 dilated convolutions with three different dilation rates are used, where the dilation rates are 1, 2, and 5 respectively. After this step, the feature map does not change in size and dimension, effectively enhancing the edge of the target; B4. Multi-branch fusion: Use a multi-branch fusion feature pyramid network to fuse feature maps from different branches, while maintaining local detail information, improving the perception of global context, thereby significantly improving the detection effect of targets of various sizes; B5. Cascade detection: The cascade detector is composed of three detectors with different thresholds for detection. Each detector consists of ROI Align, a fully connected layer, a classification score C, and a bounding box regression position coordinate B. During detection, the candidate target area is resampled through the bounding box regression B of the previous stage detector, and the IoU threshold training is gradually improved to obtain a new classification score C and bounding box regression B, which ultimately improves the sample quality and network training effect. Through these five steps, the RFOID model can effectively detect foreign objects in the image and generate an image with a detection box.
Citation Information
Cited By
Tooth image intelligent analysis system and method for oral surgery
CN120107254A
Systems and techniques for instance segmentation
WO2026198154A1
