计算机工程与应用 ›› 2025, Vol. 61 ›› Issue (23): 205-211.DOI: 10.3778/j.issn.1002-8331.2506-0028

• 模式识别与人工智能 • 上一篇    下一篇

融合扩散模型与知识蒸馏的无监督工业缺陷检测

刘明明,史伟峰,范学慧,张海燕   

  1. 1.江苏建筑职业技术学院 智能制造学院,江苏 徐州 221116 
    2.中国矿业大学 计算机科学与技术学院,江苏 徐州 221116
  • 出版日期:2025-12-01 发布日期:2025-12-01

Unsupervised Industrial Defect Detection Method Based on Diffusion Model and Knowledge Distillation

LIU Mingming, SHI Weifeng, FAN Xuehui, ZHANG Haiyan   

  1. 1.School of Intelligent Manufacturing, Jiangsu Vocational Institute of Architectural Technology, Xuzhou, Jiangsu 221116, China
    2.School of Computer Science and Technology, China University of Mining and Technology, Xuzhou, Jiangsu 221116, China
  • Online:2025-12-01 Published:2025-12-01

摘要: 近年来,基于无监督学习的工业缺陷检测模型取得了显著的性能提升。然而,现有的缺陷合成策略依赖外部数据源,导致合成缺陷与真实缺陷存在较大差异,严重制约了模型的泛化性能。此外,现有的方法存在特征细节信息丢失问题,导致模型出现误检现象。为此,引入一种多源缺陷合成策略,协同利用扩散模型生成的图像和DTD数据集的图像合成更符合真实缺陷分布的缺陷样本。利用合成的缺陷样本微调教师网络对缺陷的表征能力,并引入异常屏蔽模块解决教师学生网络同构导致的过度泛化问题。构建细节修补模块,通过跨层级特征融合增强学生网络对教师特征的细节重建能力。在MVTec AD标准数据集上进行了定量和定性实验,与基准模型相比,取得了更优的图像级和像素级指标得分。

关键词: 无监督学习, 缺陷检测, 扩散模型, 反向蒸馏

Abstract: In recent years, industrial defect detection models based on unsupervised learning have achieved significant performance improvements. However, the existing defect synthesis strategies rely on external data sources, resulting in significant differences between the synthesized defects and some real defects, which seriously restricts the generalization performance of the model. Furthermore, the existing reverse distillation methods have the problem of losing feature detail information, resulting in false detection phenomena in the model. To this end, a multi-source defect synthesis strategy is first introduced. The images generated by the diffusion model and the image synthesized from the DTD dataset are more in line with the defect samples of the real defect distribution. Then, the synthetic defect samples are used to fine-tune the representational ability of the teacher network for defects. Subsequently, an anomaly masking module is introduced to address the issue of excessive generalization caused by teacher-student network isomorphism. Finally, a detail repair module is constructed to enhance the student network’s ability to reconstruct the details of the teacher’s features through cross-level feature fusion. Quantitative and qualitative experiments are conducted on the MVTec AD standard dataset. Compared with the benchmark model, the proposed method achieves better performance in terms of both image-level and pixel -level AUROC scores.

Key words: unsupervised learning, defect detection, diffusion model, reverse distillation