Please wait a minute...
浙江大学学报(工学版)  2026, Vol. 60 Issue (10): 2186-2195    DOI: 10.3785/j.issn.1008-973X.2026.10.011
计算机技术与控制工程     
基于扩散合成与特征挖掘的工业图像异常检测
卜玉真(),余家斌,马道滨,陈梁宇,孙龙,杨力,章东平*()
中国计量大学 信息工程学院,浙江 杭州 310018
Industrial image anomaly detection via diffusion synthesis and feature mining
Yuzhen BU(),Jiabin YU,Daobin MA,Liangyu CHEN,Long SUN,Li YANG,Dongping ZHANG*()
School of Information Engineering, China Jiliang University, Hangzhou 310018, China
 全文: PDF(4463 KB)   HTML
摘要:

现有工业图像异常检测方法普遍存在对异常样本依赖度高、合成样本真实性不足以及对复杂缺陷的感知能力有限等问题. 为此,提出基于扩散合成与特征挖掘的工业图像异常检测方法. 设计类别敏感选择性扩散异常合成模块,通过可控扰动与类别敏感损失生成强度可调、类别自适应的伪异常样本,以有效缓解数据稀缺问题. 构建多阶段特征挖掘框架,包括对比驱动的特征选择、多维感知注意力重建及残差细化选择模块,实现异常敏感特征的动态筛选与结构细节增强. 实验结果表明,本研究方法在MVTec AD与MPDD数据集上分别取得图像级AUROC为99.7%与98.4%、像素级AUROC为99.0%与98.7%的优异性能,验证了方法的有效性与鲁棒性.

关键词: 异常检测异常合成特征选择扩散模型缺陷定位    
Abstract:

Current industrial image anomaly detection methods generally face challenges such as high dependency on anomalous samples, insufficient realism of synthetic samples, and limited perception capability for complex defects. To An industrial image anomaly detection method based on diffusion synthesis and feature mining was proposed to address these issues. Accordingly, a category-sensitive selective diffusion anomaly synthesis module was designed to generate pseudo-anomaly samples with adjustable intensity and category adaptability through controllable perturbation and category-sensitive loss, which could effectively alleviate data scarcity. Meanwhile, a multi-stage feature mining framework was constructed, including contrast-driven feature selection, multi-dimensional perception attention reconstruction, and residual refinement selection modules, enabling dynamic screening of anomaly-sensitive features and enhancement of structural details. Experimental results demonstrated that the proposed method achieved outstanding performance on the MVTec AD and MPDD datasets, with image-level AUROC scores of 99.7% and 98.4%, and pixel-level AUROC scores of 99.0% and 98.7%, respectively, validating its effectiveness and robustness.

Key words: anomaly detection    anomaly synthesis    feature selection    diffusion model    defect localization
收稿日期: 2025-10-18 出版日期: 2026-07-28
CLC:  TP 391  
基金资助: 浙江省重点研发计划资助项目(2024C01108);杭州市重大科技创新项目(2024SZD1A09;宁波市重点技术研发项目(2024Z114).
通讯作者: 章东平     E-mail: byzwsl@163.com;06a0303103@cjlu.cn
作者简介: 卜玉真(2001—),女,硕士生,从事工业图像异常检测研究. orcid.org/0009-0006-3268-578X. E-mail:byzwsl@163.com
服务  
把本文推荐给朋友
加入引用管理器
E-mail Alert
作者相关文章  
卜玉真
余家斌
马道滨
陈梁宇
孙龙
杨力
章东平

引用本文:

卜玉真,余家斌,马道滨,陈梁宇,孙龙,杨力,章东平. 基于扩散合成与特征挖掘的工业图像异常检测[J]. 浙江大学学报(工学版), 2026, 60(10): 2186-2195.

Yuzhen BU,Jiabin YU,Daobin MA,Liangyu CHEN,Long SUN,Li YANG,Dongping ZHANG. Industrial image anomaly detection via diffusion synthesis and feature mining. Journal of ZheJiang University (Engineering Science), 2026, 60(10): 2186-2195.

链接本文:

https://www.zjujournals.com/eng/CN/10.3785/j.issn.1008-973X.2026.10.011        https://www.zjujournals.com/eng/CN/Y2026/V60/I10/2186

图 1  异常检测方法整体框架图
图 2  类别敏感选择性扩散异常合成模块框架图
图 3  对比驱动的特征选择模块结构图
图 4  多维感知注意力模块结构图
图 5  残差细化选择模块结构图
方法Image AUROC/%Pixel AUROC/%PRO/%
SIA98.8098.3776.99
NSA99.4998.5093.31
Cutpaste99.5098.4692.73
本研究算法99.7099.0593.36
表 1  不同异常合成方法在MVTec AD数据集上的性能对比
图 6  不同异常合成方法可视化结果对比
方法Image AUROC/%Pixel AUROC/%
MDPS98.897.3
AnoDDPM75.773.6
AutoDDPM86.889.6
RAN93.196.7
本研究算法99.799.0
表 2  扩散生成式异常检测方法与本方法的性能对比
方法Image AUROC/%Pixel AUROC/%
PatchCore99.198.1
SimpleNet99.698.1
FastFlow99.398.1
DRAEM+SSPCAB98.997.2
UniAD96.696.6
RD++99.498.3
DeSTSeg98.697.9
DiffAD98.798.3
RealNet99.699.0
本研究算法99.799.0
表 3  不同异常检测方法在MVTec AD数据集上的整体性能对比
图 7  本研究方法在MVTec AD数据集上的异常检测与定位可视化结果
方法Image AUROC/%Pixel AUROC/%PRO/%
SIA97.1698.5189.29
NSA98.2698.4091.81
Cutpaste98.4397.6793.09
本研究算法98.4498.7689.61
表 4  不同异常合成方法在MPDD数据集上的性能对比
方法Image AUROC/%Pixel AUROC/%
PatchCore82.195.7
CFlow86.197.7
PaDiM74.896.7
SPADE77.195.9
DAGAN72.583.3
Skip-GANomaly64.882.2
RealNet96.398.2
本研究算法98.498.7
表 5  不同异常检测方法在MPDD数据集上的整体性能对比
异常强度Image AUROC/%Pixel AUROC/%PRO/%
s=099.5898.7694.83
s=0.199.5598.5491.37
s=0.299.5798.7692.49
s=[0.1,0.2]99.7099.0593.36
表 6  不同异常强度设置下的消融实验结果
图 8  不同异常强度生成的样本对比可视化结果
Backbone{m1,···,mK}Image AUROC/%Pixel AUROC/%PRO/%
EfficientNetB4
{24,32,56,160}
93.9192.1878.95
ResNet34
{64,128,256,128}
97.0294.4173.59
WideResNet50
{128,256,256,128}
99.1898.3890.34
WideResNet50
{256,512,512,256}
99.7099.0593.36
表 7  不同主干网络与特征维度设置下的异常检测性能对比
CDFSMPA-GRMRRSImage AUROC/%Pixel AUROC/%PRO/%
99.598.893.2
95.197.793.0
92.797.692.1
98.597.392.8
93.297.193.1
92.896.992.6
92.597.591.9
99.799.093.3
表 8  不同模块配置下的异常检测性能
1 CHENG Y, CAO Y, YAO H, et al A comprehensive survey for real-world industrial surface defect detection: challenges, approaches, and prospects[J]. Journal of Manufacturing Systems, 2026, 84: 152- 172
doi: 10.1016/j.jmsy.2025.11.022
2 CUI Y, LIU Z, LIAN S A survey on unsupervised anomaly detection algorithms for industrial images[J]. IEEE Access, 2023, 11: 55297- 55315
doi: 10.1109/ACCESS.2023.3282993
3 CHEN Y, DING Y, ZHAO F, et al Surface defect detection methods for industrial products: a review[J]. Applied Sciences, 2021, 11 (16): 7657
doi: 10.3390/app11167657
4 LI Z, YAN Y, WANG X, et al A survey of deep learning for industrial visual anomaly detection[J]. Artificial Intelligence Review, 2025, 58 (9): 279
doi: 10.1007/s10462-025-11287-7
5 白云鹍, 张昊宇, 邢宇翔 基于无监督学习的工业图像异常检测研究综述[J]. 中国体视学与图像分析, 2025, 30 (1): 102- 125
BAI Yunkun, ZHANG Haoyu, XING Yuxiang A review of industrial image anomaly detection based on unsupervised deep learning[J]. Chinese Journal of Stereology and Image Analysis, 2025, 30 (1): 102- 125
6 KA Ji, SHI Zuo, SATOSHI Kida. Overview of image-to-image translation by use of deep neural networks: denoising, super-resolution, modality conversion, and reconstruction in medical imaging [EB/OL]. [2025–09–03]. https://arxiv.org/pdf/1905.08603.
7 ALI M, FIORAIO N, SALTI S, et al AnomalyControl: few-shot anomaly generation by ControlNet inpainting[J]. IEEE Access, 2024, 12: 192903- 192914
doi: 10.1109/ACCESS.2024.3520002
8 XU R, WANG Y, DU B. MAEDiff: masked autoencoder-enhanced diffusion models for unsupervised anomaly detection in brain images [EB/OL]. [2025–09–05]. https://arxiv.org/abs/2401.10561.
9 杨曜, 许湘云, 张琳娜, 等 基于多记忆增强模块及图像轮廓重建的工业表面异常检测[J]. 计算机工程与应用, 2025, 61 (20): 248- 259
YANG Yao, XU Xiangyun, ZHANG Linna, et al Industrial surface anomaly detection based on reconstruction with multiple memory enhancement modules and image edge[J]. Computer Engineering and Applications, 2025, 61 (20): 248- 259
doi: 10.3778/j.issn.1002-8331.2406-0293
10 MIENYE I D, SWART T G Deep autoencoder neural networks: a comprehensive review and new perspectives[J]. Archives of Computational Methods in Engineering, 2025, 32 (7): 3981- 4000
doi: 10.1007/s11831-025-10260-5
11 CHEN J W, LIN W J, LI K M, et al Promoting accurate image reconstruction via synthetic noise for unsupervised screw anomaly detection and location[J]. IEEE Transactions on Instrumentation and Measurement, 2025, 74: 2528816
doi: 10.1109/tim.2025.3548207
12 LI C L, SOHN K, YOON J, et al. CutPaste: self-supervised learning for anomaly detection and localization [C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Nashville: IEEE, 2021: 9659–9669.
13 SCHLEGL T, SEEBÖCK P, WALDSTEIN S M, et al F-AnoGAN: fast unsupervised anomaly detection with generative adversarial networks[J]. Medical Image Analysis, 2019, 54: 30- 44
doi: 10.1016/j.media.2019.01.010
14 ROMBACH R, BLATTMANN A, LORENZ D, et al. High-resolution image synthesis with latent diffusion models [C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. New Orleans: IEEE, 2022: 10674–10685.
15 HO J, JAIN A, ABBEEL P. Denoising diffusion probabilistic models [EB/OL]. [2025–09–07]. https://arxiv.org/abs/2006.11239.
16 蒋世杰, 夏秀山, 翟伟, 等 基于ODE扩散模型的多类异常检测和定位[J]. 智能系统学报, 2025, 20 (2): 376- 388
JIANG Shijie, XIA Xiushan, ZHAI Wei, et al ODE diffusion model for multiclass anomaly detection and localization[J]. CAAI Transactions on Intelligent Systems, 2025, 20 (2): 376- 388
doi: 10.11992/tis.202402022
17 WYATT J, LEACH A, SCHMON S M, et al. AnoDDPM: anomaly detection with denoising diffusion probabilistic models using simplex noise [C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops. New Orleans: IEEE, 2022: 649–655.
18 WOLLEB J, BIEDER F, SANDKÜHLER R, et al. Diffusion models forMedical anomaly detection [C]// Medical Image Computing and Computer Assisted Intervention – MICCAI 2022. Cham: Springer, 2022: 35–45.
19 ZHOU X, ZHANG Y, REN Z, et al DiffDD: a surface defect detection framework with diffusion probabilistic model[J]. Advanced Engineering Informatics, 2024, 62: 102637
doi: 10.1016/j.aei.2024.102637
20 SONG Y, ERMON S. Generative modeling by estimating gradients of the data distribution [EB/OL]. [2025–09–08]. https://arxiv.org/abs/1907.05600.
21 SONG Y, SOHL-DICKSTEIN J, KINGMA D P, et al. Score-based generative modeling through stochastic differential equations [EB/OL]. [2025–09–08]. https://arxiv.org/abs/2011.13456.
22 LIM H, PARK S, KIM M, et al. MadSGM: multivariate anomaly detection with score-based generative models [C]// Proceedings of the 32nd ACM International Conference on Information and Knowledge Management. Birmingham United Kingdom: ACM, 2023: 1411–1420.
23 YIN H, JIAO G, WU Q, et al. LafitE: latent diffusion model with feature editing for unsupervised multi-class anomaly detection [EB/OL]. [2025–09–06]. https://arxiv.org/abs/2307.08059.
24 LI H, ZHANG Z, CHEN H, et al. A novel approach to industrial defect generation through blended latent diffusion model with online adaptation [EB/OL]. [2025–09–07]. https://arxiv.org/abs/2402.19330.
25 BERGMANN P, FAUSER M, SATTLEGGER D, et al. Uninformed students: student-teacher anomaly detection with discriminative latent embeddings [C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Seattle: IEEE, 2020: 4182–4191.
26 RUDOLPH M, WANDT B, ROSENHAHN B. Same same but DifferNet: semi-supervised defect detection with normalizing flows [C]// Proceedings of the IEEE Winter Conference on Applications of Computer Vision. Waikoloa: IEEE, 2021: 1906–1915.
27 ROTH K, PEMULA L, ZEPEDA J, et al. Towards total recall in industrial anomaly detection [C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. New Orleans: IEEE, 2022: 14298–14308.
28 DEFARD T, SETKOV A, LOESCH A, et al. PaDiM: a patch distribution modeling framework for anomaly detection and localization [C]// Pattern Recognition. ICPR International Workshops and Challenges. Cham: Springer, 2021: 475–489.
29 YU J, ZHENG Y, WANG X, et al. FastFlow: unsupervised anomaly detection and localization via 2D normalizing flows [EB/OL]. [2025–09–07]. https://arxiv.org/abs/2111.07677.
30 BERGMANN P, LÖWE S, FAUSER M, et al. Improving unsupervised defect segmentation by applying structural similarity to autoencoders [EB/OL]. [2025–09–08]. https://arxiv.org/abs/1807.02011.
31 COHEN N, HOSHEN Y. Sub-image anomaly detection with deep pyramid correspondences [EB/OL]. [2025–09–09]. https://arxiv.org/abs/2005.02357.
[1] 赵明华,吕雨萱,吕佳豪,陈逸飞,石程,胡静. 基于多尺度外观运动融合的视频异常检测[J]. 浙江大学学报(工学版), 2026, 60(8): 1730-1738.
[2] 边文远,火久元,常琛. 基于改进的插补扩散模型与LSTM的风电数据清洗方法[J]. 浙江大学学报(工学版), 2026, 60(5): 1016-1026.
[3] 吴杰,韩贝林,张舣航,邹超,辛莉峰,黄仕平. 微调稳定扩散模型的裂缝图像数据集扩充方法[J]. 浙江大学学报(工学版), 2026, 60(5): 926-934.
[4] 胡从裕,殷晨波,马伟,杨超,颜士宽. 基于改进CNN-LSTM的挖掘机作业对象识别[J]. 浙江大学学报(工学版), 2026, 60(3): 536-545.
[5] 朱志航,闫云凤,齐冬莲. 基于扩散模型多模态提示的电力人员行为图像生成[J]. 浙江大学学报(工学版), 2026, 60(1): 43-51.
[6] 王圣举,张赞. 基于加速扩散模型的缺失值插补算法[J]. 浙江大学学报(工学版), 2025, 59(7): 1471-1480.
[7] 肖剑,武亮亮,何昕泽,胡欣. 基于异常检测的图像特征匹配算法[J]. 浙江大学学报(工学版), 2025, 59(6): 1140-1147.
[8] 蒋沁诚,陶建峰,王洋洋,张宇磊,刘成良. 基于EWT-LSTM的工业机器人关节异常检测[J]. 浙江大学学报(工学版), 2025, 59(5): 982-994.
[9] 陈巧红,郭孟浩,方贤,孙麒. 基于跨模态级联扩散模型的图像描述方法[J]. 浙江大学学报(工学版), 2025, 59(4): 787-794.
[10] 王天飞,周文俊,项圣,贺宇航,彭博. 基于异常特征对抗学习的工业图像异常检测方法[J]. 浙江大学学报(工学版), 2025, 59(12): 2566-2575.
[11] 王冲,戴理朝,陈斌. 基于高斯过程回归的锈蚀RC梁抗剪承载力概率模型[J]. 浙江大学学报(工学版), 2025, 59(11): 2352-2360.
[12] 肖刚,卢大鹏,郑文博,程振波,张元鸣. 基于时空图注意力网络的多变量时序数据异常检测方法[J]. 浙江大学学报(工学版), 2025, 59(10): 2134-2143.
[13] 曹寅,秦俊平,马千里,孙昊,闫凯,王磊,任家琪. 文本生成图像研究综述[J]. 浙江大学学报(工学版), 2024, 58(2): 219-238.
[14] 兰欢,余建波. 基于深度学习三维成型的钢板表面缺陷检测[J]. 浙江大学学报(工学版), 2023, 57(3): 466-476.
[15] 孙菲,厉小润,赵辽英,余绍奇. 基于FrFT变换和全变分正则化的异常检测算法[J]. 浙江大学学报(工学版), 2022, 56(7): 1276-1284.