An industrial anomaly detection method and device, computer equipment and storage medium

By using a shared parameter feature extractor and multi-scale Gaussian noise generation technology, the problems of data scarcity and complexity in industrial anomaly detection are solved, achieving efficient multimodal data fusion and 3D anomaly detection, and improving detection accuracy and robustness.

CN120912593BActive Publication Date: 2026-02-17SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511416004.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-30
Publication Date
2026-02-17
Estimated Expiration
2045-09-30

AI Technical Summary

Technical Problem

Industrial anomaly detection suffers from data scarcity and complex anomaly morphology, resulting in low efficiency, high cost, and unstable detection results for traditional methods. Existing 3D anomaly detection methods also have shortcomings in modal alignment and computational complexity.

Method used

A feature extractor with shared parameters is used to implicitly align RGB and depth images. Gaussian anomaly features and texture anomaly features are generated by multi-scale Gaussian noise. A discriminator is trained by combining binary cross-entropy and focus loss to achieve effective fusion of multimodal data and anomaly recognition.

Benefits of technology

It improves the expressive power of multimodal data and the robustness of the discriminator, enhances the detection accuracy and reliability of complex anomalies in 3D scenes, and reduces computational overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120912593B_ABST
    Figure CN120912593B_ABST
Patent Text Reader

Abstract

The application discloses an industrial anomaly detection method and device, computer equipment and a storage medium, which are applied to the information technology field. The method comprises the following steps: processing acquired detection data to obtain splicing features and fusion features; adding Gaussian noise to at least one of an RGB image, a depth image, the splicing features and the fusion features through a multi-scale Gaussian anomaly generator to generate Gaussian anomaly features; inputting the detection data into a unified texture anomaly generator to generate texture anomaly features; training a discriminator through the Gaussian anomaly features, the texture anomaly features and acquired reference features to obtain a trained discriminator; and inputting detection target data into the trained discriminator to output an anomaly detection result. The application realizes implicit alignment of the RGB and the depth image, multi-scale anomaly simulation, 2D-to-3D anomaly generation expansion and anomaly detection, and provides an innovative solution for the industrial quality inspection field.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of information technology, and in particular to an industrial anomaly detection method and device, computer equipment and a storage medium. BACKGROUND

[0002] As the basis of quality control, traditional industrial anomaly detection methods rely on manual detection, which has the disadvantages of low efficiency and high labor cost. Moreover, the detection results are easily affected by the subjective judgment of the detection personnel, resulting in insufficient stability of quality control. With the development of deep learning technology, automated anomaly detection technology has gradually become a research hotspot in the industry and has been widely explored in practice. However, industrial anomaly detection still faces two major core problems in practical application: on the one hand, it is extremely difficult to obtain abnormal samples in industrial scenarios, and data scarcity has become a key bottleneck restricting model training; on the other hand, the abnormal morphology presents high complexity, including both minor abnormalities such as surface minor flaws and serious defects such as product structure rupture, with a large span of abnormal types. This data distribution feature determines that the technology route relying solely on supervised learning has significant applicability limitations in actual industrial scenarios.

[0003] To overcome these defects, the present application provides an industrial anomaly detection method, device, computer equipment and storage medium. SUMMARY

[0004] The purpose of the present application is to provide an industrial anomaly detection method, device, computer equipment and storage medium, which aims to solve the above problems.

[0005] To achieve the above purpose, the present application provides the following technical solutions:

[0006] In a first aspect, the present application provides an industrial anomaly detection method, comprising the steps of:

[0007] Obtaining detection data, wherein the detection data includes RGB images and depth images;

[0008] Processing the detection data to obtain splicing features and fusion features;

[0009] Adding Gaussian noise to at least one of the RGB images, the depth images, the splicing features and the fusion features through a multi-scale Gaussian anomaly generator to generate Gaussian anomaly features;

[0010] Inputting the detection data into a unified texture anomaly generator to generate texture anomaly features;

[0011] Training a discriminator through the Gaussian anomaly features, the texture anomaly features and the obtained reference features to obtain a trained discriminator;

[0012] Acquire the target data to be detected, input the target data to the trained discriminator, and output the anomaly detection result.

[0013] Secondly, this application provides an industrial anomaly detection device, specifically comprising:

[0014] Data acquisition module: used to acquire the data to be detected, wherein the data to be detected includes RGB images and depth images;

[0015] Feature processing module: used to process the data to be detected to obtain spliced ​​features and fused features;

[0016] Gaussian anomaly generation module: used to add Gaussian noise to at least one of the RGB image, the depth image, the stitched features and the fused features through a multi-scale Gaussian anomaly generator to generate Gaussian anomaly features;

[0017] Texture anomaly generation module: used to input the data to be detected into a unified texture anomaly generator to generate texture anomaly features;

[0018] Discriminator training module: used to train the discriminator using the Gaussian anomaly features, the texture anomaly features, and the acquired baseline features, to obtain the trained discriminator;

[0019] Inference output module: used to acquire the target data to be detected, input the target data to the trained discriminator, and output the anomaly detection result.

[0020] Thirdly, this application provides a computer device, the computer device including a processor and a memory coupled to the processor, wherein the memory stores program instructions for implementing an industrial anomaly detection method; the processor is used to execute the program instructions stored in the memory to implement an industrial anomaly detection.

[0021] Fourthly, this application provides a storage medium storing processor-executable program instructions for executing an industrial anomaly detection method.

[0022] This application provides an industrial anomaly detection method, apparatus, computer equipment, and storage medium, which have the following beneficial effects:

[0023] (1) In traditional methods, the feature distribution of RGB images and depth images is misaligned due to modal differences, which affects the fusion effect; however, this application eliminates this interference by extracting features through a shared feature extractor, while enhancing the expressive power of multimodal data without the need for additional modal alignment operations.

[0024] (2) By adding multi-scale Gaussian noise to RGB images and depth images before and after the fusion adapter, Gaussian anomalies with different semantic levels are generated, simulating the distribution of anomalies from subtle to significant, which enhances the discriminator's ability to identify anomalies; traditional single-scale anomaly generation is difficult to meet the needs of complex anomalies in 3D scenes, while multi-scale methods can more comprehensively cover anomaly types.

[0025] (3) Input the Gaussian anomaly features, texture anomaly features and the obtained baseline features into the discriminator, output the prediction mask, and optimize the training through binary cross-entropy loss (BCE) and focal loss; help the discriminator distinguish between normal and abnormal features, enhance the discriminator's robustness to texture anomaly segmentation; in the inference stage, only the trained discriminator needs to output the anomaly score, reducing the computational overhead. Attached Figure Description

[0026] Figure 1 This is a schematic flowchart of an industrial anomaly detection method according to Embodiment 1 of this application;

[0027] Figure 2 This is a technical roadmap for the unified texture anomaly generator of Embodiment 1 of this application;

[0028] Figure 3 This is a technical roadmap of an industrial anomaly detection method according to Embodiment 1 of this application;

[0029] Figure 4 This is a schematic diagram of the structure of an industrial anomaly detection device according to Embodiment 2 of this application;

[0030] Figure 5 This is a schematic diagram of the computer device structure according to Embodiment 3 of this application;

[0031] Figure 6 This is a schematic diagram of the storage medium structure in Embodiment 4 of this application. Detailed Implementation

[0032] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0033] The following analysis, based on relevant technologies, examines existing solutions.

[0034] 2D anomaly detection methods include:

[0035] Embedding-based methods input anomaly-free images into an ImageNet-pretrained model to extract features. During training, statistical algorithms embed these features into a normal feature distribution. During testing, these methods compare the input features with the learned anomaly-free distribution and calculate anomaly scores using k-nearest neighbors, thus achieving anomaly detection. The main difference between this and reconstruction-based methods is that the former detects anomalies in a high-dimensional feature space, rather than in the RGB image space.

[0036] Stream-based methods: These methods use normalized streams to transform the distribution of non-outlier samples into a simpler distribution, such as a Gaussian distribution. Outlier samples that did not appear during training are transformed outside the learned distribution and assigned a higher outlier score.

[0037] The distillation-based approach trains a student model using only outlier-free samples, then matches it to the output of a pre-trained teacher model with frozen weights. Since the student model has not been trained on outlier images, it is typically unable to simulate the teacher model's output on these images.

[0038] Despite numerous improvements, 2D modal methods struggle to detect subtle depth anomalies in industrial settings. Studies have shown that directly applying methods from 2D datasets to 3D datasets yields poor results. Therefore, researchers have begun exploring strategies suitable for 3D applications.

[0039] Compared to 2D methods, 3D anomaly detection faces greater technical challenges, but its potential is also considerable. Properly utilizing deep data can significantly improve detection performance in specific applications. Researchers have found that rotation-invariant 3D representations are crucial for 3D anomaly detection, leading to the development of the BTF (Body Feature Formatting) method. This method integrates complementary properties of color and geometric modalities, achieving superior results on 3D datasets. Meanwhile, the ST model can also be used on 3D datasets, with the teacher and student networks being a flow-based and CNN-based model, respectively. CFM detects anomalies in multimodal data by learning cross-modal feature mappings between 2D and 3D modalities. LSFA and M3DM employ two backbone networks pre-trained on RGB and point clouds, respectively, fusing extracted features and storing them in multiple memory banks.

[0040] The aforementioned 3D anomaly detection methods have the following shortcomings: ST models directly stitch 3D and RGB data without 3D feature extraction, resulting in poor depth representation. LSFA and M3DM use dual-branch networks to process RGB and point cloud data separately, making it difficult to align point cloud and RGB data and increasing computational complexity. EasyNet uses independent autoencoders to reconstruct different modal information; although a fusion module exists, inconsistent modal information distribution causes interference, leading to low detection accuracy. 3DSR only generates anomalies at a single scale, failing to meet the needs of multi-scale anomaly simulation in 3D scenes.

[0041] Based on this, this application aims to solve the aforementioned problems of the prior art. Specifically, it achieves implicit alignment of RGB images and depth images through a feature extractor with shared parameters, avoiding interference caused by inconsistent modal information distribution and improving the fusion effect of multimodal data. It also enables the detection of distribution deviations at different locations in the model, solving the problem that single-scale anomaly generation cannot meet the needs of 3D scenes. Furthermore, it extends the 2D texture anomaly generation method to 3D depth images, simulating more realistic depth anomalies and improving the accuracy and reliability of 3D anomaly detection.

[0042] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0043] Example 1

[0044] Please see Figure 1 This is a flowchart illustrating an industrial anomaly detection method according to Embodiment 1 of this application; the steps include:

[0045] S1: Obtain the data to be detected, wherein the data to be detected includes RGB images and depth images.

[0046] S2: Process the data to be detected to obtain splicing features and fusion features.

[0047] In this embodiment, a ResNet-like model pre-trained on ImageNet is selected as the base model for feature extraction. This model has powerful feature extraction capabilities and can learn rich semantic information from images. A parameter-shared feature extractor is used for both RGB and depth images, meaning that the same network parameters are used for feature extraction when images of both modalities pass through the feature extractor. This parameter-sharing mechanism allows the features of the two modalities to be correlated during the extraction process, implicitly aligning the feature distributions of the two modalities without the need for additional modality alignment operations.

[0048] S21: Input the RGB image and the depth image into a feature extractor with shared parameters to extract RGB features and depth features respectively. Specific steps include:

[0049] Feature extractor using shared parameters For RGB images respectively and depth images Extract the first Layer features are used to obtain the corresponding feature maps. and .

[0050] for The feature map of the location is represented as and Its neighborhood characteristics are defined as follows:

[0051] ;

[0052] in, ; Image patch size; This represents the position of each point in the neighborhood.

[0053] Adaptive average pooling is applied to the features within the neighborhood to generate RGB image patch features. and depth image patch features ,Right now The formula is expressed as:

[0054] ,

[0055] in, This indicates an operation that calculates the average over the neighborhood. Features of each point in the domain.

[0056] S22: Concatenate the RGB features and depth features to obtain the concatenated features. Specific steps include:

[0057] The depth features are upsampled to the shallowest layer feature size using nearest neighbor interpolation. The splicing is performed along the channel dimension to obtain the splicing features. ,Right now The formula is expressed as:

[0058] ;

[0059] in, For feature concatenation function; For the current feature layer; For all feature layers that need to be fused; This is a size scaling function that scales all features to match the size of the largest feature.

[0060] S23: Input the spliced ​​features into the fusion adapter for feature fusion and transformation to obtain fused features. Specific steps include:

[0061] splicing along the feature dimension and The final feature map is obtained. Subsequently, a fusion adapter was adopted. Will Mapping to the target feature space to generate fused features .

[0062] By employing a parameter-sharing-based feature extractor and fusion adapter for multimodal feature extraction and fusion, the complex modality alignment operations of traditional methods can be effectively avoided, reducing algorithm complexity and computational cost. Furthermore, combining adaptive average pooling and feature concatenation operations enables the extraction of more representative and discriminative multimodal features.

[0063] S3: Gaussian noise is added to at least one of the RGB image, the depth image, the stitching feature, and the fusion feature using a multi-scale Gaussian anomaly generator to generate Gaussian anomaly features.

[0064] In this embodiment, a multi-scale Gaussian anomaly generator is used to add multi-scale Gaussian noise to the RGB image, depth image, and before and after the fusion adapter. Anomalies are synthesized at different semantic abstraction levels, thereby helping the model learn richer feature representations and enhancing its ability to identify and understand anomalies. Specifically, this includes:

[0065] Different scales of Gaussian noise are designed for the feature extractor, fusion adapter, and discriminator. The specific definitions are as follows:

[0066]

[0067] in, , and These are the expected values ​​of different Gaussian distributions. , and Let $\begin{p} \ ... , ; By setting different standard deviations, Gaussian noise of different scales can be generated at different locations to simulate reasonable anomalous distributions.

[0068] Furthermore, the noise standard deviation of the feature extractor is greater than the noise standard deviation of the fusion adapter, and the noise standard deviation at the fusion adapter is greater than the noise standard deviation of the discriminator.

[0069] The defined Gaussian noise is added to the input of the feature extractor. and Input of the fusion adapter and and the input of the discriminator The Gaussian anomaly features are defined as follows:

[0070]

[0071]

[0072]

[0073] in, Indicates the first One sample. In each model layer of each sample. , and Gaussian noise is added to generate multi-scale Gaussian anomaly features. In this way, anomalies are introduced at different levels of semantic abstraction, and the system learns responses to anomalies at different levels, thus enhancing the richness of feature learning.

[0074] It's understandable that in real-world scenarios, it's difficult to guarantee that both modalities can simultaneously capture Gaussian anomaly features. If only the case where both modalities are anomalous is considered, the discriminator might over-rely on the salient features of the anomalies in both modalities, leading to a performance degradation when the anomalous conditions change in practical applications. To enhance the diversity of anomalies in bimodal scenarios, one of three modal anomaly combinations is randomly selected from each training sample. These combinations can include: RGB modal anomalies only, depth modal anomalies only, and anomalies in both modalities. By randomly selecting combinations, the discriminator is exposed to more diverse forms of anomalies during training, avoiding over-reliance on specific modal anomaly features, thereby improving the discriminator's generalization ability and robustness.

[0075] S4: Input the data to be detected into the unified texture anomaly generator to generate texture anomaly features.

[0076] In this embodiment, a unified texture anomaly generator is used to generate visually plausible and diverse texture anomaly features. Simultaneously, it achieves random combinations of texture anomalies from RGB and depth images, bridging the gap between 2D and 3D anomaly synthesis to better meet the sample data requirements of tasks such as image anomaly detection. The specific steps are as follows:

[0077] We need to locally add visually inconsistent texture patches to normal samples to define texture anomalies. First, we obtain anomalous image patches from an external texture dataset. For both RGB and depth images, a noise-based mask is generated. With foreground mask .right and Perform an intersection operation to obtain a texture anomaly mask. .

[0078] For an RGB image, the anomalous image patches are fused with the RGB image based on the texture anomaly mask to generate an RGB texture anomaly image. Its formula is expressed as:

[0079] ;

[0080] in, for The pixel-by-pixel inverse operation; For Hadama accumulation, Opacity parameters for different degrees of anomaly.

[0081] Since point cloud information is converted into depth images, depth anomalies (such as holes) appear as visible texture anomalies in all three channels of the image. Furthermore, each channel of the three-channel depth image has the same value, resembling a grayscale image. Based on these characteristics, texture anomalies similar to RGB images are synthesized on the depth image. First, the anomalous image patches are converted into grayscale images. Based on the texture anomaly mask, the grayscale image and the depth image are compared. The images are fused to generate depth texture anomaly images. Its formula is expressed as:

[0082] ;

[0083] In real-world scenarios, certain anomalies in RGB images, such as color anomalies, are almost impossible to represent in depth images; conversely, certain anomalies in depth images, such as holes, are also difficult to render well in RGB images. To more realistically simulate anomalies in real-world scenes, this application uses a random combination of three anomalies to synthesize texture anomaly features. The actual texture anomalies are defined as follows:

[0084] ;

[0085] in, This is a random value selected for each abnormal combination, with a value range of (0, 1). In this embodiment, the boundary value for each combined anomaly interval is set to 1 / 3. This random combination method can generate various combinations of texture anomaly images, further enriching the diversity of the sample data.

[0086] Furthermore, texture anomaly features are generated by the following modal combination method:

[0087] The texture anomaly feature is generated from the RGB texture anomaly image and the depth texture anomaly image;

[0088] The texture anomaly features are generated from the RGB texture anomaly image, while the depth image remains normal;

[0089] The texture anomaly features are generated from the depth texture anomaly image, while the RGB image remains normal.

[0090] Please see Figure 2 This is a technical roadmap for the unified texture anomaly generator of Embodiment 1 of this application. Taking depth texture, Burmester noise, and RGB texture as inputs, the unified texture anomaly generator processes them to generate corresponding depth maps and RGB maps. Then, depth anomalies and RGB anomalies are generated from the depth maps and RGB maps respectively through calculation. Finally, by randomly selecting a modal combination method, the final texture anomaly features are output.

[0091] S5: The discriminator is trained using the Gaussian anomaly features, the texture anomaly features, and the acquired baseline features to obtain the trained discriminator.

[0092] In this embodiment, the discriminator receives three types of feature inputs during training: Gaussian anomaly features, texture anomaly features, and acquired baseline features. For each input feature, the discriminator outputs a corresponding predicted mask. These predicted masks are then used to compare with the true mask to calculate the loss function.

[0093] Specifically, during the training phase, the discriminator uses a first loss function to process the baseline features and the Gaussian anomaly features, and a second loss function to process the texture anomaly features; wherein, the first loss function is a binary cross-entropy loss function; and the second loss function is a focal loss function.

[0094] To help the discriminator identify features in the absence of anomalies, a mask loss for the baseline features is defined using a binary cross-entropy loss function; the formula is expressed as:

[0095] ;

[0096] in, To provide prediction masks for Gaussian anomaly features spliced ​​at different scales, This is the binary cross-entropy loss function. The loss is calculated by comparing the predicted mask with the label value of 0 (indicating no anomaly), enabling the discriminator to accurately identify baseline features.

[0097] For Gaussian anomaly features, a masking loss for Gaussian anomaly features is defined using a binary cross-entropy loss function; the formula is expressed as:

[0098] ;

[0099] A label value of 1 indicates the presence of Gaussian anomalies, which helps the discriminator distinguish Gaussian anomaly features from baseline features.

[0100] To improve the robustness of anomalous product segmentation, especially for texture anomalous features, a focal loss function is used to calculate the masking loss of texture anomalous features; the formula is expressed as:

[0101] ;

[0102] in, This is a prediction mask for texture anomalies.

[0103] The total loss function during training is the sum of the three losses mentioned above, that is:

[0104] ;

[0105] By combining these three losses, the discriminator can comprehensively learn the differences between the baseline features and different types of abnormal features, and continuously iterate until convergence to obtain a trained discriminator, thereby improving the accuracy of anomaly detection.

[0106] S6: Obtain the target data to be detected, input the target data to be detected into the trained discriminator, and output the anomaly detection result.

[0107] In this embodiment, the target data to be detected is processed to obtain the fused features to be detected. These fused features are then input into a trained discriminator, which outputs anomaly detection results. The anomaly detection results include pixel-level anomaly scores and image-level anomaly scores.

[0108] To more accurately locate abnormal regions, the abnormality score is upsampled and smoothed to obtain a pixel-level abnormality score, score_i. The image-level abnormality score is then obtained based on the maximum value among the pixel-level abnormality scores. Through the above implementation, this application can effectively utilize the discriminator for image abnormality detection during the training and inference phases, improving the discriminator's detection capability and segmentation accuracy for different types of abnormalities.

[0109] Please see Figure 3This is a technical roadmap for an industrial anomaly detection method according to Embodiment 1 of this application. The RGB image and depth image are first input into a shared feature extractor to extract RGB features and depth features, respectively. These features are then concatenated and input into a fusion adapter to generate fused features. Simultaneously, a multi-scale Gaussian anomaly generator generates Gaussian anomalies, and a unified texture anomaly generator introduces texture anomalies, both producing bimodal anomaly features. The fusion adapter uses shared weights to adapt these anomaly features. Then, the output Gaussian anomaly features, texture anomaly features, and their corresponding masks are used to train a discriminator, which learns to distinguish between normal and abnormal situations by analyzing these features. In the inference phase, the trained discriminator outputs anomaly scores, thereby achieving the prediction and localization of anomalies in the image to be detected.

[0110] In summary, Embodiment 1 of this application implicitly aligns RGB and depth images using a feature extractor with shared parameters, effectively avoiding interference caused by differences in modal information distribution, thereby optimizing the fusion performance of multimodal data. Furthermore, it detects distribution deviations before and after the fusion adapter, addressing the challenge of single-scale anomaly generation failing to meet the needs of 3D scenes. Simultaneously, it extends 2D texture anomaly generation technology to the 3D depth image domain, simulating more realistic depth anomaly conditions, thus enhancing the accuracy and reliability of 3D anomaly detection.

[0111] Example 2

[0112] Please see Figure 4 This is a schematic diagram of the structure of an industrial anomaly detection device according to Embodiment 2 of this application; the specific contents include:

[0113] Data acquisition module 100: used to acquire data to be detected, wherein the data to be detected includes RGB images and depth images;

[0114] Feature processing module 200: used to process the data to be detected to obtain spliced ​​features and fused features;

[0115] Gaussian anomaly generation module 300: used to generate Gaussian anomaly features by adding Gaussian noise to at least one of the RGB image, the depth image, the stitching features and the fusion features through a multi-scale Gaussian anomaly generator;

[0116] Texture anomaly generation module 400: used to input the data to be detected into a unified texture anomaly generator to generate texture anomaly features;

[0117] Discriminator training module 500: used to train a discriminator using the Gaussian anomaly features, the texture anomaly features, and the acquired baseline features, to obtain a trained discriminator;

[0118] Inference output module 600: used to acquire the target data to be detected, input the target data to be detected into the trained discriminator, and output the anomaly detection result.

[0119] Example 3

[0120] Please see Figure 5 This is a schematic diagram of the computer device structure according to Embodiment 3 of this application. The computer device 50 includes a processor 51 and a memory 52 coupled to the processor 51.

[0121] The memory 52 stores program instructions for implementing the above-described industrial anomaly detection method.

[0122] The processor 51 is used to execute program instructions stored in the memory 52 to implement an industrial anomaly detection.

[0123] The processor 51 can also be referred to as a CPU (Central Processing Unit).

[0124] Processor 51 may be an integrated circuit chip with signal processing capabilities. Processor 51 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor.

[0125] Example 4

[0126] Please see Figure 6 This is a schematic diagram of the storage medium in Embodiment 4 of this application. The storage medium in this embodiment stores a program file 61 capable of implementing all the above methods. This program file 61 can be stored in the storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, or devices such as computers, servers, mobile phones, and tablets.

[0127] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0128] The above description is only a preferred embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural changes made based on the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

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

[0130] Of course, the present invention may have many other embodiments. Based on this embodiment, other embodiments obtained by those skilled in the art without any creative effort are all within the scope of protection of the present invention.

Claims

1. An industrial anomaly detection method, characterized by, The method comprises the following steps: acquiring to-be-detected data, wherein the to-be-detected data comprises an RGB image and a depth image; processing the to-be-detected data to obtain spliced features and fused features; specifically comprising: inputting the RGB image and the depth image into a feature extractor sharing parameters to extract RGB features and depth features respectively; splicing the RGB features and the depth features to obtain spliced features, and inputting the spliced features into a fusion adapter to perform feature fusion and conversion to obtain fused features; adding Gaussian noise in at least one of the RGB image, the depth image, the spliced features and the fused features through a multi-scale Gaussian anomaly generator to generate Gaussian anomaly features; inputting the to-be-detected data into a unified texture anomaly generator to generate texture anomaly features; training a discriminator through the Gaussian anomaly features, the texture anomaly features and acquired reference features to obtain a trained discriminator; acquiring to-be-detected target data, inputting the to-be-detected target data into the trained discriminator and outputting an anomaly detection result.

2. The industrial anomaly detection method of claim 1, wherein, In the step of inputting the to-be-detected data into the unified texture anomaly generator to generate texture anomaly features, the following steps are specifically included: acquiring an abnormal image block from an external texture data set; performing an intersection operation on a noise-based mask and a foreground mask to obtain a texture anomaly mask; The texture anomaly features are generated in the following way: The texture anomaly features are generated from an RGB texture anomaly image and a depth texture anomaly image; wherein the abnormal image block is fused with the RGB image based on the texture anomaly mask to generate an RGB texture anomaly image; the abnormal image block is converted into a grayscale image, and the grayscale image is fused with the depth image based on the texture anomaly mask to generate a depth texture anomaly image; The texture anomaly features are generated from the RGB texture anomaly image, and the depth image remains normal; wherein the abnormal image block is fused with the RGB image based on the texture anomaly mask to generate an RGB texture anomaly image, and the depth image remains normal; The texture anomaly features are generated from the depth texture anomaly image, and the RGB image remains normal; wherein the abnormal image block is converted into a grayscale image, and the grayscale image is fused with the depth image based on the texture anomaly mask to generate a depth texture anomaly image, and the RGB image remains normal.

3. The industrial anomaly detection method of claim 1, wherein, In the step of training the discriminator through the Gaussian anomaly features, the texture anomaly features and the acquired reference features to obtain the trained discriminator, the following steps are specifically included: The discriminator uses a first loss function to process the reference features and the Gaussian anomaly features in the training stage, and uses a second loss function to process the texture anomaly features. The first loss function is a binary cross-entropy loss function; and the second loss function is a focal loss function.

4. The industrial anomaly detection method of claim 1, wherein, In the step of acquiring to-be-detected target data, inputting the to-be-detected target data into the trained discriminator and outputting an anomaly detection result, the following steps are specifically included: processing the to-be-detected target data to obtain to-be-detected fused features; Input the fusion feature to be detected into the trained discriminator, and output an anomaly score; Upsample and smooth the anomaly score to obtain a pixel-level anomaly score; Obtain an image-level anomaly score according to the maximum value in the pixel-level anomaly score.

5. An industrial abnormality detection apparatus characterized by comprising: The industrial anomaly detection device is used to execute the industrial anomaly detection method according to any one of claims 1 to 4, and the industrial anomaly detection device comprises: a data acquisition module configured to acquire data to be detected, wherein the data to be detected comprises an RGB image and a depth image; a feature processing module configured to process the data to be detected to obtain splicing features and fusion features; a Gaussian anomaly generation module configured to add Gaussian noise to at least one of the RGB image, the depth image, the splicing features and the fusion features by using a multi-scale Gaussian anomaly generator to generate Gaussian anomaly features; a texture anomaly generation module configured to input the data to be detected into a unified texture anomaly generator to generate texture anomaly features; a discriminator training module configured to train a discriminator by using the Gaussian anomaly features, the texture anomaly features and reference features acquired to obtain a trained discriminator; an inference output module configured to acquire target data to be detected, input the target data to be detected into the trained discriminator, and output an anomaly detection result.

6. A computer device, comprising: The computer device comprises a processor and a memory coupled to the processor, wherein the memory stores program instructions for implementing the industrial anomaly detection method according to any one of claims 1 to 4; and the processor is configured to execute the program instructions stored in the memory to implement the industrial anomaly detection.

7. A storage medium, characterized by The computer device comprises a processor and a memory coupled to the processor, wherein the memory stores program instructions for implementing the industrial anomaly detection method according to any one of claims 1 to 4; and the processor is configured to execute the program instructions stored in the memory to implement the industrial anomaly detection.

Citation Information

Patent Citations

  • Anomaly detection method, device and apparatus in unattended settlement scenario

    CN109271847A

  • Industrial defect detection method based on self-supervised fine tuning

    CN120526218A