Textile defect detection method

By building a feature extraction network based on YOLOv5 backbone network, introducing a multi-branch discrete cosine attention mechanism module, MUPool pooling method and multi-scale feature fusion module, combined with the CDIoU loss function, the problem that traditional manual detection methods are difficult to meet the quality control needs of textiles is solved, and efficient textile defect detection is achieved.

CN119579536AInactive Publication Date: 2025-03-07YANCHENG LITTLE SHEEP CLOTHING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411636741.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-03-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional manual inspection methods are difficult to meet the challenges of textile quality control under the needs of capacity expansion and refinement, especially when automated visual image analysis technology has not yet been widely used.

Method used

A textile defect detection method is adopted to collect images in real time through visual sensing system, build a feature extraction network based on YOLOv5 backbone network, introduce a multi-branch discrete cosine attention mechanism module (MDCA), adopt MUPool pooling method and multi-scale feature fusion module (ASFF), and use CDIoU loss function to evaluate the similarity between the prediction box and the real box.

Benefits of technology

While ensuring high detection accuracy, it effectively solves the problem of false detection and missed detection of textile defects such as oil stains, black oil needles, bright oil needles, stained yarns, etc., improves the target detection accuracy, enhances the integrity of feature extraction and information retention, and achieves the improvement of textile defect detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119579536A_ABST
    Figure CN119579536A_ABST
Patent Text Reader

Abstract

The invention discloses a textile defect detection method which comprises the following steps: step A, image acquisition: performing real-time and / or timed acquisition on a textile part of a textile needle by virtue of a visual sensing system to acquire images; step B, constructing a feature extraction network: based on a YOLOv5 backbone network, introducing a multi-branch discrete cosine attention mechanism module (MDCA) to form a new backbone network SCNet, and drawing an output feature map of the new backbone network SCNet according to the acquired image; and step C, adopting an MUPool pooling method: a new backbone network SCNet outputs a feature map, important node features are acquired and screened through multi-view map convolution, a cascade structure and a rear-end fusion module, and finally a multi-scale feature map is generated, so that the problems of false detection and missing detection caused by oil stains, black oil needles, bright oil needles and dirty yarns can be solved while relatively high detection precision is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of textile defects, and in particular to a method for detecting textile defects. Background Art

[0002] The textile industry is a traditional industry, and product quality control has always been the top priority of the industry. For a long time, textile quality inspection has mainly relied on experienced operators to complete manual visual inspection. However, with the continuous expansion of the market scale, the production and shipment volume of various textiles have increased rapidly, and the traditional manual inspection method has become unsustainable.

[0003] At the same time, in recent years, machine learning and computer vision technologies represented by deep learning have made great progress, and successful commercial applications in the fields of image processing, computer vision, pattern recognition, etc. have emerged in an endless stream. This makes automated visual image analysis have broad application prospects in the field of quality control. Automatically realizing surface defect detection and classification for textiles of different materials and categories has become a technical problem that needs to be solved urgently.

[0004] Therefore, there is an urgent need for a method that can adapt to the needs of expanding production capacity and refining quality control in the textile industry to solve the above problems. Summary of the invention

[0005] The purpose of the present invention is to overcome the deficiencies of the prior art and to provide a method for detecting textile defects in order to better and more effectively solve the above-mentioned problems.

[0006] In order to achieve the above object, the technical solution adopted by the present invention is:

[0007] A method for detecting defects in textiles comprises the following steps:

[0008] Step A, image acquisition: using a visual sensing system to acquire images in real time and / or at regular intervals from the textile needle and textile part;

[0009] Step B, constructing a feature extraction network: Based on the YOLOv5 backbone network and introducing the multi-branch discrete cosine attention mechanism module MDCA to form a new backbone network SCNet, and according to the collected image, draw the new backbone network SCNet output feature map;

[0010] Step C, using the MUPool pooling method: the new backbone network SCNet outputs feature maps that obtain and filter important node features through multi-view graph convolution, cascade structure, and back-end fusion modules, and finally generates a multi-scale feature map;

[0011] Step D, using the ASFF module to perform multi-scale feature fusion: based on the feature pyramid structure, different downsampling rates are set, and weighted fusion is performed on each multi-scale feature map to generate a fused feature map;

[0012] In step E, the similarity between the predicted box and the true box is evaluated based on the CDIoU loss function.

[0013] Preferably, the YOLOv5 backbone network in step B is specifically composed of a Focus module, 3 CBL modules, 3 CSP modules and an SPP module;

[0014] The input image is first sliced ​​and connected through the Focus layer, and then downsampled through three CBL layers to obtain multiple features of different scales. Figure 1 , where different scale features Figure 1 It includes the main scale feature map 3 and other scale feature map 4. Each CBL is followed by a CSP module. The CSP module introduces a residual structure in the MDCA attention module. SPP performs multi-scale fusion through pooling operations of different sizes.

[0015] Preferably, the multi-branch discrete cosine attention mechanism module MDCA in step B has the following specific steps:

[0016] Step B1, feature map 2 obtained by residual structure, feature map 2 and different scale features Figure 1 Add and use bilinear interpolation to expand the low-scale feature map 2 to the same scale as the main-scale feature map 3;

[0017] Step B2, input the main scale feature map 3 into the self-attention generator to generate the corresponding weight coefficient;

[0018] In step B3, the main scale feature map 3 is combined with the feature map 4 of other scales to generate the final feature map 5, and the model expression ability and performance of the feature map 5 are enhanced.

[0019] Preferably, the feature map 5 in step B3, the model expression ability and performance enhancement includes the following steps:

[0020] Step B31, extract the spatial information of feature map 5 through a multi-branch method, introduce discrete cosine transform DCT in the attention weight SEWeight module, multiply the N input one-dimensional signals by different frequency factors respectively, and add the results to obtain an N-dimensional DCT coefficient vector, in which each element represents the intensity of a frequency component. The specific formula is as follows:

[0021]

[0022] Where H and W are the width and height of the image respectively, u and v are frequency parameters, x is the original data in the spatial domain, B is the transformed frequency data, and GAP is the global average pooling.

[0023] Preferably, the multi-view graph convolution in step C includes the following specific steps:

[0024] Step C1, obtain information from different angles through multi-view graph convolution to improve the completeness of extracted features. The feature extraction method is

[0025]

[0026] Where i is the i-th perspective, is the feature of the l-th layer node, is the edge matrix of the l-th layer graph, is the information of the i-th perspective extracted from the l+1 layer, N l is the number of nodes in the lth layer, d∈R is the hidden layer dimension, σ i is the activation function;

[0027] Step C2, take 3 convolutions, and use the same convolution for each perspective, namely GNN1, GNN2 and GNN3. GNN is the GraphSAGE inductive graph neural network framework. After obtaining multi-perspective feature information, the importance of the nodes is scored and the scores are fused. Then the important nodes are screened and the indexes of the nodes that need to be retained are used. To obtain the node features and edge matrices that need to be retained Finally, the acquired node features and edges are sent to the multi-view module of the next layer.

[0028] Preferably, the ligation structure in step C is specifically comprised of the following steps: l Enter the multi-layer perceptron to generate Will And the node features in step C2 are fused to get Z l .

[0029] Preferably, the cascade structure in step C comprises the following steps:

[0030] Step C3, calculate the first classification result Y l , the specific formula is:

[0031] Y l =Classify(Z i )

[0032] Among them, Classify is the classifier, Z i is the node feature after cascading at the lth layer, is the classification result of the first layer, and c is the number of categories in the data set;

[0033] Step C4, calculate the graph classification result Z, the specific formula is:

[0034]

[0035] h is the number of classifiers, and the classification results of each layer are obtained by back-end fusion method to obtain Z∈R c ;

[0036] Step C5, the classification results are fused at the back end at the decision layer.

[0037] Preferably, in step D, the specific steps of multi-scale feature fusion are as follows:

[0038] Step D1, based on the ASFF spatial adaptive network, in the feature pyramid FPN structure, three downsampling multiples of 32, 16, and 8 are set, and Level 1, Level 2, and Level 3 are generated to generate feature maps 6 with different resolutions;

[0039] Step D2, reshape the feature maps of Level 1 and Level 2 into the scale of Level 3, concatenate the features of Level 1, Level 2 and Level 3 through the convolution compression channel, and perform Softmax weighting, and perform weighted summation on the features according to the weights to obtain the ASFF features;

[0040] Step D3, ASFF is integrated into the feature fusion network of the YOLOv5 backbone network, and the output feature map 7 of FPN is sent to the ASFF module as input for cross-scale fusion. The features output by each layer of Level1, Level2 and Level3 are obtained through the output weights of Level1 and Level2, and then adaptively weighted fusion is performed to obtain the three-layer features of Level1, Level2 and Level3 in feature map 8, which are sent to the Head network for classification and regression.

[0041] The beneficial effects of the present invention are:

[0042] 1. By introducing the MDCA module, it can solve the problems of false detection and missed detection of oil stains, black oil needles, bright oil needles and stained yarns while ensuring high detection accuracy;

[0043] 2. Introduce residual structure in MDCA attention module to improve target detection accuracy;

[0044] 3. The multi-view and back-end fusion modules can solve the problem of incomplete node information extraction, and the cascade module can solve the problem of information loss;

[0045] 4. By combining FPN and ASFF, the two feature fusion schemes are introduced to enable the network to obtain richer features as much as possible for target detection, thereby improving detection accuracy;

[0046] 5. The CDIoU loss function is introduced to evaluate the similarity between the predicted box and the true box, thereby improving the accuracy of textile defect detection without increasing the computational cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is the prediction box change trend under CDIoU loss of the textile defect detection method in the present invention. DETAILED DESCRIPTION

[0048] The present invention will be further described below in conjunction with the accompanying drawings.

[0049] like Figure 1 As shown, a textile defect detection method of the present invention comprises the following steps:

[0050] Step A, image acquisition: using a visual sensing system to acquire images in real time and / or at regular intervals from the textile needle and textile part;

[0051] Step B, constructing a feature extraction network: Based on the YOLOv5 backbone network and introducing the multi-branch discrete cosine attention mechanism module MDCA to form a new backbone network SCNet, and according to the collected image, the new backbone network SCNet outputs a feature map;

[0052] Among them, this method can retain information of a specific scale and improve model performance, while avoiding the problem of losing details and blurring, ensuring the effectiveness of feature information after bilinear interpolation, and improving the performance and accuracy of the model.

[0053] Step C, using the MUPool pooling method: the feature map output by the new backbone network SCNet obtains and filters important node features through multi-view graph convolution, cascade structure and back-end fusion module, and finally generates a multi-scale feature map;

[0054] Step D, using the ASFF module to perform multi-scale feature fusion: based on the feature pyramid structure, different downsampling rates are set, and weighted fusion is performed on each multi-scale feature map to generate a fused feature map;

[0055] Step E, evaluate the similarity between the predicted box and the true box based on the CDIoU loss function;

[0056] Among them, reference Figure 1In view of the large differences in the morphology and scale of textile defects, the CDIoU loss function is introduced to evaluate the similarity between the predicted box and the real box. Compared with the CIoU loss, there is one more item. After back propagation, the model tends to pull the four vertices of the predicted box to the four vertices of the real box until they overlap. The accuracy of textile defect detection is improved without increasing the computational cost.

[0057]

[0058] L CDIoU =L CIoU +λ*dis

[0059] Among them, b and b gt Represents the center point of the predicted box and the true box; ρ 2 represents the Euclidean distance between two points; c represents the diagonal distance of the minimum closure area that can simultaneously contain the predicted box and the true box, w gt ,h gt represents the real box width and height; w, h represent the predicted box width and height; λ represents the dis penalty weight function.

[0060] Specifically, the YOLOv5 backbone network in step B is composed of a Focus module, three CBL modules, three CSP modules and an SPP module;

[0061] The input image is first sliced ​​and connected through the Focus layer, and then downsampled through three CBL layers to obtain multiple features of different scales. Figure 1 , where different scale features Figure 1 It includes three main-scale feature maps and four other-scale feature maps. Each CBL is followed by a CSP module. The CSP module introduces a residual structure in the MDCA attention module. The SPP performs multi-scale fusion through pooling operations of different sizes.

[0062] Among them, the CSP module introduces a residual structure in the MDCA attention module to increase the gradient value of back propagation between layers to prevent the gradient from disappearing. This layer is mainly used to extract defect features. SPP performs multi-scale fusion through pooling operations of different sizes to increase the model's receptive field. The CSP module is used to extract the feature information of this layer, and the SPP module is used to improve the model's feature extraction capability and improve target detection accuracy.

[0063] Specifically, the multi-branch discrete cosine attention mechanism module MDCA in step B has the following specific steps:

[0064] Step B1, feature map 2 obtained by residual structure, feature map 2 and different scale features Figure 1Add and use bilinear interpolation to expand the low-scale feature map 2 to the same scale as the main-scale feature map 3;

[0065] Step B2, input the main scale feature map 3 into the self-attention generator to generate the corresponding weight coefficient;

[0066] In step B3, the main scale feature map 3 is combined with the feature map 4 of other scales to generate the final feature map 5, and the model expression ability and performance of the feature map 5 are enhanced.

[0067] Specifically, the feature map 5 in step B3, the model expression ability and performance enhancement include the following steps:

[0068] Step B31, extract the spatial information of feature map 5 through a multi-branch method, introduce discrete cosine transform DCT in the attention weight SEWeight module, multiply the N input one-dimensional signals by different frequency factors respectively, and add the results to obtain an N-dimensional DCT coefficient vector, in which each element represents the intensity of a frequency component. The specific formula is as follows:

[0069]

[0070] Where H and W are the width and height of the image respectively, u and v are frequency parameters, x is the original data in the spatial domain, B is the transformed frequency data, and GAP is the global average pooling.

[0071] Specifically, the multi-view graph convolution in step C has the following steps:

[0072] Step C1, obtain information from different angles through multi-view graph convolution to improve the completeness of extracted features. The feature extraction method is

[0073]

[0074] Where i is the i-th perspective, is the feature of the l-th layer node, is the edge matrix of the l-th layer graph, is the information of the i-th perspective extracted from the l+1 layer, N l is the number of nodes in the lth layer, d∈R is the hidden layer dimension, σ i is the activation function;

[0075] Step C2, take 3 convolutions, and use the same convolution for each perspective, namely GNN1, GNN2 and GNN3. GNN is the GraphSAGE inductive graph neural network framework. After obtaining multi-perspective feature information, the importance of the nodes is scored and the scores are fused. Then the important nodes are screened and the indexes of the nodes that need to be retained are used. To obtain the node features and edge matrices that need to be retained Finally, the acquired node features and edges are sent to the multi-view module of the next layer.

[0076] Specifically, the cascade structure in step C includes the following steps: l Enter the multi-layer perceptron to generate Will And the node features in step C2 are fused to get Z l .

[0077] Specifically, the cascade structure in step C has the following steps:

[0078] Step C3, calculate the first classification result Y l , the specific formula is:

[0079] Y l =Classify(Z i )

[0080] Among them, Classify is the classifier, Z i is the node feature after cascading at the lth layer, is the classification result of the first layer, and c is the number of categories in the data set;

[0081] Step C4, calculate the graph classification result Z, the specific formula is:

[0082]

[0083] h is the number of classifiers, and the classification results of each layer are obtained by back-end fusion method to obtain Z∈R c ;

[0084] Step C5, the classification results are fused at the back end at the decision layer.

[0085] Specifically, in step D, the specific steps of multi-scale feature fusion are as follows:

[0086] Step D1, based on the ASFF spatial adaptive network, in the feature pyramid FPN structure, three downsampling multiples of 32, 16, and 8 are set, and Level 1, Level 2, and Level 3 are generated to generate feature maps 6 with different resolutions;

[0087] Step D2, reshape the feature maps of Level 1 and Level 2 into the scale of Level 3, concatenate the features of Level 1, Level 2 and Level 3 through the convolution compression channel, and perform Softmax weighting, and perform weighted summation on the features according to the weights to obtain the ASFF features;

[0088] Among them, X 1→3, X 2→3 , X 3→3 Represents the weights α from Level1, Level2, and Level3 layers respectively 3 , β 3 , γ 3 First, reshape the first layer, the second layer Level1, and Level2 to make them uniform in scale, and then get X 1→3 , X 2→3 , X 3→3 That is, the weight α 3 , β 3 , γ 3 , then use the convolution with a convolution kernel size of 3x3 to compress the channel to 16, and after splicing the three layers of features along the channel, compress the channel to 8 through the convolution block with a convolution kernel size of 3x3, and finally input this result into the Softmax layer to obtain the weights in the interval range [0, 1], and finally obtain the weights of the three different levels of features, and the weighted sum is obtained to obtain ASFF. The ASFF fusion formula for the third layer of features is ASFF3=X 1→3 ×α 3 +X 2→3 ×β 3 +X 3→3 ×γ 3 ASFF can not only complete the global fusion of different features, but also judge the importance of features in a weighted manner, strengthen the integration of useful features, and weaken the integration of redundant and invalid features. ASFF is integrated into the feature fusion network of the original YOLOv5, and the output feature map of FPN is sent as input to the ASFF module for cross-scale fusion. The output features of each layer are passed through the other two layers to obtain the output weight, and then adaptively weighted fusion is performed. Finally, the obtained three-layer features are sent to the Head network for classification and regression. Through the combination of the two feature fusion schemes, the network can obtain richer features as much as possible for target detection, thereby improving the detection accuracy.

[0089] Step D3, ASFF is integrated into the feature fusion network of the YOLOv5 backbone network, and the output feature map 7 of FPN is sent to the ASFF module as input for cross-scale fusion. The features output by each layer of Level1, Level2 and Level3 are obtained through the output weights of Level1 and Level2, and then adaptively weighted fusion is performed to obtain the three-layer features of Level1, Level2 and Level3 in feature map 8, which are sent to the Head network for classification and regression.

[0090] In order to better illustrate the beneficial effects of the present invention, two specific embodiments and comparative examples of the present invention are described below:

[0091] Example 1

[0092] A textile defect detection method is applied on the production line of a textile factory

[0093] Steps:

[0094] Image acquisition: Using a high-resolution camera, 5000 fabric images were collected.

[0095] Feature extraction: Apply the SCNet network and combine it with the MDCA module for feature extraction.

[0096] MUPool pooling: Multi-view graph convolution filters out important feature nodes.

[0097] Multi-scale fusion: Use the ASFF module to weightedly fuse features.

[0098] Defect detection: Optimize the detection box through the CDIoU loss function.

[0099] Example 2

[0100] A textile defect detection method is applied to test textile samples of different materials in a laboratory environment

[0101] Steps:

[0102] Sample preparation: including 3000 samples of different materials and colors.

[0103] Image processing: SCNet network for feature extraction.

[0104] MUPool pooling: Enhanced adaptability to complex backgrounds.

[0105] Multi-scale fusion: ensuring the fusion of material features.

[0106] Result evaluation: Use CDIoU loss function.

[0107] Comparative Example 1

[0108] The same test was performed using the traditional YOLOv5 model.

[0109] Steps:

[0110] Image acquisition: 5000 images were also collected.

[0111] Feature extraction: Use the standard YOLOv5 network.

[0112] Detection process: no multi-scale fusion and CDIoU optimization.

[0113] The obtained data are shown in Table 1

[0114] Detection accuracy False positive rate Missed detection rate Example 1 96% 2% 2% Example 2 94% 3% 3% Comparative Example 82% 10% 8%

[0115] Table 1

[0116] In summary, the textile defect detection method of the present invention has the following beneficial effects:

[0117] 1. By introducing the MDCA module, it can solve the problems of false detection and missed detection of oil stains, black oil needles, bright oil needles and stained yarns while ensuring high detection accuracy;

[0118] 2. Introduce residual structure in MDCA attention module to improve target detection accuracy;

[0119] 3. The multi-view and back-end fusion modules can solve the problem of incomplete node information extraction, and the cascade module can solve the problem of information loss;

[0120] 4. By combining FPN and ASFF, the two feature fusion schemes are introduced to enable the network to obtain richer features as much as possible for target detection, thereby improving detection accuracy;

[0121] 5. The CDIoU loss function is introduced to evaluate the similarity between the predicted box and the true box, thereby improving the accuracy of textile defect detection without increasing the computational cost.

[0122] The above shows and describes the basic principles, main features and advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A method for detecting textile defects, characterized in that: The following steps are included: Step (A), image acquisition: using a visual sensing system to acquire images in real time and / or at regular intervals from the textile needle and textile part; Step (B), constructing a feature extraction network: Based on the YOLOv5 backbone network and introducing the multi-branch discrete cosine attention mechanism module MDCA to form a new backbone network SCNet, and according to the collected image, draw the new backbone network SCNet output feature map; Step (C) uses the MUPool pooling method: the new backbone network SCNet outputs feature maps that obtain and filter important node features through multi-view graph convolution, cascade structure, and back-end fusion modules, and finally generates a multi-scale feature map; Step (D): Use the ASFF module to perform multi-scale feature fusion: Based on the feature pyramid structure, different downsampling rates are set, and weighted fusion is performed on each multi-scale feature map to generate a fused feature map; Step (E), the similarity between the predicted box and the true box is evaluated based on the CDIoU loss function.

2. A textile defect detection method according to claim 1, characterized in that: The YOLOv5 backbone network in step (B) is specifically composed of a Focus module, three CBL modules, three CSP modules and an SPP module; Among them, the input image is first sliced ​​and connected through the Focus layer, and then the input features are downsampled through 3 CBLs to obtain multiple feature maps of different scales. The different scale feature maps include the main scale feature map 3 and the other scale feature map 4. Each CBL is followed by a CSP module. The CSP module introduces a residual structure in the MDCA attention module. SPP performs multi-scale fusion through pooling operations of different sizes.

3. A textile defect detection method according to claim 1, characterized in that: The multi-branch discrete cosine attention mechanism module MDCA in step (B) has the following specific steps: Step (B1), feature map 2 is obtained through the residual structure, feature map 2 is added to feature map 1 of different scales, and bilinear interpolation is used to expand the low-scale feature map 2 to the same scale as the main-scale feature map 3; Step (B2), input the main scale feature map 3 into the self-attention generator to generate the corresponding weight coefficient; Step (B3) combines the main scale feature map 3 with the feature map 4 of other scales to generate the final feature map 5, and enhances the model expression ability and performance of the feature map 5.

4. A textile defect detection method according to claim 3, characterized in that: The feature map 5 in step (B3), the model expression ability and performance enhancement include the following steps, Step (B31) extracts the spatial information of feature map 5 through a multi-branch method, introduces discrete cosine transform DCT in the attention weight SEWeight module, multiplies the N input one-dimensional signals by different frequency factors, and adds the results to obtain an N-dimensional DCT coefficient vector, in which each element represents the intensity of a frequency component. The specific formula is as follows: Where H and W are the width and height of the image respectively, u and v are frequency parameters, x is the original data in the spatial domain, B is the transformed frequency data, and GAP is the global average pooling.

5. A textile defect detection method according to claim 1, characterized in that: The multi-view graph convolution in step (C) is as follows: Step (C1) obtains information from different angles through multi-view graph convolution to improve the completeness of extracted features. The feature extraction method is: Where i is the i-th perspective, is the feature of the l-th layer node, is the edge matrix of the l-th layer graph, is the information of the i-th perspective extracted from the l+1 layer, N l is the number of nodes in the lth layer, d∈R is the hidden layer dimension, σ i is the activation function; Step (C2) takes three convolutions, and the same convolution is used for each perspective, namely GNN1, GNN2 and GNN3. GNN is a GraphSAGE inductive graph neural network framework. After obtaining multi-perspective feature information, the importance of the nodes is scored and the scores are fused. Then the important nodes are screened and the index of the nodes to be retained is used. To obtain the node features and edge matrices that need to be retained Finally, the acquired node features and edges are sent to the multi-view module of the next layer.

6. A textile defect detection method according to claim 1, characterized in that: The cascade structure in step (C) comprises the following steps: l Enter the multi-layer perceptron to generate Will And the node features in step (C2) are fused to get Z l .

7. A textile defect detection method according to claim 1, characterized in that: The cascade structure in step (C) comprises the following steps: Step (C3), calculate the first classification result Y l , the specific formula is: Yl=Classify(Zi) Among them, Classify is the classifier, Z i is the node feature after cascading at the lth layer, is the classification result of the first layer, and c is the number of categories in the data set; Step (C4), calculate the graph classification result Z, the specific formula is: h is the number of classifiers, and the classification results of each layer are obtained by back-end fusion method to obtain Z∈Rc; Step (C5), the classification results are fused at the back end at the decision layer.

8. A textile defect detection method according to claim 1, characterized in that: Step (D), the specific steps of multi-scale feature fusion are as follows: Step (D1), based on the ASFF spatial adaptive network, in the feature pyramid FPN structure, three downsampling multiples of 32, 16, and 8 are set, and Level 1, Level 2, and Level 3 are generated to generate feature maps 6 with different resolutions; Step (D2), reshape the feature maps of Level 1 and Level 2 into the scale of Level 3, concatenate the features of Level 1, Level 2 and Level 3 through the convolution compression channel, perform Softmax weighting, and perform weighted summation on the features according to the weights to obtain the ASFF features; Step (D3), ASFF is integrated into the feature fusion network of the YOLOv5 backbone network, and the output feature map 7 of FPN is sent to the ASFF module as input for cross-scale fusion. The features output by each layer of Level1, Level2 and Level3 are obtained through the output weights of Level1 and Level2, and then adaptively weighted fusion is performed to obtain the three-layer features of Level1, Level2 and Level3 in feature map 8, which are sent to the Head network for classification and regression.