DSAT: a dynamic sparse attention transformer for steel surface defect detection with hierarchical feature fusion - Shouluan Wu; Hui Yang; Liefa Liao; Chao Song; Yating Fang; Jianglong Fu; Tan Li (Scientific Reports)
Abstract The rapid development of industrialization has led to a significant increase in the demand for steel, making the detection of surface defects in steel a critical challenge in industrial quality control. These defects exhibit diverse morphological characteristics and complex patterns, which pose substantial challenges to traditional detection models, particularly regarding multi-scale feature extraction and information retention across network depths. To address these limitations, we propose the Dynamic Sparse Attention Transformer (DSAT), a novel architecture that integrates two key innovations: (1) a Dynamic Sparse Attention (DSA) mechanism, which adaptively focuses on defect-salient regions while minimizing computational overhead; (2) an enhanced SPPF-GhostConv module, which combines Spatial Pyramid Pooling Fast with Ghost Convolution to achieve efficient hierarchical feature fusion. Extensive experimental evaluations on the NEU-DET and GC10-DE datasets demonstrate the superior performance of our approach. On the NEU-DET dataset, DSAT achieved an accuracy of 92.55%, with a mean Average Precision (mAP) of 83.14% at an IoU of 0.5 and 47.37% at an IoU of 0.5:0.95, significantly outperforming existing methods. Similar improvements were observed on the GC10-DE dataset, where the model attained an accuracy of 79.61% and a mAP of 67.27% at an IoU of 0.5, and a mAP of 34.09% at an IoU of 0.5:0.95. Comprehensive ablation studies validated the respective contributions of the DSA mechanism and the SPPF-GhostConv module, while visualization experiments demonstrated the model’s enhanced capability in detecting fine-grained defects. Overall, the proposed DSAT model exhibits significant advantages and potential in the field of steel surface defect detection.