Nonwoven fabric defect recognition and positioning system based on domain adaptation positive sample learning model
The nonwoven fabric defect detection system based on the domain-adaptive positive sample learning model utilizes an area array camera and unsupervised algorithms to solve the problems of poor universality of traditional methods and insufficient deep learning samples, achieving high generalization performance and rapid adaptation to the detection of various defects.
Patent Information
- Application Number
- CN202211577291.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-05
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2042-12-05
AI Technical Summary
In existing nonwoven fabric detection technologies, traditional image processing methods have poor universality, and deep learning methods lack sufficient training samples, resulting in insufficient generalization ability and difficulty in quickly adapting to new situations and identifying defects that have not yet appeared.
A domain-adaptive positive sample learning model is adopted, using an area array camera and unsupervised algorithms. Nonwoven fabric defect detection is performed through a feature extractor and a multi-scale flow model. Only normal samples are required for training. The defect location is represented by a multi-scale fusion network and a heat map.
It achieves high generalization performance and rapid production changeover capability, can adapt to multiple defect types, reduces equipment costs, and improves detection accuracy and on-site management efficiency.
Smart Images

Figure CN116128809B_ABST
Abstract
Description
Technical Field
[0001] This invention pertains to nonwoven fabric inspection technology, and particularly relates to a nonwoven fabric defect identification and localization system based on a domain-adaptive positive sample learning model. Background Technology
[0002] Currently, there are two main methods for nonwoven fabric quality monitoring using machine vision: traditional image processing and deep learning model-based methods. However, each method has its own limitations and engineering difficulties.
[0003] Traditional image processing methods require manually designing feature extraction operators and then combining these features with a corresponding detection function designed within the program. This process results in a high degree of uniqueness in the feature extraction operators and detection functions, but poor universality, often only applicable to a single type of defect, and highly susceptible to interference from background variations. If defects not considered in the design occur during actual production, they cannot be detected.
[0004] Deep learning-based methods currently primarily utilize supervised learning for object detection or classification. Both of these models require a large number of positive samples for training, meaning they need sufficient anomaly samples. However, in real-world production, anomalies are low-probability events, making it extremely difficult to collect enough samples for training. Models trained with insufficient samples are prone to overfitting, leading to missed detections in practical applications. While this method has certain advantages in general applicability compared to traditional methods, it still lacks the ability to detect anomalies not present in the training set.
[0005] There is a Chinese invention patent CN202110801896.3, which describes a machine vision-based method and system for detecting and classifying defects in nonwoven fabrics. The method includes the following steps: (1) image acquisition; (2) image preprocessing; (3) extraction of image detail signals: wavelet transform analysis is used to extract the detail signals of nonwoven fabric defect images; (4) calculation of texture feature images and reconstruction of feature images: texture information is calculated on the detail signals of the images to obtain feature images that can distinguish between normal and defective nonwoven fabric images, and these feature images are reconstructed to obtain the reconstructed feature images; (5) calculation of anomaly scores: the anomaly scores of the nonwoven fabric feature images are calculated to determine whether defects have occurred; (6) differential calculation of defect regions: the defect regions are obtained by performing differential operations on the original image to be tested and the reconstructed feature images, and the complete defect regions are obtained by post-processing the defects; (7) defect region classification: feature vectors are constructed and a classifier is trained to classify the defect regions.
[0006] The existing technology does not have the ability to detect defects outside the domain because it requires wavelet transform for preprocessing and can only target preset defect types; at the same time, the measurement method is just simple difference, which has a high probability of missed detection and false alarm.
[0007] In general, the shortcomings of existing technologies can be summarized in two parts:
[0008] 1. Methods based on traditional image processing techniques require manual design of feature extraction operators and detection functions for the features. They have poor universality and cannot quickly adapt to new situations or new types of nonwoven fabrics (e.g., color changes).
[0009] 2. Current methods using deep learning detection or classification models require sufficient training data to support model convergence. However, defect samples in non-woven fabrics are rare and difficult to collect. Furthermore, labeling the collected images is extremely tedious, and some defects are difficult to label accurately. This insufficient dataset results in poor model generalization ability, failing to effectively identify defect patterns not present in the training data. On the other hand, the need for defect image collection and labeling also makes it difficult to quickly adapt supervised deep learning methods to new non-woven fabric production lines. Summary of the Invention
[0010] To address the aforementioned shortcomings, this invention provides a nonwoven fabric defect identification and localization system based on a domain-adaptive positive sample learning model.
[0011] The present invention provides a nonwoven fabric defect identification and localization system based on a domain-adaptive positive sample learning model, comprising hardware structure and integrated software.
[0012] The hardware structure includes a non-woven fabric detection channel supported by a bracket, a lower detection light source and a lower detection camera on the lower side of the channel, an upper detection light source and an upper detection camera on the upper side of the channel, a non-woven fabric flattening opening at the channel entrance, and a PLC controller; the PLC controller is connected to a display screen and indicator lights.
[0013] The nonwoven fabric to be inspected is extracted from the packaged roll and fed into the inspection area through the nonwoven fabric leveling opening. The nonwoven fabric leveling opening adjusts the posture of the nonwoven fabric during feeding to ensure that it enters the inspection area flat and parallel to the camera's imaging surface. In the first inspection area, the system inspects the lower side of the nonwoven fabric, and the lower inspection camera acquires images under the illumination of the lower inspection light source. In the second inspection area, the system inspects the upper side of the nonwoven fabric, and the upper inspection camera acquires images under the illumination of the upper inspection light source. The acquired images are sent to the software program for inspection, and the results are displayed on the screen in real time. At the same time, they are sent to the PLC controller, which controls the machine to stop directly and issues an alarm on the indicator light.
[0014] The integrated software includes a transmission module, a data sampling module, an anomaly detection module, and an action execution module. The nonwoven fabric to be inspected is extracted from the packaged roll by the transmission module and fed into the inspection area through the nonwoven fabric flattening opening. The data sampling module then samples image data from the top and bottom sides of the nonwoven fabric and sends the collected images to the anomaly detection module to determine if an anomaly exists. If an anomaly is found, the action execution module activates: the PLC controller stops the transmission module and displays an alarm on indicator lights and the screen; if no anomaly is found and no stop signal is given, the transmission module inputs the next section of nonwoven fabric, with an input length of five-sixths of the inspection length that the camera can cover; if a stop signal is received, the system stops inspection.
[0015] Furthermore, both the lower and upper detection cameras are area scan cameras.
[0016] Furthermore, the specific workflow of the anomaly detection module is as follows:
[0017] The feature extractor extracts features from the nonwoven fabric images captured by the camera, mapping them from the image space to the feature space, removing redundant information from the image, and obtaining a feature representation containing semantic information; for the input image x, the extracted feature y is represented as:
[0018] y = f ex (x)
[0019] After normal images and samples with abnormal information are processed by the feature extractor, corresponding feature representations are obtained. The anomaly detector classifies normal features and abnormal features to detect whether there are defects in the nonwoven fabric. The anomaly detector distinguishes whether there are defects in the nonwoven fabric by predicting the degree of anomaly. A threshold ε is set as the standard for judging the degree of anomaly. If it is greater than the threshold, it is an anomaly, and if it is less than the threshold, it is a normal image.
[0020] In the defect location locator, for images determined to have defects, the trained image-level anomaly metric is applied to a 3×3 pixel block of the abnormal image using the domain adaptation concept to determine the pixel-level defect location, which is then represented in the form of a heat map.
[0021] Furthermore, the feature extractor uses EfficientNet.
[0022] Furthermore, the anomaly detector employs a multi-scale flow model, using feature maps at multiple different scales from the feature extractor as multi-scale feature representations of the samples to obtain global and local features of the image. Three Single MS-Flow modules are coupled to simultaneously process the multi-scale feature maps. Specifically, the Single MS-Flow module processes the multi-scale feature maps as follows:
[0023] The Single MS-Flow module simultaneously receives multiple feature maps from different receptive fields, denoted as y. (i) Randomly rearrange the channels of each input, and then rearrange the feature map y. (i) Uniformly divided into y along the channel dimension (i,0) and y (i,1) Two parts: y (i,0) Partially, three pairs of coefficient matrices c are obtained through an internal multi-scale fusion network. (i) With offset s (i) The Single Ms-Flow module concatenates the corresponding feature maps in the channel domain to obtain the final output h. (i) For the input feature map y (i) The reasoning process is represented as follows:
[0024] y (i,0) ,y (i,1) =split(y (i) )
[0025]
[0026] h (i,0) =y (i,0)
[0027] h (i) =concat(h (i,0) ,h (i,1) )
[0028] In the formula, ⊙ represents element-wise product, which is the multiplication of corresponding elements of two matrices, e represents the exponent exp, and concat() represents concatenation of channel domains.
[0029] The Single MS-Flow module learns the mapping relationship from the distribution Y to the Gaussian distribution Z based on maximum likelihood estimation, thereby enabling the training of the MS-Flow flow model. Its loss function is:
[0030]
[0031] In the formula, p represents the probability density, det represents the matrix determinant, and z represents a value within the Gaussian distribution Z.
[0032] Furthermore, the multi-scale fusion network consists of convolution and PReLU. Deep feature representations are upsampled and then concatenated with shallow features along the channels. Feature fusion is achieved using 1×1 convolution. The fused features are then used to learn the affine transformation coefficients and offsets at the current scale.
[0033] The beneficial technical effects of this invention are as follows:
[0034] 1. Compared with existing detection equipment, the present invention has a very simple structure and uses a more economical area scan camera instead of a line scan camera.
[0035] 2. The positive sample learning model proposed in this invention uses only positive samples, i.e., defect-free data, during training. In principle, it abstracts into fitting a spatial mapping of positive samples. However, when faced with spatial mappings of abnormal samples, it cannot embed the fitted function. Therefore, this method effectively addresses the pain points of traditional methods requiring large-scale manual design of feature extraction operators and corresponding defect detection operators, as well as the lack of sufficient training samples in deep learning methods. The detection model in this invention has high generalization performance, adaptability to multiple defect types, and facilitates rapid production changeover in factories.
[0036] 3. This invention uses heat maps to represent defect locations. This facilitates on-site management personnel in quickly identifying whether the system has made a false detection. Attached Figure Description
[0037] Figure 1 This is a schematic diagram of the hardware structure of the system of the present invention.
[0038] Figure 2 This is a block diagram illustrating the system integration software principle of the present invention.
[0039] Figure 3 This is a flowchart of the anomaly detection module of the present invention.
[0040] Figure 4 This is the anomaly detector model of the present invention.
[0041] Figure 5 This is a structural diagram of the Single MS-Flow module of the present invention.
[0042] Figure 6 This is a schematic diagram illustrating the location of the defect in this invention.
[0043] Figure 7 This is a schematic diagram illustrating the positioning of insects on the surface of a nonwoven fabric. Detailed Implementation
[0044] The present invention will be further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0045] The present invention provides a nonwoven fabric defect identification and localization system based on a domain-adaptive positive sample learning model, comprising hardware structure and integrated software.
[0046] Hardware structure such as Figure 1As shown, the system includes a nonwoven fabric detection channel supported by a bracket, a lower detection light source 3 and a lower detection camera 4 on the lower side of the channel (the light source and camera are arranged on the same side, and the nonwoven fabric reflects light to form an image), an upper detection light source 7 and an upper detection camera 6 on the upper side of the channel, a nonwoven fabric flattening opening 2 at the channel entrance, and a PLC controller 8; the PLC controller 8 is connected to a display screen 1 and indicator lights 5.
[0047] The nonwoven fabric to be tested is pulled out from the packaged roll and fed into the testing area through the nonwoven fabric flattening opening 2. The nonwoven fabric flattening opening 2 adjusts the posture of the nonwoven fabric as it is fed in, ensuring that it enters the testing area flat and parallel to the camera imaging surface. In the first testing area, the system tests the lower side of the nonwoven fabric, and the lower testing camera 4 acquires images under the illumination of the lower testing light source 3. In the second testing area, the system tests the upper side of the nonwoven fabric, and the upper testing camera 6 acquires images under the illumination of the upper testing light source 7. The acquired images are sent to the software program for testing, and the results are displayed on the display screen 1 in real time. At the same time, they are sent to the PLC controller 8, which controls the machine to stop directly and issues an alarm on the indicator light 5.
[0048] The integrated software includes a transmission module, a data sampling module, an anomaly detection module, and an action execution module. For example... Figure 2 As shown, the nonwoven fabric to be inspected is extracted from the packaged roll by the transmission module and fed into the inspection area through the nonwoven fabric flattening opening 2. Then, the data sampling module samples the image data of the upper and lower sides of the nonwoven fabric and sends the collected images to the anomaly detection module to determine whether there is an anomaly. If an anomaly is found, the action execution module works, specifically: the PLC controller 8 controls the transmission module to stop and issues an alarm on the indicator light 5 and the display screen 1; if there is no anomaly and no stop signal is given, the transmission module inputs the next section of nonwoven fabric, the length of which is five-sixths of the inspection length that the camera can cover; if a stop signal is received, the system stops the inspection.
[0049] Furthermore, both the lower detection camera 4 and the upper detection camera 6 are area scan cameras.
[0050] The anomaly detection module is the core of the system. Its core is an unsupervised algorithm based on positive sample learning. During training, only a sufficient number of normal nonwoven fabric samples are needed; defective nonwoven fabric samples are not required. The specific workflow of the anomaly detection module is as follows: Figure 3 As shown, specifically:
[0051] The feature extractor (using EfficientNet) extracts features from the nonwoven fabric images captured by the camera, mapping them from image space to feature space, removing redundant information from the image, and obtaining a feature representation containing semantic information; for the input image x, the extracted feature y is represented as:
[0052] y = fex (x)
[0053] After normal images and samples with abnormal information are processed by the feature extractor, corresponding feature representations are obtained. The anomaly detector classifies normal features and abnormal features to detect whether there are defects in the nonwoven fabric. The anomaly detector distinguishes whether there are defects in the nonwoven fabric by predicting the degree of anomaly. A threshold ε is set as the standard for judging the degree of anomaly. If it is greater than the threshold, it is an anomaly, and if it is less than the threshold, it is a normal image.
[0054] Because the abnormal regions in images caused by defects in non-woven fabrics vary in size and shape and cannot be exhaustively enumerated, both large and small receptive fields will lose defect feature information. Therefore, the anomaly detector of this invention employs a multi-scale flow model, using feature maps of multiple different scales from the feature extractor as multi-scale feature representations of the samples to obtain global and local features of the image, such as... Figure 4 As shown, multiple Single MS-Flow modules are coupled to process multi-scale feature maps simultaneously, and a complete flow model is built using multiple Single MS-Flow modules. The processing procedure of the Single MS-Flow module for multi-scale feature maps is as follows: Figure 5 As shown, specifically:
[0055] The Single MS-Flow module simultaneously receives multiple feature maps from different receptive fields, denoted as y. (i) Randomly rearrange the channels of each input, and then rearrange the feature map y. (i) Uniformly divided into y along the channel dimension (i,0) and y (i,1) Two parts: y (i,0) Partially, three pairs of coefficient matrices c are obtained through an internal multi-scale fusion network. (i) With offset s (i) The Single Ms-Flow module concatenates the corresponding feature maps in the channel domain to obtain the final output h. (i) For the input feature map y (i) The reasoning process is represented as follows:
[0056] y (i,0) ,y (i,1) =split(y (i) )
[0057]
[0058] h (i,0) =y (i,0)
[0059] h (i) =concat(h (i,0) ,h (i,1) )
[0060] In the formula, ⊙ represents element-wise product, which is the multiplication of corresponding elements of two matrices, e represents the exponent exp, and concat() represents concatenation of channel domains.
[0061] Affine transformation coefficients and offsets are learned through a multi-scale fusion network in the Single MS-Flow module. A feature pyramid approach is used to design the multi-scale fusion network, fusing deep features into shallow features. Its basic modules consist of convolutions and PReLU. Deep feature representations are upsampled and then concatenated with shallow features along the channels, with 1×1 convolutions used for feature fusion. The fused features are then used to learn the affine transformation coefficients and offsets at the current scale.
[0062] The Single MS-Flow module uses a fully convolutional structure to process feature maps, which better preserves the location information of abnormal features in the image when used for non-woven fabric defect detection. Simultaneously, the multi-scale structure of the Single MS-Flow module can process feature maps from different receptive fields simultaneously, performing feature fusion to effectively capture feature information of defects of different sizes. This invention contains three Single MS-Flow modules, which can learn the mapping relationship from the distribution Y to the Gaussian distribution Z based on maximum likelihood estimation to train the MS-Flow flow model. Its loss function is:
[0063]
[0064] In the formula, p represents the probability density, det represents the matrix determinant, and z represents a value within the Gaussian distribution Z.
[0065] In the defect location locator, for images determined to have defects, the trained image-level anomaly metric is applied to a 3×3 pixel block of the anomalous image using the domain adaptation concept to determine the pixel-level defect location, which is then represented as a heatmap. For example... Figure 6 As shown, the first row is the original image of the nonwoven fabric with hair and insects, the middle row is the area of defect response, and the third row is the final detection result. Figure 7 This is a heat map format for locating insects on the surface of a nonwoven fabric.
[0066] In summary, this invention offers high economic efficiency, accuracy, and rapid production changeover flexibility, while effectively addressing the problem of insufficient training samples containing anomaly information in deep learning models during online inspection of nonwoven fabrics. It can also identify defect locations.
Claims
1. A nonwoven fabric defect identification and localization system based on a domain-adaptive positive sample learning model, characterized in that, This includes hardware architecture and integrated software; The hardware structure includes a non-woven fabric detection channel supported by a bracket, a lower detection light source (3) and a lower detection camera (4) on the lower side of the channel, an upper detection light source (7) and an upper detection camera (6) on the upper side of the channel, a non-woven fabric flattening opening (2) at the channel opening, and a PLC controller (8); the PLC controller (8) is connected to a display screen (1) and indicator lights (5); The nonwoven fabric to be tested is pulled out from the packaged roll and fed into the testing area through the nonwoven fabric flattening opening (2). The nonwoven fabric flattening opening (2) adjusts the posture of the nonwoven fabric as it is fed in, ensuring that it is flat and parallel to the camera imaging surface as it enters the testing area. In the first testing area, the system tests the lower side of the nonwoven fabric, and the lower side testing camera (4) acquires images under the illumination of the lower side testing light source (3). In the second testing area, the system tests the upper side of the nonwoven fabric, and the upper side testing camera (6) acquires images under the illumination of the upper side testing light source (7). The acquired images are sent to the software program for testing, and the results are displayed on the display screen (1) in real time. At the same time, they are sent to the PLC controller (8), which controls the machine to stop directly and issues an alarm on the indicator light (5). The integrated software includes a transmission module, a data sampling module, an anomaly detection module, and an action execution module. The non-woven fabric to be tested is extracted from the packaged roll by the transmission module and sent into the detection area through the non-woven fabric flattening opening (2). Then, the data sampling module samples the image data of the upper and lower sides of the non-woven fabric and sends the collected images to the anomaly detection module to determine whether there is an anomaly. If there is an anomaly, the action execution module works, specifically: the PLC controller (8) controls the transmission module to stop and displays an alarm on the indicator light (5) and the display screen (1); if there is no anomaly and no stop signal is given, the transmission module inputs the next section of non-woven fabric, the length of which is five-sixths of the detection length that the camera can cover; if a stop signal is received, the system stops detection. The specific workflow of the anomaly detection module is as follows: The feature extractor extracts features from the nonwoven fabric images captured by the camera, mapping them from the image space to the feature space, removing redundant information from the image, and obtaining a feature representation containing semantic information; for the input image x, the extracted feature y is represented as: y=f ex (x) After normal images and samples with abnormal information are processed by the feature extractor, corresponding feature representations are obtained. The anomaly detector classifies normal features and abnormal features to detect whether there are defects in the non-woven fabric. The anomaly detector distinguishes whether there are defects in the non-woven fabric by predicting the degree of anomaly. A threshold ε is set as the standard for judging the degree of anomaly. If it is greater than the threshold, it is an anomaly, and if it is less than the threshold, it is a normal image. In the defect location locator, for images determined to have defects, the trained image-level anomaly metric is applied to a 3×3 pixel block of the abnormal image using the domain adaptation concept to determine the pixel-level defect location, which is then represented in the form of a heat map.
2. The nonwoven fabric defect identification and localization system based on a domain-adaptive positive sample learning model according to claim 1, characterized in that, Both the lower detection camera (4) and the upper detection camera (6) are area array cameras.
3. The nonwoven fabric defect identification and localization system based on a domain-adaptive positive sample learning model according to claim 1, characterized in that, The feature extractor used is EfficientNet.
4. The nonwoven fabric defect identification and localization system based on a domain-adaptive positive sample learning model according to claim 1, characterized in that, The anomaly detector employs a multi-scale flow model, using feature maps at multiple different scales from the feature extractor as multi-scale feature representations of the samples to obtain global and local features of the image. Three Single MS-Flow modules are coupled to simultaneously process the multi-scale feature maps. Specifically, the Single MS-Flow module processes the multi-scale feature maps as follows: The Single MS-Flow module simultaneously receives multiple feature maps from different receptive fields, denoted as y. (i) Randomly rearrange the channels of each input, and then rearrange the feature map y. (i) Uniformly divided into y along the channel dimension (i,0) and y (i,1) Two parts: y (i,0) Partially, three pairs of coefficient matrices c are obtained through an internal multi-scale fusion network. (i) With offset s (i) The Single Ms-Flow module concatenates the corresponding feature maps in the channel domain to obtain the final output h. (i) For the input feature map y (i) The reasoning process is represented as follows: and (i,0) ,and (i,1) =split(y (i) ) h (i,1) =y (i,1) ⊙e c(i) +s (i) h (i,0) =y (i,0) h (i) =concat(h (i,0) ,h (i,1) ) In the formula, ⊙ represents element-wise product, which is the multiplication of corresponding elements of two matrices, e represents the exponent exp, and concat() represents concatenation of channel domains. The Single MS-Flow module trains the MS-Flow flow model by learning the mapping relationship from the distribution Y to the Gaussian distribution Z based on maximum likelihood estimation. Its loss function is: In the formula, p represents the probability density, det represents the matrix determinant, and z represents a value within the Gaussian distribution Z.
5. The nonwoven fabric defect identification and localization system based on a domain-adaptive positive sample learning model according to claim 4, characterized in that, The multi-scale fusion network consists of convolution and PReLU. Deep feature representations are upsampled and then concatenated with shallow features along the channels. Feature fusion is achieved using 1×1 convolution. The fused features are then used to learn the affine transformation coefficients and offsets at the current scale.
Citation Information
Patent Citations
Non-woven fabric flaw detection and classification method and system based on machine vision
CN113554080A