Fabric defect detection method based on AI vision

By employing an AI-based vision-based fabric defect detection method, industrial-grade equipment and neural network technology are used to achieve efficient and accurate fabric defect detection. This solves the problems of low detection efficiency and poor adaptability in existing technologies, and realizes high-precision, real-time defect identification and quality control.

CN120912581AInactive Publication Date: 2025-11-07CHANGZHOU RONGZHAO TEXTILE TECHNOLOGY CO LTD
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202511108946.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-08
Publication Date
2025-11-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing fabric defect detection technologies rely on manual visual inspection and traditional image processing methods, which suffer from low detection efficiency, false detections, and missed detections. They are difficult to meet the requirements of high-precision and high-efficiency quality control, and their detection accuracy is insufficient under complex textures and uneven lighting conditions. They also lack a complete defect classification system, have weak generalization ability, and poor adaptability.

Method used

High-speed, high-resolution image acquisition is achieved using an industrial-grade linear scan camera and a synchronous light source array. Combined with noise filtering and histogram equalization, the image is input into an improved ResNet multi-scale convolutional neural network for feature extraction. A residual attention mechanism is embedded to enhance defective regions. A self-supervised anomaly detection model and dynamic threshold adjustment are used for accurate classification. The model is updated online through manual review and feedback.

Benefits of technology

It significantly improves the sensitivity and accuracy of fabric defect detection, enabling precise identification of subtle defects under complex conditions. It adapts to different fabric categories, achieving real-time and efficient defect detection and quality control, reducing missed and false detection rates, and supporting real-time response and efficient management on the production line.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120912581A_ABST
    Figure CN120912581A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of computer vision and images, and discloses an AI vision-based fabric defect detection method, which specifically comprises the following steps: S1, adopting an industrial-grade linear array camera and a synchronous light source array; s2, carrying out noise filtering on the collected original image; s3, inputting the enhanced image into an improved ResNet multi-scale convolutional neural network; s4, embedding a residual attention mechanism into the feature map; s5, performing dynamic feature matching on the defect enhancement feature map and the standard sample library image; s6, inputting the suspected flaw region obtained by preliminary screening into a self-supervised anomaly detection model; s7, combining an abnormal detection result with a historical batch detection error; and S8, carrying out multi-class classification on the detected flaws based on a dynamic threshold value. According to the invention, through combined application of the improved ResNet multi-scale feature extraction network and the residual attention mechanism, the complex texture, edge structure and small flaw features of the fabric can be deeply extracted.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of computer vision and image processing, and particularly relates to a fabric defect detection method based on AI vision. BACKGROUND

[0002] The existing fabric defect detection technology mainly relies on manual visual inspection and traditional image processing methods. The manual detection process is limited by the subjective judgment of the operator, and the detection efficiency is low, and false negatives and false positives are prone to occur, which is difficult to meet the quality control requirements of modern production lines for high precision and high efficiency.

[0003] The traditional image processing method is usually based on simple edge detection, gray difference or template matching. When there are complex textures, color changes or uneven illumination on the fabric surface, the adaptability is insufficient and the detection precision is reduced, especially for fine structural defects and color difference defects. The recognition effect is poor.

[0004] In addition, most of the existing technologies lack a perfect defect classification system, which cannot effectively distinguish different types of defects, resulting in limited reference value of the detection results. At the same time, the generalization ability of some existing detection models is weak, and the adaptability to different fabric categories is poor. It is difficult to respond in real time on the production line, and there are phenomena such as processing delay and batch misjudgment. SUMMARY

[0005] The purpose of the present application is to provide a fabric defect detection method based on AI vision to solve the problems raised in the background art.

[0006] In order to achieve the above purpose, the present application provides the following technical scheme: a fabric defect detection method based on AI vision, the specific steps of which are as follows:

[0007] S1: Adopting industrial-grade line array camera and synchronous light source array, real-time high-speed and high-resolution image acquisition of fabric in continuous production is realized, ensuring low noise and high definition of image data, and providing high-quality basic images for subsequent processing; S2: The collected original images are subjected to noise filtering, histogram equalization and edge enhancement, which significantly improves the gray difference between defects and background, and outputs clear images as input for subsequent feature extraction; S3: The enhanced image is input into the improved ResNet multi-scale convolutional neural network, and through the optimization of convolution kernel and residual structure, multi-level features of fabric texture, edge and potential defects are extracted, and high-dimensional feature map is output; S4: The residual attention mechanism is embedded into the feature map, and the local suspected abnormal area features are highlighted, and the region feature map with significantly enhanced defects is output, which provides accurate defect positioning for subsequent standard sample matching; S5: The defect enhanced feature map is matched with the standard sample library image, and the suspected defect area is automatically screened by using cosine similarity, and the image preliminary abnormal area screening is completed; S6: The suspected defect area obtained by preliminary screening is input into the self-supervised anomaly detection model, and the abnormal area deviating from the normal fabric feature distribution is accurately distinguished, and the defect confidence map is output; S7: Combined with the abnormal detection result and the historical batch detection error, the dynamic threshold adjustment formula is used to optimize the detection threshold in real time, ensuring the dynamic balance of detection sensitivity and error rate; S8: Based on the dynamic threshold, the detected defects are classified into multiple categories, including color difference, broken yarn, skipped yarn and scarring, and the detection image and statistical report are output in real time, realizing visual presentation; S9: The detection result is compared with the artificial review result, the review data is dynamically fed back to the training sample set, and the feature extraction and anomaly detection model is updated in real time through online incremental learning, continuously optimizing the detection performance.

[0008] Preferably, the specific steps of the S1 fabric image high-precision real-time acquisition are as follows:

[0009] S11, high-speed acquisition and data quality guarantee: industrial-grade line array camera is matched with synchronous light source array, which can realize high-speed image acquisition of continuously produced fabric, through accurate control of the synchronization frequency of light source and camera, reduce motion blur, at the same time, the uniform illumination of light source array reduces the interference of environmental light, so that the image noise is significantly reduced; The optimization of pixel point space resolution makes the fabric texture details clear, providing high-definition original data basis for subsequent processing;

[0010] The pixel point space resolution calculation expression formula is:

[0011]

[0012] In the formula, Pixel point space resolution (μm / pixel), Camera field of view range (mm), Camera pixel number (pixel);

[0013] S12, resolution adaptation and collection efficiency improvement: in view of the continuity of fabric production, the system adjusts the scanning rate of the line array camera, combines with the reasonable configuration of the pixel point spatial resolution, ensures the detail accuracy of the image in the spatial dimension while ensuring the high-speed collection, and such adaptive design makes the subtle defects, fiber arrangement and other characteristics of the fabric be captured completely, which not only meets the production efficiency demand, but also provides high-quality image input for subsequent analysis.

[0014] Preferably, the specific steps of noise suppression and contrast enhancement preprocessing of the collected image in S2 are as follows:

[0015] S21, multi-dimensional preprocessing optimizes image quality: for the original fabric image, the noise filter is used to eliminate the interference signal introduced in the collection process, reduce the covering of the details by the particle noise points, and combine with the histogram equalization to adjust the image gray scale distribution and expand the effective gray scale range, so that the originally blurred texture level is more distinct. This series of image enhancement processing lays a foundation for subsequent edge enhancement and preliminarily improves the gray scale contrast of defects and background;

[0016] S22, edge enhancement and feature highlighting, on the basis of the previous processing, the edge enhancement technology is used to highlight the contour details of the fabric surface, so that the boundary of the defect area is clearer, and the progressive application of image enhancement processing further enlarges the gray scale difference between the defects and the background, so that the subtle defects are highlighted from the complex texture, and finally the enhanced image is generated, which provides high-recognizability input data for subsequent precise extraction of defect features;

[0017] The expression formula of image enhancement processing is:

[0018]

[0019] In the formula, : enhanced image pixel value, : original image pixel value, : image gradient value (edge information), : original pixel weight coefficient, : edge enhancement weight coefficient.

[0020] Preferably, the specific steps of multi-scale feature extraction of the improved ResNet in S3 are as follows:

[0021] S31, network structure optimization adapts to fabric feature extraction: the preprocessed enhanced image is input into the improved ResNet multi-scale convolutional neural network, the convolution kernel size is adjusted to adapt to different sizes of fabric features, the optimized connection of the interlayer residual block strengthens the information transmission, the convolution operation is deepened layer by layer in the multi-layer network, and the subtle differences of the fabric texture, structure edge and other features are accurately captured, which builds an efficient processing framework for the feature extraction of potential defects.

[0022] The convolutional neural network convolution operation expression formula is:

[0023]

[0024] In the formula, : the output feature map pixel value of the i-th layer, : the convolution kernel weight of the i-th layer, : the input image pixel value of the i-th layer, : the bias term of the i-th layer, : the convolution kernel radius;

[0025] S32, multi-level feature fusion improves extraction performance: the network uses multi-scale design to focus on the global structure and local details of the fabric at different levels through convolution operation, and generates a feature map containing rich information by integrating multi-level features of texture distribution, edge contour and defect area; This progressive extraction method highlights the feature differences between defects and normal areas, providing high-quality feature input for subsequent accurate identification.

[0026] Preferably, the suspected defect area strengthening of the residual attention mechanism in S4 means that the residual attention mechanism is embedded on the basis of the multi-scale feature map output by the improved ResNet, and the local suspected abnormal area is given higher attention by dynamically adjusting the feature weight; This process combines the global features preserved by the residual connection, effectively suppresses irrelevant background interference, and significantly enhances the defect features in the regional feature map. Precise defect positioning provides focused feature basis for subsequent sample matching, improving the pertinence and reliability of the overall detection process;

[0027] The residual attention fusion expression formula is:

[0028]

[0029] In the formula, : the fused feature map, : the input feature map, : the attention weight matrix, : the bias term, : the activation function (such as ReLU).

[0030] ​​​​Preferably, the dynamic feature matching of the standard sample library in S5 refers to expanding the defect feature map reinforced by the residual attention mechanism and the fabric standard sample library image for feature comparison, calculating the feature coincidence degree of the two by cosine similarity matching, and quantitatively evaluating the similarity of the region features; this process can automatically filter out regions with significant differences from the standard sample, accurately lock the suspected defect position, provide a focused target area for further judgment, and improve the automation efficiency of defect detection.

[0031] Preferably, the defect accurate discrimination of the self-supervised anomaly detection model in S6 refers to inputting the suspected defect region obtained by preliminary screening into the self-supervised anomaly detection model, which relies on the learned normal fabric feature distribution to analyze the region deviating from the conventional mode, quantifies the abnormality degree of the region by calculating the abnormal score, and the high-score region is determined as high-confidence anomaly. The final output of the defect confidence map clearly presents the abnormal probability of each region, providing a reliable basis for accurate positioning of defects.

[0032] The abnormal score expression formula is:

[0033]

[0034] In the formula, , The detection sample feature vector, The normal sample feature mean vector, The normal sample covariance matrix.

[0035] Preferably, the specific steps of the dynamic threshold adaptive adjustment of batch feedback in S7 are as follows:

[0036] S71, threshold dynamic optimization based on historical data: for the anomaly detection results output by the self-supervised model, combine the features of the current detection batch, synchronize the historical mis-detection and missed-detection statistical data, and through dynamic threshold adjustment, optimize the judgment standard in real time according to the actual detection situation, make the threshold more suitable for the actual distribution characteristics of fabric defects, reduce the judgment deviation caused by fixed threshold, and improve the reliability of the detection result;

[0037] The dynamic threshold adjustment expression formula is:

[0038]

[0039] In the formula, The updated threshold, The last detection threshold, The adjustment coefficient, The current batch mis-detection rate, The current batch missed-detection rate;

[0040] S72, optimize threshold value support accurate classification: the determination standard after dynamic threshold adjustment will be the input basis for subsequent defect classification, this adjustment makes the threshold adapt to the characteristic differences of different batches of fabrics, ensures more accurate definition of defects in the classification process, provides stable and actual judgment criteria for subsequent subdivision of defect types through dynamic adaptation of detection requirements, enhances the adaptability of the overall detection system.

[0041] Preferably, the multi-class defect classification and visualization output of the dynamic threshold in S8 means that the detection standard after dynamic threshold adjustment is used for the multi-class soft maximum classification of the defects detected by the self-supervised anomaly detection model, the color difference, broken yarn and other types are accurately distinguished, the matching probability of each category is calculated to determine the category of the defect, a visual detection image is generated, the defect position and type are labeled, a statistical report is output synchronously, the classification results are summarized, clear and intuitive basis is provided for production quality analysis, and the fabric defect control efficiency is improved.

[0042] Preferably, the specific steps of the online adaptive model updating of the artificial review feedback in S9 are as follows

[0043] S91, result comparison and sample dynamic update: the detection results of the dynamic threshold classification are compared with the artificial review results, and the difference data is dynamically fed back to the training sample set, this process supplements the sample characteristics, especially the misjudgment prone defect types, so that the sample library is more suitable for the actual production scene, provides accurate and fresh learning materials for model updating, and lays a foundation for subsequent online incremental learning;

[0044] S92, model periodic optimization and precision improvement: based on the updated sample set, the feature extraction model and the anomaly detection model are periodically updated through the online incremental learning algorithm, the online incremental learning weight update enables the model to quickly absorb new sample information, retain effective old knowledge, continuously optimize the detection logic, and keep the model in a dynamic production environment with high detection precision, adapt to the variety of fabric defects

[0045] The expression formula of the online incremental learning weight update is:

[0046]

[0047] In the formula, The updated network weight, The current network weight, The learning rate, The gradient of the loss function to the weight.

[0048] The beneficial effects of the present application are as follows:

[0049] 1、The application can deeply extract fabric complex texture, edge structure and small defect features by the joint application of improved ResNet multi-scale feature extraction network and residual attention mechanism, significantly improve the sensitivity and accuracy of detection, the multi-scale convolution structure can fully capture the local and global features of different scales on the fabric surface, ensure the accurate identification of small defects such as fine cracks, yarn skipping and color difference, and the residual attention mechanism further gives high weight to the suspected defect area, highlights the defect area response, reduces the interference of normal area on the detection result, compared with the existing artificial detection or traditional image algorithm, the application has stronger defect detection ability under complex color, different texture and changing light conditions, effectively reduces the missed detection and false detection, the detection precision is significantly better than the prior art, and is suitable for high-standard fabric quality control scene.

[0050] 2、The application introduces dynamic threshold adjustment and online model iterative optimization mechanism, so that the system can dynamically adjust the defect discrimination threshold and classification standard according to real-time detection data and production batch parameters, and automatically optimize the threshold setting by real-time statistics of the false detection rate and the missed detection rate of the current detection batch, so as to ensure the dynamic balance between detection sensitivity and error rate, at the same time, through the online feedback of artificial review results, the detection model supports adaptive learning and incremental update, and can continuously optimize the feature extraction and abnormality discrimination model parameters according to the actual production data, this mechanism gives the system high environmental adaptability and continuous learning ability, significantly improves the adaptation effect of the detection algorithm to different fabric materials, patterns, thicknesses and process differences, reduces the detection failure problem caused by the change of production conditions, and effectively guarantees the long-term stable operation of the system.

[0051] 3、The application constructs an industrial real-time detection and visualization feedback process, supports high-speed image acquisition, rapid preprocessing, multi-layer feature extraction and efficient classification judgment on the fabric production line, realizes image processing in seconds through hardware acceleration and algorithm optimization, and the detection results can be presented on the monitoring interface in real time, so that the defect position, type and severity are obvious at a glance, the detection process transparency is greatly improved, the detection results can be timely notified to the operator through the alarm system, and batch statistical report can be generated, realizing closed-loop quality management of the production process, compared with the traditional offline detection method, the application has the advantages of high concurrency, low delay and strong real-time, can be seamlessly embedded into the existing fabric production line, significantly improves the production efficiency and quality control response speed, and meets the real-time detection needs of industrial continuous production. BRIEF DESCRIPTION OF DRAWINGS

[0052] Figure 1 The application is based on AI vision fabric defect detection method flow chart. DETAILED DESCRIPTION

[0053] With reference to the drawings and embodiments of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0054] As shown in the drawings, Figure 1 The embodiment of the present application provides an AI vision-based fabric defect detection method, and the specific steps of the AI vision-based fabric defect detection method are as follows:

[0055] S1: An industrial-grade line array camera and a synchronous light source array are used to collect high-speed and high-resolution images of the fabric in continuous production in real time, to ensure low-noise and high-definition image data, and to provide high-quality basic images for subsequent processing; S2: The collected original images are subjected to noise filtering, histogram equalization and edge enhancement, to significantly improve the gray difference between defects and backgrounds, and to output clear images as inputs for subsequent feature extraction; S3: The enhanced images are input into an improved ResNet multi-scale convolutional neural network, to extract multi-level features of fabric texture, edges and potential defects by optimizing the convolution kernel and the residual structure, and to output high-dimensional feature maps; S4: The residual attention mechanism is embedded into the feature map to highlight the features of local suspected abnormal areas, and to output a region feature map with significantly enhanced defects, to provide accurate defect positioning for subsequent standard sample matching; S5: The defect-enhanced feature map is matched with the standard sample library images in a dynamic manner, to automatically filter suspected defect areas by using cosine similarity, and to complete preliminary screening of abnormal areas in images; S6: The suspected defect areas obtained by preliminary screening are input into a self-supervised anomaly detection model, to accurately identify abnormal areas deviating from the mode by learning the feature distribution of normal fabrics, and to output a defect confidence map; S7: The anomaly detection result and the historical batch detection error are combined, and a dynamic threshold adjustment formula is used to optimize the detection threshold in real time, to ensure dynamic balance of detection sensitivity and error rate; S8: The detected defects are classified into multiple categories based on the dynamic threshold, including color difference, broken yarn, skipped yarn and scarring, to output detection images and statistical reports in real time, and to realize visual presentation; S9: The detection result is compared with the manual review result, the review data is fed back to the training sample set, the feature extraction and anomaly detection model are updated in real time through online incremental learning, and the detection performance is continuously optimized.

[0056] The high-precision real-time acquisition of the fabric image in S1 refers to an industrial-grade linear array camera matched with a synchronous light source array, which can realize high-speed image acquisition of continuously produced fabric. By precisely controlling the synchronization frequency of the light source and the camera, motion blur is reduced. Meanwhile, the uniform illumination of the light source array reduces environmental light interference, significantly reducing image noise. The optimization of pixel point spatial resolution allows the fabric texture details to be clearly presented, providing a high-definition raw data basis for subsequent processing. In view of the continuity of fabric production, the system adjusts the scanning rate of the linear array camera in combination with the reasonable configuration of pixel point spatial resolution, ensuring the detail accuracy of the image in the spatial dimension while ensuring high-speed acquisition. This adaptive design allows the subtle flaws and fiber arrangement of the fabric to be captured completely, meeting the demand for production efficiency and providing high-quality image input for subsequent analysis.

[0057] The noise suppression and contrast enhancement preprocessing of the acquired image in S2 refers to eliminating interference signals introduced during the acquisition process through noise filtering for the raw fabric image, reducing the masking of details by particle noise points, and adjusting the image gray scale distribution in combination with histogram equalization to expand the effective gray scale range, making the originally blurred texture levels more distinct. This series of image enhancement processing lays the foundation for subsequent edge enhancement and preliminarily improves the gray scale contrast between flaws and background. Based on the preliminary processing, edge enhancement technology is used to highlight the contour details of the fabric surface, making the boundaries of the flaw area clearer. The progressive application of image enhancement processing further increases the gray scale difference between flaws and background, making subtle defects stand out from complex textures. The final enhanced image provides high-recognizability input data for subsequent precise extraction of flaw features.

[0058] The multi-scale feature extraction of the improved ResNet in S3 refers to inputting the preprocessed enhanced image into the improved ResNet multi-scale convolutional neural network. By adjusting the convolution kernel size to adapt to different sizes of fabric features, the optimized connection of inter-layer residual blocks strengthens information transmission. Convolution operations are performed layer by layer in the multi-layer network, accurately capturing the subtle differences in fabric texture and structural edges, and building an efficient processing framework for feature extraction of potential flaws. The network uses multi-scale design to focus on the global structure and local details of the fabric at different levels through convolution operations. By integrating multi-level features of texture distribution, edge contour, and flaw area, a feature map containing rich information is generated. This progressive extraction method highlights the feature differences between flaws and normal areas, providing high-quality feature input for subsequent accurate recognition.

[0059] The suspected defect area strengthening of the residual attention mechanism in S4 refers to embedding the residual attention mechanism on the basis of the multi-scale feature map output by the improved ResNet, dynamically adjusting the feature weight, and making the local suspected abnormal area obtain higher attention. This process combines the global features preserved by the residual connection, effectively suppresses irrelevant background interference, and makes the defect features significantly enhanced in the regional feature map. Precise defect positioning provides focused feature basis for subsequent sample matching, improving the relevance and reliability of the overall detection process.

[0060] The dynamic feature matching of the standard sample library in S5 refers to comparing the defect feature map strengthened by the residual attention mechanism with the fabric standard sample library image, calculating the feature coincidence degree of the two by cosine similarity matching, and quantitatively evaluating the similarity of the regional features. This process can automatically filter out regions with significant differences from the standard sample, accurately lock the suspected defect position, and provide a focused target area for further judgment, improving the automation efficiency of defect detection.

[0061] The defect precise discrimination of the self-supervised anomaly detection model in S6 refers to inputting the suspected defect area obtained by preliminary screening into the self-supervised anomaly detection model. The model relies on the learned normal fabric feature distribution to analyze the areas deviating from the conventional mode, quantifies the abnormality degree of the region by calculating the abnormal score, and determines the high-score region as high-confidence anomaly. The final output of the defect confidence map clearly presents the abnormal probability of each region, providing a reliable basis for precise positioning of defects.

[0062] The dynamic threshold self-adaptive adjustment of batch feedback in S7 refers to the abnormal detection results output by the self-supervised model, combined with the features of the current detection batch, synchronously associated with historical mis-detection and missed-detection statistical data, dynamically adjusted threshold, and real-time optimization of the judgment standard according to the actual detection situation, making the threshold more consistent with the actual distribution characteristics of fabric defects, reducing the judgment deviation caused by fixed threshold, and improving the reliability of the detection results. The judgment standard adjusted by the dynamic threshold will be used as the input basis for subsequent defect classification. This adjustment makes the threshold adapt to the characteristic differences of different batches of fabrics, ensures more accurate definition of defects in the classification process, and provides a stable and practical judgment benchmark for subsequent subdivision of defect types through dynamic adaptation to detection needs, enhancing the adaptability of the overall detection system.

[0063] The multi-class defect classification and visual output of the dynamic threshold in S8 refers to the multi-class soft maximum classification method for the defects detected by the self-supervised anomaly detection model based on the detection standard adjusted by the dynamic threshold, and the types of color difference and broken yarn are accurately distinguished. By calculating the matching probability of each category, the category to which the defect belongs is determined, and a visual detection image is generated, the defect position and type are labeled, and a statistical report is output synchronously, the classification results are summarized, a clear and intuitive basis for production quality analysis is provided, and the fabric defect control efficiency is improved.

[0064] The online adaptive model updating of the artificial review feedback in S9 refers to comparing the detection results of the dynamic threshold classification with the artificial review results, and the difference data is dynamically fed back to the training sample set. This process supplements the sample features, especially the misjudgment prone defect types, so that the sample library is more suitable for the actual production scene, provides accurate and fresh learning materials for model updating, lays a foundation for subsequent online incremental learning; based on the updated sample set, the feature extraction model and the anomaly detection model are periodically updated through the online incremental learning algorithm. Online incremental learning weight updating enables the model to quickly absorb new sample information, retain effective old knowledge, continuously optimize the detection logic, and keep the model in a dynamic production environment with high detection accuracy, adapt to the variety of fabric defects.

[0065] It should be noted that, in this document, the terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "contain" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or equipment.

[0066] Although embodiments of the present application have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made thereto without departing from the principles and spirit of the present application, and the scope of the present application is defined by the appended claims and their equivalents.

Claims

1. An AI vision-based fabric defect detection method, characterized in that: The specific steps of the AI vision-based fabric defect detection method are as follows: S1: Adopt industrial line array camera and synchronous light source array to realize real-time high-speed and high-resolution image acquisition of the fabric in continuous production, ensure low noise and high definition of image data, and provide high-quality basic images for subsequent processing; S2: Perform noise filtering, histogram equalization and edge enhancement on the collected original image, significantly improve the gray difference between defects and background, and output clear images as input for subsequent feature extraction; S3: Input the enhanced image into the improved ResNet multi-scale convolutional neural network, optimize the convolution kernel and residual structure, extract multi-level features of fabric texture, edge and potential defects, and output high-dimensional feature map; S4: Embed the feature map into the residual attention mechanism, and focus on strengthening the features of local suspected abnormal areas, and output the region feature map with significantly enhanced defects, to provide accurate defect positioning for subsequent standard sample matching; S5: Perform dynamic feature matching between the defect enhanced feature map and the standard sample library image, automatically select the suspected defect area by using cosine similarity, and complete the preliminary abnormal area screening of the image; S6: Input the suspected defect area obtained by preliminary screening into the self-supervised anomaly detection model, accurately distinguish the abnormal areas deviating from the mode by learning the normal fabric feature distribution, and output the defect confidence map; S7: Combine the anomaly detection result with the historical batch detection error, and use the dynamic threshold adjustment formula to optimize the detection threshold in real time, to ensure the dynamic balance of detection sensitivity and error rate; S8: Based on the dynamic threshold, classify the detected defects into multiple categories, including color difference, broken yarn, skipped yarn and scarring, and output the detection image and statistical report in real time to realize visual presentation; S9: Compare the detection result with the manual review result, dynamically feed back the review data to the training sample set, and update the feature extraction and anomaly detection model in real time through online incremental learning, to continuously optimize the detection performance.

2. The AI vision-based fabric defect detection method of claim 1, wherein: The specific steps of the high-precision real-time acquisition of the fabric image in S1 are as follows: S11, high-speed acquisition and data quality guarantee: industrial line array camera is matched with synchronous light source array, which can realize high-speed image acquisition of the fabric in continuous production, accurately control the synchronization frequency of the light source and the camera to reduce motion blur, and the uniform illumination of the light source array reduces the interference of environmental light, so that the image noise is significantly reduced; The pixel point spatial resolution calculation expression formula is: In the formula, Pixel point spatial resolution, Camera field of view range, Camera pixel quantity; S12, resolution adaptation and acquisition efficiency improvement: in view of the continuity of fabric production, the system adjusts the scanning rate of the line array camera, and reasonably configures the pixel point spatial resolution, to ensure the detail accuracy of the image in the spatial dimension while ensuring high-speed acquisition.

3. The AI vision-based fabric defect detection method of claim 1, wherein: The specific steps of noise suppression and contrast enhancement preprocessing of the collected image in S2 are as follows: S21, multi-dimensional preprocessing optimization of image quality: for the original fabric image, noise filtering is used to eliminate the interference signals introduced in the acquisition process, reduce the covering of granular noise points on details, and combine histogram equalization to adjust the image gray distribution, expand the effective gray range, and make the original fuzzy texture level more distinct. S22, edge enhancement and feature highlighting, on the basis of the previous processing, the edge enhancement technology is used to highlight the contour details of the fabric surface, so that the boundary of the defect area is clearer, and the progressive application of image enhancement processing further enlarges the gray difference between the defect and the background; The image enhancement processing expression formula is: wherein, : enhanced image pixel value, : original image pixel value, : image gradient value, : original pixel weight coefficient, : edge enhancement weight coefficient.

4. The AI vision-based fabric defect detection method of claim 1, wherein: The specific steps of the multi-scale feature extraction of the improved ResNet in S3 are as follows: S31, network structure optimization adapts to fabric feature extraction: input the enhanced image after preprocessing into the improved ResNet multi-scale convolutional neural network, and adjust the convolution kernel size to adapt to different sizes of fabric features, and the optimized connection of the interlayer residual block strengthens the information transmission; The convolutional neural network convolution operation expression formula is: In the formula, : the first layer output feature map pixel value, : the first layer convolution kernel weight, : the first layer input image pixel value, : the first layer bias term, : convolution kernel radius; S32, multi-level feature fusion improves the extraction efficiency: the network uses multi-scale design to focus on the global structure and local details of the fabric at different levels, and integrates the multi-level features of texture distribution, edge contour and defect area to generate a feature map containing rich information.

5. The AI vision-based fabric defect detection method of claim 1, wherein: The suspected defect area strengthening of the residual attention mechanism in S4 refers to embedding the residual attention mechanism on the basis of the multi-scale feature map output by the improved ResNet, and dynamically adjusting the feature weight to give higher attention to the local suspected abnormal area; The residual attention fusion expression formula is: In the formula, : the fused feature map, : the input feature map, : the attention weight matrix, : the bias term, : the activation function.

6. The AI vision-based fabric defect detection method of claim 1, wherein: The dynamic feature matching of the standard sample library in S5 refers to comparing the defect feature map strengthened by the residual attention mechanism with the fabric standard sample library image, calculating the feature coincidence degree of the two by cosine similarity matching, and quantitatively evaluating the similarity of the area features.

7. The AI vision-based fabric defect detection method of claim 1, wherein: The defect accurate discrimination of the self-supervised anomaly detection model in S6 refers to inputting the suspected defect area obtained by preliminary screening into the self-supervised anomaly detection model, which relies on the learned normal fabric feature distribution to analyze the areas deviating from the conventional mode, and quantifies the abnormality degree of the area by calculating the abnormal score. High-score areas are judged as high-confidence anomalies, and the final output is a defect confidence map; The abnormal score expression formula is: In the formula, , detecting a sample feature vector, a normal sample feature mean vector, a normal sample covariance matrix.

8. The AI vision-based fabric defect detection method of claim 1, wherein: The specific steps of the dynamic threshold self-adaptive adjustment of batch feedback in S7 are as follows: S71, threshold dynamic optimization based on historical data: for the anomaly detection results output by the self-supervised model, combine the features of the current detection batch, and synchronously associate the historical mis-detection and missed-detection statistical data. Through dynamic threshold adjustment, the judgment standard is optimized in real time according to the actual detection situation; The dynamic threshold adjustment expression formula is: In the formula, updated threshold, last detection threshold, adjustment coefficient, current batch false detection rate, current batch missed detection rate; S72, optimized threshold supports accurate classification: the judgment standard after dynamic threshold adjustment will be used as the input basis for subsequent defect classification. This adjustment makes the threshold adapt to the characteristic differences of different batches of fabrics, ensuring more accurate definition of defects in the classification process.

9. The AI vision-based fabric defect detection method of claim 1, wherein: The multi-class defect classification and visual output of the dynamic threshold in S8 refers to using the multi-class soft maximum classification method to accurately distinguish color difference, broken yarn and other types based on the detection standard after dynamic threshold adjustment, determining the category of the defect by calculating the matching probability of each category, generating a visual detection image, labeling the defect location and type, and synchronously outputting a statistical report.

10. The AI vision-based fabric defect detection method of claim 1, wherein: The specific steps of the online adaptive model updating of the artificial review feedback in the S9 are as follows S91, result comparison and sample dynamic updating: the detection result of dynamic threshold classification is compared with the artificial review result, and the difference data is dynamically fed back to the training sample set. This process supplements the sample characteristics, especially the misjudgment defect types, so that the sample library is more suitable for the actual production scene, provides accurate and fresh learning materials for model updating, and lays a foundation for subsequent online incremental learning; S92, model periodic optimization and precision improvement: based on the updated sample set, the feature extraction model and the anomaly detection model are periodically updated through the online incremental learning algorithm. The online incremental learning weight update enables the model to quickly absorb new sample information and retain effective old knowledge; The expression formula of the online incremental learning weight update is as follows In the formula, updated network weights, : current network weights, learning rate, gradient of the loss function with respect to the weights.

Citation Information

Cited By

  • Textile defect detection method based on machine vision

    CN121458715A

  • Intelligent processing method and system for rubber flaw detection image

    CN121563862A

  • Intelligent processing method and system for rubber defect detection image

    CN121563862B

  • Wool fabric defect detection method based on data analysis

    CN121577645A

  • A wool fabric defect detection method based on data analysis

    CN121577645B