Volume 10,Issue 7
To address challenges in industrial metal surface defect detection, including tiny defects, significant scale variation, and complex backgrounds, this study proposes an enhanced YOLOv8s-based model, termed MEAF-YOLOv8s. Based on the original YOLOv8s architecture, the model introduces several improvements to enhance feature extraction and multi-scale representation. First, a CSP-MSEE module is incorporated in the feature extraction stage to strengthen the capture of edge and detail information of tiny defects, thereby effectively alleviating the problem of insufficient feature representation for small targets. Second, an AFRBN module is introduced to establish long-range spatial dependencies. By leveraging global contextual information, the module suppresses texture background interference, while a re-parameterization strategy is adopted to maintain the lightweight nature of the model and ensure that inference efficiency is not compromised. In addition, a CA-HFPN feature fusion structure is employed, which incorporates a direction-aware coordinate attention mechanism and a hierarchical pyramid architecture to promote precise cross-scale feature alignment and adaptive fusion, thereby improving the model’s adaptability and localization accuracy for defects of different sizes. To evaluate the proposed method, experiments are carried out on seven common defect types collected from real industrial environments. The results indicate that MEAF-YOLOv8s improves mAP50 by 4.72% and mAP50-95 by 1.28%, while decreasing the number of parameters by approximately 5M. These findings confirm that the proposed model can effectively enhance defect detection performance under complex background conditions.