Research on textile defect detection method combining attention mechanism
This paper presents a textile defect detection model called SAAM-YOLOX,which is based on the improved YOLOX.The model aims to address the issues of false positives and false negatives in textile defect detection,particu-larly in detecting Houndstooth and Gingham backgrounds,as well as the problem of overall low detection accuracy.In the feature extraction stage,the model introduces a multi-branch discrete cosine attention mechanism(MDCA)based on the discrete cosine transform to address false positives and false negatives in the Houndstooth and Gingham back-grounds,and thereby improve the detection accuracy.In the feature fusion stage,the SAAM-YOLOX model adopts scale aggregation technology and attention mechanism to construct a scale aggregation attention module(SAAM)to ag-gregate and enhance semantic features of different scales.SAAM uses bilinear interpolation combined with self-atten-tion mechanism to enhance validity of feature information in the upsampling process,further improving the detection ac-curacy.After completing the scale aggregation,an attention module is added to enhance the mixed-scale feature repres-entation,ultimately achieving the goal of improving detection performance.Experimental results demonstrate that the proposed detection model can effectively solve the problem of false positives and false negatives in Houndstooth and Gingham backgrounds,and improve the accuracy of defect detection.