Unsupervised wafer defect anomaly detection method based on improved DeSTSeg
Patent Information
- Application Number
- CN202410489851.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-23
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2044-04-23
AI Technical Summary
但是一般的注意力模块,对于形状复杂的微弱缺陷特征提取能力较弱,缺陷容易被背景干扰
[0028]本发明通过知识蒸馏的网络结构,从教师网络中获取特征信息,可以实现无监督异常检测,无需大量标注数据集,即可完成缺陷检测,对工业场景十分友好,可以有效解决数据标注困难以及未知缺陷检测难的问题。
Smart Images

Figure CN118469912B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an unsupervised method for detecting grain defects based on an improved DeSTSeg, belonging to the field of digital image processing. Background Technology
[0002] The wafer manufacturing industry is very complex. Various irregular abnormal defects, such as oxide film residue, pitting, and glass indentation and breakage, can be generated under the action of processes such as photolithography and chemical etching. These defects can seriously affect subsequent chip circuit printing, packaging and other processes, thus affecting product performance and cost. Therefore, it is particularly important to detect abnormal defects on the surface quality of wafers.
[0003] Currently, surface inspection primarily employs non-contact methods, with machine vision serving as a representative, offering advantages such as low operating and maintenance costs and high accuracy. Automated optical inspection platforms, including cameras, have low hardware costs and overcome the issue of human fatigue affecting inspection accuracy, allowing for 24 / 7 continuous operation. High-precision cameras combined with deep learning can achieve excellent detection and recognition accuracy for some complex and subtle defects.
[0004] Due to the manufacturing process of wafers, the die is divided into multiple regions with various defect morphologies and types. In addition, these regions also have complex backgrounds, which can interfere with the imaging of defects. Wafers have very strict requirements for process and defect standards, and even weak defects need to be detected. These weak defects in complex backgrounds pose a great challenge to defect identification methods.
[0005] To address the aforementioned issues, traditional image filtering methods can suppress background interference. However, due to the extremely subtle nature of defects and their minimal difference from the background, general image filtering methods struggle to effectively preserve the complete information of the defect target, posing a challenge to defect detection. Traditional convolutional neural networks (CNNs) are an effective feature extraction method; however, due to their inherent limitations—using the same convolutional kernel to process every region of the image—they cannot effectively distinguish between defect targets and background noise. To address this problem, some researchers have incorporated attention modules into CNNs. These attention modules can learn to selectively suppress and enhance background noise and defect targets. However, general attention modules are weak in extracting features from subtle defects with complex shapes, and defects are easily obscured by the background. Therefore, current methods have limited ability to identify subtle defects in complex backgrounds, making them unsuitable for detecting subtle grain defects. Summary of the Invention
[0006] To improve the detection accuracy of weak grain defects, this invention provides an unsupervised grain defect anomaly detection method based on an improved DeSTSeg, the technical solution of which is as follows:
[0007] The first objective of this invention is to provide an unsupervised method for detecting grain defect anomalies, comprising:
[0008] Step 1: Use the teacher network and student network in the DeSTSeg network to extract features from the grain image to be detected;
[0009] Step 2: Multiply the feature maps extracted from the teacher network and the student network, and then input them into the multi-scale feature fusion module for enhancement;
[0010] Step 3: Apply attention enhancement to the features enhanced in Step 2 using an attention mechanism;
[0011] Step 4: Output the final defect prediction and segmentation results through the residual module and the header module;
[0012] The multi-scale feature fusion module first uses the CSP module for feature extraction, and then uses the ECA module for attention enhancement. The feature maps of the three resolution sizes are passed through the CSP module and the ECA module respectively, and then subjected to quadratic linear interpolation upsampling step by step, and then stitched with the feature maps of higher resolution.
[0013] Optionally, the attention mechanism in step 3 is: a deformable convolutional spatial attention spatial pyramid pooling module DCSASPPF, in which a deformable convolutional spatial attention mechanism DCSA is added to the SPPF module.
[0014] The DCSASPPF module includes a head CBS module, a first DCSA module, a second DCSA module, and a third DCSA module connected in sequence, with a two-dimensional max pooling layer connected in series after each DCSA module. The DCSASPPF module concatenates the feature maps output by the three two-dimensional max pooling layers with the feature map output by the head CBS module, and then inputs the concatenated feature maps into the tail CBS module.
[0015] The calculation process of the DCSA module includes: first, performing global max pooling and average pooling on the input feature map to obtain two feature maps; then, concatenating the two feature maps and using a 3×3 deformable convolution to convert the channels of the feature map from 2 to 1; then, obtaining a new attention feature map through sigmoid activation; controlling the value of the attention feature map within [0,1]; and finally, multiplying the attention feature map with the original feature map to obtain the enhanced feature map.
[0016] Optionally, the number of CSP modules in the multi-scale feature fusion module is 6, 4, and 2 respectively, from deep to shallow.
[0017] Optionally, the CBS module includes, in sequence, a standard convolutional layer, a batch normalization layer, and a SiLu activation function.
[0018] Optionally, the method uses synthesized abnormal grain images to train an anomaly detection network, wherein the synthesized abnormal grain images are obtained by combining DTD-programmable texture images with defect-free good grain images.
[0019] Optionally, the process of synthesizing the abnormal grain image includes:
[0020] First, random two-dimensional Burmester noise is generated on the defect-free good grain image and thresholded to obtain a mask for the noise region. Then, the noise mask region is covered by linear combination of DTD image data and grain image.
[0021] Optionally, the teacher network uses a ResNet18 network.
[0022] Optionally, the encoder part of the student network uses a randomly initialized ResNet18 network, and the decoder part uses an inverse ResNet18 network with four residual blocks.
[0023] A second objective of this invention is to provide an electronic device, including a memory and a processor;
[0024] The memory is used to store computer programs;
[0025] The processor is configured to, when executing the computer program, implement the unsupervised grain defect anomaly detection method as described above.
[0026] A third objective of the present invention is to provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the unsupervised grain defect anomaly detection method as described in any of the preceding claims.
[0027] The beneficial effects of this invention are:
[0028] This invention uses a knowledge distillation network structure to obtain feature information from a teacher network, enabling unsupervised anomaly detection. It can complete defect detection without a large amount of labeled datasets, making it very suitable for industrial scenarios and effectively solving the problems of difficult data labeling and difficult detection of unknown defects.
[0029] Furthermore, this invention improves the DeSTSeg network by introducing a proposed multi-scale feature fusion module during the fusion of multi-layer feature outputs from the teacher and student networks. This module addresses the feature loss problem caused by downsampling of weak target features after fusion of the teacher and student models, enabling the semantic information of weak targets to flow from deep to shallow layers. Ablation experiments demonstrate that, compared to the direct splicing method of the original DeSTSeg network, the multi-scale feature fusion module proposed in this invention can effectively improve the network's accuracy in identifying grain defects.
[0030] In one embodiment of the present invention, a deformable convolutional spatial attention spatial pyramid pooling module DCSASPPF is introduced into the segmentation network. By adding three deformable convolutional attention modules to the ordinary SPPF module, weak defect feature information can be enhanced, complex texture background interference can be suppressed, and the segmentation network's ability to extract defect features can be further strengthened. Comparative experiments show that the DCSASPPF module of the present invention further improves the detection accuracy. Attached Figure Description
[0031] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0032] Figure 1 This is a flowchart of the unsupervised grain defect anomaly detection method based on the improved DeSTSeg of the present invention.
[0033] Figure 2 This is a diagram showing the overall structure of the defect detection network in Embodiment 2 of the present invention.
[0034] Figure 3 This is a structural diagram of the multi-scale feature fusion module MFFM of the present invention.
[0035] Figure 4 This is a structural diagram of the deformable convolutional spatial attention spatial pyramid pooling module DCSASPPF according to Embodiment 2 of the present invention.
[0036] Figure 5 This is a heatmap of Grad-Cam attention distribution.
[0037] Figure 6 This is a comparison test result of wafer defect detection. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0039] Example 1:
[0040] This embodiment provides an unsupervised method for detecting grain defect anomalies, including:
[0041] Step 1: Use the teacher network and student network in the DeSTSeg network to extract features from the grain image to be detected;
[0042] Step 2: Multiply the feature maps extracted from the teacher network and the student network, and then input them into the multi-scale feature fusion module for enhancement;
[0043] Step 3: Apply attention enhancement to the features enhanced in Step 2 using an attention mechanism;
[0044] Step 4: Output the final defect prediction and segmentation results through the residual module and the header module;
[0045] The multi-scale feature fusion module first uses the CSP module for feature extraction, and then uses the ECA module for attention enhancement. The feature maps of the three resolution sizes are passed through the CSP module and the ECA module respectively, and then subjected to quadratic linear interpolation upsampling step by step, and then stitched with the feature maps of higher resolution.
[0046] Example 2:
[0047] This embodiment provides an unsupervised method for detecting grain defect anomalies, including:
[0048] Step 1: Use the teacher network and student network in the DeSTSeg network to extract features from the grain image to be detected;
[0049] Step 2: Multiply the feature maps extracted from the teacher network and the student network, and then input them into the multi-scale feature fusion module for enhancement;
[0050] Step 3: Apply attention enhancement to the features enhanced in Step 2 using an attention mechanism;
[0051] Step 4: Output the final defect prediction and segmentation results through the residual module and the header module;
[0052] like Figure 2 As shown, the teacher model in this embodiment is constructed using the first three layers of a ResNet18 model and uses weights pre-trained on the ImageNet dataset. The student model uses a standard ResNet18 as the encoder, and the decoder adopts an upsampling structure symmetrical to the encoder. The output feature maps of the teacher and student models are multiplied and then input into the Multi-Scale Feature Fusion (MFFM) module for feature fusion, and then input into the segmentation network to obtain the detection result.
[0053] Model training is divided into two stages, each calculating different losses to complete the corresponding distillation and segmentation tasks.
[0054] In the first stage, the teacher model parameters are fixed, and the student model is trained. The teacher model receives a real, defect-free image as input, while the student model receives a synthetic image with abnormal defects as input. The student and teacher models output three feature maps at different scales. With T 1 ,T 2 ,T 3 By constructing a cosine distance loss between the S and T feature maps, the student network is trained to improve its ability to denoise abnormal regions.
[0055] In the second stage, the parameters of the teacher and student models are fixed, and the segmentation network is trained. The inputs to both the teacher and student models are synthetic images of abnormal defects. Since the teacher model is trained on a massive dataset, it will generate different feature representations in the abnormal regions than the denoising student model. The feature maps of S and T are then fused, and the parameters of the fusion module are further optimized by optimizing the segmentation network. The loss of the segmentation network is L1 loss and Focal loss.
[0056] During normal inference, the model input is a real defect image, and the end-to-end model generates pixel-level anomaly segmentation images and calculates the corresponding image-level anomaly scores.
[0057] The structure of the multi-scale feature fusion module MFFM in this embodiment is as follows: Figure 3 As shown, the MFFM module first further processes the deepest feature map, which has the richest semantic features, using the CSPBottleneck structure from the YOLOv5 network for feature extraction. CSPBottleneck enhances the learning ability of the CNN, reduces memory consumption, and alleviates computational bottlenecks. Then, a Channel Attention Module (CAM) is introduced to adjust the feature weights of each channel, increasing the attention to the region of interest and suppressing interference from other regions on the segmentation task. The feature map enhanced by the Channel Attention Module is then upsampled by a factor of 2 using bilinear interpolation and concatenated with the shallow feature map to obtain a new feature map. The previous operations are then repeated to finally output the result.
[0058] The channel attention module used in this embodiment is the Efficient Channel Attention (ECA) module.
[0059] The MFFM (Multi-Scale Feature Fusion) module enhances the network's ability to fuse feature information at different scales. Compared to the direct concatenation method of the original DeSTSeg network, it can acquire information more accurately and effectively. During the upsampling process, an attention mechanism is used to suppress other redundant and irrelevant information, thereby improving the subsequent network's ability to segment and detect targets.
[0060] This embodiment improves the DeSTSeg network by introducing a multi-scale feature fusion module during the fusion of multi-layer feature outputs from the teacher and student networks. This module addresses the feature loss problem caused by downsampling of weak target features after fusion of the teacher and student models, enabling the semantic information of weak targets to flow from deep to shallow layers. This effectively improves the network's accuracy in identifying grain defects.
[0061] Example 3:
[0062] This embodiment provides an unsupervised method for detecting grain defects. Based on Embodiment 2, a deformable convolutional spatial attention spatial pyramid pooling module DCSASPPF is introduced into the segmentation network.
[0063] like Figure 4 As shown, this embodiment designs a spatial pyramid pooling module (DCSASPPF) with deformable convolution spatial attention mechanism based on the spatial attention mechanism of deformable convolution. The head and tail of the DCSASPPF module both use a feature extraction module (CBS) for feature integration. The CBS module consists of 3×3 convolution, batch normalization, and SiLu activation function. The middle section of the DCSASPPF module uses a module (DCSA) with deformable convolution spatial attention mechanism, followed by a two-dimensional max pooling layer for sampling different receptive fields. The DCSA module and the two-dimensional max pooling layer are executed three times consecutively to obtain three feature maps, which are then concatenated with the feature map obtained from the head CBS module. Finally, another CBS module completes the processing, and the prediction result is output through a residual module and the ASPP segmentation head.
[0064] The processing flow in the DCSA module is as follows: First, the input feature map is subjected to global max pooling and average pooling to obtain two feature maps. Then, the two feature maps are concatenated and the channels of the feature map are transformed from 2 to 1 using a 3×3 deformable convolution. A new attention feature map is obtained by sigmoid activation. The value of the attention feature map is controlled within [0, 1]. Finally, the attention feature map is multiplied with the original feature map to obtain the enhanced feature map.
[0065] This embodiment further introduces a deformable convolutional spatial attention spatial pyramid pooling module (DCSASPPF) into the segmentation network. By adding three deformable convolutional attention modules to the ordinary SPPF module, weak defect feature information can be enhanced, complex texture background interference can be suppressed, and the defect feature extraction capability can be further strengthened. Comparative experiments show that the DCSASPPF module of this invention further improves the detection accuracy.
[0066] Example 4:
[0067] This embodiment demonstrates an experiment on an unsupervised grain defect anomaly detection method based on the improved DeSTSeg. The experimental platform is a general-purpose computer with the following specific configuration: Intel(R) Core(TM) i9-13900K CPU, NVIDIA GeForce RTX 3090 GPU, 32GB RAM, Win10 operating system, PyCharm integrated development environment, Python 3.10, PyTorch 2.0 and other open-source libraries.
[0068] To evaluate the effectiveness of the Multi-Scale Feature Fusion Module (MFFM) and the Deformable Convolutional Spatial Attention Spatial Pyramid Pooling Module (DCSASPPF), and to verify the defect recognition performance of this invention, ablation experiments and comparative experiments were set up. The ablation experiments compared the performance improvement of each improved module individually added to the original network. The comparative experiments verified the performance comparison with other mainstream anomaly and defect detection models. The network training process used mini-batch stochastic gradient descent, with a batch size of 6. The initial learning rate was set to 0.01, 0.01, 0.05, and 0.005 for the teacher network, student network, and segmentation residual, respectively, with a momentum of 0.9 and a weight decay of 1e-4.
[0069] Unsupervised anomaly segmentation algorithms typically evaluate model performance at three scales: image level, pixel level, and instance level. Image level performance uses the AUC (Area Under Curve) metric, which assesses the overall performance of the model. AUC ranges from 0 to 1; a higher AUC value indicates a stronger ability to identify anomalies and more effectively they can be detected. Pixel level performance uses the more accurate Average Precision (AP), which better reflects the imbalance of data in the segmented region. Instance level performance is a more industrially relevant metric; when 50% of the pixels in an anomaly region are correctly predicted, the instance is generally considered to have been detected correctly. A curve representing precision versus recall is plotted by adjusting the decision threshold; the average precision of this curve is represented by IAP (Instance Average Precision). The relevant calculation formula is as follows:
[0070]
[0071]
[0072]
[0073]
[0074]
[0075] In the above formula, Precision represents precision; TPR represents true positive rate; Recall represents recall; and FPR represents false positive rate.
[0076] (1) Ablation experiment:
[0077] The multi-scale feature fusion module MFFM and deformable convolutional spatial attention spatial pyramid pooling DCSASPPF designed in this invention are used to improve the performance of the original DeSTSeg. To verify the module's effectiveness, ablation experiments were conducted. Three improved modules, MFFM and DCSASPPF, were added to the original model and combined for testing. A total of four experiments were conducted, and the image-level, pixel-level, and instance-level detection accuracy were evaluated using AUC (%), AP (%), and IAP (%). The experimental results are shown in Table 1.
[0078] Table 1 Ablation Experiment Results
[0079]
[0080] Note: √ indicates that this improvement item has been added.
[0081] As shown in Table 1, the two modules have different effects on network performance. Adding the MFFM module to the output feature layers of the student and teacher networks at multiple different levels significantly improves pixel-level AP and instance-level IAP. The MFFM module replaces the original network's splicing operation, resulting in improvements in all three metrics, indicating that multi-scale feature fusion effectively enhances the accuracy of network defect identification.
[0082] After adding the DCSASPPF module to the original segmentation network, the AP and IAP improved the most, increasing by 8.86% and 4.96% respectively compared to the original network. This demonstrates the DCSA module's ability to effectively combine long-range contextual information and local features, as well as its ability to extract features of wafer defects.
[0083] To verify the improvement effects of each module in DCSASPPF and to verify the overall improvement effect of the deformable convolutional spatial attention mechanism of DCSA, based on the network containing the MFFM module, SA spatial attention was used to replace DCSA and construct the SASPPF module. Experiments were conducted on DCSA alone, SA alone, and SPPF alone. The experimental results are shown in Table 2.
[0084] Table 2 Results of DCSASPPF effectiveness test
[0085]
[0086] As shown in Table 2, DCSA has advantages over SA in various metrics. Furthermore, the comparison data between DCSASPPF and SPPF alone indicates that DCSA is superior. Adding a spatial attention mechanism to the SPPF module helps improve model accuracy because the attention mechanism facilitates more purposeful fusion of features at different pyramid scales. The data in Table 2 shows that DCSASPPF improves AP and IAP by 1.62% and 1.76% respectively compared to SASPPF. DCSA alone shows significant improvements over SA in multiple metrics, with the most significant improvement in AP (3.58 percentage points). Therefore, the DCSA designed in this invention provides a better performance improvement for the model compared to the original SA.
[0087] To examine the suppression of complex backgrounds and the enhancement effect on complex defects before and after the improvement, gradient heatmaps were plotted using the Grad-Cam method. Grad-Cam is a method that intuitively reflects the model's attention to different regions of the feature map. See [link to results] for specific effects. Figure 5The heatmap clearly shows that DCSASPPF, compared to the original SASPPF module and the original model without attention mechanisms, can more effectively and uniformly focus on defect regions with lower background attention, thus suppressing interference from complex background textures and preventing incorrect segmentation of background regions. This demonstrates the powerful feature extraction capability of deformable convolutional attention for complex-shaped targets. It can adaptively adjust the convolution kernel according to the target shape, reducing the possibility of sampling background regions, and has a greater advantage in enhancing features of weak defect regions compared to the original SA attention module.
[0088] (2) Comparative experiment:
[0089] To verify the superiority of the improved DeSTSeg algorithm, the performance of this invention was compared with other anomaly detection methods. The comparison models were UFlow, FastFlow, DRAEM, and the original DeSTSeg network model. The evaluation metrics used for comparison were still AUC, AP, and IAP, which comprehensively compared the performance accuracy of the models at the image, pixel, and instance levels at three different coarse-grained levels. All experiments were conducted under the same hardware, software, and hyperparameter conditions. The weights of the optimal training results were selected for calculating the metrics on the final test set. During the testing process, the calculation thresholds for relevant metrics and visualization results were set to 0.5. The experimental results are shown in Table 3. The defect detection results of some typical defect images were visualized in... Figure 6 The above shows that the main types of defects and anomalies include oxide film residue, corrosion pits, glass anomalies, and scratches.
[0090] Table 3. Comparison of AUC / AP / IAP (%) between the method of this invention and other methods on wafer datasets.
[0091]
[0092] As can be seen from the results in Table 3, the grain defect detection method of the present invention achieves the best detection performance in three indicators: image level, pixel level, and instance level, and has obvious advantages compared with other methods.
[0093] Figure 6 The image shows the segmentation results of wafer anomalies for each method. The predicted results are marked with red boundary lines to indicate defects, which shows the detection results of different algorithms for wafer anomalies. Figure 6The results show that all different networks exhibit overdetection and underdetection issues. While the U-Flow model performs well in image-level metrics for wafer defects, its segmentation of specific defects is inferior to other models, exhibiting underdetection of small, weak scratches and over-segmentation of abnormal defect regions. The Fast-Flow model demonstrates some robustness against complex backgrounds and performs well in segmenting larger anomalies, but its accuracy in segmenting weak defects is poor. The DRAEM model offers better segmentation accuracy than the U-Flow model, but it suffers from mis-segmentation in glass and oxide film regions, and its scratch segmentation continuity is not as good as the method described in this invention for weak scratch defects.
[0094] Comprehensive analysis shows that the method of this invention has the best recognition effect on wafer anomaly data. The image AUC index is improved by 1.15% compared with U-Flow, the AP index is improved by 4.81% compared with DRAEM, and the IAP index is improved by 9.39% compared with the best DRAEM model. The method of this invention has the best segmentation accuracy in the anomaly images of each grain example. Except for a few extremely weak defects, all are effectively segmented. It has good sensitivity to defects such as weak scratches and glass anomalies.
[0095] Some steps in the embodiments of the present invention can be implemented using software, and the corresponding software program can be stored in a readable storage medium, such as an optical disc or a hard disk.
[0096] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An unsupervised method for detecting grain defect anomalies, characterized in that, The method includes: Step 1: Use the teacher network and student network in the DeSTSeg network to extract features from the grain image to be detected; Step 2: Multiply the feature maps extracted from the teacher network and the student network, and then input them into the multi-scale feature fusion module for enhancement; Step 3: Apply attention enhancement to the features enhanced in Step 2 using an attention mechanism; Step 4: Output the final defect prediction and segmentation results through the residual module and the header module; The multi-scale feature fusion module first uses the CSP module for feature extraction, and then uses the ECA module for attention enhancement. The feature maps of the three resolution sizes are passed through the CSP module and the ECA module respectively, and then subjected to quadratic linear interpolation upsampling step by step, and then stitched with the feature maps of higher resolution. The attention mechanism in step 3 is: Deformable Convolutional Spatial Attention Spatial Pyramid Pooling Module DCSASPPF, which adds the Deformable Convolutional Spatial Attention Mechanism DCSA to the SPPF module. The DCSASPPF module includes a head CBS module, a first DCSA module, a second DCSA module, and a third DCSA module connected in sequence, with a two-dimensional max pooling layer connected in series after each DCSA module. The DCSASPPF module concatenates the feature maps output by the three two-dimensional max pooling layers with the feature map output by the head CBS module, and then inputs the concatenated feature maps into the tail CBS module. The calculation process of the DCSA module includes: first, performing global max pooling and average pooling on the input feature map to obtain two feature maps; then, concatenating the two feature maps and using a 3×3 deformable convolution to convert the channels of the feature map from 2 to 1; then, obtaining a new attention feature map through sigmoid activation; controlling the value of the attention feature map within [0,1]; and finally, multiplying the attention feature map with the original feature map to obtain the enhanced feature map.
2. The unsupervised grain defect anomaly detection method according to claim 1, characterized in that, The number of CSP modules in the multi-scale feature fusion module is 6, 4, and 2 respectively, from deep to shallow.
3. The unsupervised grain defect anomaly detection method according to claim 1, characterized in that, The CBS module consists of, in sequence, a standard convolutional layer, a batch normalization layer, and a SiLu activation function.
4. The unsupervised grain defect anomaly detection method according to claim 1, characterized in that, The method uses synthesized abnormal grain images to train an anomaly detection network. The synthesized abnormal grain images are obtained by combining DTD-programmable texture images with defect-free good grain images.
5. The unsupervised grain defect anomaly detection method according to claim 4, characterized in that, The process of synthesizing the abnormal grain image includes: First, random two-dimensional Burmester noise is generated on the defect-free good grain image and thresholded to obtain a mask for the noise region. Then, the noise mask region is covered by linear combination of DTD image data and grain image.
6. The unsupervised grain defect anomaly detection method according to claim 1, characterized in that, The teacher network uses the ResNet18 network.
7. The unsupervised grain defect anomaly detection method according to claim 1, characterized in that, The encoder part of the student network uses a randomly initialized ResNet18 network, and the decoder part uses an inverse ResNet18 network with four residual blocks.
8. An electronic device, characterized in that, Including memory and processor; The memory is used to store computer programs; The processor is configured to implement the unsupervised grain defect anomaly detection method as described in any one of claims 1 to 7 when executing the computer program.
9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the unsupervised grain defect anomaly detection method as described in any one of claims 1 to 7.