Industrial anomaly detection method and device, computer equipment and storage medium

By using a feature extractor with shared parameters and a multi-scale Gaussian noise generation technique, implicit alignment and texture anomaly generation are performed on RGB and depth images, solving the problems of low efficiency and data scarcity in traditional methods and improving the accuracy and robustness of industrial anomaly detection.

CN120912593AActive Publication Date: 2025-11-07SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI
View PDF 4 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional industrial anomaly detection methods are inefficient, labor-intensive, and their results are easily affected by subjective factors. The scarcity of data and the complexity of anomaly patterns limit the applicability of supervised learning, and relying solely on supervised learning is not effective in industrial scenarios.

Method used

Implicit alignment of RGB and depth images is performed using a feature extractor with shared parameters. A discriminator is trained to identify anomalies in multimodal data by combining multi-scale Gaussian noise generation and uniform texture anomaly generation.

Benefits of technology

It improves the fusion effect of multimodal data, enhances the ability to identify anomalies, reduces computational overhead, and improves the robustness of the discriminator in segmenting texture anomalies and the detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120912593A_ABST
    Figure CN120912593A_ABST
Patent Text Reader

Abstract

The invention discloses an industrial anomaly detection method and device, computer equipment and a storage medium, and is applied to the technical field of information, and the method comprises the steps: processing obtained to-be-detected data, and obtaining a splicing feature and a fusion feature; gaussian noise is added to at least one of the RGB image, the depth image, the splicing features and the fusion features through a multi-scale Gaussian anomaly generator, and Gaussian anomaly features are generated; inputting the to-be-detected data into a unified texture anomaly generator to generate texture anomaly features; training a discriminator through the Gaussian anomaly feature, the texture anomaly feature and the obtained reference feature to obtain a trained discriminator; inputting to-be-detected target data into the trained discriminator, and outputting an anomaly detection result; according to the invention, implicit alignment of RGB and depth images, multi-scale anomaly simulation, anomaly generation expansion from 2D to 3D and anomaly detection are realized, and an innovative solution is provided for the field of industrial quality inspection.
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 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 challenges 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: In a first aspect, the present application provides an industrial anomaly detection method, comprising the steps of: obtaining detection data, wherein the detection data includes RGB images and depth images; processing the detection data to obtain splicing features and fusion features; 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; 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 the obtained reference features to obtain a trained discriminator; obtaining target detection data, inputting the target detection data into the trained discriminator, and outputting an anomaly detection result.

[0006] In a second aspect, the present application provides an industrial anomaly detection device, specifically comprising: a data acquisition module configured to acquire to-be-detected data, wherein the to-be-detected data includes an RGB image and a depth image; a feature processing module configured to process the to-be-detected data to obtain stitching 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 stitching features, and the fusion features by a multi-scale Gaussian anomaly generator to generate Gaussian anomaly features; a texture anomaly generation module configured to input the to-be-detected data to a unified texture anomaly generator to generate texture anomaly features; a discriminator training module configured to train a discriminator by the Gaussian anomaly features, the texture anomaly features, and reference features acquired to obtain a trained discriminator; an inference output module configured to acquire to-be-detected target data, input the to-be-detected target data to the trained discriminator, and output an anomaly detection result.

[0007] In a third aspect, a computer device is provided. The computer device includes a processor and a memory coupled to the processor. The memory stores program instructions for implementing an industrial anomaly detection method. The processor is configured to execute the program instructions stored in the memory to implement an industrial anomaly detection method.

[0008] In a fourth aspect, a storage medium is provided. The storage medium stores program instructions executable by a processor. The program instructions are configured to implement an industrial anomaly detection method.

[0009] The industrial anomaly detection method, device, computer device, and storage medium provided by the present application have the following beneficial effects: (1) In a traditional method, the RGB image and the depth image are misaligned in feature distribution due to modal differences, which affects the fusion effect. The present application eliminates this interference by extracting features through a shared feature extractor, while enhancing the expression ability of multi-modal data without additional modal alignment operations. (2) By adding multi-scale Gaussian noise before and after the RGB image and the depth image and the fusion adapter, Gaussian anomalies of different semantic levels are generated, which simulates the distribution of subtle to significant anomalies and enhances the recognition ability of the discriminator for anomalies. Traditional single-scale anomaly generation cannot meet the needs of complex anomalies in 3D scenes, while multi-scale methods can more comprehensively cover anomaly types. (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

[0010] Figure 1 This is a schematic flowchart of an industrial anomaly detection method according to Embodiment 1 of this application; Figure 2 This is a technical roadmap for the unified texture anomaly generator of Embodiment 1 of this application; Figure 3 This is a technical roadmap of an industrial anomaly detection method according to Embodiment 1 of this application; Figure 4 This is a schematic diagram of the structure of an industrial anomaly detection device according to Embodiment 2 of this application; Figure 5 This is a schematic diagram of the computer device structure according to Embodiment 3 of this application; Figure 6 This is a schematic diagram of the storage medium structure of Embodiment 4 of this application. Detailed Implementation

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

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

[0013] 2D anomaly detection methods include: 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.

[0014] 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.

[0015] Distillation-based methods: Train the student model only with normal samples to match the output of the pre-trained teacher model with frozen weights. Since the student model is not trained on abnormal images, it usually cannot mimic the teacher model's output on these images.

[0016] Despite many improvements, subtle depth anomalies are difficult to detect in industrial scenarios using 2D modal methods. Studies have shown that directly applying methods from 2D datasets to 3D datasets does not work well. Therefore, researchers have begun to explore strategies suitable for 3D.

[0017] Compared with 2D methods, 3D anomaly detection faces greater technical challenges but also has considerable potential. Reasonable use of depth data can significantly improve detection performance in specific applications. Researchers have found that rotation-invariant 3D representations are crucial for 3D anomaly detection, and have proposed the BTF (Back-to-Feature) method, which combines the complementary properties of color and geometric modalities to achieve better results on 3D datasets. Meanwhile, the S-T model can also be used for 3D datasets, where the teacher and student networks are flow-based and CNN-based models, respectively. CFM detects anomalies in multi-modal data by learning cross-modal feature mapping between 2D and 3D modalities. LSFA and M3DM use two backbone networks pre-trained on RGB and point cloud, respectively, to extract features and store them in multiple memory banks.

[0018] The above 3D anomaly detection methods have the following shortcomings: S-T model directly concatenates 3D data 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, respectively, which makes it difficult to align point cloud and RGB data and increases computational complexity. EasyNet uses independent autoencoders to reconstruct different modal information, but the inconsistent distribution of modal information causes interference, resulting in low detection accuracy. 3DSR only generates anomalies at a single scale, which cannot meet the demand for multi-scale anomaly simulation in 3D scenarios.

[0019] Therefore, the present application aims to solve the above problems in the prior art. Specifically, the feature extractor with shared parameters is used to achieve implicit alignment of RGB images and depth images, avoid interference caused by inconsistent distribution of modal information, and improve the fusion effect of multi-modal data. The model detects the distribution bias at different positions, solves the problem that single-scale anomaly generation cannot meet the demand of 3D scenarios. At the same time, the 2D texture anomaly generation method is extended to 3D depth images to simulate more realistic depth anomalies and improve the accuracy and reliability of 3D anomaly detection.

[0020] 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.

[0021] Example 1 Please see Figure 1 This is a flowchart illustrating an industrial anomaly detection method according to Embodiment 1 of this application; the steps include: S1: Obtain the data to be detected, wherein the data to be detected includes RGB images and depth images.

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

[0023] 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.

[0024] 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: 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 .

[0025] for The feature map of the location is represented as and Its neighborhood characteristics are defined as follows: ; in, ; Image patch size; This represents the position of each point in the neighborhood.

[0026] Adaptive average pooling is applied to the features within the neighborhood to generate RGB image patch features. and depth image block features i.e. ; the formula is expressed as: , wherein, denotes the average operation on the neighborhood; is the feature of each point in the field.

[0027] S22: splice the RGB features and depth features to obtain spliced features. The specific steps include: up-sample the depth features to the shallowest layer feature size by nearest neighbor interpolation , splice along the channel dimension to obtain spliced features i.e. ; the formula is expressed as: ; wherein, is a feature splicing function; is the current feature layer; is all feature layers that need to be fused; is a size scaling function that scales all features to be consistent with the size of the largest feature.

[0028] S23: input the spliced features into a fusion adapter for feature fusion and conversion to obtain fused features. The specific steps include: splicing in the feature dimension and , to obtain the final feature map . Then, the fusion adapter maps to the target feature space to generate the fused features .

[0029] Through the parameter sharing-based feature extractor and fusion adapter, multi-modal feature extraction and fusion can effectively avoid the complex modal alignment operation in traditional methods, reduce algorithm complexity and computational cost. At the same time, combined with adaptive average pooling and feature splicing operations, more representative and discriminative multi-modal features can be extracted.

[0030] S3: add Gaussian noise to 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.

[0031] In this embodiment, multi-scale Gaussian noise is added before and after the RGB image, depth image and fusion adapter by a multi-scale Gaussian anomaly generator. Abnormalities are synthesized at different semantic abstraction levels to help the model learn more rich feature representations and enhance the ability to recognize and understand abnormalities. Specifically, it includes: Different scales of Gaussian noise are designed for the feature extractor, fusion adapter and discriminator. The specific definitions are as follows:

[0032] wherein, , and are the expected values of different Gaussian distributions, , and are the standard deviations of the corresponding Gaussian distribution, and satisfy , ; By setting different standard deviations, Gaussian noise of different scales can be generated at different positions to simulate reasonable abnormal distribution.

[0033] Further, 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.

[0034] The defined Gaussian noise is added to the input of the feature extractor and , the input of the fusion adapter and , and the input of the discriminator . The Gaussian anomaly feature is defined as follows:

[0035]

[0036]

[0037] wherein, represents the i-th sample. Gaussian noise is added to , , and at each model layer of each sample, thereby generating multi-scale Gaussian anomaly features. In this way, abnormalities are introduced at different semantic abstraction levels, and the response to abnormalities at different levels is learned to enhance the richness of feature learning.

[0038] It can be understood that in actual scenarios, it is difficult to guarantee that both modalities can capture Gaussian anomaly features at the same time. If only the case where both modalities are abnormal is considered, the discriminator may excessively rely on the obvious features of the abnormality in both modalities; leading to a decline in the performance of the discriminator when the abnormality changes in actual application. In order to enhance the diversity of the abnormality in the dual-modality scene, one of the three modal abnormality combinations is randomly selected in each training sample. The three combinations can include: only the RGB modality is abnormal, only the depth modality is abnormal, and both modalities are abnormal. By randomly selecting the combination, the discriminator is exposed to more different forms of abnormality during the training process, avoiding excessive dependence on specific modality abnormal features, thereby improving the generalization ability and robustness of the discriminator.

[0039] S4: inputting the to-be-detected data into the unified texture abnormality generator to generate texture abnormality features.

[0040] In the embodiment, the unified texture abnormality generator is used to generate visual reasonable and diversified texture abnormality features, and random combination of RGB image and depth image texture abnormalities is realized, a bridge is built for 2D abnormality and 3D abnormality synthesis, and the demand of image abnormality detection and other tasks for sample data is better met. The specific steps are as follows: A visually inconsistent texture block needs to be added locally to a normal sample to define the texture abnormality. First, an abnormal image block is obtained from an external texture data set . For the RGB image and the depth image, a noise-based mask is generated . The intersection operation is performed on and to obtain a texture abnormality mask .

[0041] For the RGB image, the abnormal image block is fused with the RGB image based on the texture abnormality mask to generate an RGB texture abnormality image . The formula is as follows: ; wherein, is the pixel-wise inverse operation of ; is the Hadamard product, is an opacity parameter of different abnormality degrees.

[0042] Since the point cloud information is converted into a depth image, the depth abnormality (such as a hole) is represented as a visible texture abnormality on the three-channel image. And the value of each channel of the three-channel depth image is the same, which is similar to a grayscale image. Based on the above characteristics, the texture abnormality similar to the RGB image is synthesized on the depth image. First, the abnormal image block is converted into a grayscale image fusing the grayscale image and the depth image based on the texture abnormality mask to generate a depth texture abnormality image fusing the grayscale image and the depth image based on the texture abnormality mask to generate a depth texture abnormality image The formula is: ; In actual scenes, some abnormalities of RGB images, such as color abnormalities, are almost impossible to represent in depth images; and some abnormalities in depth images, such as holes, are also difficult to be well presented in RGB images. In order to more realistically simulate the abnormal situation in the real scene, the present application uses a random combination of three types of abnormalities to synthesize texture abnormality features. The actual texture abnormality is defined as follows: ; wherein, is a random value selected each time the abnormality combination is performed, the value range is (0, 1), is the boundary value of each combined abnormality interval, which is set to 1 / 3 in this embodiment. Through this random combination method, a variety of different combined texture abnormality images can be generated, further enriching the diversity of sample data.

[0043] Further, the texture abnormality feature is generated by the following one of the modal combination methods: the texture abnormality feature is generated by the RGB texture abnormality image and the depth texture abnormality image; the texture abnormality feature is generated by the RGB texture abnormality image, and the depth image remains normal; the texture abnormality feature is generated by the depth texture abnormality image, and the RGB image remains normal.

[0044] Please refer to Figure 2 , which is the technical roadmap of the unified texture abnormality generator of Embodiment 1 of the present application. With depth texture, Berlin noise and RGB texture as input, the unified texture abnormality generator processes them to generate corresponding depth images and RGB images. Then, the depth images and RGB images respectively generate depth abnormalities and RGB abnormalities through calculation. Finally, by randomly selecting one of the modal combination methods, the final texture abnormality feature is output.

[0045] S5: training the discriminator by the Gaussian abnormality feature, the texture abnormality feature and the obtained reference feature to obtain a trained discriminator.

[0046] In this embodiment, the discriminator receives three types of feature inputs during the training process, which are Gaussian abnormality features, texture abnormality features and obtained reference features. For the input features, the discriminator outputs corresponding prediction masks. These prediction masks will be used for subsequent comparison with the real masks to calculate the loss function.

[0047] Specifically, the discriminator adopts a first loss function to process the baseline feature and the Gaussian abnormal feature in the training stage, and adopts a second loss function to process the texture abnormal feature; wherein the first loss function is a binary cross-entropy loss function; and the second loss function is a focal loss function.

[0048] In order to help the discriminator identify the feature in the case of no abnormality, a mask loss of the baseline feature is defined by a binary cross-entropy loss function; the formula is as follows: wherein, is a predicted mask corresponding to the Gaussian abnormal feature spliced in different scales, is a binary cross-entropy loss function. By comparing the predicted mask with the label value 0 (indicating no abnormality) to calculate the loss, the discriminator can accurately identify the baseline feature.

[0049] For the Gaussian abnormal feature, a mask loss of the Gaussian abnormal feature is defined by a binary cross-entropy loss function; the formula is as follows: wherein, the label value 1 indicates that there is a Gaussian abnormality, which helps the discriminator to distinguish the Gaussian abnormal feature from the baseline feature.

[0050] In order to improve the robustness of abnormal product segmentation, especially for the texture abnormal feature, a focal loss function is used to calculate the mask loss of the texture abnormal feature; the formula is as follows: wherein, is a predicted mask of the texture abnormality.

[0051] The total loss function in the training process is the sum of the above three losses, that is: By comprehensively considering the three kinds of losses, the discriminator can comprehensively learn the differences between the baseline feature and different types of abnormal features, and iteratively converge until the trained discriminator is obtained, thereby improving the accuracy of abnormal detection.

[0052] S6: obtaining target data to be detected, inputting the target data to be detected into the trained discriminator, and outputting an abnormal detection result.

[0053] In this embodiment, the target data to be detected is processed to obtain a fusion feature to be detected. The fusion feature to be detected is input into the trained discriminator, and an abnormal detection result is output. The abnormal detection result includes a pixel-level abnormal score and an image-level abnormal score.

[0054] ​​​​In order to more accurately locate the abnormal area, the anomaly score is up-sampled and smoothed to obtain a pixel-level anomaly score score_i. An image-level anomaly score is obtained according to the maximum value in the pixel-level anomaly score. Through the above implementation, the application can effectively utilize the discriminator for image anomaly detection in the training and inference stages, and improve the detection ability and segmentation accuracy of the discriminator for different types of anomalies.

[0055] Referring to Figure 3 , a technical roadmap of an industrial anomaly detection method according to Embodiment 1 of the application. The RGB image and the depth image are first input into a shared feature extractor to extract RGB features and depth features, respectively. These features are then spliced and input into a fusion adapter to generate fusion features. At the same time, a multi-scale Gaussian anomaly generator generates Gaussian anomalies, and a unified texture anomaly generator introduces texture anomalies, both of which generate bimodal anomaly features. The fusion adapter uses shared weights to adaptively process these anomaly features. Then, the output Gaussian anomaly features, texture anomaly features, and their corresponding masks are used to train the discriminator, which learns to distinguish between normal and abnormal conditions by analyzing these features. In the inference stage, the trained discriminator outputs an anomaly score, thereby realizing the prediction and positioning of anomalies in the image to be detected.

[0056] In summary, Embodiment 1 of the application uses a feature extractor with shared parameters to implicitly align RGB images and depth images, effectively avoiding interference caused by differences in modal information distribution, and thereby optimizing the effectiveness of multi-modal data fusion. In addition, the distribution bias before and after the fusion adapter is detected to solve the problem that single-scale anomaly generation is difficult to meet the needs of 3D scenes. At the same time, the 2D texture anomaly generation technology is extended to the 3D depth image field to simulate more realistic depth anomaly conditions, thereby enhancing the accuracy and reliability of 3D anomaly detection.

[0057] Embodiment 2 Referring to Figure 4 , a structural schematic diagram of an industrial anomaly detection device according to Embodiment 2 of the application; the specific content includes: A data acquisition module 100 is configured to acquire detection data, wherein the detection data includes an RGB image and a depth image. A feature processing module 200 is configured to process the detection data to obtain spliced features and fusion features. A Gaussian anomaly generation module 300 is configured to add Gaussian noise to at least one of the RGB image, the depth image, the spliced features, and the fusion features through a multi-scale Gaussian anomaly generator to generate Gaussian anomaly features. The texture anomaly generation module 400 is configured to input the to-be-detected data into a unified texture anomaly generator to generate a texture anomaly feature. The discriminator training module 500 is configured to train a discriminator by using the Gaussian anomaly feature, the texture anomaly feature, and a reference feature to obtain a trained discriminator. The inference output module 600 is configured to obtain to-be-detected target data, input the to-be-detected target data into the trained discriminator, and output an anomaly detection result.

[0058] Embodiment 3 Please refer to Figure 5 FIG. 5 is a structural schematic diagram of a computer device according to Embodiment 3 of the present application. The computer device 50 includes a processor 51 and a memory 52 coupled to the processor 51.

[0059] The memory 52 stores program instructions for implementing the industrial anomaly detection method.

[0060] The processor 51 is configured to execute the program instructions stored in the memory 52 to implement the industrial anomaly detection method.

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

[0062] The processor 51 can be an integrated circuit chip with a signal processing capability. The processor 51 can also be a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application-Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0063] Embodiment 4 Please refer to Figure 6Fig. 4 is a structural schematic diagram of a storage medium of Embodiment 4 of the present application. The storage medium of the present application stores a program file 61 capable of implementing all the methods described above, wherein the program file 61 can be stored in the storage medium in the form of a software product, and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor execute all or part of the steps of the method of each embodiment of the present application. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media capable of storing program codes, or a computer, a server, a mobile phone, a tablet, etc.

[0064] It should be noted that in this document, the terms "comprising", "containing" or any other variant thereof are intended to cover non-exclusive inclusions, so that a process, device, article or method including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such a process, device, article or method. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of another identical element in the process, device, article or method including the element.

[0065] The above description is only the preferred embodiments of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation based on the content of the specification and drawings, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.

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

[0067] Of course, the present application can have other various embodiments, and based on the present embodiments, other embodiments obtained by those skilled in the art without any creative labor are within the scope of protection of the present application.

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; adding Gaussian noise to at least one of the RGB image, the depth image, the spliced features and the fused features by using 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 by using the Gaussian anomaly features, the texture anomaly features and reference features to obtain a trained discriminator; acquiring to-be-detected target data and inputting the to-be-detected target data into the trained discriminator to output an anomaly detection result.

2. The industrial anomaly detection method of claim 1, wherein, In the step of processing the to-be-detected data to obtain spliced features and fused features, the following steps are further included: inputting the RGB image and the depth image into a feature extractor with shared parameters to extract RGB features and depth features, respectively; splicing the RGB features and the depth features to obtain spliced features; inputting the spliced features into a fusion adapter to perform feature fusion and conversion to obtain fused features.

3. The industrial anomaly detection method of claim 2, wherein, In the step of adding Gaussian noise to at least one of the RGB image, the depth image, the spliced features and the fused features by using a multi-scale Gaussian anomaly generator to generate Gaussian anomaly features, the following steps are further included: adding Gaussian noise with different standard deviations at the input of the feature extractor, the input of the fusion adapter and the input of the discriminator, respectively; wherein the noise standard deviation of the feature extractor is greater than the noise standard deviation of the fusion adapter, and the noise standard deviation of the fusion adapter is greater than the noise standard deviation of the discriminator.

4. The industrial anomaly detection method of claim 1, wherein, In the step of inputting the to-be-detected data into a unified texture anomaly generator to generate texture anomaly features, the following steps are further 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; fusing the abnormal image block and the RGB image based on the texture anomaly mask to generate an RGB texture anomaly image; converting the abnormal image block into a grayscale image and fusing the grayscale image and the depth image based on the texture anomaly mask to generate a depth texture anomaly image.

5. The industrial anomaly detection method of claim 4, wherein, The texture anomaly features are generated in one of the following modal combination manners: the texture anomaly features are generated from the RGB texture anomaly image and the depth texture anomaly image; the texture anomaly features are generated from the 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.

6. The industrial anomaly detection method of claim 1, wherein, In the step of training a discriminator by using the Gaussian anomaly features, the texture anomaly features and reference features to obtain a trained discriminator, the following steps are further 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.

7. The industrial anomaly detection method of claim 1, wherein, The step of obtaining the to-be-detected target data and inputting the to-be-detected target data into the trained discriminator to output an abnormality detection result specifically includes: processing the to-be-detected target data to obtain to-be-detected fusion features; inputting the to-be-detected fusion features into the trained discriminator to output an abnormality score; upsampling and smoothing the abnormality score to obtain a pixel-level abnormality score; obtaining an image-level abnormality score according to a maximum value in the pixel-level abnormality score.

8. An industrial anomaly detection apparatus characterized by comprising: The industrial anomaly detection device is used to perform the industrial anomaly detection method according to any one of claims 1 to 7, and the industrial anomaly detection device comprises: a data acquisition module configured to acquire to-be-detected data, wherein the to-be-detected data comprises an RGB image and a depth image; a feature processing module configured to process the to-be-detected data 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 through a multi-scale Gaussian anomaly generator to generate Gaussian abnormality features; a texture anomaly generation module configured to input the to-be-detected data into a unified texture anomaly generator to generate texture abnormality features; a discriminator training module configured to train a discriminator through the Gaussian abnormality features, the texture abnormality features and acquired reference features to obtain a trained discriminator; an inference output module configured to acquire to-be-detected target data, input the to-be-detected target data into the trained discriminator and output an abnormality detection result.

9. 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 7; and the processor is configured to execute the program instructions stored in the memory to implement the industrial anomaly detection.

10. 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 7; 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

  • Self-supervised 3D industrial defect detection method based on reconstruction mode

    CN117670807A

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

    CN120526218A

  • Target detection method, apparatus and computer device based on RGBD image

    WO2021249351A1