To address the low detection accuracy of existing aluminum-profile surface defect algorithms, an improved YOLOv8s-based model named CDA-YOLOv8 is proposed. The CG Block replaces the original 3 × 3 downsampling convolution, and the Dilation-Wise Residual (DWR) module refines the Bottleneck structure in C2f, enhancing multi-scale feature extraction and small-object detection. To mitigate the loss of micro-defect features, an ASFP2 Detection Layer is constructed by integrating a Small-object Detection Layer with the SSFF module and embedding it into the YOLOv8s Neck. With these improvements, the CDA-YOLOv8 model significantly improves the detection accuracy of aluminum-profile surface defects such as scratches, stains, and paint bubbles. Experiments conducted on an aluminum-profile dataset containing 3,229 images and ten defect categories demonstrate notable performance gains, with mAP@0.5 increasing from 83.7% to 88.1%, confirming the effectiveness of the proposed approach.
Sun et al. (Fri,) studied this question.