Abstract
In rail damage detection, the scale variation of small targets leads to inaccurate extraction of damage morphology and size features, thereby affecting the reliable identification of damage types. The DETR algorithm has been optimized and improved. Firstly, we introduce the convolution–attention fusion module (CAFMAttention) after the two side convolutional layers of the original algorithm; then, we replace the nn.Upsample-based upsampling layer with the Dysample upsampler. Finally, we replace the Conv modules in the two down-sampled convolutional layers with Dual-Conv modules. The results of the comparative experiments show that the recall rate of the improved DETR model in this paper is 0.698, which is 12.2% higher than that of the original DETR model. The accuracy is 0.815, which is 2.3% higher than that of the original DETR model. The average precision (Map@0.5) is 0.741. Compared with the original DETR model, it has been improved by 8.7%. The F1 score is 0.75, which is 8.7% higher than the original DETR model. The frame per second (FPS) transfer rate is 64.94, which is 2.6% higher than that of the original DETR model. The proposed DETR algorithm can detect rail damage under complex working conditions well, with high accuracy and robustness, and better meet the requirements of practical actual rail detection.