Please wait a minute...
Journal of ZheJiang University (Engineering Science)  2026, Vol. 60 Issue (10): 2186-2195    DOI: 10.3785/j.issn.1008-973X.2026.10.011
    
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
Download: HTML     PDF(4463KB) HTML
Export: BibTeX | EndNote (RIS)      

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 wordsanomaly detection      anomaly synthesis      feature selection      diffusion model      defect localization     
Received: 18 October 2025      Published: 28 July 2026
CLC:  TP 391  
Fund:  浙江省重点研发计划资助项目(2024C01108);杭州市重大科技创新项目(2024SZD1A09;宁波市重点技术研发项目(2024Z114).
Corresponding Authors: Dongping ZHANG     E-mail: byzwsl@163.com;06a0303103@cjlu.cn
Cite this article:

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.

URL:

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


基于扩散合成与特征挖掘的工业图像异常检测

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


关键词: 异常检测,  异常合成,  特征选择,  扩散模型,  缺陷定位 
Fig.1 Overall framework of anomaly detection method
Fig.2 Framework diagram of class-aware selective diffusion-based anomaly synthesis module
Fig.3 Structure of contrast-driven feature selection module
Fig.4 Structure of multi-dimensional perception attention module
Fig.5 Structure of residual refinement selection module
方法Image AUROC/%Pixel AUROC/%PRO/%
SIA98.8098.3776.99
NSA99.4998.5093.31
Cutpaste99.5098.4692.73
本研究算法99.7099.0593.36
Tab.1 Performance comparison of different anomaly synthesis methods on MVTec AD dataset
Fig.6 Visual comparison of different anomaly synthesis methods
方法Image AUROC/%Pixel AUROC/%
MDPS98.897.3
AnoDDPM75.773.6
AutoDDPM86.889.6
RAN93.196.7
本研究算法99.799.0
Tab.2 Performance comparison between diffusion-based anomaly detection methods and proposed method
方法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
Tab.3 Overall performance comparison of different anomaly detection methods on MVTec AD dataset
Fig.7 Visualization results of anomaly detection and localization by proposed method on MVTec AD dataset
方法Image AUROC/%Pixel AUROC/%PRO/%
SIA97.1698.5189.29
NSA98.2698.4091.81
Cutpaste98.4397.6793.09
本研究算法98.4498.7689.61
Tab.4 Performance comparison of different anomaly synthesis methods on MPDD dataset
方法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
Tab.5 Overall performance comparison of different anomaly detection methods on MPDD dataset
异常强度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
Tab.6 Ablation study results under different anomaly intensity settings
Fig.8 Visual comparison of samples generated with different anomaly intensities
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
Tab.7 Performance comparison of anomaly detection under different backbone networks and feature dimension settings
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
Tab.8 Anomaly detection performance under different module configurations
[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] Minghua ZHAO,Yuxuan LYU,Jiahao LYU,Yifei CHEN,Cheng SHI,Jing HU. Video anomaly detection based on multi-scale appearance and motion fusion[J]. Journal of ZheJiang University (Engineering Science), 2026, 60(8): 1730-1738.
[2] Wenyuan BIAN,Jiuyuan HUO,Chen CHANG. Wind power data cleaning method based on improved imputation diffusion model and LSTM[J]. Journal of ZheJiang University (Engineering Science), 2026, 60(5): 1016-1026.
[3] Jie WU,Beilin HAN,Yihang ZHANG,Chao ZOU,Lifeng XIN,Shiping HUANG. Method for augmenting crack image datasets via fine-tuning of stable diffusion models[J]. Journal of ZheJiang University (Engineering Science), 2026, 60(5): 926-934.
[4] Congyu HU,Chenbo YIN,Wei MA,Chao YANG,Shikuan YAN. Object recognition of excavator operation based on improved CNN-LSTM[J]. Journal of ZheJiang University (Engineering Science), 2026, 60(3): 536-545.
[5] Zhihang ZHU,Yunfeng YAN,Donglian QI. Image generation for power personnel behaviors based on diffusion model with multimodal prompts[J]. Journal of ZheJiang University (Engineering Science), 2026, 60(1): 43-51.
[6] Shengju WANG,Zan ZHANG. Missing value imputation algorithm based on accelerated diffusion model[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(7): 1471-1480.
[7] Jian XIAO,Liangliang WU,Xinze HE,Xin HU. Image feature matching algorithm based on anomaly detection[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(6): 1140-1147.
[8] Qincheng JIANG,Jianfeng TAO,Yangyang WANG,Yulei ZHANG,Chengliang LIU. EWT-LSTM based industrial robot joint anomaly detection[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(5): 982-994.
[9] Qiaohong CHEN,Menghao GUO,Xian FANG,Qi SUN. Image captioning based on cross-modal cascaded diffusion model[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(4): 787-794.
[10] Bote WANG,Qing WANG,Qiang LIU,Bo JIN. Self-supervised anomaly recognition method for wind turbine blade based on multi-channel vibration principal features[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(3): 653-660.
[11] Tianfei WANG,Wenjun ZHOU,Sheng XIANG,Yuhang HE,Bo PENG. Industrial image anomaly detection method based on adversarial learning of abnormal features[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(12): 2566-2575.
[12] Chong WANG,Lizhao DAI,Bin CHEN. Probabilistic model for shear capacity of corroded RC beams based on Gaussian process regression[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(11): 2352-2360.
[13] Gang XIAO,Dapeng LU,Wenbo ZHENG,Zhenbo CHENG,Yuanming ZHANG. Multivariable time series data anomaly detection method based on spatiotemporal graph attention network[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(10): 2134-2143.
[14] Yin CAO,Junping QIN,Qianli MA,Hao SUN,Kai YAN,Lei WANG,Jiaqi REN. Survey of text-to-image synthesis[J]. Journal of ZheJiang University (Engineering Science), 2024, 58(2): 219-238.
[15] Fei SUN,Xiao-run LI,Liao-ying ZHAO,Shao-qi YU. Anomaly detection algorithm based on FrFT transform and total variation regularization[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(7): 1276-1284.