Multi-Attention Collocation of the Textile Defects Detection Method
Han Yan* and Hongge Yao
College of Computer Science & Engineering, Xi’an Technological University, China
Submission: November 19, 2022; Published: January 04, 2023
*Corresponding author: Han Yan, College of Computer Science & Engineering, Xi’an Technological University, China
How to cite this article: Han Y, Hongge Y. Multi-Attention Collocation of the Textile Defects Detection Method. Curr Trends Fashion Technol Textile Eng. 2023; 7(5): 555723. DOI: 10.19080/CTFTTE.2023.07.555723
Abstract
The article is dedicated to a method of “multi-attention mechanism” collocation to improve the detection ability of neural networks for textile defects. The “multi-attention mechanism” that combines channel attention and spatial attention in neural networks is presented to improve the feature extraction ability of defects. The results indicate that this method has a high detection rate for difficult-to-detect samples such as small defects, uneven density defects, and easily confused defects, among which the detection rate of stains, weft defects, and holes can reach more than 75%, and the detection rate of edge, erase and weave can reach more than 90%.
Introduction
Textile defect detection is an important part of the production and quality management of the textile industry, the use of deep learning algorithms [1], instead of manual can achieve faster and more accurate detection of textile defects. The core of fabric defect detection is feature extraction. In this article, a multi-attention feature extraction method [2,3], is used to improve the feature extraction ability of textile defects, and to improve the efficiency of textile defect identification. The multi-attention module, as shown in Figure 1, includes channel attention and spatial attention. Channel attention can obtain “which feature map is the key point”, while spatial attention can obtain “which part is the key point in the feature map” [4]. This article combined both “attentions” to enhance the representational capacity of the network for defects.
Experimental Section
To add a “multi-attention mechanism” in the neural network, the following two groups of experiments were designed. The first group of experiments is a channel and spatial attention collocation; the second group of experiments is stage selection.
Channel attention matches spatial attention
The attention mechanism is usually added to the feature extraction part of the neural network [5], which can enhance the defect feature information and suppress the non-defect information. Because the sequence combination of the collocation of space and channel attention and the cooperation with convolution operation has a certain influence on the recognition results, this article designs the following comparative experiments on the sequence of channel and space collocation according to the textile defect recognition rate. The experimental results are shown in Figure 2, in which, the abscissa A-G represents the collocation plans: A: without attention mechanism; B: convolution-channel attention-convolution-spatial attention; C: convolution-spatial attention-convolution-channel attention; D: convolution-channel attention-spatial attention-convolution; E: convolution-spatial attention-channel attention-convolution; F: convolution-spatial attention-channel attention; G: convolution-channel attention-spatial attention. The ordinate represents the accuracy (ACC), true positive rate (TPR), false positive rate (FPR), and precision (PPV).
In Figure 2, according to the matching sequence of convolution-channel attention spatial attention, the ACC, PPV, and TPR indexes are the highest at 0.9091, 0.9249, and 0.9492, respectively, and FPR is lowest at 0.1667, so the matching of the convolution-channel attention spatial attention is the most ideal one [6]. This is because after extracting the fabric defect features by convolution, the global defect features should be highlighted first, which is helpful to find all the defects. Then the local defect features are highlighted, which can fully display each defect. The order of convolution-channel attention-spatial attention is exactly in this order to highlight the defective features. So, this order of collocation is ideal. The experiment also proves this.
Effectiveness of collocation
To verify the effectiveness of adding a “multi-attention mechanism” to the neural network system, the feature maps of the intermediate process of the “multi-attention mechanism “ were visualized. Figure 3 shows inputting an image and conducting channel attention, the refined feature map R′ can be obtained. After carrying out spatial attention, the ultimate refined feature map R′′ can be obtained. It is known from the R′′ that the “multiattention mechanism” can enhance features and suppress nondefects features.
Multi-category defects recognition effect
Multiple defects of different types existing in one fabric image were detected. In Figure 4, all four pictures contain multiple defects of many different types.
Figure 4 shows that the recognition of tucked-in selvage and bruise holes is 0.90 and 0.99, respectively; The recognition of pricking holes and bruise holes is 0.79 and above 0.97, respectively; The recognition of missing picks and gout is 0.82 and 0.97, respectively; The recognition of bruise holes and stains is 0.94 and 0.75, respectively. This indicates that this method can effectively detect multi-type defect positions and defect types, accurately extracting all types of defect features and recognizing defect types.
Conclusion
Aiming at the characteristics of textile defects, a method of fusing a multi-attention is proposed to detect them. Experiments showed that the method in this article had strong detection ability for textile defects, which was manifested as strong detection ability for difficult detection, especially for confusing defects, and clear classification. It meets the requirements of practical application.
References
- Lecun Y, Bengio Y, Hinton G (2015) Deep learning. Nature 521(7553): 436-444.
- He K, Gkioxari G, Dollar P, Girshick R (2017) Mask R-CNN. IEEE Transactions on Pattern Analysis & Machine Intelligence 99: 1.
- Ren S, He K, Girshick R, Sun J (2015) Faster R-CNN: towards real-time object detection with region proposal networks
- Woo S, Park J, Lee JY, Kweon IS (2018) Cbam: Convolutional block attention module[C]//Proceedings of the European conference on computer vision (ECCV) 3-19.
- Fei W, Jiang M, Chen Q, Yang S, Li C, et al. (2017) Residual Attention Network for Image Classification.
- Yao H, Na Q, Zhu S, Lin M, Yu J (2022) Fabric defect detection with an attention mechanism based on hard sample training. Textile Research Journal 92(9-10): 1429-1443.