DOI: 10.3390/electronics15215016 ISSN: 2079-9292

KFW-DETR: Research on a Fabric Defect Detection Model Based on RT-DETR

Fuzhe Zhao, Lihai Cao, Wenlin Han

When detecting micro-defects or defect samples with significant dimensional variations in textile defect detection, the localization accuracy of the detection model remains a critical bottleneck hindering the automation upgrade of textile production lines. This paper proposes an improved RT-DETR-based textile defect detection model, termed KFW-DETR. This model first proposes the BKAGN module, which introduces convolutional operations from Kolmogorov–Arnold Networks (KANs) by replacing the 3 × 3 convolutions used in traditional residual networks with KAN convolutions based on the Gram polynomial, thereby enhancing the feature extraction capability of the convolutional kernels. Secondly, we adopt the Focusing Diffusion Pyramid Network (FDPN) to optimize the neck architecture of RT-DETR. The FDPN accepts inputs at three different scales, employs a set of parallel deep convolutional layers to capture rich multi-scale information, and enables the diffusion of features with comprehensive contextual information across all detection scales. Finally, by introducing the non-monotonic focusing mechanism of the Wise-IoUv3 loss function into the GIoU loss, we obtain the Wise-GIoU loss function, which assigns a small gradient gain to prediction boxes containing large outliers, thereby mitigating the negative impact of low-quality anchor boxes on model training. Ablation experiments demonstrate that, compared with the baseline RT-DETR, the proposed model KFW-DETR achieves improvements of 4.7 percentage points (pp) in mAP50 and 4.5 pp in mAP50-95 on the TILDA dataset; on the independent BHDB dataset, whose defect categories differ from those of TILDA, KFW-DETR still achieves improvements of 1.6 pp in mAP50 and 1.7 pp in mAP50-95 after retraining under the same protocol. The results validate the effectiveness of the proposed model for fabric defect detection, particularly demonstrating its significant advantages in detecting micro-defects and performing multi-scale target localization.

More from our Archive