Reconstruction-based detection algorithms are extensively employed for automatic defect detection in industrial products. Nevertheless, they frequently struggle to effectively eliminate defect features from reconstructed images, resulting in diminished detection accuracy. This paper proposes an industrial product defect detection algorithm based on a diffusion-variational autoencoder to address this issue. The algorithm treats defects as noise and reconstructs typical images through the reverse denoising process of a diffusion model. During training, a pre-trained vector quantized variational autoencoder (VQ-VAE) is utilized to extract normal features and add noise to industrial product images. The diffusion model is then employed to eliminate defect features while preserving normal features during denoising, resulting in reconstructed normal images. Defects can be determined and localized by comparing the reconstructed images with original image. In the testing phase, input images are treated as noise-added for defect detection. Experimental results demonstrate a significant improvement in detection accuracy compared to other algorithms.
VAN DEN OORDA, VINYALSO, KAVUKCUOGLUK. Neural discrete representation learning[C]//Proceedings of the 31st International Conference on Neural Information Processing Systems. New York: ACM, 2017: 6309–6318. DOI: 10.5555/3295222.3295378 .
[8]
RAZAVIA, VAN DEN OORDA, VINYALSO. Generating diverse high-fidelity images with VQ-VAE-2[EB/OL]. 2019: arXiv: 1906.00446.
[9]
HO J, JAINA, ABBEELP. Denoising diffusion probabilistic models[J]. Advances in Neural Information Processing Systems, 2020, 33: 6840-6851. DOI: 10.48550/arXiv.2006.11239 .
[10]
HUM H, WANGY J, CHAMT J, et al. Global context with discrete diffusion in vector quantised modelling for image generation[C]//2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). New York: IEEE Press, 2022: 11492-11501. DOI: 10.1109/CVPR52688.2022.01121 .
[11]
RONNEBERGERO, FISCHERP, BROXT. U-net: Convolutional networks for biomedical image segmentation[C]//International Conference on Medical Image Computing and Computer-Assisted Intervention. Cham: Springer, 2015: 234-241.10.1007/978-3-319-24574-4_28. DOI: 10.1007/978-3-319-24574-4_28 .
[12]
DENGJ, DONGW, SOCHERR, et al. ImageNet: A large-scale hierarchical image database[C]//2009 IEEE Conference on Computer Vision and Pattern Recognition. New York: IEEE Press, 2009: 248-255. DOI: 10.1109/CVPR.2009.5206848 .
BERGMANNP, FAUSERM, SATTLEGGERD, et al. MVTec AD—A comprehensive real-world dataset for unsupervised anomaly detection[C]//2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). New York: IEEE Press, 2019: 9584-9592. DOI: 10.1109/CVPR.2019.00982 .
[17]
MISHRAP, VERKR, FORNASIERD, et al. VT-ADL: A vision transformer network for image anomaly detection and localization[C]//2021 IEEE 30th International Symposium on Industrial Electronics (ISIE). New York: IEEE Press, 2021: 1-6. DOI: 10.1109/ISIE45552.2021.9576231 .
[18]
BERGMANNP, FAUSERM, SATTLEGGERD, et al. Uninformed students: Student-teacher anomaly detection with discriminative latent embeddings[C]//2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). New York: IEEE Press, 2020: 4182-4191. DOI: 10.1109/CVPR42600.2020.00424 .
[19]
DEFARDT, SETKOVA, LOESCHA, et al. PaDiM: A patch distribution modeling framework for anomaly detection and localization[C]//International Conference on Pattern Recognition. Cham: Springer, 2021: 475-489.10.1007/978-3-030-68799-1_35. DOI: 10.1007/978-3-030-68799-1_35 .
[20]
LIC L, SOHNK, YOONJ, et al. CutPaste: Self-supervised learning for anomaly detection and localization[C]//2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). New York: IEEE Press, 2021: 9659-9669. DOI: 10.1109/CVPR46437.2021.00954 .
[21]
YIJ H, YOONS. Patch SVDD: Patch-level SVDD for anomaly detection and segmentation[C]//Asian Conference on Computer Vision. Cham: Springer, 2021: 375-390.10.1007/978-3-030-69544-6_23. DOI: 10.1007/978-3-030-69544-6_23 .
[22]
COHENN, HOSHENY. Sub-image anomaly detection with deep pyramid correspondences[EB/OL]. 2020: arXiv: 2005.02357.
[23]
LIANGY F, ZHANGJ N, ZHAOS W, et al. Omni-frequency channel-selection representations for unsupervised anomaly detection[J]. IEEE Transactions on Image Processing: A Publication of the IEEE Signal Processing Society, 2023, 32: 4327-4340. DOI: 10.1109/TIP.2023.3293772 .