Abstract:Aiming at the traditional yarn-dyed fabric defect detection reconstruction model, there are problems such as difficult to ensure the reconstruction effect of the defective region, missed detection and high false detection rate, an unsupervised teacher-student network yarn-dyed fabric defect detection algo-rithm based on attention residual block guidance is proposed. Firstly, from the perspective of knowledge distillation, a teacher-student model with encoding-decoding structure based on Wide_Resnet50_2 network is designed, and the student network enhances the reconstruction capa-bility by recovering the multi-scale features of the pre-trained teacher network. Secondly, a DARM (Dual Attention Residual Module) is proposed to incorporate dual attention, and the dual weight assignment of feature information can remove the redundant information output from the teacher network, further expand the differences in the representation of defective regions between the teach-er-student network, and improve the defect detection and localization ability of the model. The ex-perimental results show that the proposed algorithm achieves 85.8% AUPRO, 96.3% pixel-level AUROC and 98.3% image-level AUROC on the YDFID-1 dataset, and the proposed algorithm de-creases no more than 4.5% AUPRO and AUROC on the MVTec dataset under the setting of fewer samples condition, and the experimental results validate the algorithm's effectiveness and stability in dealing with the experimental results verify the effectiveness as well as the stability of the algorithm to deal with the problem of color fabric defect detection.