Rail Surface Defect Detection Based on Improved YOLOv7
Research purposes:Surface defects of steel rails are important hidden dangers for safe operation of railway traffic,accurate detection of surface defects on steel rails is crucial.The complex environment in which steel rails are in service may cause them to be contaminated with stains,at the same time,the shape of rail defects is often inconsistent.To address the problems of false detection due to stains and difficulty in accurate detection due to different shapes of defects in rail surface defect detection,an improved YOLOv7-based rail surface defect detection method is proposed.Research conclusions:(1)The problem of false detection of stains was overcome by constructing the dataset with images of rails containing stains as negative samples,with the use of label differences to enable the network to learn features that distinguish between defects and stains.(2)YOLOv7 was improved by deformable convolution with an embedded channel attention mechanism.That was,the deformable convolution replaced the fixed convolution by adding a bias to the convolution sampling points to enhance the network's ability to adapt to the geometric deformation of defects.At the same time,the channel attention mechanism was embedded in the network,and its feature of weighting different channel features made the network focus on the defect features,thus enhancing the defect feature extraction ability.(3)The effectiveness and feasibility of the proposed method was demonstrated by loading the rail surface defect dataset onto the constructed improved YOLOv7 network for end-to-end rail surface defect detection.(4)The research can provide a new method for intelligent detection of rail surface defects.