Lightweight color-difference defect detection for printed fabrics based on multicolor-space feature fusion
Abstract
Color-difference defects in printed fabrics usually appear as subtle local shifts in hue or brightness, with weak boundaries and high texture similarity to normal patterns. Direct detection in the RGB space is therefore vulnerable to pattern texture and illumination disturbance. To address this problem, this paper proposes a lightweight detection method based on multicolor-space feature fusion. Using YOLOv8n as the baseline, the input image is transformed into Lab and HSV spaces; the Lab a/b channels and the HSV H channel are extracted as an auxiliary color branch, and a channel-attention mechanism adaptively fuses RGB texture features with color-sensitive features. Depthwise separable convolutions are introduced into the backbone to control model complexity. The Tianchi fabric defect dataset is treated as the main experimental dataset, and the AFID/AITEX public dataset is used for cross-domain validation. The parsed AFID data contain 247 image annotations, 117 pixel-level defect objects, and 12 defect classes, with 237 locally readable images. The statistical analysis indicates that AFID is dominated by structural and near-grayscale defects; it is therefore suitable for cross-domain structural validation, while the performance of color-difference detection should be evaluated on the color-difference category of the Tianchi dataset. In the revised version, a quantitative validation section is added: on the AFID validation split, the complete YOLOv8n+Lab/HSV+Attention variant reaches Precision 0.846, Recall 0.801, mAP@0.5 0.842, and mAP@0.5:0.95 0.501, while keeping the parameter count at 2.91M.