| With the vigorous development of high-speed railway transportation at home and abroad,potential safety hazards in railway infrastructure equipment are becoming increasingly prominent.Among them,under the high-speed operation of the railway,the surface of the rail is in direct contact with the high-speed train,which is easy to cause damage and lead to safety accidents.At present,the existing rail surface detection methods mainly adopt physical detection methods and manual methods,which have a series of problems such as detection blind spots,missed detection,and slow detection speed to a certain extent.With the development of deep learning,a series of excellent rail surface defect detection algorithms have been shaped.However,there are still problems such as the small sample of defects and the unpredictability of defects.In order to solve the above problems,this thesis aims at the rail surface and uses the convolutional neural network as the basis to study the rail surface defect detection algorithm.(1)This thesis designs a rail surface area extraction algorithm based on improved the LSD linear detection,and makes a dataset in a real scenario by extracting rail area from the self-mined rail panoramic image.The algorithm first pre-crops the panoramic image,then uses Edge Drawing to extract the edge information of the image,and then extracts the line information based on the detection algorithm of the LSD based on the collected edge information.To obtain more detailed edge information,the Gaussian filter in the Edge Drawing algorithm is replaced with an adaptive Gaussian filter.Finally,the straight-line detection results are integrated projection,and the rail surface area image is screened out according to the rail width and rail alternative set calculation.The extracted rail surface image provides an experimental basis for the subsequent detection algorithm in real scenarios.(2)In order to address the difficulty of obtaining rail defect images,the wide range of defect types and the unpredictability of defects,a rail surface defect detection algorithm based on self-supervision method is designed,which is an unsupervised detection algorithm.Firstly,the image is divided into patches of the same size to extract the image more finely,and an encoder is trained by using the convolutional neural network,mapping the data features of each patch block to different hyperspheres.Then,self-supervised learning is used to predict the relative position of the two patch blocks,making the semantic information of each patch block coherent in the whole image.Finally,hierarchical coding and multi-scale detection are used to reduce the impact of different defect scales and detect rail surface defects.Experimental analysis shows that the proposed algorithm has good performance on the three datasets,with defect detection results reaching 97.2% and defect segmentation results reaching97.1%.(3)In order to improve the detection speed of unsupervised rail surface defects,this thesis proposes a multi-scale cross fast flow model-based rail surface defect detection algorithm.Firstly,pre-trained models are used to extract multi-scale features,which ensures the extraction effect of image features.Then,the cross-scale model normalizes the scale,and the probability distribution estimation of the image density is performed by using the fast flow model to obtain the standard Gaussian distribution of the image.Finally,the anomaly score of the defect is obtained by calculating the distance from the center of distribution.The comparative test results show that the proposed method can improve the image-level detection effect by at least 0.93%~19%,and the defect pixel-level detection by at least 1.8%~19.47%,and the detection speed of each picture also has different amplitudes of 0.13s~0.43 s. |