Unsupervised Notebook Appearance Defect Detection Method Based on Multi-Scale Normalizing Flow
By constructing a multi-scale feature extraction network and defect detection model, and using multi-scale standardized flow for unsupervised detection, the problems of low accuracy and poor migration of laptop appearance defect detection in the prior art are solved, and efficient defect positioning and detection effects are achieved.
Patent Information
- Application Number
- CN202310158673.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-20
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2043-02-20
AI Technical Summary
Existing machine vision-based laptop appearance defect detection methods have problems such as low accuracy, poor migration and relying on large amounts of labeled sample data, especially in the detection of missing defect types and micro defect types.
Using an unsupervised detection method based on multi-scale standardized flow, the multi-scale feature extraction network and defect detection model are constructed, and multi-scale features are extracted using ResNet50 and feature pyramid networks, and density estimation learning is performed through multi-scale standardized flow networks to realize unsupervised defect detection.
This method can effectively locate defects of different scales and types, improve detection accuracy and defect positioning effect, solve the problems of low accuracy and poor migration of traditional methods, and reduce the dependence on large amounts of labeled sample data.
Smart Images

Figure CN116205876B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial defect detection, and particularly relates to an unsupervised notebook appearance defect detection method based on multi-scale normalizing flow. Background Art
[0002] With the continuous popularization of information technology, intelligent manufacturing has gradually developed, and national industrial development strategies related to intelligent manufacturing have been continuously proposed.
[0003] In the field of industrial manufacturing, it is crucial to ensure the quality of the produced products. Specifically, on the notebook computer production line, timely detection of the appearance surface defects of the computers can ensure the final delivery of the products. Traditional surface defect detection is mainly based on manual visual inspection, and traditional manual detection methods have problems such as being time-consuming and laborious, prone to false detection and missed detection, and difficult to match the increasingly improving production efficiency. With the rapid development of computer technology, the AOI (Automated Optical Inspection) technology based on machine vision has gradually replaced manual visual inspection of surface defects.
[0004] Currently, the surface defect detection methods based on machine vision are mainly divided into two categories:
[0005] 1) Defect detection methods based on support vector machines; the algorithms of such methods have low complexity, fast detection speed, and are easy to be embedded in mechanical equipment, but the detection accuracy is not high, prone to missed detection and false detection, and due to the need for manual feature design, it is very dependent on experienced engineers.
[0006] 2) Defect detection methods based on deep learning; compared with traditional machine learning detection algorithms, deep learning detection algorithms can achieve high-precision detection under the condition of having sufficient training sample data, and do not depend on manual feature design, with good transferability. However, in the actual industrial production scenario, it is difficult to collect a complete surface defect data set, and some defect types may never have appeared in the previous production process, which will inevitably lead to poor detection effects of deep learning detection algorithms for missing defect types, and most deep learning detection algorithms perform poorly on some micro-defect types. In addition, the collection and annotation of a large amount of sample data are also time-consuming, laborious, and costly. Summary of the Invention
[0007] To solve the above technical problems, the present invention provides an unsupervised notebook appearance defect detection method based on multi-scale normalizing flow.
[0008] To solve the above technical problems, the present invention adopts the following technical solutions:
[0009] An unsupervised notebook appearance defect detection method based on multi-scale normalizing flow. The appearance images of laptop computers collected in real time on the laptop production line are sequentially input into a multi-scale feature extraction network model and a defect detection model to obtain the detection results of the appearance defects of laptop computers. When training the multi-scale feature extraction network model and the defect detection model, the following steps are included:
[0010] Step 1: After preprocessing the original appearance images of laptop computers, a training data set is formed.
[0011] Step 2: Construct a multi-scale feature extraction network model based on the ResNet50 network and the feature pyramid network to extract the multi-scale features of the appearance images in the training data set.
[0012] Step 3: Construct a defect detection model based on the multi-scale normalizing flow network. Using the multi-scale features extracted in Step 2 as the input of the defect detection model, the defect detection model is trained by calculating the loss function.
[0013] Specifically, when preprocessing the original appearance images of laptop computers in Step 1, an industrial camera is used to collect the original appearance images of laptop computers on the laptop production line, and then the original appearance images are preprocessed by the random angle rotation method or the translation method.
[0014] Specifically, the multi-scale feature extraction network model constructed in Step 2 includes a ResNet50 backbone network. The ResNet50 backbone network is pre-trained using the public data set ImageNet to obtain the initial parameters, and it is ensured that the initial parameters of the ResNet50 backbone network remain unchanged during the training processes of the multi-scale feature extraction network model and the defect detection model. The training data is input into the ResNet50 backbone network, and the feature maps C 0 、C 1 、C 2 、C 3 、C 4 output by the last layer of the five stages Stage0, Stage1, Stage2, Stage3, and Stage4 of the ResNet50 backbone network are obtained respectively.
[0015] Specifically, the multi-scale feature extraction network model in Step 2 also includes a multi-scale feature extraction network constructed based on the feature pyramid network. The multi-scale feature extraction network includes a top-down feature fusion path 1 and a bottom-up feature fusion path 2.
[0016] In the top-down feature fusion path 1, the feature maps M 4 、M 3 、M2 , M 1 , the top-level feature map M 4 is obtained by performing a 1×1 convolution on the feature map C 4 to reduce the number of channels. The remaining feature maps M i , i = 1, 2, 3 are obtained by fusing a shallow feature map C i and a deep feature map M i+1 ;
[0017] In the second feature fusion path, from bottom to top, it successively includes feature maps P 1 , P 2 , P 3 , P 4 . The bottom-level feature map P 1 directly copies the value of M 1 . The remaining feature maps P i , i = 2, 3, 4 are obtained by fusing a shallow feature map P i-1 and a deep feature map M i ;
[0018] Finally, [M 2 , M 3 , M 4 and [P 2 , P 3 , P 4 are concatenated along the channel dimension to form multi-scale features [y 1 , y 2 , y 3 .
[0019] Specifically, the defect detection model constructed in step three is a chain of coupled blocks connected in series, and the coupled block is a multi-scale normalization flow sub-network; the multi-scale features input into the defect detection model successively pass through each coupled block in the chain of coupled blocks, and each time passing through a coupled block, an affine invertible transformation is performed on the input features. After multiple affine invertible transformations, the unknown distribution ρ Y in the feature space Y is mapped to the latent space Z with a Gaussian distribution ρ Z :
[0020] f(y (1) , …, y (s) ) = [z (1) , …, z (s) = z;
[0021] where f represents the multi-scale normalization flow network, y = [y (1) , …, y (s) ∈ Y, y is the image feature of the appearance image x, y (s) is the feature of the s-th scale in y, z = [z (1) , …, z(s) ∈ Z, where z is the multi-scale feature tensor corresponding to y after transformation, and z (s) is the same-scale feature tensor corresponding to y (s) , and s is the feature scale.
[0022] Specifically, when the coupling block A performs an affine invertible transformation on the input features, it includes the following steps:
[0023] S31: First, use the permutation attention mechanism to fuse the visual information and semantic information of the input features of the coupling block to obtain the fused feature tensor
[0024] S32: Uniformly divide the fused feature tensor along the channel dimension to obtain the features and
[0025] S33: Input the divided features and into the cross-scale fully convolutional sub-network. The cross-scale fully convolutional sub-network first expands the channels of the features and through 1*1 convolution, then uses bilinear interpolation upsampling and strided convolution downsampling for information fusion between features of different scales, and finally divides them by channel respectively to obtain the scaling parameter s and the offset parameter t;
[0026] Use the feature y in,1 as the input to obtain the parameter s 1 (y in,1 ) and t 1 (y in,1 ), which act on y in,2 to obtain the feature y out,2 ; then use the feature y out,2 as the input to obtain the parameter s 2 (y out,2 ) and t 2 (y out,2 ), which act on y in,1 to obtain the feature y out,1 :
[0027]
[0028]
[0029] where ⊙ is the element-wise multiplication, and γ 1 and γ 2 are learnable parameters;
[0030] S34: Finally, the features and Concatenate by channel to obtain the output feature tensor of the coupling block A and input it into the next cascaded coupling block.
[0031] Specifically, during the training of the defect detection model, density estimation learning is performed on the multi-scale features through multi-scale normalizing flow, and a likelihood value p is assigned to the image feature y of the appearance image x Y (y), and the training objective of the defect detection model is to maximize the likelihood value p of the image feature y of the defect-free appearance image Y (y):
[0032]
[0033] where represents the absolute determinant of the Jacobian matrix;
[0034] The loss function
[0035] Specifically, when detecting the appearance defects of a laptop, p z (z) and the threshold θ are used to determine the detection result of the appearance image x:
[0036]
[0037] A(x)=1 indicates that the appearance image x is a defect-free appearance image, and A(x)=0 indicates that the appearance image x is a defective appearance image.
[0038] Compared with the prior art, the beneficial technical effects of the present invention are:
[0039] The present invention can well locate defects of different scales and types. In the detection of laptop appearance defects, it has good detection effects and defect location effects, and can solve the problems of low accuracy, poor transferability of traditional machine learning detection algorithms, difficult detection of small targets in deep learning detection algorithms, and dependence on a large amount of labeled sample data. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 is a schematic diagram of the model in the present invention;
[0041] Figure 2 is a schematic diagram of the multi-scale feature extraction network model of the present invention;
[0042] Figure 3 is a schematic diagram of the multi-scale normalizing flow sub-network of the present invention;
[0043] Figure 4 is a schematic diagram of the cross-scale fully convolutional sub-network of the present invention;
[0044] Figure 5This is a schematic diagram of the visualization result of the defect detection of the present invention. Detailed implementation manners
[0045] The following is a detailed description of a preferred implementation manner of the present invention in conjunction with the accompanying drawings.
[0046] The training method of the multi-scale feature extraction network model and the multi-scale normalizing flow network in the present invention includes the following steps:
[0047] S1: Obtain the original appearance image of the laptop and perform data preprocessing on it, and then divide and organize the preprocessed original appearance image into a data set.
[0048] Step S1 specifically includes:
[0049] S11: Use an industrial camera to collect the original appearance image of the laptop on the laptop production line, and then use preprocessing methods such as image enhancement (such as random angle rotation, translation) on the original appearance image to obtain a preset number of appearance images. Before detecting the appearance image of the laptop in the actual production process using the defect detection method in the present invention, it is also necessary to preprocess the appearance image of the laptop in the production process.
[0050] S12: Divide the preprocessed appearance images, classify most of the defect-free appearance images into the training data set, and then classify the remaining small number of defect-free appearance images and all defective appearance images into the test data set. The training data set and the test data set are collectively referred to as the data set.
[0051] S2: Construct a multi-scale feature extraction network model based on the ResNet50 network and the feature pyramid network, and extract the multi-scale features of the appearance images in the data set.
[0052] Step S2 specifically includes:
[0053] S21: The constructed multi-scale feature extraction network model is as Figure 2 shown. The left side is the backbone network part of the ResNet50 network (that is, the last global average pooling layer and the fully connected layer are removed). The ResNet50 backbone network is pre-trained using the public data set ImageNet to obtain initial parameters, and it is ensured that the initial parameters of the ResNet50 backbone network remain unchanged throughout the training process. The input Input passes through the ResNet50 backbone network, and the feature maps C 0 、C 1 、C 2 、C 3 、C 4 output by the last layer of the five stages Stage0, Stage1, Stage2, Stage3, and Stage4 of the ResNet50 network are obtained in sequence.
[0054] Traditional image pyramid methods obtain input images with different resolutions by scaling the original image, and then input them into the feature extraction network in sequence to finally obtain multi-scale features; or directly use the outputs of several end stages in the feature extraction network as multi-scale features. The multi-scale features extracted by the first method all have rich semantic information, which is beneficial to the recognition and detection of small targets. However, the extraction of each scale feature requires scaling the image and traversing a complete feature extraction network once, and the computational complexity of the algorithm is relatively high; although the second method avoids the complex calculation process and retains the spatial information at high resolution, the low-level features pass through too few convolutional layers and contain weak semantic information, resulting in insufficient feature extraction.
[0055] Based on the above considerations, the present invention proposes an improved multi-scale feature extraction network based on Feature Pyramid Networks (FPN), as Figure 2 shown on the right. In the first step, the feature maps C 0 , C 1 , C 2 , C 3 , C 4 obtained in step S21 are used to construct a top-down feature fusion path. Except for the top-level feature map M 4 which is directly obtained by performing 1*1 convolution on C 4 to reduce the number of channels, the remaining feature maps M i , i = 1, 2, 3 are obtained by fusing a shallower feature map C i and a deeper feature map M i+1 . Taking the calculation from M 4 to M 3 as an example, first, bilinear interpolation is used to upsample M 4 to double its feature map size, then 1*1 convolution is performed on C 3 to make its number of channels a fixed value (usually 256), and then the transformed C 3 and the feature map obtained by upsampling M 4 are feature-fused by element-wise addition. Finally, a 3*3 convolution is used on the fused feature map for smoothing to obtain M 3 . The smoothing process is used to increase the representational ability of the fused features. Thus, the construction of the top-down feature fusion path is completed and the feature maps M 1 , M 2 , M 3 , M 4 are obtained. In the second step, the fused feature maps are used to construct a bottom-up feature fusion path. Except for the bottom-level feature map P 1 which is directly copied from M1 The value, and the remaining feature maps P i , i = 2, 3, 4 are obtained by fusing a shallow feature map P i-1 and a deep feature map M i . Taking the calculation from P 1 to P 2 as an example, first, P 1 is downsampled through a 3×3 convolution with a stride of 2, and then M 2 and the downsampled feature map of P 1 are feature-fused by the way of element-wise addition. Then, a 3×3 convolution is used to smooth the fused features to obtain P 2 . Thus, the construction of the bottom-up feature fusion path is completed and the feature maps P 1 , P 2 , P 3 , P 4 are obtained. The above two sets of feature fusion paths in opposite directions are for better fusing the underlying information (texture, color, etc.) of low-level features and the semantic information of high-level features. Finally, the higher-level features [M 2 , M 3 , M 4 and [P 2 , P 3 , P 4 are concatenated along the channel dimension to form the required multi-scale features [y 1 , y 2 , y3].
[0056] S3: Construct a defect detection model based on the multi-scale normalizing flow network, using the multi-scale features extracted in step S2 as the input of the defect detection model.
[0057] Step S3 specifically includes:
[0058] S31: As Figure 1 shown, the constructed defect detection model is a chain of coupling blocks (i.e., the multi-scale normalizing flow sub-network shown in Figure 3 ), which is composed of a series of coupled blocks in series. In the present invention, the number of coupling blocks is 4. Each time passing through a coupling block, an affine invertible transformation is performed on the input. Through a series of affine invertible transformations, the unknown distribution ρ Y in the feature space Y is mapped to the latent space Z with a Gaussian distribution ρ Z (z = [z (1) , …, z (s) ∈ Z). A visual description is as follows:
[0059] f(y (1) , …, y (s) ) = [z (1) , …, z(s) =z∈Z;
[0060] where y = [y (1) ,…,y (s) ∈ Y, where y is the image feature of the appearance image x, and y (s) represents the feature of the s-th scale in y, z is the multi-scale feature tensor corresponding to y after transformation, and z (s) is the same-scale feature tensor corresponding to y (s) , s is the feature scale, and in the method of the present invention, s = 3.
[0061] The permutation attention mechanism (Shuffle Attention) is used to fully fuse the visual information and semantic information of the input features of the coupling block. Permutation attention is a channel-spatial attention mechanism that, based on channel attention and spatial domain attention, introduces feature grouping and channel permutation, reduces computational complexity, and obtains a lightweight, plug-and-play attention mechanism.
[0062] S32: The fused feature tensor is evenly divided along the channel dimension to obtain features and
[0063] S33: The divided features are input into the cross-scale fully convolutional sub-network as shown in Figure 4 . The cross-scale fully convolutional sub-network first expands the channel dimension of the input features through 1*1 convolution, then uses bilinear interpolation upsampling and strided convolution downsampling for information fusion between features of different scales, and finally divides by channel respectively to obtain the scaling parameter s and the offset parameter t. First, using y in,1 as the input to obtain the parameter s 1 (y in,1 ) and t 1 (y in,1 ), which act on y in,2 to obtain the feature y out,2 ; then using the feature y out,2 as the input to obtain the parameter s 2 (y out,2 ) and t 2 (y out,2 ), which act on y in,1 to obtain the feature y out,1 . The formulaic description is as follows:
[0064]
[0065]
[0066] where ⊙ is element-wise multiplication, γ 1 and γ2 is a learnable parameter, initialized to 0.
[0067] S34: Finally, the feature and are concatenated by channel to obtain the output feature tensor of this coupling block and input it into the next cascaded coupling block.
[0068] S35: In the training stage of the defect detection model, density estimation learning is performed on the extracted multi-scale features through multi-scale normalizing flows. Density estimation can assign a likelihood value to the image feature y of the input image x. Assuming that a low likelihood value indicates a defect appearance image, the training objective is to maximize the likelihood value p Y (y). According to the change-of-variables theorem, p Y (y) can be expressed as follows:
[0069]
[0070] where represents the absolute determinant of the Jacobian matrix. Combining with the formula in S33, the logarithm of this term can be simplified to the element sum of the parameter s because the Jacobian determinant of the element-wise product operator ⊙ is a diagonal matrix. Equivalently, changing the above objective of maximizing the likelihood to the objective of minimizing the negative log-likelihood loss, that is, the loss function
[0071]
[0072]
[0073] In the inference stage, p Z (z) and the threshold θ are used to determine whether the input x is a defect appearance image, which is described formulaically as follows:
[0074]
[0075] The defect detection method proposed by the present invention is compared with other mainstream methods through the test data set to verify the effectiveness of the present invention. The area under the receiver operating characteristic curve (AUROC) at the image level of the defect detection results of the present invention is compared with the following models, and the results are shown in Table 1.
[0076] Table 1
[0077] Defect detection model AUROC (%) GANomaly 84.7 PaDim 96.8 CS_Flow 98.8 The present invention 99.5
[0078] From the data in Table 1, it can be seen that the detection effect of the present invention is the best; followed by the same type of CS_Flow model, whose performance is slightly lower than the defect detection method in the present invention; the detection effects of the Padim model based on feature embedding and the GANomaly model based on adversarial autoencoders are the worst.
[0079] By summing the squared values along the channel dimension on the maximum-scale output feature map z (1) and then using bilinear interpolation to restore it to the original image resolution, the visualized defect detection effect obtained is as Figure 5 shown. The first row is the original image, and the second row is the defect localization heat map. It can be seen from the figure that the defect detection method in the present invention can well locate defects of different scales and types. In summary, in the detection of notebook appearance defects, the defect detection method in the present invention has good detection and defect localization effects.
[0080] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and without departing from the spirit or basic characteristics of the present invention, the present invention can be implemented in other specific forms. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be included in the present invention, and any reference signs in the claims should not be regarded as limiting the claims involved.
[0081] In addition, it should be understood that although this specification is described according to embodiments, not every embodiment only contains an independent technical solution. This narrative way of the specification is only for clarity. Those skilled in the art should regard the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. An unsupervised notebook appearance defect detection method based on multi-scale normalizing flow, characterized in that, The appearance images of laptops collected in real time on the laptop production line are sequentially input into the multi-scale feature extraction network model and the defect detection model to obtain the detection results of the appearance defects of the laptops; among them, when training the multi-scale feature extraction network model and the defect detection model, the following steps are included: Step 1: Preprocess the original appearance images of the laptops and form a training data set; Step 2: Construct a multi-scale feature extraction network model based on the ResNet50 network and the feature pyramid network to extract the multi-scale features of the appearance images in the training data set; Step 3: Construct a defect detection model based on the multi-scale normalizing flow network, use the multi-scale features extracted in Step 2 as the input of the defect detection model, and train the defect detection model by calculating the loss function; The defect detection model constructed in step three is a coupling block chain formed by connecting multiple coupling blocks in series. A coupling block is a multi-scale normalization flow sub-network. The multi-scale features input into the defect detection model sequentially pass through each coupling block in the coupling block chain, and an affine invertible transformation is performed on the input features each time a coupling block is passed through. After multiple affine invertible transformations, the unknown distribution ρ in the feature space Y is γ mapped to the latent space Z with a Gaussian distribution ρ Z : f(y (1) , …, y (s) ) = [z (1) , …, z (s) = z; where \(f\) represents the multi-scale normalizing flow network, \(y = [y (1) ,\ldots,y (s) \in Y\), \(y\) is the image feature of the appearance image \(x\), \(y (s) \) is the feature at the \(s\)-th scale in \(y\), \(z = [z (1) ,\ldots,z (s) \in Z\), \(z\) is the multi-scale feature tensor corresponding to \(y\) after transformation, \(z (s) \) is the co-scale feature tensor corresponding to \(y (s) \), and \(s\) is the feature scale; When the coupling block A performs an affine invertible transformation on the input features, the following steps are included: S31: First, use the permutation attention mechanism to fuse the visual information and semantic information of the input features of the coupling block to obtain a fused feature tensor S32: Uniformly divide the fused feature tensor along the channel dimension to obtain features and S33: Input the divided features and into the cross-scale fully convolutional sub-network. The cross-scale fully convolutional sub-network first expands the channel dimensions of the features and through 1×1 convolution, then performs information fusion between features of different scales using bilinear interpolation upsampling and strided convolution downsampling, and finally divides them by channel respectively to obtain the scaling parameter s and the offset parameter t; Utilize feature y in,1 as input to obtain parameter s 1 (y in,1 ) and t 1 (y in,1 ), act on y in,2 to obtain feature y out,2 ; Then utilize feature y out,2 as input to obtain parameter s 2 (y out,2 ) and t 2 (y out,2 ), act on y in,1 to obtain feature y out,1 : where ⊙ is element-wise multiplication, and γ 1 and γ 2 are learnable parameters; S34: Finally, the features and are concatenated by channel to obtain the output feature tensor of the coupling block A and input it into the next cascaded coupling block.
2. The unsupervised notebook appearance defect detection method based on multi-scale normalizing flow according to claim 1, characterized in that, When preprocessing the original appearance images of the laptops in Step 1, use an industrial camera to collect the original appearance images of the laptops on the laptop production line, and then preprocess the original appearance images by the random angle rotation method or the translation method.
3. The unsupervised notebook appearance defect detection method based on multi-scale normalizing flow according to claim 1, characterized in that, The multi-scale feature extraction network model constructed in step two includes a ResNet50 backbone network; the ResNet50 backbone network is pre-trained using the public dataset ImageNet to obtain initial parameters, and it is ensured that the initial parameters of the ResNet50 backbone network remain unchanged during the training processes of the multi-scale feature extraction network model and the defect detection model; the training data is input into the ResNet50 backbone network to respectively obtain the feature maps C 0 , C 1 , C 2 , C 3 , C 4 .
4. The unsupervised notebook appearance defect detection method based on multi-scale normalizing flow according to claim 3, characterized in that, The multi-scale feature extraction network model in Step 2 further includes a multi-scale feature extraction network constructed based on the feature pyramid network; the multi-scale feature extraction network includes a top-down feature fusion path 1 and a bottom-up feature fusion path 2; The top-down in the first feature fusion path successively includes feature maps M 4 , M 3 , M 2 , M 1 . The top-level feature map M 4 is obtained by directly performing 1*1 convolution on the feature map C 4 to reduce the number of channels. The remaining feature maps M i , i = 1, 2, 3 are obtained by fusing a shallow feature map C i and a deep feature map M i+1 . In the second feature fusion path, from bottom to top, it successively includes feature maps P 1 , P 2 , P 3 , P 4 . The bottom feature map P 1 directly copies the value of M 1 . For the remaining feature maps P i , i = 2, 3, 4, they are obtained by fusing a shallow feature map P i-1 and a deep feature map M i . Finally, [M 2 , M 3 , M 4 and [P 2 , P 3 , P 4 are concatenated along the channel dimension to form multi-scale features [y 1 , y 2 , y 3 .
5. The unsupervised notebook appearance defect detection method based on multi-scale normalizing flow according to claim 1, characterized in that: When training the defect detection model, density estimation learning is performed on the multi-scale features through multi-scale normalizing flow to assign a likelihood value p Y (y) to the image feature y of the appearance image x: wherein represents the absolute determinant of the Jacobian matrix; The loss function 6. The unsupervised notebook appearance defect detection method based on multi-scale normalizing flow according to claim 5, characterized in that: When detecting the appearance defects of a laptop, use p Z (z) and a threshold θ to determine the detection result of the appearance image x: A(x) = 1 indicates that the appearance image x is a defect-free appearance image, and A(x) = 0 indicates that the appearance image x is a defective appearance image.
Citation Information
Patent Citations
Unsupervised defect detection and positioning method based on multilevel feature reconstruction
CN114332008A
Large-view-field target detection method based on YOLOv4 improved algorithm
CN114998688A