A method for identifying textile defect types

Through the deep learning algorithm and mean square error calculation, combined with the convolutional neural network, the automatic identification and classification statistics of textile defects are realized, which solves the problems of low textile detection efficiency and impossible classification in the existing technology, and improves the textile yield rate.

CN117893467BActive Publication Date: 2024-09-06JIANGSU XIN SI LU TEXTILE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311665287.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-06
Publication Date
2024-09-06
Estimated Expiration
2043-12-06

AI Technical Summary

Technical Problem

The existing technology is inefficient in textile defect detection and cannot perform classification statistics, resulting in a low textile yield rate.

Method used

A deep learning algorithm is used to build a defect analysis model in the database. Through training on textile defect images, combined with mean square error calculation and convolutional neural network, automatic identification and classification statistics of textile defects are achieved.

Benefits of technology

It improves the efficiency and accuracy of textile defect detection, can automatically determine whether textiles have defects, and conducts statistics on different defect types to help improve processes and reduce defective rates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117893467B
    Figure CN117893467B
Patent Text Reader

Abstract

The present invention relates to the technical field of textile defect recognition, and discloses a method for identifying textile defect types, comprising the following steps: building a database, a defect analysis model is built in the database, and the defect analysis model includes a comparison module and an analysis module; the defect analysis model is trained and learned in a deep learning algorithm for known textile defect images and defect positions, and is used to classify textile defects; step two: obtaining all images of textile surface defects, and saving the images to a storage unit of the database. The present invention performs three pre-processing steps of filtering, grayscale processing and segmentation processing on the collected textile images. The filtering processing can suppress the noise of the target image under the condition of retaining the image detail features, and the grayscale processing can convert the color RGB image into a grayscale image, which can enhance the image contrast and reduce the storage volume and computational complexity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of textile defect recognition, and in particular to a method for identifying textile defect types. Background Art

[0002] When defects appear on the surface of textiles, it will affect the appearance of subsequent fabrics and even cause quality problems. Defect detection and identification of defect types are key links in the production of textile industry. In the textile industry, there are more than 50 kinds of textile defects. Most of them are caused by machine failure and yarn problems. These defects can be divided into six types: dirty yarn, cobweb, broken warp, weft, thinning and loose yarn. Textiles need to undergo various inspections and tests during the production process and before entering the market. Identification of defects on the surface of textiles is an essential step.

[0003] At present, the detection of textile defects mainly relies on manual or visual inspection systems. The former is slow in efficiency and the accuracy of the detection results is not high, so it is gradually eliminated by the market. Although the latter has high detection efficiency and high accuracy of the detection results, it still has defects: it cannot classify and count the detected textile defects, which is not conducive to improving related processes and making it difficult to improve the yield rate of textiles. To this end, we propose a textile defect type recognition method to solve the above problems. Summary of the invention

[0004] 1. Technical issues to be solved

[0005] In view of the deficiencies in the prior art, the present invention provides a method for identifying textile defect types, which has the advantages of being able to identify textile defects and classify and statistically process the textile defects, thereby being conducive to improving related processes, and solving the above-mentioned technical problems.

[0006] (II) Technical solution

[0007] To achieve the above object, the present invention provides the following technical solution: a method for identifying textile defect types, comprising the following steps:

[0008] Step 1: Building a database with a built-in defect analysis model, which includes a comparison module and an analysis module;

[0009] The defect analysis model is used to classify textile defects by training and learning known textile defect images and defect locations in a deep learning algorithm;

[0010] Step 2: Obtain all images of textile surface defects and save the images into a storage unit of the database;

[0011] Step 3: Acquire the surface image of the textile and preprocess the image;

[0012] Step 4: input the preprocessed textile surface image into the defect analysis model, and capture key features of the textile surface image through the defect analysis model;

[0013] Step 5: Input the key features captured by the defect analysis model into the comparison module, and then compare them with the textile surface defect image stored in the storage unit, and determine whether the textile has defects through the analysis module;

[0014] Step 6: If the textile is determined to have defects, the analysis module marks the defect location, notes the defect type, and counts the number of different defect types.

[0015] As a preferred technical solution of the present invention, in step three, a high-definition industrial camera is used to acquire the surface image of the textile, and the image is preprocessed including segmentation processing, wherein the segmentation processing is to segment the surface image of the textile into several parts using a region-based segmentation algorithm.

[0016] As a preferred technical solution of the present invention, the image preprocessing in step three also includes filtering processing and grayscale processing, and the grayscale image is enhanced, and the filtering processing and grayscale processing are performed before the segmentation processing.

[0017] As a preferred technical solution of the present invention, the comparison module is connected to the storage unit of the database, and the comparison module uses a mean square error calculation formula to compare the preprocessed image with the pre-stored textile defect image. The calculation formula is as follows:

[0018]

[0019] Where MSE is the mean square error, n is the number of samples, yi is the true value of the i-th sample, is the predicted value of the defect analysis model for the i-th sample.

[0020] As a preferred technical solution of the present invention, the comparison module is connected to the analysis module, and the analysis module classifies the data calculated by the comparison module.

[0021] As a preferred technical solution of the present invention, the specific process of the classification processing is as follows:

[0022] The number of types of textile defects is determined according to the number of known textile defect images, and different types of defects are marked with symbols;

[0023] the mean square error value calculated by comparing the preprocessed textile image with each known textile defect image;

[0024] The mean square error values ​​calculated by the comparison module are respectively input into the analysis module, and the analysis module selects a data with the smallest mean square error value, and determines which defect the data belongs to according to the symbol mark, and counts the symbol mark.

[0025] As a preferred technical solution of the present invention, the deep learning algorithm is specifically a convolutional neural network algorithm.

[0026] As a preferred technical solution of the present invention, it is characterized in that: the step six also includes displaying the statistical number of different defect types on a digital display screen.

[0027] Compared with the prior art, the present invention provides a method for identifying textile defect types, which has the following beneficial effects:

[0028] 1. The present invention pre-stores known textile defect images in a storage unit of a database, and sends the collected textile images to a defect analysis model. The pre-processed image and the pre-stored known textile defect image are compared using a mean square error method, and the mean square error value between the two images is calculated using a mean square error calculation formula. The larger the mean square error value, the greater the difference between the two images, indicating that there is a large difference between the pre-processed image and the known textile defect image, so the textile is judged to be good. Otherwise, the smaller the difference is, when the mean square error value is within a preset threshold range, it means that the pre-processed image is very similar to the known textile defect image, and it is judged that the textile is defective. In this way, it is possible to automatically detect whether the textile is defective.

[0029] 2. The present invention obtains defective images of textiles and then counts their number, and obtains n types of textile defects, so the obtained mean square error value marks are also n. If the n mean square error values ​​in the calculation result are all greater than the set threshold value, it indicates that the textile has no defects and is a good product. On the contrary, if there is a value within the set threshold range among the n mean square error values, the analysis module finds the mark corresponding to the value, determines that the textile has defects, and determines the defect type according to the mark. After the analysis module classifies and counts the textile defects, the number of marks for each defect will be displayed on the digital display screen for user observation. By analyzing the number of different defects, the process of related processes in textile processing can be adjusted accordingly, which is beneficial to reducing the defective rate of textiles.

[0030] 3. The present invention performs three pre-processing steps on the collected textile images, namely, filtering processing, grayscale processing and segmentation processing. The filtering processing can suppress the noise of the target image while retaining the image detail features. The grayscale processing can convert the color RGB image into a grayscale image, which can enhance the image contrast and reduce the storage volume and computational complexity. The segmentation processing can fragment the image, making it easier to remove image fragments without features and retain image fragments with features, thereby further reducing the computational complexity of subsequent comparisons. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a schematic diagram of the process of the present invention;

[0032] Figure 2 It is a schematic diagram of the module structure of the present invention. DETAILED DESCRIPTION

[0033] The following embodiments of the present invention are described in further detail in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0034] In the description of the present invention, unless otherwise specified, "plurality" means two or more than two; the orientations or positional relationships indicated by the terms "upper", "lower", "left", "right", "inner", "outer", "front end", "rear end", "head", "tail", etc. are based on the orientations or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", "third", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0035] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "connected" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0036] See also Figure 1-Figure 2 , a method for identifying textile defect types, comprising the following steps:

[0037] Step 1: Building a database with a built-in defect analysis model, which includes a comparison module and an analysis module;

[0038] The defect analysis model is used to classify textile defects by training and learning known textile defect images and defect locations in a deep learning algorithm;

[0039] Step 2: Obtain all images of textile surface defects and save the images into a storage unit of the database;

[0040] Step 3: Acquire the surface image of the textile and preprocess the image;

[0041] Step 4: input the preprocessed textile surface image into the defect analysis model, and capture key features of the textile surface image through the defect analysis model;

[0042] Step 5: Input the key features captured by the defect analysis model into the comparison module, and then compare them with the textile surface defect image stored in the storage unit, and determine whether the textile has defects through the analysis module;

[0043] Step 6: If the textile is determined to have defects, the analysis module marks the defect location, notes the defect type, and counts the number of different defect types.

[0044] Specifically, in step 3, a high-definition industrial camera is used to acquire the surface image of the textile, and the image is preprocessed including segmentation processing, and the segmentation processing is to segment the surface image of the textile into several parts based on the region segmentation algorithm. The advantage is that the image of the outer surface of the textile is collected by a high-definition industrial camera, and the collected image is sent to the database. The image to be collected is filtered and gray-scaled before being segmented into several parts. The segmented image fragments are convenient for subsequent comparison with pre-stored known textile defect images, and the image fragmentation is more conducive to feature extraction, thereby eliminating image fragments without comparison value, reducing the amount of calculation, and thus improving the speed of textile defect recognition.

[0045] Specifically, the image preprocessing in step 3 also includes filtering and grayscale processing, and the grayscale image is enhanced, and the filtering and grayscale processing are performed before the segmentation process. The advantage is that the filtering process of the image mainly performs a convolution operation on the image, uses the weighted average of the local pixel values ​​to change the pixel value, suppresses the noise of the target image while retaining the image detail features as much as possible, and retains the authenticity of the image; the grayscale processing of the collected textile image mainly converts the color RGB image into a grayscale image, which can enhance the contrast of the image and reduce the storage volume and calculation complexity.

[0046] Specifically, the comparison module is connected to the storage unit of the database, and the comparison module uses a mean square error calculation formula to compare the preprocessed image with the pre-stored textile defect image. The calculation formula is as follows:

[0047]

[0048] Where MSE is the mean square error, n is the number of samples, yi is the true value of the th sample, is the predicted value of the defect analysis model for the i-th sample. The advantage is that the mean square error method is used to compare the preprocessed image with the pre-stored known textile defect image, and the mean square error value between the two images is calculated by the above calculation formula. The larger the mean square error value, the greater the difference between the two images, indicating that there is a large difference between the preprocessed image and the known textile defect image, so the textile is judged to be good. On the contrary, the smaller the difference, when the mean square error value is within the preset threshold range, it means that the preprocessed image is very similar to the known textile defect image, and it is judged that the textile has defects.

[0049] Specifically, the comparison module is connected to the analysis module, and the analysis module performs classification processing on the data calculated by the comparison module. The advantage is that when calculating the mean square error value of the preprocessed image and the known textile defect image, it is necessary to calculate the mean square error value of the preprocessed image and each different defect image once, and the obtained mean square error values ​​are marked as A1, A2...An, and then these marked values ​​are sent to the analysis module.

[0050] Specifically, the classification process is as follows:

[0051] The number of types of textile defects is determined according to the number of known textile defect images, and different types of defects are marked with symbols;

[0052] the mean square error value calculated by comparing the preprocessed textile image with each known textile defect image;

[0053] The mean square error values ​​calculated by the comparison module are respectively input into the analysis module. The analysis module selects a data with the smallest mean square error value, and determines which type of defect the data belongs to according to the symbol mark, and counts the symbol mark. The advantage is that after obtaining the defect image of the textile, the number of them is counted, and it is found that there are n types of textile defects, so the mean square error value marks obtained are also n. If the n mean square error values ​​in the calculation result are all greater than the set threshold, it indicates that the textile has no defects and is a good product. On the contrary, if there is a value within the set threshold range among the n mean square error values, the analysis module finds the mark corresponding to the value, determines that the textile has defects, and determines the defect type according to the mark.

[0054] Specifically, the deep learning algorithm is a convolutional neural network algorithm. The advantage is that the convolutional neural network includes a feedforward neural network with a deep structure and includes a convolution calculation, a pooling layer and a fully connected layer. The convolution kernel performs a convolution operation on the input image to extract the local features of the image. The feature map after convolution is downsampled to reduce the size of the feature map, further extract the main feature information, and expand the feature map after convolution and pooling into a one-dimensional vector. The convolutional neural network enables the extraction of features from the acquired textile image, greatly reducing the amount of calculation for subsequent comparison.

[0055] Specifically, the step six also includes displaying the number of different defect types on the digital display screen. The advantage is that after the analysis module classifies and counts the textile defects, the number of marks for each defect will be displayed on the digital display screen for easy observation by the user. By analyzing the number of different defects, the process of the relevant process of textile processing can be adjusted accordingly, which is conducive to reducing the defective rate of textiles.

[0056] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for identifying textile defect types, characterized in that: The following steps are involved: Step 1: Building a database with a built-in defect analysis model, which includes a comparison module and an analysis module; The defect analysis model is used to classify textile defects by training and learning known textile defect images and defect locations in a deep learning algorithm; Step 2: Obtain all images of textile surface defects and save the images into a storage unit of the database; Step 3: Acquire the surface image of the textile and preprocess the image; Step 4: input the preprocessed textile surface image into the defect analysis model, and capture key features of the textile surface image through the defect analysis model; Step 5: Input the key features captured by the defect analysis model into the comparison module, and then compare them with the textile surface defect image stored in the storage unit, and determine whether the textile has defects through the analysis module; Step 6: If the textile is judged to have defects, the analysis module marks the defect location, notes the defect type and counts the number of different defect types; The comparison module is connected to the storage unit of the database, and the comparison module uses a mean square error calculation formula to compare the preprocessed image with the pre-stored textile defect image. The calculation formula is as follows: Where MSE is the mean square error, n is the number of samples, yi is the true value of the i-th sample, is the predicted value of the defect analysis model for the i-th sample; The comparison module is connected to the analysis module, and the analysis module classifies the data calculated by the comparison module. The specific process of the classification process is as follows: The number of types of textile defects is determined according to the number of known textile defect images, and different types of defects are marked with symbols; the mean square error value calculated by comparing the preprocessed textile image with each known textile defect image; The mean square error values ​​calculated by the comparison module are respectively input into the analysis module, and the analysis module selects a data with the smallest mean square error value, and determines which defect the data belongs to according to the symbol mark, and counts the symbol mark.

2. A textile defect type identification method according to claim 1, characterized in that: In the step three, a high-definition industrial camera is used to acquire the textile surface image, and the image is preprocessed including segmentation processing. The segmentation processing is to segment the textile surface image into several parts based on a region-based segmentation algorithm.

3. A textile defect type identification method according to claim 1, characterized in that: The image preprocessing in step three also includes filtering and grayscale processing, and the grayscale image is enhanced. The filtering and grayscale processing are performed before the segmentation process.

4. A textile defect type identification method according to claim 1, characterized in that: The deep learning algorithm is specifically a convolutional neural network algorithm.

5. A textile defect type identification method according to claim 1, characterized in that: The step six also includes displaying the counted number of different defect types on a digital display screen.