CN-122024098-A - Rail surface damage detection method based on unmanned aerial vehicle inspection and improved DETR algorithm
Abstract
The invention relates to the technical field of steel rail detection, solves the problem that the prior art has obvious omission in the case of facing a more complex detection scene and a detection scene of extreme illumination conditions, in particular to a steel rail surface damage detection method based on unmanned aerial vehicle inspection and improved DETR algorithm, acquires a steel rail surface image by inspection unmanned aerial vehicle flying along a railway under a preset route, performs pretreatment to acquire a standard steel rail image, performs data marking and data enhancement on steel rail damage in the standard steel rail image to acquire a steel rail damage data set, and builds an improved DETR model for steel rail damage detection. According to the invention, the defects of an original model in small target damage detection are overcome, the anti-interference capability of a complex scene and under extreme illumination conditions is improved, the accurate identification and less omission of three damage types of stripping, scale pattern and wave grinding are realized, the small target damage detection precision and robustness are improved, and the small target damage detection capability of the model is improved.
Inventors
- LIN FENGTAO
- WU LIN
- YANG SHIDE
- YANG YANG
- WU MIN
- WU CHEN
- CHEN ZHIHANG
Assignees
- 华东交通大学
- 江西飞行学院
Dates
- Publication Date
- 20260512
- Application Date
- 20260130
Claims (9)
- 1. The steel rail surface damage detection method based on unmanned aerial vehicle inspection and improved DETR algorithm is characterized by comprising the following steps of: The method comprises the steps that under a preset route, a rail surface image is obtained through the flight of a patrol unmanned aerial vehicle along a railway, and pretreatment is carried out to obtain a standard rail image; Carrying out data marking and data enhancement on rail damage in the standard rail image to obtain a rail damage data set; Constructing an improved DETR model for rail damage detection, and training and verifying the improved DETR model by using a rail damage data set to obtain optimal weight parameters; And inputting the standard steel rail image into an improved DETR model for deploying the optimal weight parameters for reasoning, obtaining the boundary frame, the category and the confidence coefficient of the steel rail damage, and calculating the real two-dimensional size of the steel rail damage according to the preset pixel-real size conversion ratio and the camera parameter-rail head width.
- 2. The method of detection according to claim 1, wherein the modified DETR model comprises: the convolution and attention fusion module is used for extracting local features in the standard steel rail images; Replacing the common convolution in the sampling path of the original DETR model with a double convolution module comprising group convolution and heterogeneous convolution; And replacing the standard upsampler in the original DETR model with a Dysample upsampler that dynamically generates a sampling offset from the input features.
- 3. The detection method according to claim 2, wherein the convolution and attention fusion module receives a feature map generated by feature extraction of the standard steel rail image as an input feature map, and sends the feature map into a local branch and a global branch respectively for parallel processing; in the local branch, performing dimension reduction operation on the input feature map through a 1X 1 convolution layer, performing channel scrambling on the input feature map after dimension reduction, inputting a 3X 3 convolution layer, extracting local space detail features of a damaged area in a standard steel rail image, and generating a local branch feature map; in the global branch, an input feature map is processed through a 1X 1 convolution layer, the processed input feature map is respectively processed through three parallel 3X 3 convolution layers to generate a query vector, a key vector and a value vector, matrix multiplication operation is carried out on the query vector and the key vector, attention force map is generated through an activation function, the generated attention force map and the value vector are subjected to matrix multiplication operation, linear mapping is carried out through the 1X 1 convolution layer, element-by-element addition is carried out on the feature of the front end of the branch, and the global branch feature map is output; and adding the local branch feature map and the global branch feature map element by element, and carrying out self-adaptive fusion to generate an output feature map.
- 4. The detection method according to claim 2, wherein the double convolution module comprising group convolution and heterogeneous convolution receives a feature map generated by feature extraction of the standard rail image as an input feature map, and performs convolution operation; The heterogeneous double convolution module comprises M convolution filters, wherein the construction rule of each convolution filter is as follows, the grouping number G is set, and N input channels are divided into G channel groups; For each convolution filter, selecting one channel group as a space feature extraction area, configuring a 3X 3 convolution kernel to extract space geometric features, using the rest G-1 channel groups as channel compression areas, and configuring a 1X 1 convolution kernel to execute linear transformation; the space feature extraction area is distributed in a stepwise shift mode along the channel dimension among different groups of convolution filters to realize full coverage of all input channel space features, convolution results of the space feature extraction area and the channel compression area are calculated respectively during operation, and the convolution results are added element by element to obtain an output feature map.
- 5. The method according to claim 2, wherein the upsampler for dynamically generating the sampling offset according to the input features is used for reconstructing the low resolution feature map into the high resolution feature map, and the specific steps are as follows: Obtain the size of Is provided with a preset up-sampling scale factor; Processing the input feature map by using a linear mapping layer to generate a channel with dimension of And remodelling the initial offset features to a size by pixel rebinning Is a sampling offset of (a); Generating a standard sampling grid according to the up-sampling scale factor, and adding the sampling offset with the standard sampling grid element by element to generate a final sampling set; Based on the sampling set, resampling operation is performed on the input feature map, and a high-resolution feature map containing track dense damage details is output.
- 6. The detection method of claim 4, wherein the double convolution module generates the feature map of the output by a mathematical model of: Wherein, the For the feature map of the output, For the feature map of the input, Weight matrices for the heterogeneous convolution and group convolution, respectively.
- 7. The method of claim 1, wherein the categories of rail damage include flaking, wave grinding and fish scale.
- 8. The method of claim 1, wherein the two-dimensional dimensions include length and width, and the formula for calculating the true two-dimensional dimensions of the rail damage is as follows: Wherein, the Representing the actual dimensions of the device, The pixel size is indicated as such, Representing the conversion ratio.
- 9. A rail surface damage detection system for implementing any one of claims 1 to 8, comprising a processor and a memory for storing a computer program which, when executed by the processor, implements the rail surface damage detection method of any one of claims 1 to 8.
Description
Rail surface damage detection method based on unmanned aerial vehicle inspection and improved DETR algorithm Technical Field The invention relates to the technical field of steel rail detection, in particular to a steel rail surface damage detection method based on unmanned aerial vehicle inspection and improved DETR algorithm. Background The rail is used as a core bearing component of railway infrastructure, and the health condition of the rail is directly related to the running safety, stability and service life of the train. Along with the continuous expansion of the railway network in China, the rapid development of high-speed and heavy-load railways brings higher requirements to the precision, efficiency and intelligent level of rail damage detection. Unmanned aerial vehicle inspection provides a more efficient solution for damage identification of the track, and the deep learning algorithm provides a new method for detection accuracy in the damage detection field. The DETR algorithm shows good performance in a plurality of target detection tasks by means of global modeling capability, and has wide application prospects in rail damage detection tasks. The model trained by the original DETR algorithm has good effect in a detection scene, but the actual rail damage is more complex, often a plurality of tiny damages are combined together, the model has obvious omission phenomenon when facing the detection scene with complex detection scene and extreme illumination condition, and especially the problem is more obvious when detecting the small target damage, so that the service life of the rail is shortened. Disclosure of Invention Aiming at the defects of the prior art, the invention provides the steel rail surface damage detection method based on unmanned aerial vehicle inspection and improved DETR algorithm, solves the technical problem that the prior art has obvious omission in the detection of complex detection scenes and detection scenes of extreme illumination conditions, and achieves the purposes of realizing the detection of the tiny damage on the steel rail surface and the visualization of the damage area of the steel rail, and improving the accuracy of the detection of the damage on the steel rail surface. In order to solve the technical problems, the invention provides the following technical scheme that the method for detecting the surface damage of the steel rail based on unmanned aerial vehicle inspection and improved DETR algorithm comprises the following steps: The method comprises the steps that under a preset route, a rail surface image is obtained through the flight of a patrol unmanned aerial vehicle along a railway, and pretreatment is carried out to obtain a standard rail image; Carrying out data marking and data enhancement on rail damage in the standard rail image to obtain a rail damage data set; Constructing an improved DETR model for rail damage detection, and training and verifying the improved DETR model by using a rail damage data set to obtain optimal weight parameters; And inputting the standard steel rail image into an improved DETR model for deploying the optimal weight parameters for reasoning, obtaining the boundary frame, the category and the confidence coefficient of the steel rail damage, and calculating the real two-dimensional size of the steel rail damage according to the preset pixel-real size conversion ratio and the camera parameter-rail head width. Further, the improved DETR model comprises: the convolution and attention fusion module is used for extracting local features in the standard steel rail images; Replacing the common convolution in the sampling path of the original DETR model with a double convolution module comprising group convolution and heterogeneous convolution; And replacing the standard upsampler in the original DETR model with a Dysample upsampler that dynamically generates a sampling offset from the input features. Further, the convolution and attention fusion module receives a feature image generated by feature extraction of the standard steel rail image as an input feature image, and sends the feature image into a local branch and a global branch respectively for parallel processing; in the local branch, performing dimension reduction operation on the input feature map through a 1X 1 convolution layer, performing channel scrambling on the input feature map after dimension reduction, inputting a 3X 3 convolution layer, extracting local space detail features of a damaged area in a standard steel rail image, and generating a local branch feature map; in the global branch, an input feature map is processed through a 1X 1 convolution layer, the processed input feature map is respectively processed through three parallel 3X 3 convolution layers to generate a query vector, a key vector and a value vector, matrix multiplication operation is carried out on the query vector and the key vector, attention force map is generated through an activation fu