Fabric defect intelligent identification method fusing semantic segmentation network and fuzzy decision
By combining the improved U-Net network and fuzzy decision system, and utilizing the spatial and temporal information of fabric images, the problem of low accuracy in fabric defect identification was solved, and fast and accurate defect judgment was achieved.
Patent Information
- Application Number
- CN202311367645.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-22
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2043-10-22
AI Technical Summary
Existing technologies for fabric defect identification suffer from low accuracy and fail to effectively utilize the spatial and temporal information of fabric images.
An improved U-Net network is used for semantic segmentation, combined with a fuzzy decision system, to make decisions using longitudinal temporal and lateral spatial information, and to judge defects through membership functions and fuzzy rules.
It improves the accuracy and efficiency of fabric defect identification, solves the problem of low identification accuracy in existing technologies, and achieves fast and accurate defect judgment.
Smart Images

Figure CN117474844B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of fabric surface defect detection technology, specifically involving an intelligent fabric defect recognition method that integrates semantic segmentation networks and fuzzy decision-making. Background Technology
[0002] Fabric defects refer to imperfections or flaws on the surface of textiles that affect their appearance, quality, function, and performance. These defects can be caused by poor quality raw materials, substandard textile equipment, problems in the production process, or operator errors. Surface defects on the fabric weaken its quality and appearance.
[0003] Traditional fabric defect identification relies on human or machine vision to detect and identify surface defects, which is not only costly in terms of manpower and resources but also often suffers from low accuracy. Therefore, with the rapid development of information technology and artificial intelligence, deep learning-based automatic detection and identification has gradually become the mainstream approach. Semantic segmentation, a crucial method in image processing, offers significant advantages over object detection when handling fabric images with highly specific aspect ratios. However, current deep learning-based semantic segmentation methods simply use the acquired fabric image at the current moment to obtain segmentation results. Improvements to the segmentation results typically focus solely on enhancing the semantic segmentation network, without considering how to utilize the spatial and temporal information of the fabric image to improve the prediction method. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a method for intelligent identification of fabric defects that integrates semantic segmentation network and fuzzy decision-making. Based on the identification of fabric surface defects through semantic segmentation network, the method then uses fuzzy decision-making system to make intelligent decisions on the identification results, thereby quickly and accurately obtaining the judgment result of fabric surface defects.
[0005] To address the aforementioned technical problems, this invention provides an intelligent fabric defect identification method integrating semantic segmentation networks and fuzzy decision-making. The method includes: real-time acquisition of fabric surface images; image scaling processing of the fabric surface images at the current and previous times in a computer, followed by inputting the images into an improved U-Net network to obtain prediction results with semantic information at the current and previous times, respectively; and then inputting the prediction results at the current and previous times together into a fuzzy decision-making system to obtain a judgment result on whether there are defects on the fabric surface at the current time.
[0006] As an improvement to the intelligent fabric defect recognition method that integrates semantic segmentation networks and fuzzy decision-making of the present invention:
[0007] The fuzzy decision system includes a vertical temporal decision subsystem and a horizontal spatial decision subsystem;
[0008] The prediction results at the current moment and the prediction results at the previous moment are respectively mapped to the number of defective semantic pixels into the membership values at the current moment and the previous moment through the membership function, and are used as the input of the fuzzy rules of the temporal decision subsystem. The output of the temporal decision subsystem is used as the input of the fuzzy rules of the spatial decision subsystem.
[0009] As a further improvement to the intelligent fabric defect recognition method that integrates semantic segmentation networks and fuzzy decision-making of the present invention:
[0010] The improved U-Net network is based on the U-Net network and includes an encoder and a decoder. The encoder mainly consists of four nested convolutional modules and downsampling modules, followed by a convolutional module. The decoder mainly consists of four nested upsampling modules and convolutional modules, followed by a convolutional layer.
[0011] The convolution module first performs two convolution operations, and then performs edge filling in a mirror-symmetric manner after each convolution.
[0012] The downsampling module uses convolution instead of max pooling for downsampling;
[0013] The upsampling module uses the nearest neighbor interpolation method.
[0014] As a further improvement to the intelligent fabric defect recognition method that integrates semantic segmentation networks and fuzzy decision-making of the present invention:
[0015] The membership function is:
[0016] f S (x)=g(x,-0.025,400) (4)
[0017] f M (x)=g(x,0.025,400)-g(x,-0.025,800) (5)
[0018] f B (x)=g(x,0.025,800) (6)
[0019] Where x is the number of defective pixels, f S (x), f M (x) and f B (x) represent the membership functions of the fuzzy sets S, M, and B in the input domain, respectively. a and c are the parameters of the sigmoid membership function;
[0020] F S(x)=g(x,-25,0.3) (7)
[0021] F M (x)=g(x,25,0.3)-g(x,-25,0.7) (8)
[0022] F B (x)=g(x,25,0.7) (9)
[0023] Among them, F S (x), F M (x) and F B (x) corresponds to the membership functions of the fuzzy sets S, M, and B in the output domain, respectively.
[0024] As a further improvement to the intelligent fabric defect recognition method that integrates semantic segmentation networks and fuzzy decision-making of the present invention:
[0025] The fuzzy rules of the time-series decision subsystem are shown in the table below:
[0026]
[0027] in, The prediction result at the current moment. The prediction result for the previous moment, y i This is the output.
[0028] As a further improvement to the intelligent fabric defect recognition method that integrates semantic segmentation networks and fuzzy decision-making of the present invention:
[0029] The fuzzy rules of the spatial decision-making subsystem are as follows:
[0030] if any(y i is B), then y final is B;
[0031] if num(y i If M)≥2, then y final is B;
[0032] if num(y i if S)≥5, then y final is B;
[0033] if any(y i is M), then y final is M;
[0034] if num(y i if S)≥2, then yfinal is M;
[0035] otherwise, y final is S.
[0036] In this context, any(·) means that as long as one image within the parentheses meets the condition, it is acceptable; and num(·) represents the number of images within the parentheses that meet the condition.
[0037] The beneficial effects of this invention are mainly reflected in:
[0038] 1. This invention improves the existing U-Net network by adding edge padding, making it easier for the network to calculate the loss function and iterate backpropagation; without changing the number of network layers, it improves the network's ability to identify small vertical defects by replacing pooling with convolution.
[0039] 2. This invention utilizes a fuzzy decision system to fully leverage the lateral distribution information and longitudinal temporal information of multiple cameras in an actual visual acquisition system, effectively improving the accuracy of fabric defect identification.
[0040] 3. This invention proposes a solution for effectively integrating network models and knowledge models, which solves the difficulty of integrating knowledge information with data models in practical applications and provides a new approach for building a defect recognition system based on machine vision. Attached Figure Description
[0041] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0042] Figure 1 This is a schematic diagram of the existing U-Net network before the improvement of this invention;
[0043] Figure 2 This is a schematic diagram of the structure of the improved U-Net network of the present invention;
[0044] Figure 3 A top view of the camera arrangement used for acquiring fabric surface images according to the present invention;
[0045] Figure 4 This is a schematic diagram of the fuzzy decision system of the present invention;
[0046] Figure 5 A schematic diagram of the fuzzy set partitioning of the input variables of the fuzzy decision system of the present invention;
[0047] Figure 6 This is a schematic diagram of the fuzzy set partitioning of the output variables of the fuzzy decision system of the present invention;
[0048] Figure 7The following are some example test results of the comparison experiment between the improved U-Net network of the present invention and the existing U-Net network (a is the comparison detection result of tight-slit defects, b is the comparison detection result of double-diameter defects, c is the comparison detection result of normal and defect-free network, d is the comparison detection result of bend defects, e is the comparison detection result of weft defects, and f is the comparison detection result of broken diameter defects). Detailed Implementation
[0049] The present invention will be further described below with reference to specific embodiments, but the scope of protection of the present invention is not limited thereto:
[0050] Example 1: A method for intelligent identification of fabric defects by integrating semantic segmentation networks and fuzzy decision-making. This method adopts a fusion scheme of semantic segmentation network and fuzzy decision-making system. Based on the improved U-Net network recognition results, a fuzzy decision-making system is added to intelligently identify fabric surface defects. The specific process includes acquiring surface images of the fabric, preprocessing the acquired images in a computer, and inputting them into the improved U-Net network. The network outputs images of fabric defects with semantic information. The number of semantic pixels of defects is mapped to the image defect membership value through a membership function. A fuzzy system is constructed based on the membership value. Fuzzy rules are constructed based on human experience and longitudinal time series information. Finally, a decision is made with the help of lateral distribution information.
[0051] 1. Improve U-Net network
[0052] This invention applies to existing U-Net networks (such as...) Figure 1 An improvement was made to the existing U-Net network structure (as shown below), resulting in the following improved U-Net network structure: Figure 2 As shown, the encoder-decoder structure consists of a U-shaped symmetrical encoder-decoder configuration. The encoder comprises four nested convolutional modules and downsampling layers, ultimately outputting a 32×2 feature image with 1024 channels after passing through a convolutional module with 1024 kernels. The decoder comprises four nested upsampling and convolutional modules, finally passing through a 1×1 convolutional layer for channel number correction, resulting in a 512*32 output image with 3 channels.
[0053] 1.1 Convolution Module
[0054] The convolution module is structured as follows: it first performs two 3x3 convolution operations with a stride of 1. After each convolution, edge padding is performed in a mirror-symmetric manner. This effectively solves the problem of image size reduction after convolution, which hinders subsequent loss function calculation and backpropagation iteration. In the convolution part, edge padding with a padding value of 1 is performed after each convolution operation. This not only achieves feature extraction but also modifies the number of image channels without changing the original image size.
[0055] 1.2 Downsampling Module
[0056] In this model, to improve the model's ability to recognize small vertical defects, convolution operations are used instead of pooling operations for downsampling. The downsampling module is implemented using 3x3 convolutions with a stride of 2, reducing the image size by half without changing the number of channels. Using 3x3 convolutions with a stride of 2 instead of max pooling for downsampling improves the network's ability to recognize small vertical defects without changing the number of network layers. Figure 7 As shown in (f), the improved U-Net network performs significantly better than the original U-Net network in identifying broken diameter defects.
[0057] 1.3 Upsampling Module
[0058] The upsampling module uses nearest-neighbor interpolation to double the image size and halve the number of channels, facilitating subsequent feature fusion. After feature fusion, a 1x1 convolution is used to reduce the number of channels. The basic principle of nearest-neighbor interpolation is to find the nearest integer value to the new pixel during image scaling and assign it to the new pixel. The nearest-neighbor interpolation coordinate transformation calculation formula is as follows:
[0059] AX = BX * (AW / BW) (1)
[0060] AY = BY * (AH / BH) (2)
[0061] Where BX and BY are the x and y coordinates of a pixel after scaling, BW and BH are the length and width of the scaled image; AW and AH are the length and width of the original image, and AX and AY are the x and y coordinates of the original image pixels corresponding to BX and BY.
[0062] 1.4 Improve the training and testing of the U-Net network
[0063] (1) Dataset creation
[0064] Images of the fabric surface after production are collected. The dataset contains fabric surface images captured in real time by six area array CCD cameras placed at the fabric outlet. A top-down view of the camera arrangement is shown below. Figure 3 As shown, the collected fabric surface images were first preprocessed in the computer, including data augmentation and image scaling. Data augmentation employed horizontal flipping, and for certain types of defects (broken warp, double warp) the sample size was increased through data augmentation. Image scaling involved uniformly scaling all data-augmented images to a size of 512*32 pixels.
[0065] Then, the 512*32 pixel images were manually labeled with defect categories. Defects were divided into eight categories, plus the normal, flawless fabric, for a total of nine categories. The name and sample number of each defect are shown in Table 2.
[0066] Table 2. Statistics on the Number of Defective Samples
[0067]
[0068] A total of 1281 manually labeled images were randomly divided into training and testing sets at a ratio of 9:1.
[0069] (2) Training and Testing
[0070] Images from the training set are input into the improved U-Net network to obtain prediction results with semantic information. During training, the model parameters are iteratively optimized by calculating the loss function value and backpropagation. The improved U-Net network of this invention aims to solve the binary classification problem of whether defects exist. Therefore, the loss function adopted is the weighted cross-entropy (BCE) loss function, the calculation formula of which is as follows:
[0071]
[0072] Where y is the true value, y * These are predicted values.
[0073] Training ends when the 100th epoch is completed.
[0074] The testing process involves feeding the test set images into the trained improved U-Net network to generate prediction result images with semantic information. Then, the number of defective pixels in the prediction result images is counted to eliminate minor interference caused by fabric surface texture. When the number of defective pixels is less than 500, it is a positive sample, and when it is greater than 500, it is a negative sample. Accuracy is used as the evaluation metric. When the evaluation metric reaches A = 95.24, an improved U-Net network that can be used online is obtained.
[0075] 2. Fuzzy Decision-Making System
[0076] Based on the semantic segmentation model (the improved U-Net network constructed in step 1), and using the image detection results from six horizontally distributed cameras in the visual acquisition system and the detection results from two consecutive time series in the vertical direction, a fuzzy decision system with two spatiotemporal dimensions is constructed to complete the online detection of fabric defects. Predictive reasoning is performed by combining spatiotemporal information to improve detection accuracy.
[0077] The structure of a fuzzy decision system is as follows: Figure 4 As shown: The two horizontal rectangles in the figure represent the fabric images at time t-1 and time t, respectively, taken by six horizontally arranged industrial cameras. The image of the fabric captured by the i-th camera at time t is the detection result of the improved U-Net network established in step 1. The image of the fabric captured by the i-th camera at time t-1 is the detection result of the improved U-Net network established in step 1. After reasoning through the fuzzy decision system, the decision conclusion at the current time t can be obtained, which is the final defect detection result y. final It can be seen that this fuzzy decision system consists of 12 input variables. 1 output variable (y) final )composition.
[0078] 2.1 Definition of Fuzzy Sets
[0079] Fuzzy set definition of input and output variables: The 12 input variables are the prediction results of the improved U-Net network, i.e., the number of defective pixels in each image. In this invention, the universe of discourse for all 12 input variables is set to [0, 1200]. Three fuzzy sets S (Small), M (Middle), and B (Big) are defined on this universe of discourse. The fuzzy set partitioning of the 12 input variables is identical, and their membership degrees are represented as follows: Figure 5 As shown, its formula is as shown in (4-6):
[0080] f S (x)=g(x,-0.025,400) (4)
[0081] f M (x)=g(x,0.025,400)-g(x,-0.025,800) (5)
[0082] f B (x)=g(x,0.025,800) (6)
[0083] Where x is the number of defective pixels, f S (x), F M (x) and f B (x) represent the membership functions of the fuzzy sets S, M, and B in the input domain, respectively. a and c are the parameters of the sigmoid membership function.
[0084] The universe of discourse for the output variable is [0,1]. Three fuzzy sets S(Small), M(Middle), and B(Big) are also defined on this universe, with their membership degrees represented as follows: Figure 6 As shown, the membership function formulas for the fuzzy sets S, M, and B in the output domain are shown in (7-9):
[0085] F S (x)=g(x,-25,0.3) (7)
[0086] F M (x)=g(x,25,0.3)-g(x,-25,0.7) (8)
[0087] F B (x)=g(x,25,0.7) (9)
[0088] 2.2 Refinement of Fuzzy Rules
[0089] The fuzzy decision-making system consists of two parts: a vertical temporal decision-making subsystem and a horizontal spatial decision-making subsystem. The temporal decision-making subsystem utilizes forward and backward temporal information to make decisions. For input, y i The fuzzy rules for the time-series decision subsystem are shown in Table 1 as the output.
[0090] Table 1 Fuzzy rule table for the temporal decision subsystem
[0091]
[0092] The spatial decision subsystem makes decisions using the spatial distribution information of six transverse cameras, and the output y of the temporal decision subsystem is used to make decisions. i The input is i = 1, 2, 3, 4, 5, 6, and y is... final For output, the fuzzy rules of the spatial decision subsystem are as follows:
[0093] if any(y i is B), then y final is B;
[0094] if num(y i If M)≥2, then y final is B;
[0095] if num(y i if S)≥5, then y final is B;
[0096] if any(y i is M), then y final is M;
[0097] if num(y i if S)≥2, then y final is M;
[0098] otherwise, y final is S.
[0099] In the above formula, any(·) means that as long as one of the images within the parentheses meets the condition, it is acceptable. num(·) represents the number of images within the parentheses that meet the condition. For example, the first rule is: if any(y i is B), then y final is B means that if the probability of one of the six cameras detecting a defect is B, then the output is a high probability (B).
[0100] 3. Online use
[0101] Real-time images of the fabric surface after production are captured by six CCD cameras arranged horizontally above the fabric outlet. The images are then scaled and processed in the computer, and then input into the improved U-Net network obtained in step 1.4 to obtain six prediction results with semantic information for the current time and six for the previous time. These 12 prediction results are then input into the fuzzy decision system constructed in step 2 for fuzzy judgment and final decision, thereby determining whether there are defects on the fabric surface at the current time.
[0102] experiment:
[0103] 1. The dataset used in the experiment is the dataset constructed in step 1.4 of Example 1.
[0104] 2. Evaluation Indicators
[0105] The experimental evaluation metrics include accuracy, precision, false alarm rate, miss rate, and intersection over union (IoU). Their formulas are shown in (10-14):
[0106]
[0107]
[0108]
[0109]
[0110]
[0111] Where TP is the number of correctly predicted positive samples; FP is the number of positive samples that were incorrectly predicted as negative samples; TN is the number of correctly predicted negative samples; FN is the number of negative samples that were incorrectly predicted as positive samples; A is the prediction graph; and B is the annotation graph.
[0112] 3. Comparative Experiment Results of Semantic Segmentation Networks
[0113] The improved U-Net network of this invention was compared with the existing U-Net network on the same experimental dataset. The comparison results of the U-Net networks before and after the improvement are shown in Table 3.
[0114] Table 3 Network Performance Comparison Table
[0115]
[0116] The defect detection performance of some test sets is as follows: Figure 7 As shown, the six figures (a)–(f) represent the test results for different types of defects. a is the comparative detection result of tight-slit defects, b is the comparative detection result of double-diameter defects, c is the comparative detection result of normal defects, d is the comparative detection result of zigzag defects, e is the comparative detection result of weft defects, and f is the comparative detection result of broken-diameter defects. Each figure consists of two sub-figures: the upper figure is the detection result figure of the existing U-Net network, and the lower figure is the detection result figure of the improved U-Net network.
[0117] 6. Experimental Results of Fusion Networks
[0118] After segmenting and predicting the images acquired by six cameras using an improved U-Net network, the lateral distribution information of the six cameras was used for decision-making. The value with the highest confidence among the six cameras was taken as the confidence value at the current time. A threshold of 0.5 was set. When the confidence value at time t was greater than 0.5, the fabric was considered to have a defect; otherwise, it was considered to be normal. The prediction results of the fuzzy decision system (i.e., the prediction results of the intelligent fabric defect recognition method using the fusion semantic segmentation network and fuzzy decision of this invention) were compared with the prediction results of using only the improved U-Net network of this invention. The specific test results are shown in Table 4.
[0119] Table 4 Comparison of Experimental Results with and without Fuzzy Decision Systems
[0120]
[0121] This invention proposes a fusion decision-making scheme for fabric defect identification using a data model and a knowledge model. The data model employs an improved semantic segmentation network, while the knowledge model uses a fuzzy decision system. Based on the use of the semantic segmentation network to complete the detection and identification of fabric surface defects, this invention fully utilizes the lateral distribution knowledge and longitudinal temporal knowledge of multiple cameras in the actual visual acquisition system. It cleverly combines the powerful feature extraction and computational performance of deep neural networks (data model) with the human brain's ability to make comprehensive decisions (knowledge model), effectively improving the identification accuracy of fabric surface defects.
[0122] Finally, it should be noted that the above examples are merely some specific embodiments of the present invention. Obviously, the present invention is not limited to the above embodiments and many variations are possible. All variations that can be directly derived or conceived by those skilled in the art from the disclosure of the present invention should be considered within the scope of protection of the present invention.
Claims
1. A method for intelligent identification of fabric defects integrating semantic segmentation networks and fuzzy decision-making, characterized by: Real-time images of the fabric surface are acquired. In the computer, the images of the fabric surface at the current moment and the previous moment are scaled and then input into the improved U-Net network to obtain the prediction results of the current moment and the previous moment with semantic information. Then, the prediction results of the current moment and the previous moment are input into the fuzzy decision system to obtain the judgment result of whether there are defects on the fabric surface at the current moment. The fuzzy decision system includes a vertical temporal decision subsystem and a horizontal spatial decision subsystem; The prediction results at the current moment and the prediction results at the previous moment are respectively mapped to the number of defective semantic pixels through the membership function, which is used as the input of the fuzzy rules of the temporal decision subsystem. The output of the temporal decision subsystem is used as the input of the fuzzy rules of the spatial decision subsystem. The membership function is: (4) (5) (6) Where x is the number of defective pixels. and These correspond to the membership functions of the fuzzy sets S(Small), M(Middle), and B(Big) on the universe of discourse of the input variables, respectively. a and c are the parameters of the sigmoid membership function; (7) (8) (9) in, and These are the membership functions of the fuzzy sets S(Small), M(Middle), and B(Big) on the universe of discourse of the output variables, respectively. The fuzzy rules of the time-series decision subsystem are shown in the table below: ; in, The prediction result at the current moment. The prediction result for the previous moment. For output; The fuzzy rules of the spatial decision-making subsystem are as follows: In this context, any(∙) means that as long as one of the images within the parentheses meets the condition, it is acceptable; and num(∙) represents the number of images within the parentheses that meet the condition.
2. The intelligent fabric defect recognition method integrating semantic segmentation network and fuzzy decision-making according to claim 1, characterized in that: The improved U-Net network is based on the U-Net network and includes an encoder and a decoder. The encoder mainly consists of four nested convolutional modules and downsampling modules, followed by one convolutional module. The decoder mainly consists of four nested upsampling modules and convolutional modules, followed by one convolutional layer. The convolution module first performs two convolution operations, and then performs edge filling in a mirror-symmetric manner after each convolution. The downsampling module uses convolution instead of max pooling for downsampling; The upsampling module uses the nearest neighbor interpolation method.
