融合知识蒸馏与记忆机制的无监督工业缺陷检测
Unsupervised industrial defect detection by integrating knowledge distillation and memory mechanism
- 2025年30卷第3期 页码:660-671
收稿日期:2024-04-12,
修回日期:2024-08-13,
纸质出版日期:2025-03-16
DOI: 10.11834/jig.240202
移动端阅览
浏览全部资源
扫码关注微信
收稿日期:2024-04-12,
修回日期:2024-08-13,
纸质出版日期:2025-03-16
移动端阅览
目的
2
基于深度学习的工业缺陷检测方法可以降低传统人工质检的成本, 提升检测的准确性与效率,因而在智能制造中扮演重要角色。针对无监督工业缺陷检测中存在的过检测和逻辑缺陷检测失效等问题,提出一种融合知识蒸馏与记忆机制的无监督工业缺陷检测模型。
方法
2
使用显著性检测网络和柏林噪声合成缺陷图像,提升合成图像与真实缺陷图像的分布一致性,缓解传统模型的过检测问题;同时,对传统无监督工业缺陷检测框架进行改进,引入平均记忆模块提取正常样本的原型特征,通过记忆引导提高模型对逻辑缺陷的检测性能。
结果
2
在工业缺陷检测基准数据集MVTec AD(MVTec anomaly detection dataset)上的实验结果表明,针对晶体管逻辑缺陷检测难题,在像素级接受者操作特征曲线下面积(area under the receiver operating characteristic curve, AUROC)指标上本文方法相比于基线模型提升了9.1%;针对各类缺陷检测场景,在更具挑战性的平均准确率(average precision, AP)指标上提升了2.5%。针对更具挑战性的Breakfast box数据集中的逻辑缺陷问题,本文方法在图像级AUROC指标上相较于基线模型提升了11.5%。同时,在像素级AUROC指标上,本文方法相较于基线模型提升了4.0%。
结论
2
本文不受传统缺陷合成方法的限制,能够有效缓解现有缺陷合成方法引起的过检测问题;引入平均记忆模块不仅可以减小内存开销,而且无需设计复杂的检索算法,节省了检索内存库所耗费的时间;将所提出的缺陷合成方法与记忆机制进行有机结合,能够准确检测出不同种类的工业缺陷。
Objective
2
From airplane wings to chip grains, industrial products are ubiquitous in modern society. Industrial defect detection, which aims to identify appearance defects in various industrial products, is a crucial technology for ensuring product quality and maintaining stable production. Previous defect detection methods rely on manual screening, which is costly, inefficient, and often inadequate for large-scale quality inspection needs. In recent years, the continuous emergence of new technologies in industrial imaging, computer vision, and deep learning has notably advanced vision-based industrial defect detection, making it an effective solution for inspecting product appearance quality. However, several types of industrial defects are found in the actual scene, and a lack of sufficient samples poses challenges for existing unsupervised industrial defect detection methods, These methods often struggle to effectively detect local normal logic defects, such as when a normal target appears in the wrong position or is missing altogether. This difficulty arises from the lack of prior knowledge regarding normal samples during the testing phase, which can lead to defective parts being incorrectly identified as normal. Additionally, deep neural networks possess strong generalization capability, but existing methods often misidentify interference factors on the background of the image as defects, leading to issues of over-detection. To address the challenges of logic defect detection failures and over-detection in unsupervised industrial defect detection, a new unsupervised industrial defect detection model is proposed.
Method
2
First, a saliency detection network and Berlin noise are used to synthesize defect images, enhancing the distribution consistency between synthesized and real defect images while alleviating the over-detection problem in traditional models. Second, the proposed model comprises a teacher-student branch and a memory branch. The teacher-student branch trains the student network by distilling knowledge and synthesizing defect images, allowing it to extract normal image features consistent with those of the teacher network while also repairing defected areas, effectively alleviating the overgeneralization issue of the student network. The memory branch can effectively learn the prototype features that represent normal samples by introducing the average memory module, thereby enhancing the capability of the model to detect logical defects. The two branches adaptively fuse multiscale defect features, enabling accurate detection of various defects through joint discrimination.
Result
2
Experiments on MVTec AD, a benchmark dataset for industrial defect detection, show that the proposed method achieves excellent detection performance across all types of defect images. For texture defect images, the average image-level area under the receiver operating characteristic curve(AUROC) metric improved from 99.3% to 99.8% compared to the baseline model DeSTSeg, while the average pixel-level AUROC metric increased from 98.1% to 98.7%. For object class defect images, the average image-level AUROC metric rose from 97.5% to 99.1%, and the average pixel-level AUROC metric increased from 97.9% to 99.1%, relative to DeSTSeg. Notably, for transistor logic defect detection, the proposed method showed an improvement of 9.1%. Across the entire MVTec AD dataset, compared to the baseline model, the average image-level AUROC metric increased from 98.1% to 99.3%, and the average pixel-level AUROC metric improved from 97.9% to 98.9%. Additionally, the proposed approach achieved improvements of 0.9% and 2.5% in the more challenging pixel-level PRO (per-region-overlap) and average accuracy AP metrics, respectively. In addressing logic defects in the more challenging Breakfast box dataset, the proposed method achieved an 11.5% improvement in image-level AUROC metrics compared to the baseline model. Simultaneously, in terms of the pixel-level AUROC index, the proposed method showed a 4.0% improvement compared to the baseline model. In the ablation experiment, each module of the proposed method is validated. The introduction of substantial detection to constrain synthetic defects in the foreground markedly reduces the over-detection phenomenon caused by background interference in the model, improving classification performance by 1% compared to the baseline model. With the addition of memory branches, the model can effectively detect logic defects and substantially enhance segmentation performance. However, the direct average fusion method compromises the respective advantages of the two branches, leading to poor defect detection performance. Therefore, the normalization module effectively combines the advantages of the two segmentation networks, resulting in improvements of 0.7% and 0.5% in classification and segmentation performances, respectively, compared to the direct averaging approach.
Conclusion
2
The proposed method is not limited by traditional defect synthesis techniques and can effectively alleviate the over-detection problems caused by existing synthesis methods. The introduction of the average memory module not only reduces memory costs but also saves time in searching the memory library without requiring a complicated search algorithm. In this paper, the proposed defect synthesis method is organically combined with the memory mechanism, enabling accurate detection of various types of industrial defects.
Bergmann P , Fauser M , Sattlegger D and Steger C . 2020 . Uninformed students: student-teacher anomaly detection with discriminative latent embeddings // Proceedings of 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition . Seattle, USA : IEEE: 4182 - 4191 [ DOI: 10.1109/CVPR42600.2020.00424 http://dx.doi.org/10.1109/CVPR42600.2020.00424 ]
Cao Y K , Wan Q , Shen W M and Gao L . 2022 . Informative knowledge distillation for image anomaly segmentation . Knowledge-Based Systems , 248 : # 108846 [ DOI: 10.1016/j.knosys.2022.108846 http://dx.doi.org/10.1016/j.knosys.2022.108846 ]
Deng H Q and Li X Y . 2022 . Anomaly detection via reverse distillation from one-class embedding // Proceedings of 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition . New Orleans, USA : IEEE: 9727 - 9736 [ DOI: 10.1109/CVPR52688.2022.00951 http://dx.doi.org/10.1109/CVPR52688.2022.00951 ]
He K M , Zhang X Y , Ren S Q and Sun J . 2016 . Deep residual learning for image recognition // Proceedings of 2016 IEEE Conference on Computer Vision and Pattern Recognition . Las Vegas, USA : IEEE: 770 - 778 [ DOI: 10.1109/CVPR.2016.90 http://dx.doi.org/10.1109/CVPR.2016.90 ]
Li W G , Ye X , Zhao Y T and Wang W B . 2020 . Strip steel surface defect detection based on improved YOLOv3 algorithm . Acta Electronica Sinica , 48 ( 7 ): 1284 - 1292
李维刚 , 叶欣 , 赵云涛 , 王文波 . 2020 . 基于改进YOLOv3算法的带钢表面缺陷检测 . 电子学报 , 48 ( 7 ): 1284 - 1292 [ DOI: 10.3969/j.issn.0372-2112.2020.07.006 http://dx.doi.org/10.3969/j.issn.0372-2112.2020.07.006 ]
Lin S Y and Wu Y Q . 2024 . Vision-based LCD/OLED defect detection methods: a critical summary . Journal of Image and Graphics , 29 ( 5 ): 1321 - 1345
林思媛 , 吴一全 . 2024 . 基于视觉的液晶屏/OLED屏缺陷检测方法综述 . 中国图象图形学报 , 29 ( 5 ): 1321 - 1345 [ DOI: 10.11834/jig.230518 http://dx.doi.org/10.11834/jig.230518 ]
Luo D L , Cai Y X , Yang Z H , Zhang Z Y , Zhou Y and Bai X . 2022 . Survey on industrial defect detection with deep learning . Scientia Sinica Informationis , 52 ( 6 ): 1002 - 1039
罗东亮 , 蔡雨萱 , 杨子豪 , 章哲彦 , 周瑜 , 白翔 . 2022 . 工业缺陷检测深度学习方法综述 . 中国科学 : 信息科学) , 52 ( 6 ): 1002 - 1039 [ DOI: 10.1360/SSI-2021-0336 http://dx.doi.org/10.1360/SSI-2021-0336 ]
Qi Y C , Wu X L , Zhao Z B , Shi B Q and Nie L Q . 2021 . Bolt defect detection for aerial transmission lines using faster R-CNN with an embedded dual attention mechanism . Journal of Image and Graphics , 26 ( 11 ): 2594 - 2604
戚银城 , 武学良 , 赵振兵 , 史博强 , 聂礼强 . 2021 . 嵌入双注意力机制的Faster R-CNN航拍输电线路螺栓缺陷检测 . 中国图象图形学报 , 26 ( 11 ): 2594 - 2604 [ DOI: 10.11834/jig.200793 http://dx.doi.org/10.11834/jig.200793 ]
Qin X B , Zhang Z C , Huang C Y , Dehghan M , Zaïane O R and Jägersand M . 2020 . U2-Net: going deeper with nested U-structure for salient object detection . Pattern Recognition , 106 : # 107404 [ DOI: 10.1016/j.patcog.2020.107404 http://dx.doi.org/10.1016/j.patcog.2020.107404 ]
Roth K , Pemula L , Zepeda J , Schölkopf B , Brox T and Gehler P . 2022 . Towards total recall in industrial anomaly detection // Proceedings of 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition . New Orleans, USA : IEEE: 14298 - 14308 [ DOI: 10.1109/CVPR52688.2022.01392 http://dx.doi.org/10.1109/CVPR52688.2022.01392 ]
Saito T and Rehmsmeier M . 2015 . The precision-recall plot is more informative than the ROC plot when evaluating binary classifiers on imbalanced datasets . PLoS ONE , 10 ( 3 ): #e 0118432 [ DOI: 10.1371/journal.pone.0118432 http://dx.doi.org/10.1371/journal.pone.0118432 ]
Wang G D , Han H M , Ding E R and Huang D . 2021 . Student-teacher feature pyramid matching for anomaly detection [EB/OL]. [ 2024-04-12 ]. https://arxiv.org/pdf/2103.04257.pdf https://arxiv.org/pdf/2103.04257.pdf
Yang M H , Wu P and Feng H . 2023 . MemSeg: a semi-supervised method for image surface defect detection using differences and commonalities . Engineering Applications of Artificial Intelligence , 119 : # 105835 [ DOI: 10.1016/j.engappai.2023.105835 http://dx.doi.org/10.1016/j.engappai.2023.105835 ]
Yi J H and Yoon S . 2021 . Patch SVDD: patch-level SVDD for anomaly detection and segmentation // Proceedings of the 15th Asian Conference on Computer Vision . Kyoto, Japan : Springer: 375 - 390 [ DOI: 10.1007/978-3-030-69544-6_23 http://dx.doi.org/10.1007/978-3-030-69544-6_23 ]
You Z Y , Cui L , Shen Y J , Yang K , Lu X , Zheng Y and Le X Y . 2022 . A unified model for multi-class anomaly detection // Proceedings of the 36th International Conference on Neural Information Processing Systems . New Orleans, USA : Curran Associates Inc.: 4571 - 4584
Zaheer M Z , Lee J H , Astrid M and Lee S I . 2020 . Old is gold: redefining the adversarially learned one-class classifier training paradigm // Proceedings of 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition . Seattle, USA : IEEE: 14171 - 14181 [ DOI: 10.1109/CVPR42600.2020.01419 http://dx.doi.org/10.1109/CVPR42600.2020.01419 ]
Zavrtanik V , Kristan M and Skočaj D . 2021a . Reconstruction by inpainting for visual anomaly detection . Pattern Recognition , 112 : # 107706 [ DOI: 10.1016/j.patcog.2020.107706 http://dx.doi.org/10.1016/j.patcog.2020.107706 ]
Zavrtanik V , Kristan M and Skočaj D . 2021b . DRÆM—a discriminatively trained reconstruction embedding for surface anomaly detection // Proceedings of 2021 IEEE/CVF International Conference on Computer Vision . Montreal, Canada : IEEE: 8310 - 8319 [ DOI: 10.1109/ICCV48922.2021.00822 http://dx.doi.org/10.1109/ICCV48922.2021.00822 ]
Zhang X , Li S Y , Li X , Huang P , Shan J L and Chen T . 2023 . DeSTSeg: segmentation guided denoising student-teacher for anomaly detection // Proceedings of 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition . Vancouver, Canada : IEEE: 3914 - 3923 [ DOI: 10.1109/CVPR52729.2023.00381 http://dx.doi.org/10.1109/CVPR52729.2023.00381 ]
相关作者
相关机构