A textile jacquard defect detection method and system based on deep learning

Through deep learning technology, combined with adversarial training and neural network models, defect recognition and classification of textile jacquard images are realized, solving the problem of inaccurate defect detection in the existing technology, and improving detection accuracy and production efficiency.

CN117541557BActive Publication Date: 2024-12-13JIANGSU INTERSTATE DIGITAL PRINTING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311541980.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-28
Publication Date
2024-12-13
Estimated Expiration
2043-08-28

AI Technical Summary

Technical Problem

Existing textile jacquard detection technology cannot accurately and automatically distinguish various defects, resulting in the production of defective products, reducing product quality and affecting product availability and safety.

Method used

Deep learning-based textile jacquard defect detection method is adopted to realize defect identification and classification of textile jacquard image data through information collection, denoising preprocessing, adversarial training, feature extraction and neural network classification models.

Benefits of technology

It improves detection accuracy and supports multi-category defect detection, facilitates defect positioning and repair, enhances the model's ability to identify and generalize defects, reduces computing complexity, and improves production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117541557B_ABST
    Figure CN117541557B_ABST
Patent Text Reader

Abstract

The present invention discloses a textile jacquard defect detection method and system based on deep learning, comprising the following steps: obtaining historical textile jacquard image data through an information acquisition terminal, preprocessing the data by denoising, and decomposing the data into a test set and a training set; designing a defect discrimination method based on a deep learning method combined with a training set, and detecting the test set according to the discrimination method to generate defect samples; conducting adversarial training on the textile jacquard image data to be detected, generating data expansion defect samples similar to the defect samples, and establishing a feature extraction model according to the defect samples; mapping the defect feature extraction results to the template textile jacquard image data to analyze its geometric shape; using the geometric shape as training data to design a jacquard defect classification model based on a neural network; connecting the constructed defect feature extraction model and classification model to a management system. The present invention can improve detection accuracy and support multi-category defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of textile detection technology, and in particular to a textile jacquard defect detection method and system based on deep learning. Background Art

[0002] Textile jacquard is a textile technology that interweaves yarns of different colors and materials on the fabric to form a fabric with a pattern, pattern or decorative effect. Jacquard weaving can create a variety of complex geometric shapes, patterns and textures on textiles. It is usually produced using a special jacquard loom. In textile jacquard, computer-aided design software can be used to create and edit jacquard patterns. These patterns can be transmitted to the jacquard loom through a computer to control the action of each weaving mechanism on the loom, thereby realizing the weaving of the pattern.

[0003] In the process of textile jacquard production, textile jacquard testing is extremely necessary. By detecting defects or errors in the jacquard pattern, the quality of the jacquard fabric can be ensured to meet the requirements. At the same time, the correctness and consistency of the jacquard pattern are very important for the beauty and market demand of the fabric. At the same time, through jacquard testing, problems in the production process can be discovered and corrected in time, the production process can be improved and optimized, and production efficiency and product quality can be improved. In summary, textile jacquard testing is of great necessity to ensure product quality, meet market demand, protect brand reputation and optimize production processes. It can help textile companies improve their competitiveness, maintain market advantages, and provide high-quality products that meet consumer needs.

[0004] However, in the current textile jacquard inspection process, there is still a situation where various defects cannot be accurately and automatically distinguished, which will lead to the inability to timely discover and correct the real problems of the product, resulting in the production of defective products, reducing product quality, and even affecting product availability and safety. Therefore, in order to ensure product quality, it is very important to accurately and automatically distinguish different defect situations.

[0005] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention

[0006] In response to the problems in the related art, the present invention proposes a textile jacquard defect detection method and system based on deep learning to overcome the above-mentioned technical problems existing in the existing related technology.

[0007] To this end, the specific technical solution adopted by the present invention is as follows:

[0008] According to one aspect of the present invention, a method for detecting defects in textile jacquard based on deep learning is provided, and the method comprises the following steps:

[0009] S1. Obtain historical textile jacquard image data through the information collection terminal, pre-process the data by using a denoising method, and decompose the data into a test set and a training set;

[0010] S2. Design a defect discrimination method based on the deep learning method combined with the training set, and detect the test set according to the discrimination method to generate defect samples;

[0011] S3, conducting adversarial training on the textile jacquard image data to be detected, generating data similar to the defective samples to expand the defective samples, and establishing a feature extraction model based on the defective samples;

[0012] S4, mapping the defect feature extraction result to the template textile jacquard image data to analyze its geometric shape;

[0013] S5. Designing a neural network-based jacquard defect classification model using geometric shapes as training data;

[0014] S6. Connect the constructed defect feature extraction model and classification model with the management system to output the textile jacquard defect detection and classification results in real time.

[0015] Furthermore, the method of performing adversarial training on the textile jacquard image data to be detected, generating data similar to the defect sample to expand the defect sample, and establishing a feature extraction model according to the defect sample includes the following steps:

[0016] S31, generating a learning framework for sample adversarial training including a graph embedding module, two generators, a classifier and a discriminator;

[0017] S32, mapping the textile jacquard image to a feature space, and generating a synthetic sample similar to the defect sample in the image through a set of generators;

[0018] S33, generating non-synthesized samples in the image that are different from the defective samples through another group of generators, and classifying the sample labels through a classifier;

[0019] S34, according to the difference between the synthetic samples and the defective samples identified by the discriminator, a group of generators and discriminators are set to perform adversarial training, so that the generated synthetic samples are closer to the defective samples, and the synthetic samples and the defective samples are trained by the classifier;

[0020] S35, adding the generated synthetic samples to the defective samples after multiple iterations of training;

[0021] S36. Construct a feature extraction model based on the expanded defect samples, output the extraction results, perform repetition rate detection on the results, sort the repetition rates, and select the results with the highest repetition rate to generate defect features.

[0022] Furthermore, mapping the defect feature extraction result to the template textile jacquard image data to analyze its geometric shape comprises the following steps:

[0023] S41, determining the coordinate system of the textile jacquard image data, and aligning the defect feature extraction results with the image coordinate system respectively;

[0024] S42, drawing and marking the defect feature extraction result on the image data by using image processing technology;

[0025] S43, using an iterative threshold method to perform binary segmentation on the image data, and using a boundary tracking method to perform edge extraction to obtain an edge point set of a complete outline of the target;

[0026] S44, performing polygon fitting on the curve formed by the edge point set, and performing normalization processing on the fitted polygon to extract geometric features;

[0027] S45, calculating corresponding geometric feature parameters, and comparing the geometric feature parameters with the geometric shape to determine its shape.

[0028] Furthermore, the method of using an iterative threshold method to perform binary segmentation on the image data and using a boundary tracking method to extract edges to obtain an edge point set of a complete outline of the target includes the following steps:

[0029] S431, taking the average of the maximum grayscale value and the minimum grayscale value of the image data as the initial estimated value of the grayscale threshold, and dividing the image data pixels into two groups according to the grayscale threshold;

[0030] S432, respectively calculating the average grayscale value of all pixels in the two groups of image data pixels;

[0031] S433, repeating steps S431 and S432 to iterate to obtain a grayscale threshold, setting the grayscale values ​​of pixels greater than the grayscale threshold to a specified value, and setting the grayscale values ​​of the remaining pixels to zero to obtain a binary image;

[0032] S434, finding the starting point on the coordinate sequence of the binary image by a large step method, and finding the remaining boundary points by a small step clockwise search method, and repeating the operation to complete the extraction of the edge point set.

[0033] Furthermore, the polygon fitting of the curve formed by the edge point set and the normalization of the fitted polygon to extract geometric features include the following steps:

[0034] S441, setting the total number of edge point sets, and giving a distance threshold according to the sequence number of the current edge point set, and creating a set of empty linked lists;

[0035] S442, taking the starting point and the end point of each edge point set as two end points of a virtual line segment, and calculating the distance between the edge points of the two end points and the virtual line segment;

[0036] S443, if the distance is less than the set threshold, positioning the virtual line segment as an edge of the polygon;

[0037] S444, obtaining an ordered set of polygon vertices after fitting through the above steps, and performing normalization processing on the fitted polygon by taking the maximum distance from the centroid of the boundary point set to the polygon vertex as a normalization factor in combination with a calculation formula;

[0038] S445. Calculate geometric features of the normalized polygon, where the geometric features include area, length, width and perimeter.

[0039] Furthermore, the design of a neural network-based jacquard defect classification model using geometric shapes as training data includes the following steps:

[0040] S51, inputting the different geometric shape features obtained in the above steps into the neural network as model training samples;

[0041] S52, completing the neural network model training by sequentially implementing the initialization, hidden layer and output layer calculation, and weight calculation steps;

[0042] S53, using a particle swarm algorithm to determine the optimal weight and threshold of the neural network, and calculate the particle fitness value, and update the particle speed and position;

[0043] S54, when the termination conditions are met, the weight and threshold optimization results of the neural network are output, and a jacquard defect classification model based on the swarm intelligence optimization neural network is constructed.

[0044] Furthermore, the calculation formula for completing the output layer calculation in the neural network model training by sequentially implementing the initialization, hidden layer and output layer calculation, and weight calculation steps is:

[0045] ;

[0046] In the formula, Indicates i variables of the input nodes;

[0047] f represents the hidden layer activation function;

[0048] Represents the connection weights between neurons in the input layer and hidden layer. j Represents the number of hidden layer nodes;

[0049] nIndicates the number of input layer nodes.

[0050] Furthermore, the method of using the particle swarm algorithm to determine the optimal weight and threshold of the neural network, and calculating the particle fitness value, and updating the particle speed and position includes the following steps:

[0051] S531, initializing the relevant parameters of the particle swarm, obtaining the neural network topology, and initializing the weights and threshold length of the neural network;

[0052] S532, encoding the threshold and weight of the neural network to obtain the initial population of the particle swarm algorithm;

[0053] S533, using a particle swarm optimization neural network to iterate and obtain the fitness of each group of particles, and determining the particle extreme value and the particle group extreme value through the fitness value, wherein the particle's historical best position is the best position in the particle optimization iterative process;

[0054] S534, updating the speed and position of the iterative particle through the calculation formula, and determining whether the termination condition is met.

[0055] Furthermore, outputting the weight and threshold optimization results of the neural network when the termination condition is met, and constructing a jacquard defect classification model based on the swarm intelligence optimization neural network includes the following steps:

[0056] S541, input samples covering geometric feature polygons, and divide them into a training set and a test set;

[0057] S542, inputting the training set to complete the neural network training, and constructing a jacquard defect classification model based on the swarm intelligence optimization neural network;

[0058] S543. Input a test set into the constructed model to test its classification effect, and update it.

[0059] According to another aspect of the present invention, there is also provided a textile jacquard defect detection system based on deep learning, the detection system comprising: a data acquisition module, a discrimination module, a building module, an analysis module, a design module and a connection module;

[0060] Wherein, the data acquisition module is connected to the discrimination module, the discrimination module is connected to the establishment module, the establishment module is connected to the analysis module, the analysis module is connected to the design module, and the design module is connected to the connection module;

[0061] The data acquisition module is used to obtain historical textile jacquard image data through the information acquisition terminal, pre-process the data by using a denoising method, and decompose the data into a test set and a training set;

[0062] The discrimination module is used to design a defect discrimination method based on a deep learning method combined with a training set, and to detect a test set according to the discrimination method to generate defect samples;

[0063] The establishment module is used to perform adversarial training on the textile jacquard image data to be detected, generate data similar to the defect sample to expand the defect sample, and establish a feature extraction model based on the defect sample;

[0064] The analysis module is used to map the defect feature extraction result to the template textile jacquard image data to analyze its geometric shape;

[0065] The design module is used to design a neural network-based jacquard defect classification model using geometric shapes as training data;

[0066] The connection module is used to connect the constructed defect feature extraction model and classification model with the management system, and output the textile jacquard defect detection and classification results in real time.

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

[0068] 1. In the textile jacquard defect detection method based on deep learning proposed in the present invention, defects are first identified and then classified, which can improve detection accuracy, reduce computational complexity, support multi-category defect detection, and facilitate defect location and later repair. First, defect features are extracted based on historical textile jacquard image data and a feature extraction model is constructed, and defects are classified according to the features output by the feature extraction model, so that by first identifying the defects, attention can be focused on areas where defects may exist, reducing detection of normal areas, thereby improving detection accuracy. At the same time, there may be many different types of defects in the textile jacquard image. By first identifying the defects and then classifying them, multi-category defect detection and classification can be effectively supported. Identifying the defects first can provide the location information of the defects, which helps operators to quickly locate and repair the defects, thereby improving production efficiency.

[0069] 2. The present invention first generates data similar to defective samples by performing adversarial training on the textile jacquard image data to be detected. By generating adversarial samples similar to the defective samples, the number of defective samples is expanded. Adversarial training can make the model more robust to the interference of defective samples. By introducing adversarial samples similar to defective samples, the model can learn to classify and detect defects more accurately, thereby improving the model's ability to recognize defects. At the same time, by generating adversarial samples similar to defective samples, the model can better learn the characteristics and patterns of defective samples, thereby improving the generalization ability of new samples.

[0070] 3. The present invention establishes a classification model based on the shape of the defect, which can help accurately judge defects of different shapes. Defects of different shapes may be related to different textile problems, such as linear defects, surface defects, point defects, etc. By establishing a classification model, the model can learn the characteristics of defects of different shapes, thereby improving accuracy and reducing false alarm rates, and can be customized and adjusted according to specific needs. At the same time, by establishing a classification model based on defect shape, defects of different shapes can be recorded and counted, which is helpful to analyze and understand the occurrence patterns and causes of defects of different shapes. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0072] Figure 1 is a flow chart of a textile jacquard defect detection method based on deep learning according to an embodiment of the present invention;

[0073] Figure 2 It is a principle block diagram of a textile jacquard defect detection system based on deep learning according to an embodiment of the present invention.

[0074] In the figure:

[0075] 1. Data acquisition module; 2. Identification module; 3. Establishment module; 4. Analysis module; 5. Design module; 6. Connection module. DETAILED DESCRIPTION

[0076] To further illustrate each embodiment, the present invention provides drawings, which are part of the disclosure of the present invention and are mainly used to illustrate the embodiments. They can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in this field should be able to understand other possible implementation methods and advantages of the present invention.

[0077] According to an embodiment of the present invention, a method and system for detecting textile jacquard defects based on deep learning are provided.

[0078] The present invention will now be further described with reference to the accompanying drawings and specific embodiments. Figure 1 As shown, according to a textile jacquard defect detection method based on deep learning according to an embodiment of the present invention, a textile jacquard defect detection method based on deep learning is provided, and the detection method comprises the following steps:

[0079] S1. Obtain historical textile jacquard image data through the information collection terminal, pre-process the data using a denoising method, and decompose the data into a test set and a training set.

[0080] In one embodiment, the acquisition of historical textile jacquard image data through the information acquisition terminal, preprocessing the data by denoising, and decomposing the data into a test set and a training set comprises the following steps:

[0081] The historical textile jacquard image data is obtained through the information collection terminal to ensure the quality and integrity of the data. The collected textile jacquard image data is cleaned to remove possible noise, invalid data or outliers to ensure the accuracy and consistency of the data.

[0082] Denoising algorithms (such as Gaussian filtering, median filtering, etc.) can be used to denoise image data to reduce the impact of noise on subsequent analysis. Image enhancement techniques (such as contrast enhancement, edge enhancement, etc.) can be used to improve image quality and make defects more prominent.

[0083] A part of the preprocessed data is selected as a training set for training the deep learning model. A part of the preprocessed data is reserved as a test set to evaluate the performance and generalization ability of the trained model.

[0084] According to the actual situation of textile jacquard image data, the images in the training set are annotated to mark the location and type of defects so as to perform supervised learning when training the model. Data enhancement techniques (such as rotation, flipping, scaling, etc.) can be used to expand the training set to increase the diversity and quantity of data and improve the generalization ability of the model.

[0085] Normalizing the image data so that they have similar scale and distribution during training helps speed up later training and improve model performance.

[0086] S2. Design a defect identification method based on deep learning methods and training sets, and detect the test set according to the identification method to generate defect samples.

[0087] In one embodiment, the designing of a defect discrimination method based on a deep learning method in combination with a training set, and detecting a test set according to the discrimination method to generate defect samples comprises the following steps:

[0088] The general steps for designing a defect discrimination method based on deep learning methods and generating defect samples for the test set according to the discrimination method are as follows:

[0089] Use a preprocessed training set, including defect images and normal images. Make sure the defect images in the training set are correctly labeled (marking the defect location and type).

[0090] The preprocessed training set is input into the deep learning model for training. The input image can be a single-channel grayscale image or a multi-channel color image.

[0091] Label definition: Defective images are labeled as positive samples, and normal images are labeled as negative samples.

[0092] Loss function: Choose an appropriate loss function (such as the cross entropy loss function) to measure the difference between the prediction and the true label.

[0093] Optimization algorithm: Select an appropriate optimization algorithm (such as stochastic gradient descent) to minimize the loss function and update the weight parameters of the model.

[0094] Use the validation set to evaluate the trained model, calculate indicators such as accuracy, recall, and F1 value, and evaluate the performance and generalization ability of the model.

[0095] The preprocessed test set is input into the trained model for detection.

[0096] Defect identification is performed based on the output of the model, and a threshold can be set to determine whether it is a defective sample.

[0097] For images judged as defects, the defect locations are marked on the images and saved as defect samples for subsequent analysis and further processing.

[0098] By analyzing the generated defect samples, we can collect information such as the defect type, quantity, and location distribution to help optimize the model or perform subsequent processing.

[0099] S3. Conduct adversarial training on the textile jacquard image data to be detected, generate data similar to the defective samples to expand the defective samples, and establish a feature extraction model based on the defective samples.

[0100] In one embodiment, the method of performing adversarial training on the textile jacquard image data to be detected, generating data similar to the defect sample to expand the defect sample, and establishing a feature extraction model according to the defect sample includes the following steps:

[0101] S31, generating a learning framework for sample adversarial training including a graph embedding module, two generators, a classifier and a discriminator;

[0102] S32, mapping the textile jacquard image to a feature space, and generating a synthetic sample similar to the defect sample in the image through a set of generators;

[0103] S33, generating non-synthesized samples in the image that are different from the defective samples through another group of generators, and classifying the sample labels through a classifier;

[0104] S34, according to the difference between the synthetic samples and the defective samples identified by the discriminator, a group of generators and discriminators are set to perform adversarial training, so that the generated synthetic samples are closer to the defective samples, and the synthetic samples and the defective samples are trained by the classifier;

[0105] S35, adding the generated synthetic samples to the defective samples after multiple iterations of training;

[0106] S36. Construct a feature extraction model based on the expanded defect samples, output the extraction results, perform repetition rate detection on the results, sort the repetition rates, and select the results with the highest repetition rate to generate defect features.

[0107] S4. Map the defect feature extraction results to the template textile jacquard image data to analyze its geometric shape.

[0108] In one embodiment, mapping the defect feature extraction result to the template textile jacquard image data to analyze its geometric shape comprises the following steps:

[0109] S41, determining the coordinate system of the textile jacquard image data, and aligning the defect feature extraction results with the image coordinate system respectively;

[0110] S42, drawing and marking the defect feature extraction result on the image data by using image processing technology;

[0111] S43, using an iterative threshold method to perform binary segmentation on the image data, and using a boundary tracking method to extract edges to obtain an edge point set of the complete outline of the target.

[0112] The method of using an iterative threshold method to perform binary segmentation on the image data and using a boundary tracking method to extract edges to obtain an edge point set of a complete target contour includes the following steps:

[0113] S431, taking the average of the maximum grayscale value and the minimum grayscale value of the image data as the initial estimated value of the grayscale threshold, and dividing the image data pixels into two groups according to the grayscale threshold;

[0114] S432, respectively calculating the average grayscale value of all pixels in the two groups of image data pixels;

[0115] S433, repeating steps S431 and S432 to iterate to obtain a grayscale threshold, setting the grayscale values ​​of pixels greater than the grayscale threshold to a specified value, and setting the grayscale values ​​of the remaining pixels to zero to obtain a binary image;

[0116] S434, finding the starting point on the coordinate sequence of the binary image by a large step method, and finding the remaining boundary points by a small step clockwise search method, and repeating the operation to complete the extraction of the edge point set.

[0117] S44, performing polygon fitting on the curve formed by the edge point set, and normalizing the fitted polygon to extract geometric features.

[0118] The step of performing polygon fitting on the curve formed by the edge point set and normalizing the fitted polygon to extract geometric features comprises the following steps:

[0119] S441, setting the total number of edge point sets, and giving a distance threshold according to the sequence number of the current edge point set, and creating a set of empty linked lists;

[0120] S442, taking the starting point and the end point of each edge point set as two end points of a virtual line segment, and calculating the distance between the edge points of the two end points and the virtual line segment;

[0121] S443, if the distance is less than the set threshold, positioning the virtual line segment as an edge of the polygon;

[0122] S444, obtaining an ordered set of polygon vertices after fitting through the above steps, and performing normalization processing on the fitted polygon by taking the maximum distance from the centroid of the boundary point set to the polygon vertex as a normalization factor in combination with a calculation formula;

[0123] S445, calculating geometric features of the normalized polygon, where the geometric features include area, length, width and perimeter

[0124] S45, calculating corresponding geometric feature parameters, and comparing the geometric feature parameters with the geometric shape to determine its shape.

[0125] S5. Use geometric shapes as training data to design a neural network-based jacquard defect classification model.

[0126] In one embodiment, the design of a neural network-based jacquard defect classification model using geometric shapes as training data comprises the following steps:

[0127] S51, inputting the different geometric shape features obtained in the above steps into the neural network as model training samples;

[0128] S52, completing the neural network model training by sequentially implementing the initialization, hidden layer and output layer calculation, and weight calculation steps.

[0129] Specifically, the calculation formula for completing the output layer calculation in the neural network model training by sequentially implementing the initialization, hidden layer and output layer calculation, and weight calculation steps is:

[0130] ;

[0131] In the formula, Indicates i variables of the input nodes;

[0132] f represents the hidden layer activation function;

[0133] Represents the connection weights between neurons in the input layer and hidden layer. j Represents the number of hidden layer nodes;

[0134] n Indicates the number of input layer nodes.

[0135] S53, using the particle swarm algorithm to determine the optimal weights and thresholds of the neural network, calculate the particle fitness value, and update the particle speed and position.

[0136] Specifically, the particle swarm algorithm is used to determine the optimal weight and threshold of the neural network, calculate the particle fitness value, and update the particle speed and position, including the following steps:

[0137] S531, initializing the relevant parameters of the particle swarm, obtaining the neural network topology, and initializing the weights and threshold length of the neural network;

[0138] S532, encoding the threshold and weight of the neural network to obtain the initial population of the particle swarm algorithm;

[0139] S533, using a particle swarm optimization neural network to iterate and obtain the fitness of each group of particles, and determining the particle extreme value and the particle group extreme value through the fitness value, wherein the particle's historical best position is the best position in the particle optimization iterative process;

[0140] S534, updating the speed and position of the iterative particle through the calculation formula, and determining whether the termination condition is met.

[0141] S54, when the termination conditions are met, the weight and threshold optimization results of the neural network are output, and a jacquard defect classification model based on the swarm intelligence optimization neural network is constructed.

[0142] Specifically, outputting the weight and threshold optimization results of the neural network when the termination condition is met, and constructing a jacquard defect classification model based on the crowd intelligence optimization neural network includes the following steps:

[0143] S541, input samples covering geometric feature polygons, and divide them into a training set and a test set;

[0144] S542, inputting the training set to complete the neural network training, and constructing a jacquard defect classification model based on the swarm intelligence optimization neural network;

[0145] S543. Input a test set into the constructed model to test its classification effect, and update it.

[0146] S6. Connect the constructed defect feature extraction model and classification model with the management system to output the textile jacquard defect detection and classification results in real time.

[0147] like Figure 2 As shown, according to another embodiment of the present invention, a textile jacquard defect detection system based on deep learning is also provided, the detection system comprising: a data acquisition module 1, a discrimination module 2, a building module 3, an analysis module 4, a design module 5 and a connection module 6;

[0148] Wherein, the data acquisition module 1 is connected to the discrimination module 2, the discrimination module 3 is connected to the establishment module 3, the establishment module 3 is connected to the analysis module 4, the analysis module 4 is connected to the design module 5, and the design module 5 is connected to the connection module 6;

[0149] The data acquisition module 1 is used to obtain historical textile jacquard image data through the information acquisition terminal, pre-process the data by using a denoising method, and decompose the data into a test set and a training set;

[0150] The discrimination module 2 is used to design a defect discrimination method based on a deep learning method combined with a training set, and to detect the test set according to the discrimination method to generate defect samples;

[0151] The establishment module 3 is used to perform adversarial training on the textile jacquard image data to be detected, generate data similar to the defect sample to expand the defect sample, and establish a feature extraction model based on the defect sample;

[0152] The analysis module 4 is used to map the defect feature extraction result to the template textile jacquard image data to analyze its geometric shape;

[0153] The design module 5 is used to design a neural network-based jacquard defect classification model using the geometric shape as training data;

[0154] The connection module 6 is used to connect the constructed defect feature extraction model and classification model with the management system, and output the textile jacquard defect detection and classification results in real time.

[0155] To sum up, with the help of the above-mentioned technical scheme of the present invention, the textile jacquard defect detection method based on deep learning proposed in the present invention first identifies defects and then classifies them, which can improve detection accuracy, reduce computational complexity, support multi-category defect detection, and facilitate defect positioning and later repair. First, defect features are extracted based on historical textile jacquard image data and a feature extraction model is constructed, and defects are classified according to the features output by the feature extraction model, so that by first identifying the defects, attention can be focused on areas where defects may exist, reducing detection of normal areas, thereby improving detection accuracy. At the same time, there may be many different types of defects in the textile jacquard image. By first identifying the defects and then classifying them, multi-category defect detection and classification can be effectively supported. Identifying the defects first can provide the location information of the defects, which helps the operator to quickly locate and repair the defects, thereby improving production efficiency. The present invention firstly generates data similar to defect samples by conducting adversarial training on textile jacquard image data to be detected, and expands the number of defect samples by generating adversarial samples similar to defect samples. The adversarial training can make the model more robust to the interference of defect samples. By introducing adversarial samples similar to defect samples, the model can learn to classify and detect defects more accurately, improve the model's recognition ability of defects, and by generating adversarial samples similar to defect samples, the model can better learn the characteristics and patterns of defect samples, thereby improving the generalization ability of new samples. The present invention establishes a classification model according to the shape of the defect, which can help accurately judge defects of different shapes. Defects of different shapes may be related to different textile problems, such as linear defects, surface defects, point defects, etc. By establishing a classification model, the model can learn the characteristics of defects of different shapes, thereby improving accuracy and reducing false alarm rate, and can be customized and adjusted according to specific needs. At the same time, by establishing a classification model based on defect shape, defects of different shapes can be recorded and counted, which is helpful to analyze and understand the occurrence rules and causes of defects of different shapes.

[0156] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A textile jacquard defect detection method based on deep learning, It is characterized in that The detection method comprises the following steps: S1. Obtain historical textile jacquard image data through the information collection terminal, pre-process the data by using Gaussian filtering and denoising, and decompose the data into a test set and a training set; S2. Design a defect discrimination method based on the deep learning method combined with the training set, and detect the test set according to the discrimination method to generate defect samples; S3, conducting adversarial training on the textile jacquard image data to be detected, generating data similar to the defective samples to expand the defective samples, and establishing a feature extraction model based on the defective samples; S4, mapping the defect feature extraction result to the template textile jacquard image data to analyze its geometric shape; S5. Designing a neural network-based jacquard defect classification model using geometric shapes as training data; S6, connecting the constructed defect feature extraction model and classification model with the management system, and outputting the textile jacquard defect detection and classification results in real time; Mapping the defect feature extraction result to the template textile jacquard image data to analyze its geometric shape comprises the following steps: S41, determining the coordinate system of the textile jacquard image data, and aligning the defect feature extraction results with the image coordinate system respectively; S42, drawing and marking the defect feature extraction result on the image data by using image processing technology; S43, using an iterative threshold method to perform binary segmentation on the image data, and using a boundary tracking method to perform edge extraction to obtain an edge point set of a complete outline of the target; S44, performing polygon fitting on the curve formed by the edge point set, and performing normalization processing on the fitted polygon to extract geometric features; S45, calculating corresponding geometric feature parameters, and comparing the geometric feature parameters with the geometric shape to determine its shape; The process of performing polygon fitting on the curve formed by the edge point set and normalizing the fitted polygon to extract geometric features comprises the following steps: S441, setting the total number of edge point sets, and giving a distance threshold according to the sequence number of the current edge point set, and creating a set of empty linked lists; S442, taking the starting point and the end point of each edge point set as two end points of a virtual line segment, and calculating the distance between the edge points of the two end points and the virtual line segment; S443, if the distance is less than the set threshold, positioning the virtual line segment as an edge of the polygon; S444, obtaining an ordered set of polygon vertices after fitting through the above steps, and performing normalization processing on the fitted polygon by taking the maximum distance from the centroid of the boundary point set to the polygon vertex as a normalization factor in combination with a calculation formula; S445. Calculate geometric features of the normalized polygon, where the geometric features include area, length, width and perimeter.

2. According to claim 1, a textile jacquard defect detection method based on deep learning, It is characterized in that The method of performing adversarial training on the textile jacquard image data to be detected, generating data similar to the defect sample to expand the defect sample, and establishing a feature extraction model according to the defect sample comprises the following steps: S31, generating a learning framework for sample adversarial training including a graph embedding module, two generators, a classifier and a discriminator; S32, mapping the textile jacquard image to a feature space, and generating a synthetic sample similar to the defect sample in the image through a set of generators; S33, generating non-synthesized samples in the image that are different from the defective samples through another group of generators, and classifying the sample labels through a classifier; S34, according to the difference between the synthetic samples and the defective samples identified by the discriminator, a group of generators and discriminators are set to perform adversarial training, so that the generated synthetic samples are closer to the defective samples, and the synthetic samples and the defective samples are trained by the classifier; S35, adding the generated synthetic samples to the defective samples after multiple iterations of training; S36. Construct a feature extraction model based on the expanded defect samples, output the extraction results, perform repetition rate detection on the results, sort the repetition rates, and select the results with the highest repetition rate to generate defect features.

3. The textile jacquard defect detection method based on deep learning according to claim 1, It is characterized in that The method of using an iterative threshold method to perform binary segmentation on the image data and using a boundary tracking method to extract the edge to obtain an edge point set of the complete outline of the target includes the following steps: S431, taking the average of the maximum grayscale value and the minimum grayscale value of the image data as the initial estimated value of the grayscale threshold, and dividing the image data pixels into two groups according to the grayscale threshold; S432, respectively calculating the average grayscale value of all pixels in the two groups of image data pixels; S433, repeating step S431 and step S432 to iterate to obtain a grayscale threshold, setting the grayscale values ​​of pixels greater than the grayscale threshold to a specified value, and setting the grayscale values ​​of the remaining pixels to zero to obtain a binary image; S434, finding the starting point on the coordinate sequence of the binary image by a large step method, and finding the remaining boundary points by a small step clockwise search method, and repeating the operation to complete the extraction of the edge point set.

4. The textile jacquard defect detection method based on deep learning according to claim 1, It is characterized in that The method of designing a neural network-based jacquard defect classification model using geometric shapes as training data comprises the following steps: S51, inputting the different geometric shape features obtained in the above steps into the neural network as model training samples; S52, completing the neural network model training by sequentially implementing the initialization, hidden layer and output layer calculation, and weight calculation steps; S53, using a particle swarm algorithm to determine the optimal weight and threshold of the neural network, and calculate the particle fitness value, and update the particle speed and position; S54, when the termination conditions are met, the weight and threshold optimization results of the neural network are output, and a jacquard defect classification model based on the swarm intelligence optimization neural network is constructed.

5. The textile jacquard defect detection method based on deep learning according to claim 4, It is characterized in that The calculation formula for completing the output layer calculation in the neural network model training by sequentially implementing the initialization, hidden layer and output layer calculation, and weight calculation steps is: ; In the formula, Represents the variable of the i-th input node; f represents the hidden layer activation function; represents the connection weights between neurons in the input layer and the hidden layer, and j represents the number of nodes in the hidden layer; n represents the number of input layer nodes.

6. A textile jacquard defect detection method based on deep learning according to claim 4, It is characterized in that The particle swarm algorithm is used to determine the optimal weight and threshold of the neural network, calculate the particle fitness value, and update the particle speed and position, including the following steps: S531, initializing the relevant parameters of the particle swarm, obtaining the neural network topology, and initializing the weights and threshold length of the neural network; S532, encoding the threshold and weight of the neural network to obtain the initial population of the particle swarm algorithm; S533, using a particle swarm optimization neural network to iterate and obtain the fitness of each group of particles, and determining the particle extreme value and the particle group extreme value through the fitness value, wherein the particle's historical best position is the best position in the particle optimization iterative process; S534, updating the speed and position of the iterative particle through the calculation formula, and determining whether the termination condition is met.

7. The textile jacquard defect detection method based on deep learning according to claim 4, It is characterized in that Outputting the weight and threshold optimization results of the neural network when the termination condition is met, and constructing a jacquard defect classification model based on the crowd intelligence optimization neural network includes the following steps: S541, input samples covering geometric feature polygons, and divide them into a training set and a test set; S542, inputting the training set to complete the neural network training, and constructing a jacquard defect classification model based on the swarm intelligence optimization neural network; S543. Input a test set into the constructed model to test its classification effect, and update it.

8. A textile jacquard defect detection system based on deep learning, used to implement the textile jacquard defect detection method based on deep learning according to any one of claims 1 to 7, It is characterized in that The detection system includes: a data acquisition module, a discrimination module, a building module, an analysis module, a design module and a connection module; Wherein, the data acquisition module is connected to the discrimination module, the discrimination module is connected to the establishment module, the establishment module is connected to the analysis module, the analysis module is connected to the design module, and the design module is connected to the connection module; The data acquisition module is used to obtain historical textile jacquard image data through the information acquisition terminal, pre-process the data by using a denoising method, and decompose the data into a test set and a training set; The discrimination module is used to design a defect discrimination method based on a deep learning method combined with a training set, and to detect a test set according to the discrimination method to generate defect samples; The establishment module is used to perform adversarial training on the textile jacquard image data to be detected, generate data similar to the defect sample to expand the defect sample, and establish a feature extraction model based on the defect sample; The analysis module is used to map the defect feature extraction result to the template textile jacquard image data to analyze its geometric shape; The design module is used to design a neural network-based jacquard defect classification model using geometric shapes as training data; The connection module is used to connect the constructed defect feature extraction model and classification model with the management system, and output the textile jacquard defect detection and classification results in real time.