An improved RT-DETR for steel surface defect detection
Abstract
Reliable identification of steel surface defects plays an important role in industrial inspection, while practical detection remains difficult because of diverse defect appearances, unclear boundaries, weak contrast, and complex background patterns. To address these issues, this paper proposes an improved detection model based on Real-Time Detection Transformer with a ResNet-18 backbone (RT-DETR-R18). First, a Feature Adaptive Enhancement Network (FAENet) is introduced before the backbone. By using a Laplacian pyramid to decompose low-frequency structural information and high-frequency details, FAENet adaptively enhances defect contours, edges, and texture features, thereby improving the quality of input features. Second, an Attention-based Intra-scale Feature Interaction with Dual-Window Multi-Scale Self-Attention (AIFI-DWMMSA) module is designed with a dual-window multi-scale self-attention mechanism. It collaboratively models local textures, multi-scale structures, and long-range dependencies, enhancing the discriminative capability for weak-texture defects, scale-varying defects, and complex background interference. Finally, an Efficient Upsampling Convolution Block (EUCB) is adopted instead of the original upsampling operation to perform lightweight feature refinement, improving the detection capability for defects with blurred boundaries. On the NEU-DET dataset, the proposed method increases mAP50 from 73.64% to 77.66% and mAP50-95 from 42.55% to 44.86%, yielding gains of 4.02 and 2.31 percentage points, respectively. The experimental findings confirm that the improved RT-DETR achieves higher detection accuracy and stronger robustness for steel surface defect detection.