CMA-YOLO: a context-aware multiscale attention model for steel surface defect detection
Abstract
Steel surface defect detection is a critical task for quality control in intelligent manufacturing. In industrial scenarios, steel defects are commonly small in size, accompanied by complex background textures and large inter-class differences. These characteristics reduce the detection precision and robustness of conventional detectors. To tackle these problems, this paper proposes Context-aware Multi-scale Attention YOLO (CMA-YOLO), a detector developed on the basis of YOLO11. Firstly, the SPPELAN module is adopted in the backbone to optimize the spatial pyramid structure, strengthen multiscale context aggregation, and improve feature expression under complex backgrounds. Secondly, Bottleneck modules are integrated into the feature fusion stage to enhance cross-scale semantic transmission and suppress redundant feature interference. Thirdly, the C3k2ECA module is embedded into deep backbone layers to highlight defect-related features via an efficient channel attention mechanism, thus improving the detection ability of small and weak-texture defects. Experimental results on the NEU-DET dataset illustrate that the proposed method achieves 78.9% mAP and 479.6 FPS. CMA-YOLO maintains a favorable balance between detection accuracy and speed, and shows strong application potential for steel surface defect inspection in actual industrial production lines.