DFDA-AD: An Approach with Dual Feature Extraction Architecture and Dual Attention Mechanism for Image Anomaly Detection

Document Type : Computer Article

Author

Department of Information Technology, Payamenoor University (PNU), P.O.Box, 19395-3697 Tehran, I.R of Iran

Abstract

Detecting and locating unwanted structures or anomalies in the image is one of the important issues in machine vision and industrial inspection. The complexity and variability of data distribution and the lack of labeled data are among the challenges of detecting anomalies in images. In recent years, deep learning methods have provided promising results for solving anomaly detection problems in any data types, especially in images. In this paper, the DFDA-AD architecture, which is an unsupervised approach based on deep learning, is proposed for anomaly detection in industrial images. DFDA-AD consists of dual feature extraction from images by pre-trained DenseNet121 and ResNet50 networks. Two attention mechanisms are improved and developed in this paper, which provide more important feature maps for clustering by K-means algorithm. The evaluation of the model's performance was done on the MVTec AD data set, and the results of the evaluations for anomaly detection and localization were satisfactory compared to several other approaches that have been recently proposed.
 

Keywords

Main Subjects


[1] J. Liu, G. Xie, J. Wang, S. Li, C. Wang, F. Zheng, and Y. Jin. "Deep industrial image anomaly detection: A survey." Machine Intelligence Research 21, no. 1 (2024): 104-135.
[2] L. Bommes, M. Hoffmann, C. Buerhop‐Lutz, T. Pickel, J. Hauch, C. Brabec, A. Maier, and I.M. Peters. "Anomaly detection in IR images of PV modules using supervised contrastive learning." Progress in Photovoltaics: Research and Applications 30, no. 6 (2022): 597-614.
[3] W.H. Pinaya, P.D. Tudosiu, R. Gray, G. Rees, P. Nachev, S. Ourselin, and M.J. Cardoso. "Unsupervised brain imaging 3D anomaly detection and segmentation with transformers." Medical Image Analysis 79 (2022): 102475.
[4] P. Napoletano, F. Piccoli, and R. Schettini. "Semi-supervised anomaly detection for visual quality inspection." Expert Systems with Applications 183.  (2021): 115275.
[5] S. Rezaei, N. Masoud, and A. Khojandi. "GAAD: GAN-enabled Autoencoder for Real-Time Sensor Anomaly Detection and Recovery in Autonomous Driving." IEEE Sensors Journal 24. no. 7 (2024): 11734-11742.
[6] J. Miao, H. Tao, H. Xie, J. Sun, and J. Cao. "Reconstruction-based anomaly detection for multivariate time series using contrastive generative adversarial networks". Information Processing & Management 61. no. 1  (2024): 103569.
[7] G. Zhong, F. Liu, J. Jiang, B. Wang, and C.L.P. Chen. "Refining one-class representation: A unified transformer for unsupervised time-series anomaly detection." Information Sciences 656. (2024): 119914.
[8] J. Yang, Y. Shi, and Z. Qi. "Learning deep feature correspondence for unsupervised anomaly detection and segmentation." Pattern Recognition 132.  (2022): 108874.
[9] P. Bergmann, S. Löwe, M. Fauser, D. Sattlegger, and C. Steger. "Improving Unsupervised Defect Segmentation by Applying Structural Similarity to Autoencoders." In Proceedings of the 14th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications (VISIGRAPP 2019). p. 372-380 .2018.
[10] T. Schlegl, P. Seeböck, S.M. Waldstein, U. Schmidt-Erfurth, and G. Langs. "Unsupervised anomaly detection with generative adversarial networks to guide marker discovery." In International conference on information processing in medical imaging, pp. 146-157. Cham: Springer International Publishing, 2017.
[11] H. Chai, W. Su, S. Tang, Y. Ding, B. Fang, and Q. Liao. "Improving Anomaly Detection with a Self-Supervised Task Based on Generative Adversarial Network." In IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). p. 3563-3567. 2022.
[12] P. Schlachter, Y. Liao, and B. Yang. "One-class feature learning using intra-class splitting." In 2019 27th European Signal Processing Conference (EUSIPCO), pp. 1-5. IEEE, 2019.
[13] D. Abati, A. Porrello, S. Calderara, and R. Cucchiara. "Latent Space Autoregression for Novelty Detection." In 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR): IEEE Computer Society.p. 481-490. 2019.
[14] Z. Zhang, S. Chen, and L. Sun. "P-KDGAN: progressive knowledge distillation with GANs for one-class novelty detection." In Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, Yokohama, Yokohama, Japan.  p. 3237-3243. 2021.
[15] J. Deng, W. Dong, R. Socher, L.J. Li, L. Kai, and F.F. Li. "ImageNet: A large-scale hierarchical image database." In IEEE Conference on Computer Vision and Pattern Recognition, p. 248-255, 2009.
[16] N. Cohen and Y. Hoshen. "Sub-Image Anomaly Detection with Deep Pyramid Correspondences." CoRR abs/ (2020): 1-7.
[17] O. Rippel, P. Mertens, and D. Merhof. "Modeling the Distribution of Normal Data in Pre-Trained Deep Features for Anomaly Detection." In 25th International Conference on Pattern Recognition (ICPR): IEEE Computer Society, p. 6726-6733. 2021.
[18] K. Ishida, Y. Takena, Y. Nota, R. Mochizuki, I. Matsumura, and G. Ohashi. "SA-PatchCore: Anomaly Detection in Dataset With Co-Occurrence Relationships Using Self-Attention." IEEE Access 11.  (2023): 3232-3240.
[19] K. Roth, L. Pemula, J. Zepeda, B. Schölkopf, T. Brox, and P.V. Gehler. "Towards Total Recall in Industrial Anomaly Detection." CoRR abs/ (2021):1-7.
[20] S. Zagoruyko and N. Komodakis. "Wide Residual Networks."  ArXiv. vol. abs/1606.07146  2016.
[21] X. Jin and J. Han, "K-Means Clustering. " Encyclopedia of Machine Learning (2010): 563-564.
[22] G. Huang, Z. Liu, L.V.D. Maaten, and K.Q. Weinberger. "Densely Connected Convolutional Networks." In 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). p. 2261-2269. 2017.
[23] K. He, X. Zhang, S. Ren, and J. Sun. "Deep Residual Learning for Image Recognition." In 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). p. 770-778. 2016.
[24] S. Woo, J. Park, J.Y. Lee, and I.S. Kweon. "CBAM: Convolutional Block Attention Module." Cham: Springer International Publishing, in Computer Vision – ECCV. p. 3-19. 2018.
[25] P. Bergmann, M. Fauser, D. Sattlegger, and C. Steger. "Uninformed Students: Student-Teacher Anomaly Detection With Discriminative Latent Embeddings." 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (2019): 4182-4191.
[26] V. Zavrtanik, M. Kristan, and D. Skocaj. "Draem-a discriminatively trained reconstruction embedding for surface anomaly detection." In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 8330-8339. 2021.
[27]  P. Bergmann, M. Fauser, D. Sattlegger, and C. Steger. "MVTec AD — A Comprehensive Real-World Dataset for Unsupervised Anomaly Detection." In 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). p. 9584-9592, 2019.
[28] H.M. Zhang, Z. Wu, Z. Wang, Z. Chen, and Y. Jiang. "Prototypical Residual Networks for Anomaly Detection and Localization." ArXiv abs (2022): 1-7.
[29] M. Salehi, N. Sadjadi, S. Baselizadeh, M.H. Rohban, and H.R. Rabiee. "Multiresolution Knowledge Distillation for Anomaly Detection." In 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). p. 14897-14907. 2021.
[30]  D. Gudovskiy, S. Ishizaka, and K. Kozuka. "CFLOW-AD: Real-Time Unsupervised Anomaly Detection with Localization via Conditional Normalizing Flows." In 2022 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV): IEEE Computer Society. p. 1819-1828. 2022.
[31] N.C. Ristea, N. Madan, R.T. Ionescu, K. Nasrollahi, F.S. Khan, T.B. Moeslund, and M. Shah. "Self-supervised predictive convolutional attentive block for anomaly detection." In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13576-13586. 2022.
[32] S.L. Sungwook Lee, B.C. Song. "CFA: Coupled-hypersphere-based Feature Adaptation for Target-Oriented Anomaly Localization." IEEE Access 10.  (2022): 78446-78454.
[33] H. Deng and X. Li. "Anomaly Detection via Reverse Distillation from One-Class Embedding." In 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR): IEEE Computer Society. p. 9727-9736. 2022.
[34] K. Roth, L. Pemula, J. Zepeda, B. Schölkopf, T. Brox, and P. Gehler. "Towards Total Recall in Industrial Anomaly Detection." 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). p. 14298-14308. 2021.