A high-speed rail surface damage detection method based on double-branch structure

By adopting a two-branch structure detection method in the surface damage detection of high-speed rail, combining sliding window transformer and improving faster regional convolutional neural network, multi-axis attention and improved hollow space feature pyramid pooling, the problem of insufficient detection accuracy in complex scenarios is solved, and the detection effect of small-size injuries is improved.

CN119339161BActive Publication Date: 2025-03-25EAST CHINA JIAOTONG UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411863838.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-03-25
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

The existing high-speed rail surface damage detection methods are insufficient in complex scenarios, especially the detection effect of small-sized injuries is poor.

Method used

Using a detection method based on a two-branch structure, the characteristic difference and complementarity of visible light and infrared images are analyzed by combining sliding window transformers and improving faster regional convolutional neural networks.

Benefits of technology

The accuracy of detection and detection capabilities of small targets are improved, and the accuracy of the model's detection of rail surface damage in complex scenarios is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119339161B_ABST
    Figure CN119339161B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for detecting surface damage of high-speed rails based on a dual-branch structure, comprising the following steps: collecting visible light images and infrared images of high-speed rails, processing the collected visible light images and infrared images, obtaining training sets and test sets, constructing a dual-branch encoder model, training the dual-branch encoder model using the training set and the test set, obtaining the trained dual-branch encoder model, inputting the visible light images and infrared images in the trained dual-branch encoder model for processing, and obtaining a segmented image. Through the dual-branch encoder model, a sliding window transformer is combined with an improved faster regional convolutional neural network to realize the difference and complementarity analysis of visible light image and infrared image features, thereby improving the accuracy of model detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of railway track damage detection, and in particular to a high-speed railway rail surface damage detection method based on a double-branch structure. Background Art

[0002] As the most important component of the high-speed rail track structure, the high temperature caused by long-term emergency braking friction of the train, the metal foreign matter running into the wheel-rail, the excessive pressure during railway cargo transportation, or the adverse weather conditions and environmental factors such as rain, ice and snow, and exposure to the sun will accelerate the wear or corrosion of the rail surface. If the rail surface is damaged and not treated for a long time, it will affect the stability and comfort of the train and increase the noise and vibration of the train. Therefore, it is very necessary to detect the damage on the surface of the high-speed rail efficiently and accurately.

[0003] Nowadays, most methods such as ultrasonic testing, eddy current testing and machine vision testing are used to detect surface damage of high-speed rails. With the continuous development of computer performance and detection algorithms, the method of rail surface damage detection based on machine vision has been widely used.

[0004] The current research status at home and abroad shows that the pixel-level target detection method based on deep learning in machine vision has great advantages. In order to solve the problem of high-speed rail surface damage detection and safety warning in complex scenes, and to overcome the difficulties brought by the diversity and scale differences of unbalanced small data sets, a high-speed rail surface damage detection method based on a double-branch structure was invented. Summary of the invention

[0005] In view of the deficiencies in the prior art, the present invention provides a method for detecting surface damage of high-speed rails based on a double-branch structure to solve the problems raised in the above-mentioned background technology.

[0006] To achieve the above object, the present invention provides the following technical solution: a method for detecting surface damage of high-speed rails based on a double-branch structure, comprising the following steps:

[0007] Step S1: collecting visible light images and infrared images of high-speed rails;

[0008] Step S2: Processing the collected visible light images and infrared images to obtain a training set and a test set;

[0009] Step S3: construct a dual-branch encoder model, and train the dual-branch encoder model using a training set and a test set to obtain a trained dual-branch encoder model;

[0010] Step S4: input the visible light image and the infrared image in step S1 into the trained dual-branch encoder model for processing to obtain a segmented image;

[0011] The trained two-branch encoder model consists of an encoder and a decoder;

[0012] The encoder consists of a sliding window transformer, an improved faster region convolutional neural network, a first multi-axis attention, a second multi-axis attention, a third multi-axis attention, and a fourth multi-axis attention;

[0013] The sliding window converter is composed of a first sliding module, a second sliding module, a third sliding module and a fourth sliding module;

[0014] The improved faster regional convolutional neural network consists of a first faster regional convolutional neural network, a second faster regional convolutional neural network, a third faster regional convolutional neural network, a fourth faster regional convolutional neural network and a fifth faster regional convolutional neural network;

[0015] The decoder consists of an automatic switching module, first downsampling, second downsampling, first upsampling, second upsampling, third upsampling, attention mechanism, fourth upsampling, improved hole space feature pyramid pooling, and fifth upsampling;

[0016] The automatic switching module consists of a first switch, a second switch, a third switch and a fourth switch.

[0017] Furthermore, in step S1, the visible light image and infrared image of the high-speed rail are collected, and the specific process is as follows:

[0018] The CCD camera and the infrared camera are installed vertically on the ground on the side of the high-speed rail. The high-speed rail is captured by the CCD camera and the infrared camera to obtain visible light images and infrared images.

[0019] Further, in step S2, a training set and a test set are obtained, and the specific process is as follows:

[0020] The visible light images and infrared images are segmented and adjusted to a fixed size, and then annotated to construct an initial dataset of rail surface damage images. The initial dataset of rail surface damage images is expanded by using flipping transformation, random cropping, image fusion and other methods, and the dataset is randomly divided into training set and test set.

[0021] Further, in step S4, the segmented image is obtained, and the specific process is as follows:

[0022] Input the visible light image and infrared image in step S1 into the trained dual-branch encoder model;

[0023] The visible light image is first input into the first sliding module, the second sliding module, the third sliding module, and the fourth sliding module in sequence in the trained dual-branch encoder model;

[0024] In the trained dual-branch encoder model, the infrared image is first input into the first faster region convolutional neural network, the second faster region convolutional neural network, the third faster region convolutional neural network, the fourth faster region convolutional neural network, and the fifth faster region convolutional neural network in sequence;

[0025] Deconvolve the output of the second faster regional convolutional neural network and fuse it with the output of the first faster regional convolutional neural network to obtain the first output of the faster regional convolutional neural network, input the first output of the faster regional convolutional neural network and the output of the first sliding module into the first multi-axis attention to obtain a feature map of the first corresponding resolution; deconvolve the output of the third faster regional convolutional neural network and fuse it with the output of the second faster regional convolutional neural network to obtain the second output of the faster regional convolutional neural network, input the second output of the faster regional convolutional neural network and the output of the second sliding module into the second multi-axis attention to obtain a feature map of the second corresponding resolution; deconvolve the output of the fourth faster regional convolutional neural network and fuse it with the output of the third faster regional convolutional neural network to obtain the third output of the faster regional convolutional neural network, input the third output of the faster regional convolutional neural network and the output of the third sliding module into the third multi-axis attention to obtain a feature map of the third corresponding resolution; deconvolve the output of the fifth faster regional convolutional neural network and fuse it with the output of the fourth faster regional convolutional neural network to obtain the fourth output of the faster regional convolutional neural network, input the fourth output of the faster regional convolutional neural network and the output of the fourth sliding module into the fourth multi-axis attention to obtain a feature map of the fourth corresponding resolution;

[0026] The feature map of the fourth corresponding resolution is sequentially input into the fourth switch and the fifth upsampling; the feature map of the third corresponding resolution is sequentially input into the third switch, the output of the fifth upsampling and the output of the third switch are input into the improved void space feature pyramid pooling, and the output of the improved void space feature pyramid pooling is input into the fourth upsampling; the feature map of the first corresponding resolution is sequentially input into the first switch, the first downsampling, and the second downsampling; the feature map of the second corresponding resolution is input into the second switch, the output of the second switch is added to the output of the first downsampling, the output after adding the output of the first downsampling is added to the output of the second downsampling, the output after adding the output of the second downsampling and the output of the fourth upsampling are input into the attention mechanism, the output of the attention mechanism is input into the third upsampling, the output of the third upsampling and the output of the first downsampling are added and input into the second upsampling, the output of the second upsampling is input into the first upsampling, and the output of the first upsampling is used as the final output of the trained dual-branch encoder model, which is the segmented image.

[0027] Further, the first faster regional convolutional neural network, the second faster regional convolutional neural network, the third faster regional convolutional neural network, the fourth faster regional convolutional neural network and the fifth faster regional convolutional neural network have the same structure;

[0028] The first faster regional convolutional neural network consists of a feature extraction network, a regional generation network, a feature matrix, and a regional pooling layer;

[0029] The processing flow of the first faster regional convolutional neural network is as follows: input the infrared image into the feature extraction network for processing to obtain a feature map, input the feature map into the regional generation network for processing to generate a candidate box, input the feature map and the candidate box into the feature matrix, input the output of the feature matrix into the regional pooling layer, and use the output of the regional pooling layer as the final output of the first faster regional convolutional neural network.

[0030] Furthermore, the first multi-axis attention, the second multi-axis attention, the third multi-axis attention, and the fourth multi-axis attention have the same structure;

[0031] The first multi-axis attention consists of window partitioning, window attention, window inversion, network partitioning, network attention, and network inversion;

[0032] The first multi-axis attention processing flow is: the output of the first sliding module and the first output of the faster regional convolutional neural network are input into window partitioning, window attention, window inversion, network partitioning, network attention, and network inversion in sequence, and the output of the network inversion is used as the final output of the first multi-axis attention, which is the feature map of the first corresponding resolution.

[0033] Furthermore, the improved atrous spatial feature pyramid pooling consists of a first fusion layer, a pooling network, a first atrous convolution, a second atrous convolution, a third atrous convolution, a first 1×1 convolution, a fourth atrous convolution, a fifth atrous convolution, a sixth atrous convolution, a second fusion layer, and a distributed shift convolution;

[0034] The first dilated convolution, the second dilated convolution, and the third dilated convolution have the same structure. The first dilated convolution is a dilated convolution with a 3×3 convolution kernel and a dilated rate of 1.

[0035] The fourth dilated convolution has the same structure as the fifth dilated convolution. The fourth dilated convolution is a dilated convolution with a 3×3 convolution kernel and a dilated rate of 3.

[0036] The sixth dilated convolution is a dilated convolution with a 3×3 convolution kernel and a dilated rate of 5;

[0037] Improved atrous spatial feature pyramid pooling processing flow: input the output of the fifth upsampling and the output of the third switch into the first fusion layer, input the output of the first fusion layer into the pooling network, the first atrous convolution, the second atrous convolution, the third atrous convolution, and the convolution respectively; input the output of the first atrous convolution into the fourth atrous convolution; add the output of the second atrous convolution and the output of the third atrous convolution and input them into the fifth atrous convolution, add the output of the fifth atrous convolution and the output of the fourth atrous convolution and input them into the sixth atrous convolution; input the output of the pooling network, the output of the sixth atrous convolution, the output of the fifth atrous convolution, the output of the third atrous convolution, and the output of the convolution into the second fusion layer, input the output of the second fusion layer into the distributed shift convolution, and use the output of the distributed shift convolution as the final output of the improved atrous spatial feature pyramid pooling.

[0038] Compared with the existing technology, the present invention has the following beneficial effects:

[0039] (1) The present invention combines a sliding window transformer with an improved faster regional convolutional neural network through a dual-branch encoder model to achieve feature difference and complementarity analysis of visible light images and infrared images, thereby improving the accuracy of model detection.

[0040] (2) The present invention improves the faster regional convolutional neural network to more fully obtain the deep and shallow feature information of the infrared image, so as to solve the problem that important features are ignored and small damage cannot be detected, thereby improving the accuracy of the dual-branch encoder model in small target detection.

[0041] (2) The present invention improves the accuracy of the model by introducing multi-axis attention and improving the void space feature pyramid pooling to better integrate multimodal context information. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 The figure is a flow chart of the method of the present invention.

[0043] Figure 2 Schematic diagram of the dual-branch encoder model of the present invention.

[0044] Figure 3 This is the multi-axis attention framework diagram of the present invention.

[0045] Figure 4 This is a diagram of the improved hole space feature pyramid pooling framework of the present invention.

[0046] Figure 5 This is a diagram of the improved faster regional convolutional neural network framework of the present invention. DETAILED DESCRIPTION

[0047] like Figure 1As shown, the present invention provides a technical solution: a high-speed rail surface damage detection method based on a double-branch structure, comprising the following steps:

[0048] Step S1: collecting visible light images and infrared images of high-speed rails;

[0049] Step S2: Processing the collected visible light images and infrared images to obtain a training set and a test set;

[0050] Step S3: construct a dual-branch encoder model, and train the dual-branch encoder model using a training set and a test set to obtain a trained dual-branch encoder model;

[0051] Step S4: input the visible light image and the infrared image in step S1 into the trained dual-branch encoder model for processing to obtain a segmented image;

[0052] The trained two-branch encoder model consists of an encoder and a decoder;

[0053] The encoder consists of a sliding window transformer, an improved faster region convolutional neural network, a first multi-axis attention, a second multi-axis attention, a third multi-axis attention, and a fourth multi-axis attention;

[0054] The sliding window converter is composed of a first sliding module, a second sliding module, a third sliding module and a fourth sliding module;

[0055] The improved faster regional convolutional neural network consists of a first faster regional convolutional neural network, a second faster regional convolutional neural network, a third faster regional convolutional neural network, a fourth faster regional convolutional neural network and a fifth faster regional convolutional neural network;

[0056] The decoder consists of an automatic switching module, first downsampling, second downsampling, first upsampling, second upsampling, third upsampling, attention mechanism, fourth upsampling, improved hole space feature pyramid pooling, and fifth upsampling;

[0057] The automatic switching module consists of a first switch, a second switch, a third switch and a fourth switch.

[0058] Among them, in step S1, the visible light image and infrared image of the high-speed rail are collected, and the specific process is as follows:

[0059] The CCD camera and the infrared camera are installed vertically on the ground on the side of the high-speed rail. LED lights or lasers can be used for auxiliary fill lighting. The high-speed rail is captured by the CCD camera and the infrared camera to obtain visible light images and infrared images.

[0060] Among them, in step S2, the training set and the test set are obtained, and the specific process is:

[0061] The visible light images and infrared images are segmented and adjusted to a fixed size, and then annotated to construct an initial data set of rail surface damage images; the initial data set of rail surface damage images is expanded by using flipping transformation, random cropping, image fusion and other methods, and finally 1500 high-speed rail visible light images and infrared images are generated, and 70% are randomly selected as training sets and 30% as test sets to reduce the impact of complex scenes such as changing light, low contrast and unbalanced sample categories.

[0062] like Figure 2 As shown, in step S4, the segmented image is obtained, and the specific process is:

[0063] Input the visible light image and infrared image in step S1 into the trained dual-branch encoder model;

[0064] The visible light image is first input into the first sliding module, the second sliding module, the third sliding module, and the fourth sliding module in sequence in the trained dual-branch encoder model;

[0065] In the trained dual-branch encoder model, the infrared image is first input into the first faster region convolutional neural network, the second faster region convolutional neural network, the third faster region convolutional neural network, the fourth faster region convolutional neural network, and the fifth faster region convolutional neural network in sequence;

[0066] The output of the second faster regional convolutional neural network is deconvolved and fused with the output of the first faster regional convolutional neural network to obtain the first output of the faster regional convolutional neural network. The first output of the faster regional convolutional neural network and the output of the first sliding module are input into the first multi-axis attention to obtain the features of the first corresponding resolution. Figure 1 / 4; deconvolve the output of the third faster regional convolutional neural network and fuse it with the output of the second faster regional convolutional neural network to obtain the second output of the faster regional convolutional neural network, input the second output of the faster regional convolutional neural network and the output of the second sliding module into the second multi-axis attention to obtain the features of the second corresponding resolution Figure 1 / 8; Deconvolve the output of the fourth faster regional convolutional neural network and fuse it with the output of the third faster regional convolutional neural network to obtain the third output of the faster regional convolutional neural network, input the third output of the faster regional convolutional neural network and the output of the third sliding module into the third multi-axis attention to obtain the features of the third corresponding resolution Figure 1 / 16; Deconvolve the output of the fifth faster regional convolutional neural network and fuse it with the output of the fourth faster regional convolutional neural network to obtain the fourth output of the faster regional convolutional neural network, input the fourth output of the faster regional convolutional neural network and the output of the fourth sliding module into the fourth multi-axis attention to obtain the features of the fourth corresponding resolution Figure 1 / 32;

[0067] The fourth corresponding resolution feature Figure 1 / 32 is input into the fourth switch and the fifth up-sampling in turn; the feature of the third corresponding resolution is Figure 1 / 16 are sequentially input into the third switch, the output of the fifth upsampling and the output of the third switch are input into the improved void space feature pyramid pooling, and the output of the improved void space feature pyramid pooling is input into the fourth upsampling; the feature of the first corresponding resolution is input into Figure 1 / 4 input the first switch, the first downsampling, and the second downsampling in sequence; the feature of the second corresponding resolution Figure 1 / 8 is input into the second switch, the output of the second switch is added to the output of the first down-sampling, the output after adding the output of the first down-sampling is added to the output of the second down-sampling, the output after adding the output of the second down-sampling and the output of the fourth up-sampling are input into the attention mechanism, the output of the attention mechanism is input into the third up-sampling, the output of the third up-sampling is added to the output of the first down-sampling and input into the second up-sampling, the output of the second up-sampling is input into the first up-sampling, and the output of the first up-sampling is used as the final output of the trained dual-branch encoder model, which is the segmented image.

[0068] like Figure 3 As shown, the first multi-axis attention, the second multi-axis attention, the third multi-axis attention and the fourth multi-axis attention have the same structure;

[0069] The first multi-axis attention consists of window partitioning, window attention, window inversion, network partitioning, network attention, and network inversion;

[0070] The first multi-axis attention processing flow is: the output of the first sliding module and the first output of the faster regional convolutional neural network are sequentially input into window partitioning, window attention, window inversion, network partitioning, network attention, and network inversion, and the output of network inversion is used as the final output of the first multi-axis attention, which is the feature of the first corresponding resolution. Figure 1 / 4.

[0071] like Figure 4 As shown, the improved dilated spatial feature pyramid pooling consists of a first fusion layer, a pooling network, a first dilated convolution, a second dilated convolution, a third dilated convolution, a first 1×1 convolution, a fourth dilated convolution, a fifth dilated convolution, a sixth dilated convolution, a second fusion layer, and a distributed shift convolution.

[0072] The first dilated convolution, the second dilated convolution, and the third dilated convolution have the same structure. The first dilated convolution is a dilated convolution with a 3×3 convolution kernel and a dilated rate of 1.

[0073] The fourth dilated convolution has the same structure as the fifth dilated convolution. The fourth dilated convolution is a dilated convolution with a 3×3 convolution kernel and a dilated rate of 3.

[0074] The sixth dilated convolution is a dilated convolution with a 3×3 convolution kernel and a dilated rate of 5;

[0075] Improved atrous spatial feature pyramid pooling processing flow: input the output of the fifth upsampling and the output of the third switch into the first fusion layer, input the output of the first fusion layer into the pooling network, the first atrous convolution, the second atrous convolution, the third atrous convolution, and the convolution respectively; input the output of the first atrous convolution into the fourth atrous convolution; add the output of the second atrous convolution and the output of the third atrous convolution and input them into the fifth atrous convolution, add the output of the fifth atrous convolution and the output of the fourth atrous convolution and input them into the sixth atrous convolution; input the output of the pooling network, the output of the sixth atrous convolution, the output of the fifth atrous convolution, the output of the third atrous convolution, and the output of the convolution into the second fusion layer, input the output of the second fusion layer into the distributed shift convolution, and use the output of the distributed shift convolution as the final output of the improved atrous spatial feature pyramid pooling.

[0076] like Figure 5 As shown, the first faster regional convolutional neural network, the second faster regional convolutional neural network, the third faster regional convolutional neural network, the fourth faster regional convolutional neural network and the fifth faster regional convolutional neural network have the same structure;

[0077] The first faster regional convolutional neural network consists of a feature extraction network, a regional generation network, a feature matrix, and a regional pooling layer;

[0078] The processing flow of the first faster regional convolutional neural network is as follows: input the infrared image into the feature extraction network for processing to obtain a feature map, input the feature map into the regional generation network for processing to generate a candidate box, input the feature map and the candidate box into the feature matrix, input the output of the feature matrix into the regional pooling layer, and use the output of the regional pooling layer as the final output of the first faster regional convolutional neural network.

[0079] Among them, the faster regional convolutional neural network includes:

[0080] The Faster Regional Convolutional Neural Network (FasterR-CNN) is used to replace the five-stage convolutional layers in the traditional deep convolutional neural network (VGG-16), and the fully connected layers of the deep convolutional neural network are deleted, leaving only the void convolution and pooling network.

[0081] After each pooling network, the output size is reduced by half; after the visible light image and infrared image are processed by five pooling layers in the faster area convolutional neural network, the output features of the fourth corresponding resolution are Figure 1 / 32 features become very abstract, which may cause some important features to be ignored, resulting in the inability to detect too small damage; therefore, according to the output of the first multi-axis attention, the output of the second multi-axis attention, the output of the third multi-axis attention and the output of the fourth multi-axis attention, the deep and shallow feature information of the visible light image and the infrared image can be fully obtained; the multi-axis attention in the improved trained dual-branch encoder model, such as Figure 3 As shown in the figure, this improvement not only increases the scale invariance of the segmented image, but also improves the detection effect of small-sized surface damage.

[0082] Two improvements are proposed for the multi-axis attention and improved atrous spatial feature pyramid pooling of the trained dual-branch encoder model: first, the two types of window attention and network attention contained in the multi-axis attention are stacked sequentially; balanced local and global interactions are obtained in a single block containing window attention and network attention; second, for the improved atrous spatial feature pyramid pooling, non-atrous convolutions are added in different channels and cross-layer skip connections are added to increase the receptive field of the improved atrous spatial feature pyramid pooling, thereby improving the accuracy of multi-scale damage detection.

[0083] Among them, multi-axis attention:

[0084] Multi-axis attention achieves local convolution and global interaction by stacking window attention and network attention sequentially so that they are contained in a single block.

[0085] A fixed G×G uniform network is used to divide the window attention and network attention containing a single block into tensor networks of shape (G×G, HG×WG, C), resulting in windows with adaptive size HG×WG; self-attention is adopted on the decomposed tensor network axis, G×G, corresponding to the global spatial mixture of the expansion of the window attention and network attention containing a single block symbol; by using the same fixed window and network size, the computation between local and global interaction operations can be fully balanced, and these two operations have only linear complexity with respect to the spatial size or sequence length.

[0086] Multi-axis attention has global interaction capabilities and does not require padding or cyclic shift, making it easier to implement. It can adaptively fuse multimodal contextual information based on feature maps of corresponding resolutions in a global interaction view, which is beneficial to improving the segmentation accuracy of the trained dual-branch encoder model.

[0087] The improved atrous spatial feature pyramid pooling described above can increase the receptive field of the trained dual-branch encoder model, effectively fuse multi-scale contextual information at different levels, and restore low-level details and position information, high-level semantic information and global contextual information, thereby improving the accuracy of multi-scale damage detection.

[0088] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A high-speed rail surface damage detection method based on a double-branch structure, characterized in that: The following steps are involved: Step S1: collecting visible light images and infrared images of high-speed rails; Step S2: Processing the collected visible light images and infrared images to obtain a training set and a test set; Step S3: construct a dual-branch encoder model, and train the dual-branch encoder model using a training set and a test set to obtain a trained dual-branch encoder model; Step S4: input the visible light image and the infrared image in step S1 into the trained dual-branch encoder model for processing to obtain a segmented image; The trained two-branch encoder model consists of an encoder and a decoder; The encoder consists of a sliding window transformer, an improved faster region convolutional neural network, a first multi-axis attention, a second multi-axis attention, a third multi-axis attention, and a fourth multi-axis attention; The sliding window converter is composed of a first sliding module, a second sliding module, a third sliding module and a fourth sliding module; The improved faster regional convolutional neural network consists of a first faster regional convolutional neural network, a second faster regional convolutional neural network, a third faster regional convolutional neural network, a fourth faster regional convolutional neural network and a fifth faster regional convolutional neural network; The decoder consists of an automatic switching module, first downsampling, second downsampling, first upsampling, second upsampling, third upsampling, attention mechanism, fourth upsampling, improved hole space feature pyramid pooling, and fifth upsampling; The automatic switching module consists of a first switch, a second switch, a third switch and a fourth switch.

2. According to claim 1, a high-speed rail surface damage detection method based on a double-branch structure is characterized in that: In step S1, the visible light image and infrared image of the high-speed rail are collected. The specific process is as follows: The CCD camera and the infrared camera are installed vertically on the ground on the side of the high-speed rail. The high-speed rail is captured by the CCD camera and the infrared camera to obtain visible light images and infrared images.

3. The method for detecting surface damage of high-speed rails based on a double-branch structure according to claim 2 is characterized in that: In step S2, the training set and test set are obtained. The specific process is as follows: The visible light images and infrared images are segmented and adjusted to a fixed size, and then annotated to construct the initial dataset of rail surface damage images. The initial dataset of rail surface damage images is expanded by using flipping transformation, random cropping, and image fusion, and the dataset is randomly divided into training set and test set.

4. The method for detecting surface damage of high-speed rails based on a double-branch structure according to claim 3 is characterized in that: In step S4, the segmented image is obtained, and the specific process is as follows: Input the visible light image and infrared image in step S1 into the trained dual-branch encoder model; The visible light image is first input into the first sliding module, the second sliding module, the third sliding module, and the fourth sliding module in sequence in the trained dual-branch encoder model; In the trained dual-branch encoder model, the infrared image is first input into the first faster region convolutional neural network, the second faster region convolutional neural network, the third faster region convolutional neural network, the fourth faster region convolutional neural network, and the fifth faster region convolutional neural network in sequence; Deconvolve the output of the second faster regional convolutional neural network and fuse it with the output of the first faster regional convolutional neural network to obtain a first output of the faster regional convolutional neural network, input the first output of the faster regional convolutional neural network and the output of the first sliding module into the first multi-axis attention to obtain a feature map of the first corresponding resolution; Deconvolve the output of the third faster regional convolutional neural network and fuse it with the output of the second faster regional convolutional neural network to obtain a second output of the faster regional convolutional neural network, input the second output of the faster regional convolutional neural network and the output of the second sliding module into the second multi-axis attention to obtain a feature map of a second corresponding resolution; Deconvolve the output of the fourth faster regional convolutional neural network and fuse it with the output of the third faster regional convolutional neural network to obtain a third output of the faster regional convolutional neural network, input the third output of the faster regional convolutional neural network and the output of the third sliding module into the third multi-axis attention to obtain a feature map of a third corresponding resolution; Deconvolving the output of the fifth faster regional convolutional neural network and fusing it with the output of the fourth faster regional convolutional neural network to obtain a fourth output of the faster regional convolutional neural network, and inputting the fourth output of the faster regional convolutional neural network and the output of the fourth sliding module into a fourth multi-axis attention to obtain a feature map of a fourth corresponding resolution; Inputting the feature map of the fourth corresponding resolution into the fourth switch and the fifth up-sampling in sequence; Input the feature map of the third corresponding resolution into the third switch in sequence, input the output of the fifth upsampling and the output of the third switch into the improved hole space feature pyramid pooling, and input the output of the improved hole space feature pyramid pooling into the fourth upsampling; The feature map of the first corresponding resolution is sequentially input into the first switch, the first downsampling, and the second downsampling; the feature map of the second corresponding resolution is input into the second switch, the output of the second switch is added to the output of the first downsampling, the output after adding the output of the first downsampling is added to the output of the second downsampling, the output after adding the output of the second downsampling and the output of the fourth upsampling are input into the attention mechanism, the output of the attention mechanism is input into the third upsampling, the output of the third upsampling and the output of the first downsampling are added and input into the second upsampling, the output of the second upsampling is input into the first upsampling, and the output of the first upsampling is used as the final output of the trained dual-branch encoder model, which is the segmented image.

5. The method for detecting surface damage of high-speed rails based on a double-branch structure according to claim 4 is characterized in that: The first faster regional convolutional neural network, the second faster regional convolutional neural network, the third faster regional convolutional neural network, the fourth faster regional convolutional neural network and the fifth faster regional convolutional neural network have the same structure; The first faster regional convolutional neural network consists of a feature extraction network, a regional generation network, a feature matrix, and a regional pooling layer; The processing flow of the first faster regional convolutional neural network is as follows: input the infrared image into the feature extraction network for processing to obtain a feature map, input the feature map into the regional generation network for processing to generate a candidate box, input the feature map and the candidate box into the feature matrix, input the output of the feature matrix into the regional pooling layer, and use the output of the regional pooling layer as the final output of the first faster regional convolutional neural network.

6. The method for detecting surface damage of high-speed rails based on a double-branch structure according to claim 5 is characterized in that: The first multi-axis attention, the second multi-axis attention, the third multi-axis attention, and the fourth multi-axis attention have the same structure; The first multi-axis attention consists of window partitioning, window attention, window inversion, network partitioning, network attention, and network inversion; The first multi-axis attention processing flow is: the output of the first sliding module and the first output of the faster regional convolutional neural network are input into window partitioning, window attention, window inversion, network partitioning, network attention, and network inversion in sequence, and the output of the network inversion is used as the final output of the first multi-axis attention, which is the feature map of the first corresponding resolution.

7. The method for detecting surface damage of high-speed rails based on a double-branch structure according to claim 6 is characterized in that: The improved dilated spatial feature pyramid pooling consists of the first fusion layer, the pooling network, the first dilated convolution, the second dilated convolution, the third dilated convolution, the first 1×1 convolution, the fourth dilated convolution, the fifth dilated convolution, the sixth dilated convolution, the second fusion layer and the distributed shift convolution; The first dilated convolution, the second dilated convolution, and the third dilated convolution have the same structure. The first dilated convolution is a dilated convolution with a 3×3 convolution kernel and a dilated rate of 1. The fourth dilated convolution has the same structure as the fifth dilated convolution. The fourth dilated convolution is a dilated convolution with a 3×3 convolution kernel and a dilated rate of 3. The sixth dilated convolution is a dilated convolution with a 3×3 convolution kernel and a dilated rate of 5; Improved atrous spatial feature pyramid pooling processing flow: input the output of the fifth upsampling and the output of the third switch into the first fusion layer, input the output of the first fusion layer into the pooling network, the first atrous convolution, the second atrous convolution, the third atrous convolution, and the convolution respectively; input the output of the first atrous convolution into the fourth atrous convolution; add the output of the second atrous convolution and the output of the third atrous convolution and input them into the fifth atrous convolution, add the output of the fifth atrous convolution and the output of the fourth atrous convolution and input them into the sixth atrous convolution; input the output of the pooling network, the output of the sixth atrous convolution, the output of the fifth atrous convolution, the output of the third atrous convolution, and the output of the convolution into the second fusion layer, input the output of the second fusion layer into the distributed shift convolution, and use the output of the distributed shift convolution as the final output of the improved atrous spatial feature pyramid pooling.

Citation Information

Patent Citations

  • Unmanned real-time road scene semantic segmentation method based on multi-task supervision

    CN112699889A

  • Semantic segmentation method for RGB-T bimodal feature fusion

    CN115620010A