Defect recognition of flat metals is paramount for ensuring quality control during the production process. However, the diverse origins of metal surface damage, ranging from mechanical impacts to chemical corrosion, and the resulting varied morphology and scale of surface defects, particularly numerous microdefects and elongated defects with high aspect ratios, complicate defect recognition. Existing methods fail to select the most beneficial features during extraction and commonly lose critical feature information during gradient sampling. To overcome these challenges, we propose a lightweight network to optimize feature screening for defect recognition. First, we propose a deformable context–guided block that employs deformable convolution to dynamically adapt the perception of the spatial context, providing precise guidance of relevant semantic information in complex surface textures. Second, we develop a content-aware feature compression block that implements adaptive weighting of features, which significantly reduces information loss during the downsampling stage. Finally, we introduce an intra-scale feature interaction transformer block, which optimizes high-order semantic features to enhance the accuracy and reliability of defect detection. Experimental validation on the NEU-DET, APS-DET, and GC10-DET datasets demonstrated significant improvements in the detection accuracy and parameter efficiency, confirming the proposed method's robust generalizability.
Read full abstract