Digital printing fabric defect detection method

By conducting complexity analysis and classification processing on the grayscale diagram of digital printed fabrics, a defect detection system model is constructed, which solves the problem of insufficient correlation between defect detection efficiency and defects in the prior art, and achieves more efficient and accurate defect detection.

CN119784740AInactive Publication Date: 2025-04-08NANTONG JIASHISHI TEXTILE CO LTD

Patent Information

Application Number
CN202510008454.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-03
Publication Date
2025-04-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the defect detection efficiency and defect detection of digital printed fabrics are insufficiently correlated with defects, resulting in large differences in detection time and accuracy.

Method used

By preprocessing the grayscale map of digital printed fabrics, the information entropy and feature data are extracted, the fabric image complexity is calculated, and the image is secondary processed according to the complexity classification, the defect detection system model is constructed, and the model evaluation and detection result analysis is carried out.

Benefits of technology

It improves the efficiency and accuracy of defect detection of digital printed fabrics, ensures the adequacy of the correlation between the detection results and the defect, and reduces misjudgment and omissions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119784740A_ABST
    Figure CN119784740A_ABST
Patent Text Reader

Abstract

The invention discloses a digital printing fabric defect detection method, and relates to the technical field of electric digital data processing. The digital printing fabric defect detection method comprises the following steps: analyzing complexity; collecting a data set; constructing a model; and testing the sample. According to the method, the fabric image complexity is obtained through the digital printing fabric grey-scale map, the digital printing fabric grey-scale map is subjected to secondary processing according to the fabric image complexity to obtain the model data set, then the to-be-evaluated defect detection system model is constructed through the model data set, and the model evaluation is performed to obtain the defect detection system model. Inputting the image of the test sample into the defect detection system model to obtain a detection result, and finally analyzing the detection result in combination with the preset time interval and the defect index to determine whether alarm information needs to be sent out, so that the defect detection efficiency of the digital printing fabric is improved. The problem that in the prior art, the digital printing fabric defect detection efficiency and the defects of the digital printing fabric are not sufficiently associated is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of electrical digital data processing, in particular to a method for detecting defects in digitally printed fabrics. Background Art

[0002] With the development of modern industrialization, digital printing technology has become an indispensable part of fabric printing technology. Digital printing is to input the required pattern into the computer through various digital input methods, and then the special dye liquid is directly sprayed onto various fabrics or other media by the printing system after being edited and processed by the computer printing color separation system. Digital printing technology reduces the original printing color separation tracing, film making and other processes, greatly shortening the production cycle. However, in daily use, digital printing machines may experience fabric deviation, nozzle blockage, nozzle tilt, stepper motor loss of step, etc., resulting in fabric defects such as white stripes, virtual edges, jagged, overlapping lines, etc. The digital printing fabric defect detection method can detect defects in time and stop feeding to reduce losses.

[0003] In the prior art, the main method for detecting defects in digital printed fabrics is the deep learning model method. The deep learning model method is based on image processing and computer vision technology. It slices the input digital printed fabric image, preprocesses the sliced ​​digital printed fabric image, and sends it to the deep learning network to determine whether there are defects. During identification, traversal identification is performed through a sliding window detection method, which has the characteristics of slow speed and high accuracy.

[0004] For example, a patent application with publication number: CN115855952A discloses a sand sheet disc defect detection method and detection equipment, comprising: collecting an image of a sand sheet disc to be detected; graying the image to obtain a grayscale image; extracting feature information in the grayscale image, and entering the feature information into a database for comparison; wherein the database stores defect type data corresponding to the sand sheet disc features; and judging whether the current sand sheet disc to be detected is a defective product based on the comparison result.

[0005] For example, the invention patent with announcement number: CN115078552B announces a flip chip defect detection method and system, including: obtaining vibration signal samples of flip chip chips with different defects and dividing the vibration signal samples into training samples and test samples, automatically extracting feature information of training samples by multi-granularity scanning to obtain transformation feature vectors, using KPCA feature screening channel to perform spatial dimension reduction on the transformation feature vectors to obtain the transformed feature vectors after dimension reduction, and inputting the transformed feature vectors of the training samples and the transformed feature vectors after dimension reduction into a cascade forest for training to obtain a flip chip defect detection model.

[0006] However, in the process of implementing the technical solution of the invention in the embodiments of the present application, the present application found that the above technology has at least the following technical problems: In the prior art, when the sizes of defects in digitally printed fabrics are different, the corresponding defect detection times through machine learning methods are different; when the numbers of defects in digitally printed fabrics are different, the corresponding detection accuracy through machine learning methods is different. There is a problem that the efficiency of digitally printed fabric defect detection is not sufficiently correlated with the defects of digitally printed fabrics. Summary of the invention

[0007] The embodiment of the present application solves the problem of insufficient correlation between the digital printed fabric defect detection efficiency and the digital printed fabric defects in the prior art by providing a digital printed fabric defect detection method, thereby improving the digital printed fabric defect detection efficiency.

[0008] The embodiment of the present application provides a digital printed fabric defect detection method, comprising the following steps: S1, pre-processing the collected digital printed fabric image to obtain a digital printed fabric grayscale image, obtaining information entropy and feature data based on the digital printed fabric grayscale image, and obtaining the complexity of the fabric image through the information entropy and the feature data; S2, performing complexity classification on the digital printed fabric grayscale image according to the obtained fabric image complexity to obtain a complexity classification result, and performing secondary processing on the digital printed fabric grayscale image according to the complexity classification result to obtain a model data set; S3, constructing a defect detection system model to be evaluated through the model data set, and performing model evaluation on the constructed defect detection system model to be evaluated. If the evaluation passes, execute S4 and record the model as a defect detection system model, otherwise execute S1; S4, input the test sample image into the defect detection system model to obtain the detection result, and analyze the detection result in combination with the preset time interval and the preset defect index to determine whether it is necessary to issue an alarm message.

[0009] Furthermore, the feature data includes edge ratio, energy, contrast and correlation; the edge ratio is used to describe the number of elements in the grayscale image of the digitally printed fabric; the energy is used to indicate the uniformity of the image grayscale distribution of the digitally printed fabric grayscale image; the contrast is used to describe the clarity of the texture of the digitally printed fabric grayscale image; and the correlation is used to describe the similarity of the elements in the digitally printed fabric grayscale image.

[0010] Furthermore, the specific method for obtaining the complexity of the fabric image is as follows: obtaining complexity weights from a preset database, the complexity weights including a first complexity weight, a second complexity weight, a third complexity weight, a fourth complexity weight and a fifth complexity weight; obtaining information entropy based on the grayscale level of the digital printed fabric grayscale image and the corresponding pixel occurrence; obtaining feature data based on the digital printed fabric grayscale image and the grayscale co-occurrence matrix, and deriving the complexity of the fabric image by combining the information entropy and the complexity weight.

[0011] Furthermore, the specific method for obtaining the model data set is as follows: comparing the complexity of the fabric image with the preset complexity classification index, classifying the digital printing fabric grayscale image with a higher complexity classification index than the preset complexity classification index into a high complexity queue, and classifying the digital printing fabric grayscale image with a complexity classification index not higher than the preset complexity classification index into a low complexity queue; obtaining the digital printing fabric grayscale image from the high complexity queue, partitioning the digital printing fabric grayscale image according to the feature data of the digital printing fabric grayscale image, obtaining the complexity classification result of the partitioned digital printing fabric, and judging whether the partitioned digital printing fabric grayscale image is lower than the preset secondary classification index. If it is lower than the preset secondary classification index, classifying the partitioned digital printing fabric grayscale image into the low complexity queue, otherwise not processing; obtaining the digital printing grayscale image from the low complexity queue, marking defects on the digital printing grayscale image and recording defect information; storing the defect-annotated digital printing grayscale image in the model data set according to the defect information classification, and performing stratified sampling on the model data set to obtain a training set, a validation set and a test set.

[0012] Furthermore, the specific process of constructing the defect detection system model to be evaluated is as follows: use the training set to train the selected model to obtain the training model; use the validation set to verify the training model, and judge the performance of the training model on the validation set. If the performance of the training model on the validation set reaches the preset model fitting standard, then this model is recorded as the defect detection system model to be evaluated, otherwise continue to use the training set to train the training model until the performance on the validation set reaches the preset model fitting standard.

[0013] Furthermore, the specific process of the model evaluation is as follows: input the test set into the defect detection system model to be evaluated to obtain the test results, compare the test results with the actual results to obtain a performance evaluation index, and the performance evaluation index is used to numerically describe the accuracy of the defect detection system model to be evaluated; combine the performance evaluation index and the detection efficiency index to obtain an overall evaluation index, and compare the overall evaluation index with the preset defect detection system evaluation index. If the preset defect detection system evaluation index is met, the evaluation passes, otherwise the evaluation fails. The overall evaluation index represents the overall performance of the defect detection system model to be evaluated, and the detection efficiency index is used to quantify the degree of deviation in the number of detections of the defect detection system model to be evaluated per unit time.

[0014] Furthermore, the specific method for obtaining the performance evaluation index is as follows: obtaining the performance evaluation parameters of the defect detection system model to be evaluated, the performance evaluation parameters including the F score, the intersection-over-union ratio and the accuracy; obtaining the performance evaluation weights according to the performance requirements of the defect detection system model, the performance evaluation weights including the first performance weight, the second performance weight and the third performance weight; combining the performance evaluation parameters and the performance evaluation weights to obtain the performance evaluation index, the performance evaluation index is calculated using the following formula: ; Where t represents the number of the defect detection system model to be evaluated, , T represents the total number of defect detection systems to be evaluated, represents the performance evaluation index of the tth defect detection system model to be evaluated, represents the F score of the tth defect detection system model to be evaluated, represents the reference F score, is the F-score reference deviation, represents the intersection-over-union ratio of the tth defect detection system model to be evaluated, represents the reference intersection-over-union ratio, is the intersection-and-union ratio reference deviation, represents the accuracy of the tth defect detection system model to be evaluated, represents the reference accuracy, is the accuracy reference deviation, is the first performance weight, is the second performance weight, is the third performance weight.

[0015] Furthermore, the specific method for obtaining the detection efficiency index is as follows: the number of test set images that the defect detection system model to be evaluated has completed recognition within a unit time is obtained, and the detection efficiency index of the defect detection system model to be evaluated is obtained based on this, and the detection efficiency index is calculated using the following formula: ; Where t represents the number of the defect detection system model to be evaluated, , T represents the total number of defect detection systems to be evaluated, represents the detection efficiency index of the tth defect detection system model to be evaluated, It represents the number of test set images recognized by the tth defect detection system model to be evaluated in unit time, Indicates the number of detections per reference unit time, It is the reference deviation of the number of detections per unit time of the model.

[0016] Furthermore, the specific method for obtaining the overall evaluation index is as follows: obtaining an overall evaluation weight according to the task requirements of the defect detection system model, the overall evaluation weight including a first overall weight and a second overall weight; combining the obtained performance evaluation index, the detection efficiency index and the overall evaluation weight to obtain an overall evaluation index, the overall evaluation index is calculated using the following formula: ; Where t represents the number of the defect detection system model to be evaluated, , T represents the total number of defect detection systems to be evaluated, represents the overall evaluation index of the tth defect detection system model to be evaluated, is the reference performance evaluation index, is the reference detection efficiency index, is the first overall weight, is the second overall weight, is the reference threshold, represents the performance evaluation index of the tth defect detection system model to be evaluated, Represents the detection efficiency index of the tth defect detection system model to be evaluated.

[0017] Furthermore, the specific process of analyzing the detection results is as follows: inputting the test sample image into the defect detection system model to obtain the detection result; extracting the number of times the defect is recognized from the detection result, and judging whether the number of times the defect is recognized within the preset time interval is greater than the preset defect index; if it is greater than the preset defect index, issuing an alarm message, otherwise clearing the recognition times and restarting the recognition at the next preset time interval.

[0018] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. The complexity of the fabric image is obtained by analyzing the grayscale image of the digitally printed fabric, and the grayscale image of the digitally printed fabric is secondary processed to obtain a model data set. Then, the defect detection system model to be evaluated is constructed through the model data set, and the model evaluation is performed to obtain the defect detection system model. Then, the test sample image is input into the defect detection system model to obtain the detection result. Finally, the detection result is analyzed in combination with the preset time interval and defect index, thereby adjusting the detection partition according to the complexity of the printing pattern, thereby achieving the improvement of the defect detection efficiency of the digitally printed fabric, and effectively solving the problem of insufficient correlation between the defect detection efficiency of the digitally printed fabric and the defects of the digitally printed fabric in the prior art.

[0019] 2. By processing the grayscale image of digitally printed fabric, information entropy and feature data are obtained, based on which the complexity of the fabric image is obtained. Then, the digitally printed fabric grayscale image is classified according to the complexity of the fabric image. Based on this, the digitally printed fabric grayscale image is processed again to obtain the model data set. The model data set is stratified sampled to obtain the training set, verification set and test set, thereby achieving a reasonable division of the model data set and further improving the generalization ability of the defect detection system model.

[0020] 3. The test results are obtained by inputting the test set into the defect detection system model to be evaluated, and the performance evaluation index is obtained by comparing it with the actual results. The overall evaluation index is then obtained by combining it with the detection efficiency index. Finally, the overall evaluation index is compared with the preset defect detection system evaluation index. If the preset defect detection system evaluation index is met, the evaluation passes, otherwise the evaluation fails, thereby realizing the quantification of the overall performance of the defect detection system model to be evaluated, and then achieving a more accurate evaluation of the overall performance of the defect detection system model to be evaluated. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A flow chart of a method for detecting defects in digitally printed fabrics provided in an embodiment of the present application; Figure 2 A schematic diagram of the changes in the overall evaluation index provided in an embodiment of the present application. DETAILED DESCRIPTION

[0022] The embodiment of the present application solves the problem of insufficient correlation between the efficiency of digital printed fabric defect detection and the defects of digital printed fabric in the prior art by providing a digital printed fabric defect detection method. The digital printed fabric grayscale image is obtained by preprocessing the collected digital printed fabric image, and information entropy and feature data are extracted based on the digital printed fabric grayscale image to obtain the complexity of the fabric image. Then, complexity classification is performed based on the complexity of the fabric image to obtain a complexity classification result. The digital printed fabric grayscale image is secondary processed to generate a model data set. Then, the model data set is used to establish a defect detection system model to be evaluated and the model is evaluated. If the evaluation passes, the model is confirmed to be a defect detection system model. Otherwise, the model is re-established. Finally, the test sample image is input into the defect detection system model to obtain the detection result, and whether to issue an alarm message is determined in combination with a preset time interval and a preset defect indicator, thereby improving the efficiency of digital printed fabric defect detection.

[0023] The technical solution in the embodiment of the present application is to solve the problem that the above-mentioned digital printed fabric defect detection efficiency is not sufficiently correlated with the defects of the digital printed fabric. The overall idea is as follows: The fabric image complexity is obtained by analyzing the obtained digital printed fabric grayscale image, and the digital printed fabric grayscale image is secondary processed to obtain a model data set. Then, the defect detection system model to be evaluated is constructed through the model data set, and the model evaluation is performed to obtain the defect detection system model. Finally, the test sample image is input into the defect detection system model to obtain the detection result, and the detection result is analyzed in combination with the preset time interval and defect index, so as to achieve the effect of improving the efficiency of digital printed fabric defect detection.

[0024] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0025] like Figure 1 As shown, it is a flow chart of the digital printing fabric defect detection method provided by an embodiment of the present application, and the method includes the following steps: S1, preprocessing the collected digital printing fabric image to obtain a digital printing fabric grayscale image, obtaining information entropy and feature data based on the digital printing fabric grayscale image, and obtaining the complexity of the fabric image through the information entropy and the feature data, the digital printing fabric image is used to record the collected fabric printing information, the preprocessing includes graying and Gaussian filtering, the digital printing fabric grayscale image refers to the digital printing fabric image after preprocessing, the information entropy represents the average amount of information in the digital printing fabric image, the feature data is used to reflect the characteristics of the internal elements of the digital printing fabric image, and the fabric image complexity is used to reflect the richness and difference of the digital printing fabric image; S2, according to the obtained fabric image complexity, the digital printing fabric grayscale image is complexity classified to obtain a complexity classification result, and according to the complexity classification result, the digital printing fabric grayscale image is secondary processed to obtain a model data set, the model data set includes a training set, a validation set and a test set, and the complexity classification refers to comparing Deviation between the complexity of the fabric image and the preset complexity classification index. The preset complexity classification index is determined by the preset personnel according to the actual printing pattern of the digital printed fabric. The complexity classification result includes a high complexity queue and a low complexity queue. The secondary processing includes processing the digital printed fabric grayscale images of the high complexity queue and the low complexity queue respectively. S3, constructing the defect detection system model to be evaluated through the model data set, and performing model evaluation on the constructed defect detection system model to be evaluated. If the evaluation passes, execute S4 and record the model as the defect detection system model, otherwise execute S1. Model evaluation refers to inputting the test set into the defect detection system model to be evaluated to evaluate the performance of the defect detection system model to be evaluated; S4, inputting the test sample image into the defect detection system model to obtain the detection result, and analyzing the detection result in combination with the preset time interval and the preset defect index to determine whether it is necessary to issue an alarm message. The preset time interval is determined by the preset personnel according to the production speed of the digital printed fabric, and the preset defect index is set by the preset personnel according to the measurement accuracy of the defect detection system model.

[0026] In this embodiment, preprocessing is crucial for the subsequent analysis of the complexity of the fabric image. Grayscaling converts the color digital fabric print image into a digital print image grayscale image, which reduces the amount of calculation while retaining the main features of the digital print image. Gaussian filtering removes the noise in the digital print image grayscale image and improves the image quality of the digital print image grayscale image. The preset complexity classification index should be set according to the actual printing pattern of the digital printed fabric to ensure the rationality of the classification result. The construction of the model data set is the key to constructing the defect detection system to be evaluated. By reasonably dividing the training set, the validation set and the test set, the effectiveness and generalization ability of the model can be ensured. The improvement of the efficiency of digital printed fabric defect detection is achieved, and the problem of insufficient correlation between the efficiency of digital printed fabric defect detection and the defects of digital printed fabric in the prior art is solved.

[0027] Furthermore, the feature data include edge ratio, energy, contrast and correlation; the edge ratio is used to describe the number of elements in the grayscale image of digitally printed fabrics; the energy is used to indicate the uniformity of the image grayscale distribution of the digitally printed fabrics grayscale image; the contrast is used to describe the clarity of the texture of the digitally printed fabrics grayscale image; and the correlation is used to describe the similarity of the elements in the digitally printed fabrics grayscale image.

[0028] In this embodiment, the edge ratio refers to the ratio of the number of pixels in the grayscale image of the digital printed fabric whose grayscale value differs from the grayscale value of the adjacent pixels by more than a preset grayscale threshold to the total number of pixels. The preset grayscale threshold is determined by the specific application scenario. The energy is obtained by the sum of the squares of each element of the grayscale co-occurrence matrix, the contrast is obtained by squaring the difference between each grayscale level pair of the grayscale co-occurrence matrix, multiplying the result by the probability of appearing in the grayscale co-occurrence matrix, and adding the results of all grayscale level pairs. The correlation is obtained by multiplying the difference between each grayscale level pair of the grayscale co-occurrence matrix elements by the mean difference, multiplying the result by the probability of appearing in the grayscale co-occurrence matrix, and adding the results of all grayscale level pairs.

[0029] Furthermore, a specific method for obtaining the complexity of a fabric image is as follows: obtaining complexity weights from a preset database, the complexity weights including a first complexity weight, a second complexity weight, a third complexity weight, a fourth complexity weight and a fifth complexity weight, the first complexity weight being used to describe the degree of influence of information entropy on the complexity of a fabric image, the second complexity weight being used to describe the degree of influence of an edge ratio on the complexity of a fabric image, the third complexity weight being used to describe the degree of influence of energy on the complexity of a fabric image, the fourth complexity weight being used to describe the degree of influence of contrast on the complexity of a fabric image, and the fifth complexity weight being used to describe the degree of influence of correlation on the complexity of a fabric image; obtaining information entropy based on the grayscale level of a grayscale image of a digitally printed fabric and the corresponding occurrence of pixels; obtaining feature data based on the grayscale image of a digitally printed fabric and a grayscale co-occurrence matrix, and deriving the complexity of the fabric image by combining information entropy and complexity weights.

[0030] In this embodiment, the information entropy is obtained by weighted summing the probability of each gray level in the digital printed fabric grayscale image. The probability of each gray level is the ratio of the number of pixels of the gray level to the total number of pixels in the digital printed fabric grayscale image. The fabric image complexity is specifically calculated using the following formula: ; Where m represents the number of the grayscale image of digital printed fabrics. , M is the total number of grayscale images of digitally printed fabrics, is the fabric image complexity of the mth digital printed fabric grayscale image, is the information entropy of the mth digital printed fabric grayscale image, is the edge ratio of the mth digital printed fabric grayscale image, is the energy of the mth digital printed fabric grayscale image, is the contrast of the grayscale image of the mth digital printed fabric, is the correlation of the mth digital printed fabric grayscale image, is the first complexity weight, is the second complexity weight, is the third complexity weight, is the fourth complexity weight, is the fifth complexity weight.

[0031] Specifically, the first complexity weight is obtained from a preset database. In a specific implementation, the relationship between the information entropy and the image complexity is fitted by obtaining the information entropy of the fabric image in the historical time period and the corresponding image complexity to obtain a fitting curve, and then the information entropy corresponding to the grayscale image of the digital printed fabric is input into the fitting curve to obtain the first complexity weight.

[0032] Specifically, the second complexity weight is obtained from a preset database. In a specific implementation, the relationship between the edge ratio and the image complexity is fitted by obtaining the edge ratio of the fabric image in the historical time period and the corresponding image complexity to obtain a fitting curve, and then the edge ratio corresponding to the digital printed fabric grayscale image is input into the fitting curve to obtain the second complexity weight.

[0033] Specifically, the third complexity weight is obtained from a preset database. In a specific implementation, the energy of the fabric images in the historical time period is obtained and the corresponding image complexity is fitted to obtain a fitting curve based on the relationship between energy and image complexity, and then the energy corresponding to the grayscale image of the digital printed fabric is input into the fitting curve to obtain the third complexity weight.

[0034] Specifically, the fourth complexity weight is obtained from a preset database. In a specific implementation, the contrast of the fabric image in the historical time period is obtained and the corresponding image complexity is fitted to obtain a fitting curve based on the relationship between the contrast and the image complexity, and then the contrast corresponding to the grayscale image of the digital printed fabric is input into the fitting curve to obtain the fourth complexity weight.

[0035] Specifically, the fifth complexity weight is obtained from a preset database. In a specific implementation, the relationship between the correlation and the image complexity is fitted by obtaining the correlation of the fabric images in the historical time period and the corresponding image complexity to obtain a fitting curve, and then the correlation corresponding to the grayscale image of the digital printed fabric is input into the fitting curve to obtain the fifth complexity weight.

[0036] Furthermore, a specific method for acquiring the model data set is as follows: comparing the complexity of the fabric image with a preset complexity classification index, classifying the digitally printed fabric grayscale image with a complexity higher than the preset complexity classification index into a high complexity queue, and classifying the digitally printed fabric grayscale image with a complexity not higher than the preset complexity classification index into a low complexity queue; obtaining the digitally printed fabric grayscale image from the high complexity queue, partitioning the digitally printed fabric grayscale image according to the feature data of the digitally printed fabric grayscale image, where the partitioning means dividing the digitally printed fabric grayscale image into regions of different sizes according to the feature data of the digitally printed fabric grayscale image, obtaining the complexity classification result of the digitally printed fabric after partitioning, and judging whether the digitally printed fabric grayscale image after partitioning is lower than the preset complexity. A secondary classification index is set. If it is lower than the preset secondary classification index, the partitioned digital printed fabric grayscale image is classified into a low-complexity queue, otherwise the partitioned digital printed fabric grayscale image is partitioned again. The preset complexity classification index and the preset secondary classification index are determined by the preset personnel according to the actual printing pattern of the digital printed fabric; the digital printing grayscale image is obtained from the low-complexity queue, the defects of the digital printing grayscale image are annotated and the defect information is recorded, and the defect information includes the location and size information of the defect; the digital printing grayscale image after defect annotation is classified and stored in the model data set according to the defect information, and the model data set is stratified sampled to obtain the training set, the validation set and the test set.

[0037] In this embodiment, the digitally printed fabric grayscale images of the high-complexity queue have complex textures and colors, and need to be further divided into areas of different sizes according to feature data. The defects of the digitally printed fabric grayscale images of the low-complexity queue are directly annotated, and then the annotated digitally printed fabric grayscale images are placed in a training set. The training set is then divided into a verification set and a test set to ensure that both include digitally printed grayscale images of different defect information categories and maintain a distribution ratio similar to that of the training set, thereby improving the speed of building the defect detection system model.

[0038] Furthermore, the specific process of constructing the defect detection system model to be evaluated is as follows: the training set is used to train the candidate model to obtain the training model, the candidate model is YOLOv5, YOLOv5 is a target detection model with high accuracy and fast inference speed, training refers to inputting the training set into YOLOv5 and outputting the training model, the training model refers to the model of the candidate model that fits the training set after training; the training model is verified using the validation set to judge the performance of the training model on the validation set, if the performance of the training model on the validation set reaches the preset model fitting standard, then this model is recorded as the defect detection system model to be evaluated, otherwise continue to use the training set to train the training model until the performance on the validation set reaches the preset model fitting standard, and the preset model fitting standard is determined by the preset personnel according to the model accuracy.

[0039] In this embodiment, YOLOv5 is selected as the candidate model. YOLOv5 can achieve faster reasoning speed while maintaining high accuracy, and is suitable for use in fabric defect detection system models with real-time and large-scale data sets. YOLOv5 is trained using a training set to obtain a training model that fits the training set, and then an independent validation set is used to validate the training model. The purpose is to evaluate the performance of the training model on data that has not participated in the training, so as to test the generalization ability of the model.

[0040] Furthermore, the specific process of model evaluation is as follows: input the test set into the defect detection system model to be evaluated to obtain the test results, compare the test results with the actual results to obtain the performance evaluation index, and the performance evaluation index is used to numerically describe the accuracy of the defect detection system model to be evaluated; combine the performance evaluation index and the detection efficiency index to obtain the overall evaluation index, and compare the overall evaluation index with the preset defect detection system evaluation index. If the preset defect detection system evaluation index is met, the evaluation passes, otherwise the evaluation fails. The overall evaluation index represents the overall performance of the defect detection system model to be evaluated, and the detection efficiency index is used to quantify the degree of deviation in the number of detections of the defect detection system model to be evaluated per unit time. The preset defect detection system evaluation index is determined by the preset personnel based on the maximum measurement error value of the defect detection system model.

[0041] In this embodiment, the performance evaluation index reflects the accuracy of the defect detection system model to be evaluated in identifying defects, and is one of the key indicators for evaluating the overall performance of the defect detection system model to be evaluated; the detection efficiency index can quantify the degree of deviation in the number of detections of the defect detection system model to be evaluated per unit time, and reflects the work efficiency of the defect detection system model in practical applications. By combining the performance evaluation index and the detection efficiency index, a more comprehensive overall evaluation index can be obtained, thereby improving the effectiveness and reliability of the defect detection system model in practical use.

[0042] Furthermore, the specific method for obtaining the performance evaluation index is as follows: obtaining the performance evaluation parameters of the defect detection system model to be evaluated, the performance evaluation parameters include F score, intersection-over-union ratio and accuracy; obtaining the performance evaluation weight according to the performance requirements of the defect detection system model, the performance requirements are determined by the preset personnel according to the actual detection requirements of the defect detection system model, the performance evaluation weight includes the first performance weight, the second performance weight and the third performance weight, the first performance weight is used to describe the influence of the F score on the performance evaluation index, the second performance weight is used to describe the influence of the intersection-over-union ratio on the performance evaluation index, and the third performance weight is used to describe the influence of the accuracy on the performance evaluation index; combining the performance evaluation parameters and the performance evaluation weight to obtain the performance evaluation index, the performance evaluation index is calculated using the following formula: ; Where t represents the number of the defect detection system model to be evaluated, , T represents the total number of defect detection systems to be evaluated, represents the performance evaluation index of the tth defect detection system model to be evaluated, represents the F score of the tth defect detection system model to be evaluated, represents the reference F score, is the F-score reference deviation, represents the intersection-over-union ratio of the tth defect detection system model to be evaluated, represents the reference intersection-over-union ratio, is the intersection-and-union ratio reference deviation, represents the accuracy of the tth defect detection system model to be evaluated, represents the reference accuracy, is the accuracy reference deviation, is the first performance weight, is the second performance weight, is the third performance weight.

[0043] In this embodiment, the F score is calculated by two indicators, precision and recall. The precision is used to describe the proportion of samples that are truly positive among all samples predicted to be positive. The recall is used to describe the proportion of samples that are correctly predicted to be positive among all samples of actual positive categories. The intersection-over-union ratio is used to describe the degree of overlap between the detected defect border and the actual defect border. The intersection-over-union ratio is obtained by dividing the area of ​​the overlapping part of the two rectangular borders by the area of ​​the non-overlapping part. The area of ​​the non-overlapping part is obtained by adding the areas of the two rectangular borders and subtracting the area of ​​the overlapping part. The accuracy is used to describe the proportion of samples correctly predicted by the load model of the power system to be evaluated. Specifically, the first performance weight is obtained from a preset database. In a specific embodiment, a fitting curve is obtained by fitting the relationship between the F score and the performance evaluation index of the defect detection system model to be evaluated in a historical time period and the corresponding number of correct detections, and the first performance weight corresponding to the input F score is obtained according to the fitting curve; Specifically, the second performance weight is obtained from a preset database. In a specific embodiment, a fitting curve is obtained by fitting the relationship between the intersection-and-union ratio and the performance evaluation index of the intersection-and-union ratio of the defect detection system model to be evaluated in a historical time period and the pixel area of ​​the corresponding detection frame, and the second performance weight corresponding to the input intersection-and-union ratio is obtained according to the fitting curve; Specifically, the third performance weight is obtained from a preset database. In a specific embodiment, a fitting curve is obtained by fitting the relationship between the accuracy rate and the performance evaluation index of the defect detection system model to be evaluated in a historical time period and the corresponding number of correct detections, and the third performance weight corresponding to the input accuracy rate is obtained according to the fitting curve.

[0044] In order to simplify the description of the independent variables of the performance evaluation index, the F score index is defined , intersection ratio index , accuracy index , It indicates the degree of deviation between the F score of the t-th defect detection system model to be evaluated and the reference F score. The reference F score is obtained by the mean of the F scores of the defect detection system model to be evaluated in the historical time period. The F score reference deviation is obtained by the average difference of the F scores of the defect detection system model to be evaluated in the historical time period. It represents the degree of deviation between the intersection-and-union ratio of the tth defect detection system model to be evaluated and the reference intersection-and-union ratio. The reference intersection-and-union ratio is obtained by the mean of the intersection-and-union ratios of the defect detection system model to be evaluated in the historical time period. The reference deviation of the intersection-and-union ratio is obtained by the average difference of the intersection-and-union ratios of the defect detection system model to be evaluated in the historical time period. It represents the degree of deviation between the accuracy of the t-th defect detection system model to be evaluated and the reference accuracy. The reference accuracy is obtained by the mean accuracy of the defect detection system model to be evaluated in the historical time period. The accuracy reference deviation is obtained by the average difference in the accuracy of the defect detection system model to be evaluated in the historical time period. The simplified formula is: , taking the first performance weight as 0.4, the second performance weight and the third performance weight as 0.3 respectively as an example, the statistical table of the change of the performance evaluation index is shown in Table 1: Table 1 Statistics of performance evaluation index changes

[0045] If the preset defect detection system evaluation index is set to 0.6, it can be seen from Table 1 that the performance evaluation indexes corresponding to the second, third and fourth groups of data are all lower than the preset defect detection system evaluation index. Taking the second group as an example, the corresponding accuracy index is the largest, but since the F score index corresponding to the second group of data is the smallest, the corresponding performance evaluation index is lower than the preset defect detection system evaluation index. Although the F score index, intersection ratio index and accuracy index of the first group of data are not the largest data in the table, the performance evaluation index corresponding to the first group of data is the largest based on the three independent variables, which meets the preset defect detection system evaluation index. In general, the performance evaluation index needs to be comprehensively judged, and the corresponding performance evaluation index cannot be estimated based on the size of a single independent variable. It can more intuitively describe the performance differences of the defect detection systems to be evaluated, and realize the numerical evaluation of the accuracy of the defect detection system model.

[0046] Furthermore, the specific method for obtaining the detection efficiency index is as follows: obtain the number of test set images that the defect detection system model to be evaluated has completed recognizing in a unit time, and based on this, obtain the detection efficiency index of the defect detection system model to be evaluated. The detection efficiency index is calculated using the following formula: ; Where t represents the number of the defect detection system model to be evaluated, , T represents the total number of defect detection systems to be evaluated, represents the detection efficiency index of the tth defect detection system model to be evaluated, It represents the number of test set images recognized by the tth defect detection system model to be evaluated in unit time, Indicates the number of detections per reference unit time, It is the reference deviation of the number of detections per unit time of the model.

[0047] In this embodiment, the detection efficiency index represents the degree of deviation of the number of detections per unit time of the defect detection system model to be evaluated. It is determined whether the number of test set images recognized by the defect detection system model to be evaluated within a unit time is greater than the number of detections per reference unit time. The number of detections per reference unit time is obtained by the mean number of detections per unit time of the defect detection system model to be evaluated in the historical time period. The reference deviation of the number of detections per unit time of the model is obtained by the average difference in the number of detections per unit time of the defect detection system model to be evaluated in the historical time period. If the number of test set images recognized by the defect detection system model to be evaluated within a unit time is greater than the number of detections per reference unit time, the detection efficiency index at this time is 1. Otherwise, the detection efficiency index is calculated according to the formula, thereby realizing the numerical evaluation of the degree of deviation of the number of detections of the defect detection system model.

[0048] Furthermore, the specific method for obtaining the overall evaluation index is as follows: the overall evaluation weight is obtained according to the task requirements of the defect detection system model. The task requirements are determined by the preset personnel according to the actual application scenarios of the defect detection system model. The overall evaluation weight includes a first overall weight and a second overall weight. The first overall weight is used to describe the degree of influence of the performance evaluation index on the overall evaluation index. The second overall weight is used to describe the degree of influence of the detection efficiency index on the overall evaluation index. The overall evaluation index is obtained by combining the obtained performance evaluation index, detection efficiency index and overall evaluation weight. The overall evaluation index is calculated using the following formula: ; Where t represents the number of the defect detection system model to be evaluated, , T represents the total number of defect detection systems to be evaluated, represents the overall evaluation index of the tth defect detection system model to be evaluated, is the reference performance evaluation index, is the reference detection efficiency index, is the first overall weight, is the second overall weight, is the reference threshold, represents the performance evaluation index of the tth defect detection system model to be evaluated, Represents the detection efficiency index of the tth defect detection system model to be evaluated.

[0049] In this embodiment, specifically, the first overall weight is obtained from a preset database. In a specific embodiment, a fitting curve is obtained by fitting the relationship between the performance evaluation index and the overall evaluation index of the defect detection system model to be evaluated in a historical time period and the proportion of correct detections, and the first overall weight corresponding to the input performance evaluation index is obtained according to the fitting curve.

[0050] Specifically, the second overall weight is obtained from a preset database. In a specific embodiment, a fitting curve is obtained by fitting the relationship between the detection efficiency index and the overall evaluation index of the defect detection system model to be evaluated in a historical time period with the number of detections per unit time, and the second overall weight corresponding to the input detection efficiency index is obtained according to the fitting curve.

[0051] Specifically, define the performance evaluation comparison index , Detection efficiency comparison index , It represents the ratio of the performance evaluation index of the t-th defect detection system model to be evaluated to the reference performance evaluation index. The reference performance evaluation index is obtained by the average of the performance evaluation indexes of the defect detection system model to be evaluated in the historical time period. It represents the ratio of the detection efficiency index of the t-th defect detection system model to be evaluated to the reference detection efficiency index. The reference detection efficiency index is obtained by the mean of the detection efficiency index of the defect detection system model to be evaluated in the historical time period. The reference threshold is obtained by the average difference of the performance evaluation index of the defect detection system model to be evaluated in the historical time period. The simplified formula is: , taking the first overall weight as 0.6, the second overall weight as 0.4, and the reference threshold as 0.2 as an example, Figure 2 As shown, it is a schematic diagram of the change of the overall evaluation index provided in the embodiment of the present application. It can be seen from the figure that when the performance evaluation comparison index of the defect detection system model to be evaluated is less than the reference threshold, the overall evaluation index at this time is 0. If it is not less than the reference threshold, the overall evaluation index is positively correlated with the performance evaluation comparison index and the detection efficiency comparison index, thereby realizing the numerical evaluation of the overall performance of the defect detection system model.

[0052] Furthermore, the specific process of analyzing the detection results is as follows: input the test sample image into the defect detection system model to obtain the detection result, the detection result includes whether there is a defect in the test sample image and the specific location and type information of the defect; extract the number of times the defect is recognized from the detection result, and judge whether the number of times the defect is recognized within the preset time interval is greater than the preset defect index. If it is greater than the preset defect index, an alarm message is issued, otherwise the recognition number is cleared and the recognition is restarted at the next preset time interval.

[0053] In this embodiment, by analyzing the detection results in combination with preset time intervals and preset defect indicators, the function of accurately identifying digital printed fabric defects is achieved. The detection method of the defect detection system model can also be adjusted by changing the preset time intervals and preset defect indicators to make the defect detection system model suitable for different application scenarios.

[0054] In summary, the embodiment of the present application analyzes the grayscale image of the digitally printed fabric to obtain the complexity of the fabric image, and based on this, performs secondary processing on the grayscale image of the digitally printed fabric to obtain a model data set, and then constructs a defect detection system model to be evaluated through the model data set, and performs model evaluation to obtain a defect detection system model, and then inputs the test sample image into the defect detection system model to obtain the detection result, and finally analyzes the detection result in combination with the preset time interval and defect index, thereby achieving the adjustment of the detection partition according to the complexity of the printed pattern, and then achieving the improvement of the defect detection efficiency of the digitally printed fabric, and effectively solving the problem of insufficient correlation between the defect detection efficiency of the digitally printed fabric and the defects of the digitally printed fabric in the prior art.

[0055] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0056] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0057] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0058] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0059] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0060] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for detecting defects in digitally printed fabrics, characterized in that: The following steps are involved: S1, preprocessing the collected digital printed fabric image to obtain a digital printed fabric grayscale image, obtaining information entropy and feature data according to the digital printed fabric grayscale image, and obtaining fabric image complexity through the information entropy and feature data; S2, performing complexity classification on the digital printed fabric grayscale image according to the obtained fabric image complexity to obtain a complexity classification result, and performing secondary processing on the digital printed fabric grayscale image according to the complexity classification result to obtain a model data set; S3, constructing a defect detection system model to be evaluated through the model data set, and performing model evaluation on the constructed defect detection system model to be evaluated. If the evaluation passes, execute S4 and record the model as a defect detection system model. Otherwise, execute S1; S4, input the test sample image into the defect detection system model to obtain the detection result, and analyze the detection result in combination with the preset time interval and the preset defect index to determine whether an alarm message needs to be issued.

2. The method for detecting defects in digitally printed fabrics according to claim 1, characterized in that: The characteristic data include edge ratio, energy, contrast and correlation; The edge ratio is used to describe the number of elements in the grayscale image of the digitally printed fabric; The energy is used to represent the uniformity of grayscale distribution of the digital printed fabric grayscale image; The contrast is used to describe the clarity of the grayscale texture of the digitally printed fabric; The correlation is used to describe the similarity of elements in the grayscale image of the digitally printed fabric.

3. The digital printed fabric defect detection method according to claim 1, characterized in that: The specific method for obtaining the complexity of the fabric image is as follows: Obtaining complexity weights from a preset database, the complexity weights comprising a first complexity weight, a second complexity weight, a third complexity weight, a fourth complexity weight, and a fifth complexity weight; The information entropy is obtained according to the grayscale level of the digital printed fabric grayscale image and the corresponding pixel appearance; The feature data is obtained according to the grayscale image and grayscale co-occurrence matrix of digital printed fabrics, and the complexity of fabric images is obtained by combining information entropy and complexity weight.

4. The digital printed fabric defect detection method according to claim 1, characterized in that: The specific method for obtaining the model data set is as follows: Compare the complexity of the fabric image with the preset complexity classification index, classify the digital printed fabric grayscale image with a complexity higher than the preset complexity classification index into a high complexity queue, and classify the digital printed fabric grayscale image with a complexity not higher than the preset complexity classification index into a low complexity queue; Obtaining a digitally printed fabric grayscale image from a high-complexity queue, partitioning the digitally printed fabric grayscale image according to feature data of the digitally printed fabric grayscale image, obtaining a complexity classification result of the digitally printed fabric after partitioning, and judging whether the digitally printed fabric grayscale image after partitioning is lower than a preset secondary classification index; if it is lower than the preset secondary classification index, classifying the digitally printed fabric grayscale image after partitioning into a low-complexity queue, otherwise not processing; Obtain the digital printing grayscale image from the low-complexity queue, mark the defects of the digital printing grayscale image and record the defect information; The defect-annotated digital printing grayscale images are classified and stored in the model data set according to the defect information, and the model data set is stratified sampled to obtain the training set, validation set and test set.

5. The digital printed fabric defect detection method according to claim 1, characterized in that: The specific process of constructing the defect detection system model to be evaluated is as follows: Use the training set to train the candidate model to obtain a training model; Use the validation set to validate the training model and determine the performance of the training model on the validation set. If the performance of the training model on the validation set meets the preset model fitting standard, then this model is recorded as the defect detection system model to be evaluated. Otherwise, continue to use the training set to train the training model until the performance on the validation set meets the preset model fitting standard.

6. The digital printed fabric defect detection method according to claim 1, characterized in that: The specific process of model evaluation is as follows: Inputting the test set into the defect detection system model to be evaluated to obtain the test result, and comparing the test result with the actual result to obtain the performance evaluation index, wherein the performance evaluation index is used to numerically describe the accuracy of the defect detection system model to be evaluated; The overall evaluation index is obtained by combining the performance evaluation index and the detection efficiency index. The overall evaluation index is compared with the preset defect detection system evaluation index. If the preset defect detection system evaluation index is met, the evaluation passes, otherwise the evaluation fails. The overall evaluation index represents the overall performance of the defect detection system model to be evaluated, and the detection efficiency index is used to quantify the degree of deviation in the number of detections per unit time of the defect detection system model to be evaluated.

7. The digital printed fabric defect detection method according to claim 6, characterized in that: The specific method for obtaining the performance evaluation index is as follows: Obtaining performance evaluation parameters of the defect detection system model to be evaluated, wherein the performance evaluation parameters include F score, intersection-over-union ratio and accuracy; Acquire performance evaluation weights according to performance requirements of the defect detection system model, wherein the performance evaluation weights include a first performance weight, a second performance weight, and a third performance weight; The performance evaluation parameter and the performance evaluation weight are combined to obtain a performance evaluation index, which is calculated using the following formula: ; Where t represents the number of the defect detection system model to be evaluated, , T represents the total number of defect detection systems to be evaluated, represents the performance evaluation index of the tth defect detection system model to be evaluated, represents the F score of the tth defect detection system model to be evaluated, represents the reference F score, is the F-score reference deviation, represents the intersection-over-union ratio of the tth defect detection system model to be evaluated, represents the reference intersection-over-union ratio, is the intersection-and-union ratio reference deviation, represents the accuracy of the tth defect detection system model to be evaluated, represents the reference accuracy, is the accuracy reference deviation, is the first performance weight, is the second performance weight, is the third performance weight.

8. The digital printed fabric defect detection method according to claim 6, characterized in that: The specific method for obtaining the detection efficiency index is as follows: The number of test set images that the defect detection system model to be evaluated has completed identifying within a unit time is obtained, and the detection efficiency index of the defect detection system model to be evaluated is obtained based on this. The detection efficiency index is calculated using the following formula: ; Where t represents the number of the defect detection system model to be evaluated, , T represents the total number of defect detection systems to be evaluated, represents the detection efficiency index of the tth defect detection system model to be evaluated, It represents the number of test set images recognized by the tth defect detection system model to be evaluated in unit time, Indicates the number of detections per reference unit time, It is the reference deviation of the number of detections per unit time of the model.

9. The digital printed fabric defect detection method according to claim 6, characterized in that: The specific method for obtaining the overall evaluation index is as follows: Acquire an overall evaluation weight according to the task requirements of the defect detection system model, wherein the overall evaluation weight includes a first overall weight and a second overall weight; The obtained performance evaluation index, detection efficiency index and overall evaluation weight are combined to obtain an overall evaluation index, which is calculated using the following formula: ; Where t represents the number of the defect detection system model to be evaluated, , T represents the total number of defect detection systems to be evaluated, represents the overall evaluation index of the tth defect detection system model to be evaluated, is the reference performance evaluation index, is the reference detection efficiency index, is the first overall weight, is the second overall weight, is the reference threshold, represents the performance evaluation index of the tth defect detection system model to be evaluated, Represents the detection efficiency index of the tth defect detection system model to be evaluated.

10. The digital printed fabric defect detection method according to claim 1, characterized in that: The specific process of analyzing the test results is as follows: Input the test sample image into the defect detection system model to obtain the detection result; The number of times defects are identified is extracted from the detection results, and it is determined whether the number of times defects are identified within a preset time interval is greater than a preset defect index. If it is greater than the preset defect index, an alarm message is issued, otherwise the number of identifications is cleared and identification is restarted at the next preset time interval.

Citation Information

Patent Citations

  • A method and system for detecting defects in flip-chip bonding

    CN115078552B

  • Flap disc defect detection method and detection equipment

    CN115855952A

  • Digital printing fabric defect detection method based on generative adversarial network

    CN117237274A

  • Holographic printing quality detection method and system based on computer vision

    CN118505693A

  • Tire surface quality judgment method, electronic equipment and readable storage medium

    CN118898594A

Cited By

  • Vehicle-mounted personal image optimization method based on multi-modal perception

    CN120747137A

  • Vehicle-mounted personal image optimization method based on multi-modal perception

    CN120747137B