Industrial part anomaly detection method based on SCFlow

Through the industrial parts abnormality detection method based on SCFlow, multi-level features are extracted and incremental feature conversion is carried out layer by layer, which solves the problems of insufficient sensitivity and insufficient feature expression ability of the existing methods in the processing of small image changes, and achieves high-accuracy abnormality detection and positioning.

CN119599998AActive Publication Date: 2025-03-11TAIYUAN UNIVERSITY OF TECHNOLOGY

Patent Information

Application Number
CN202411710985.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-11
Estimated Expiration
2044-11-27

AI Technical Summary

Technical Problem

The existing unsupervised anomaly detection methods are insufficient in handling slight changes in images, lack of feature expression capabilities, and low information fusion efficiency, resulting in the impact of the accuracy and reliability of anomaly detection.

Method used

Using the industrial parts anomaly detection method based on SCFlow, a multi-scale normalized flow SCFlow framework is constructed by extracting multi-level features and incremental feature conversion, including StepFlow and ConvergeFlow modules, and probability density estimation is performed to achieve abnormal detection.

Benefits of technology

It significantly improves the accuracy and positioning accuracy of abnormality detection, enhances the adaptability of the model, performs excellently on multiple data sets, can accelerate the abnormality detection process, and has important industrial monitoring application value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119599998A_ABST
    Figure CN119599998A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of industrial anomaly detection, and particularly relates to an industrial part anomaly detection method based on SCFlow, which takes a normal sample image as input, and extracts multi-scale features through a pre-trained feature extractor. The SCFlow receives the multi-scale feature maps and carries out probability density estimation. A layer-by-layer increasing feature layer-by-layer enhancement module StepFlow is utilized to independently encode each layer of feature map so as to ensure that the bottom layer captures detail features, the middle layer enhances the feature expression ability, and the top layer combines a global attention mechanism to realize effective integration of features; the feature fusion module ConvergeFlow effectively fuses feature maps from different scales, and improves the comprehensive analysis capability of the model for anomalies. Product defect detection in the industrial manufacturing process is a key link for guaranteeing the product quality, and the solution provided by the invention can improve the accuracy and efficiency of industrial anomaly detection, thereby providing support for applications such as industrial quality control, equipment maintenance, production optimization and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of industrial anomaly detection, and specifically relates to an industrial parts anomaly detection method based on SCFlow. Background Art

[0002] In modern industrial environments, anomaly detection is a key factor in ensuring production efficiency and equipment safety. With the development of intelligence, timely detection and processing of potential anomalies can reduce maintenance costs. Figure 1 As shown in the figure, anomalies include texture anomalies and functional anomalies. Texture anomalies can be detected by image processing, while functional anomalies require high-level semantic information. Supervised learning requires a large amount of labeled data, which is not only time-consuming and labor-intensive, but also inaccurate in manual annotation. Unsupervised methods only need to use images of normal samples for training, so research on unsupervised anomaly detection is constantly developing.

[0003] The current unsupervised anomaly detection methods are mainly divided into image reconstruction-based and representation-based methods. The reconstruction-based method is only trained on normal images, so that it can reconstruct normal images well. During the test phase, it will produce large reconstruction errors for the defective areas of the image to determine abnormal samples. However, although the reconstruction-based method can effectively capture the features of normal images, it will cause misjudgment when processing abnormal samples due to the lack of sensitivity to reconstruction errors, thus affecting the accuracy and reliability of anomaly detection.

[0004] Representation-based methods extract feature vectors through pre-trained models and perform anomaly detection by calculating the distance of data distribution. In recent years, normalized flows have been gradually applied to industrial anomaly detection. However, the first time the normalized flow was introduced for anomaly detection, the two-dimensional image was compressed into one dimension by flipping and scaling the image before inputting it into the feature extractor for anomaly detection, resulting in the loss of position information, which may affect the accuracy of detection. Subsequent methods extend the original normalized flow to two-dimensional space, which can maintain the relative position of the space to improve the performance of anomaly detection. However, some anomalies may be small, and using a single-scale input image for direct feature extraction cannot fully utilize the information of the image. In addition, current methods mainly focus on local features and ignore the relationship between local features and global features. Summary of the invention

[0005] In response to the above-mentioned technical problems, the present invention provides an industrial parts anomaly detection method based on SCFlow, which aims to effectively improve the performance of unsupervised anomaly detection. By extracting multi-level features and incremental feature conversion, the present invention solves the problems of insufficient sensitivity of existing methods to slight changes in images, insufficient feature expression capabilities, and low information fusion efficiency, thereby achieving accurate identification and positioning of anomalies.

[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0007] An industrial parts anomaly detection method based on SCFlow includes the following steps:

[0008] S1: Prepare the dataset: Obtain the image dataset required for the unsupervised anomaly detection task. The images usually contain different types of industrial objects, some of which contain anomalies, while others are defect-free images. Since unsupervised detection does not rely on defect labels, the training set usually only uses defect-free images.

[0009] S2: Model building: normal sample images are taken as input, and multi-scale features are extracted through pre-trained feature extractors; the SCFlow module receives these multi-scale feature maps and performs probability density estimation;

[0010] S3: Unsupervised anomaly detection: After completing the construction and training of the model, use the model to perform unsupervised anomaly detection and location on the test set; verify the effectiveness of the model by evaluating the detection performance indicators.

[0011] The data set in S1 is selected from MVTec AD and BTAD.

[0012] The method for extracting multi-scale features in S2 is: using a feature extractor to extract multi-level features and constructing a multi-scale normalized flow SCFlow framework. SCFlow includes two key modules: StepFlow and ConvergeFlow.

[0013] The feature extractor uses a pre-trained Wide ResNet50 to extract features from a single-scale input image and generate a multi-scale feature map.

[0014] The StepFlow module in S2 encodes the input multi-scale feature map through a layer-by-layer incremental flow module to construct a stepped network architecture; the bottom-level flow module captures the detailed features of the image; the middle-level flow module extracts details and local features through a dual-branch structure to retain important information; the deep-level flow module integrates multi-level information through global attention to extract high-level semantic features.

[0015] The underlying flow module of the StepFlow module in S2 uses 3×3 convolution, layer normalization and ReLU activation function, and then applies a second 3×3 convolution layer to capture the detailed features of the image.

[0016] The middle-level flow module of the StepFlow module in the S2 is composed of two branch structures. The first branch structure is the same as the bottom-level flow module, and the second branch is a multi-branch depth-separable convolution module. The module is divided into the following branches. First, 1×1 convolution is used to extract channel-by-channel features, and then 3×3 and 5×5 convolutions are used to further extract multi-scale features, and the maximum pooling operation is used to retain important information of the image. By splicing the outputs of multiple branches, a feature representation with rich information is generated.

[0017] The top-level laminar flow module of the StepFlow module in S2 is composed of three branch structures. The first two branch structures are the same as the middle-level flow module, and the third branch adds global attention. The third branch combines the first two branches to extract features and integrate multi-level information.

[0018] The method for outputting the feature map in S2 is as follows: the ConvergeFlow module integrates the potential feature map from StepFlow through multi-scale convolution operations; the input multi-layer feature maps are resized to the same scale size, and the fused feature map is added to the input feature map using a residual connection, and finally the fused feature map is output.

[0019] The method for using the model to perform unsupervised anomaly detection and location on the test set in S3 is: using the model to estimate the probability density of the test set, and if the feature probability density of the abnormal image is significantly lower than that of the normal image, the image is determined to be abnormal.

[0020] Compared with the prior art, the present invention has the following beneficial effects:

[0021] The present invention proposes an industrial parts anomaly detection method based on SCFlow. By extracting multi-scale features, the model can make full use of image information. The use of SCFlow for probability density estimation significantly improves the accuracy of anomaly detection. In addition, the model has good adaptability and performs well on multiple data sets. Through the evaluation of detection performance indicators, the present invention not only improves the positioning accuracy of abnormal areas, but also has important application value in fields such as industrial monitoring, and can accelerate the anomaly detection process, thereby providing effective support for practical applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.

[0023] The structures, proportions, sizes, etc. illustrated in this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with the technology. They are not used to limit the conditions under which the present invention can be implemented, and therefore have no substantial technical significance. Any structural modification, change in proportion or adjustment of size shall still fall within the scope of the technical contents disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.

[0024] Figure 1 It is a flow chart of an industrial parts anomaly detection method based on SCFlow of the present invention;

[0025] Figure 2 is a network structure diagram of the present invention;

[0026] Figure 3 They are respectively the network structure diagrams of the underlying flow modules of StepFlow in the present invention;

[0027] Figure 4 It is the network structure diagram of the middle-level flow module of StepFlow in the present invention;

[0028] Figure 5 It is the network structure diagram of the top-level flow module of StepFlow in the present invention;

[0029] Figure 6 It is a network structure diagram of ConvergeFlow in the present invention;

[0030] Figure 7 This is a diagram showing the abnormality detection results of the present invention. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. These descriptions are only to further illustrate the features and advantages of the present invention, rather than to limit the claims of the present invention. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0032] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0033] An industrial parts anomaly detection method based on SCFlow in an embodiment of the present invention is as follows: Figure 1 As shown, the following steps are included:

[0034] Step 1: Prepare the dataset: Get the image dataset required for the unsupervised anomaly detection task. The images usually contain different types of industrial objects. Some images contain anomalies (such as cracks, stains, or deformations), while other images are defect-free images. Since unsupervised detection does not rely on defect labels, the training set usually only uses defect-free images.

[0035] Step 2: Build the model: The normal sample image is taken as input, and multi-scale features are extracted through the pre-trained feature extractor. SCFlow receives these multi-scale feature maps and performs probability density estimation.

[0036] Step 3: Unsupervised anomaly detection: After completing the construction and training of the model, use the model to perform unsupervised anomaly detection and location on the test set. The effectiveness of the model is verified by evaluating the detection performance indicators.

[0037] Further, in step 1, the data set is selected from MVTec AD and BTAD.

[0038] Further, in step 2, if Figure 2 As shown, the feature extractor is used to extract multi-level features and construct a multi-scale normalized flow (SCFlow) framework. SCFlow mainly includes two key modules: StepFlow and ConvergeFlow. Step 2 includes the following steps 2-1, 2-2 and 2-3:

[0039] Step 2-1: Feature extraction module: Use the pre-trained Wide ResNet50 as the feature extractor to extract features from the single-scale input image and generate a multi-scale feature map.

[0040] Step 2-2: StepFlow module: StepFlow encodes the input multi-scale feature map through a layer-by-layer incremental flow module to build a ladder-like network architecture. The bottom-level flow module captures the detailed features of the image. The middle-level flow module extracts details and local features through a dual-branch structure to retain important information. The deep-level flow module integrates multi-level information through global attention and extracts high-level semantic features.

[0041] Further, in step 2-2, if Figure 3 As shown in Figure 1, the underlying flow module of StepFlow uses 3×3 convolution, layer normalization, and ReLU activation function, and then applies a second 3×3 convolution layer to capture the detailed features of the image.

[0042] Further, in step 2-2, if Figure 4As shown in the figure, the middle-level flow module of StepFlow consists of two branch structures. The first branch structure is the same as the bottom-level flow module, and the second branch is a multi-branch depth-separable convolution module. This module is divided into the following branches. First, 1×1 convolution is used to extract channel-by-channel features. Then, 3×3 and 5×5 convolutions are used to further extract multi-scale features, and the maximum pooling operation is used to retain important information of the image. By splicing the outputs of multiple branches, a feature representation with rich information is generated.

[0043] Further, in step 2-2, if Figure 5 As shown in the figure, the deep flow module of StepFlow consists of three branch structures. The first two branch structures are the same as the middle flow module, and the third branch adds global attention. The third branch combines the first two branches to extract features and integrate multi-level information.

[0044] Step 2-3: ConvergeFlow module: Figure 6 As shown in Figure 1, ConvergeFlow integrates the potential feature maps from StepFlow through multi-scale convolution operations. The input multi-layer feature maps are resized to the same scale, and the fused feature maps are added to the input feature maps using residual connections, and finally the fused feature maps are output.

[0045] Furthermore, in step 3, the model is used to estimate the probability density of the test set. The feature probability density of the abnormal image is significantly lower than that of the normal image, and the image is determined to be abnormal.

[0046] Furthermore, the prediction method of the present invention uses the area under the receiver operating characteristic curve (AUROC) as the main evaluation index.

[0047] Furthermore, the method of the present invention is implemented using Pytorch and trained using the Adam optimizer. After multiple experiments to adjust the parameters, the present invention sets the learning rate to 1e-4, the batch size to 8, and each experiment runs for 25 cycles.

[0048] The present invention proposes an industrial parts anomaly detection method based on SCFlow, such as Figure 7 As shown, the AUROC values ​​on two commonly used public data sets reach 0.998 and 0.978 respectively, proving that the industrial parts anomaly detection method based on SCFlow proposed in the present invention has good anomaly detection capability.

[0049] The present invention proposes an industrial parts anomaly detection method based on SCFlow. By extracting multi-scale features, the model can make full use of image information. The use of SCFlow for probability density estimation significantly improves the accuracy of anomaly detection. In addition, the model has good adaptability and performs well on multiple data sets. Through the evaluation of detection performance indicators, the present invention not only improves the positioning accuracy of abnormal areas, but also has important application value in fields such as industrial monitoring, and can accelerate the anomaly detection process, thereby providing effective support for practical applications.

[0050] Only the preferred embodiments of the present invention are described in detail above, but the present invention is not limited to the above embodiments. Various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention, and various changes should be included in the protection scope of the present invention.

Claims

1. An industrial parts anomaly detection method based on SCFlow, characterized in that: The following steps are involved: S1: Prepare the dataset: Obtain the image dataset required for the unsupervised anomaly detection task. The images usually contain different types of industrial objects, some of which contain anomalies, while others are defect-free images. Since unsupervised detection does not rely on defect labels, the training set usually only uses defect-free images. S2: Model building: normal sample images are taken as input, and multi-scale features are extracted through pre-trained feature extractors; the SCFlow module receives these multi-scale feature maps and performs probability density estimation; S3: Unsupervised anomaly detection: After completing the construction and training of the model, use the model to perform unsupervised anomaly detection and location on the test set; verify the effectiveness of the model by evaluating the detection performance indicators.

2. The method for detecting anomalies of industrial parts based on SCFlow according to claim 1, characterized in that: The data set in S1 is selected from MVTec AD and BTAD.

3. The method for detecting anomalies of industrial parts based on SCFlow according to claim 1, characterized in that: The method for extracting multi-scale features in S2 is: using a feature extractor to extract multi-level features and constructing a multi-scale normalized flow SCFlow framework. SCFlow includes two key modules: StepFlow and ConvergeFlow.

4. The method for detecting anomalies of industrial parts based on SCFlow according to claim 3 is characterized in that: The feature extractor uses a pre-trained Wide ResNet50 to extract features from a single-scale input image and generate a multi-scale feature map.

5. The method for detecting abnormality of industrial parts based on SCFlow according to claim 1, characterized in that: The StepFlow module in S2 encodes the input multi-scale feature map through a layer-by-layer incremental flow module to construct a stepped network architecture; the bottom-level flow module captures the detailed features of the image; The middle-level stream module extracts details and local features through a dual-branch structure and retains important information; the deep-level stream module integrates multi-level information through global attention and extracts high-level semantic features.

6. The method for detecting abnormality of industrial parts based on SCFlow according to claim 1, characterized in that: The underlying flow module of the StepFlow module in S2 uses 3×3 convolution, layer normalization and ReLU activation function, and then applies a second 3×3 convolution layer to capture the detailed features of the image.

7. The method for detecting anomalies of industrial parts based on SCFlow according to claim 1, characterized in that: The middle-level flow module of the StepFlow module in the S2 is composed of two branch structures. The first branch structure is the same as the bottom-level flow module, and the second branch is a multi-branch depth-separable convolution module. The module is divided into the following branches. First, 1×1 convolution is used to extract channel-by-channel features, and then 3×3 and 5×5 convolutions are used to further extract multi-scale features, and the maximum pooling operation is used to retain important information of the image. By splicing the outputs of multiple branches, a feature representation with rich information is generated.

8. The method for detecting anomalies of industrial parts based on SCFlow according to claim 1, characterized in that: The top-level laminar flow module of the StepFlow module in S2 is composed of three branch structures. The first two branch structures are the same as the middle-level flow module, and the third branch adds global attention. The third branch combines the first two branches to extract features and integrate multi-level information.

9. The method for detecting abnormality of industrial parts based on SCFlow according to claim 1, characterized in that: The method for outputting the feature map in S2 is as follows: the ConvergeFlow module integrates the potential feature map from StepFlow through multi-scale convolution operations; the input multi-layer feature maps are resized to the same scale size, and the fused feature map is added to the input feature map using a residual connection, and finally the fused feature map is output.

10. The method for detecting abnormality of industrial parts based on SCFlow according to claim 1, characterized in that: The method for using the model to perform unsupervised anomaly detection and location on the test set in S3 is: using the model to estimate the probability density of the test set, and if the feature probability density of the abnormal image is significantly lower than that of the normal image, the image is determined to be abnormal.

Citation Information

Patent Citations

  • Unsupervised anomaly positioning and detection method and device based on multi-scale standardized flow

    CN115205650A

  • Industrial product anomaly detection method based on self-supervised puzzle module

    CN115861306A

  • Industrial defect detection method based on image recovery

    CN116862894A

  • Industrial anomaly detection method and system based on multi-scale feature guidance and fusion

    CN117710757A

  • Industrial product surface defect detection method based on memory information

    CN118333981A

Cited By

  • Rice fine processing quality control method based on big data

    CN120181666A