Anomaly Detection via Progressive Reconstruction and Hierarchical Feature Fusion
Abstract
:1. Introduction
- We incorporate progressive reconstruction and feature fusion into DRAEM while enhancing its understanding of hierarchical features through technologies such as Swin transformer and UperNet. Our proposed method outperforms similar algorithms on both the MVTec-AD public dataset and GTanoIC chip dataset.
- We construct the largest real chip surface defect dataset to the best of our knowledge. It consists of 1750 real non-defective samples, 470 real defective samples, and pixel-level annotations.
2. Related Works
3. GTanoIC Dataset
4. Method
4.1. Reconstructive Sub-Network
4.2. Discriminative Sub-Network
5. Experiments
5.1. Datasets, Metrics, and Implementation Details
5.1.1. Datasets
5.1.2. Evaluation Metrics
5.1.3. Implementation Details
5.2. Comparison with Existing Methods
6. Ablation Study
7. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- An, J.; Cho, S. Variational autoencoder based anomaly detection using reconstruction probability. Spec. Lect. IE 2015, 2, 1–18. [Google Scholar]
- Bergmann, P.; Löwe, S.; Fauser, M.; Sattlegger, D.; Steger, C. Improving unsupervised defect segmentation by applying structural similarity to autoencoders. arXiv 2018, arXiv:1807.02011. [Google Scholar]
- Haselmann, M.; Gruber, D.P.; Tabatabai, P. Anomaly detection using deep learning based image completion. In Proceedings of the 2018 17th IEEE International Conference on Machine Learning and Applications (ICMLA), Orlando, FL, USA, 17–20 December 2018; IEEE: Piscataway, NJ, USA, 2018; pp. 1237–1242. [Google Scholar]
- Chow, J.K.; Su, Z.; Wu, J.; Tan, P.S.; Mao, X.; Wang, Y.H. Anomaly detection of defects on concrete structures with the convolutional autoencoder. Adv. Eng. Inform. 2020, 45, 101105. [Google Scholar] [CrossRef]
- Tang, T.W.; Hsu, H.; Huang, W.R.; Li, K.M. Industrial Anomaly Detection with Skip Autoencoder and Deep Feature Extractor. Sensors 2022, 22, 9327. [Google Scholar] [CrossRef] [PubMed]
- Oluwasanmi, A.; Aftab, M.U.; Baagyere, E.; Qin, Z.; Ahmad, M.; Mazzara, M. Attention Autoencoder for Generative Latent Representational Learning in Anomaly Detection. Sensors 2022, 22, 123. [Google Scholar] [CrossRef]
- Baur, C.; Wiestler, B.; Albarqouni, S.; Navab, N. Deep autoencoding models for unsupervised anomaly segmentation in brain MR images. In Brainlesion: Glioma, Multiple Sclerosis, Stroke and Traumatic Brain Injuries: 4th International Workshop, BrainLes 2018, Held in Conjunction with MICCAI 2018, Granada, Spain, 16 September 2018; Revised Selected Papers, Part I 4; Springer: Berlin/Heidelberg, Germany, 2019; pp. 161–169. [Google Scholar]
- Vasilev, A.; Golkov, V.; Meissner, M.; Lipp, I.; Sgarlata, E.; Tomassini, V.; Jones, D.K.; Cremers, D. q-Space novelty detection with variational autoencoders. In Computational Diffusion MRI: MICCAI Workshop, Shenzhen, China, October 2019; Springer: Berlin/Heidelberg, Germany, 2020; pp. 113–124. [Google Scholar]
- Niu, Z.; Yu, K.; Wu, X. LSTM-Based VAE-GAN for Time-Series Anomaly Detection. Sensors 2020, 20, 3738. [Google Scholar] [CrossRef]
- Schlegl, T.; Seeböck, P.; Waldstein, S.M.; Schmidt-Erfurth, U.; Langs, G. Unsupervised anomaly detection with generative adversarial networks to guide marker discovery. In Proceedings of the International Conference on Information Processing in Medical Imaging, Boone, NC, USA, 25–30 June 2017; Springer: Berlin/Heidelberg, Germany, 2017; pp. 146–157. [Google Scholar]
- Zhang, L.; Dai, Y.; Fan, F.; He, C. Anomaly Detection of GAN Industrial Image Based on Attention Feature Fusion. Sensors 2023, 23, 355. [Google Scholar] [CrossRef] [PubMed]
- Liu, T.; Li, B.; Zhao, Z.; Du, X.; Jiang, B.; Geng, L. Reconstruction from edge image combined with color and gradient difference for industrial surface anomaly detection. arXiv 2022, arXiv:2210.14485. [Google Scholar]
- You, Z.; Yang, K.; Luo, W.; Cui, L.; Zheng, Y.; Le, X. Adtr: Anomaly detection transformer with feature reconstruction. In Proceedings of the International Conference on Neural Information Processing, Virtual, 22–26 November 2022; Springer: Berlin/Heidelberg, Germany, 2022; pp. 298–310. [Google Scholar]
- Li, Z.; Li, N.; Jiang, K.; Ma, Z.; Wei, X.; Hong, X.; Gong, Y. Superpixel Masking and Inpainting for Self-Supervised Anomaly Detection. In Proceedings of the BMVC, Virtual, 7–10 September 2020. [Google Scholar]
- Zavrtanik, V.; Kristan, M.; Skočaj, D. Reconstruction by inpainting for visual anomaly detection. Pattern Recognit. 2021, 112, 107706. [Google Scholar] [CrossRef]
- Pirnay, J.; Chai, K. Inpainting transformer for anomaly detection. In Proceedings of the International Conference on Image Analysis and Processing, Bordeaux, France, 16–19 October 2022; Springer: Berlin/Heidelberg, Germany, 2022; pp. 394–406. [Google Scholar]
- Zavrtanik, V.; Kristan, M.; Skočaj, D. Draem—A discriminatively trained reconstruction embedding for surface anomaly detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Montreal, BC, Canada, 11–17 October 2021; pp. 8330–8339. [Google Scholar]
- Li, C.L.; Sohn, K.; Yoon, J.; Pfister, T. Cutpaste: Self-supervised learning for anomaly detection and localization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Nashville, TN, USA, 20–25 June 2021; pp. 9664–9674. [Google Scholar]
- Ronneberger, O.; Fischer, P.; Brox, T. U-net: Convolutional networks for biomedical image segmentation. In Medical Image Computing and Computer-Assisted Intervention–MICCAI 2015: 18th International Conference, Munich, Germany, 5–9 October 2015, Proceedings, Part III 18; Springer: Berlin/Heidelberg, Germany, 2015; pp. 234–241. [Google Scholar]
- Liu, Z.; Lin, Y.; Cao, Y.; Hu, H.; Wei, Y.; Zhang, Z.; Lin, S.; Guo, B. Swin transformer: Hierarchical vision transformer using shifted windows. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Montreal, BC, Canada, 11–17 October 2021; pp. 10012–10022. [Google Scholar]
- Xiao, T.; Liu, Y.; Zhou, B.; Jiang, Y.; Sun, J. Unified perceptual parsing for scene understanding. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 418–434. [Google Scholar]
- Bergmann, P.; Fauser, M.; Sattlegger, D.; Steger, C. MVTec AD—A comprehensive real-world dataset for unsupervised anomaly detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 15–20 June 2019; pp. 9592–9600. [Google Scholar]
- Huang, H.; Lin, L.; Tong, R.; Hu, H.; Zhang, Q.; Iwamoto, Y.; Han, X.; Chen, Y.W.; Wu, J. Unet 3+: A full-scale connected unet for medical image segmentation. In Proceedings of the ICASSP 2020-2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Barcelona, Spain, 4–8 May 2020; IEEE: Piscataway, NJ, USA, 2020; pp. 1055–1059. [Google Scholar]
- Lin, T.Y.; Goyal, P.; Girshick, R.; He, K.; Dollár, P. Focal loss for dense object detection. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017; pp. 2980–2988. [Google Scholar]
- Gong, D.; Liu, L.; Le, V.; Saha, B.; Mansour, M.R.; Venkatesh, S.; Hengel, A.v.d. Memorizing normality to detect anomaly: Memory-augmented deep autoencoder for unsupervised anomaly detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Seoul, Republic of Korea, 27 October–2 November 2019; pp. 1705–1714. [Google Scholar]
- Ho, J.; Jain, A.; Abbeel, P. Denoising diffusion probabilistic models. Adv. Neural Inf. Process. Syst. 2020, 33, 6840–6851. [Google Scholar]
Dataset | Type | Pollution | Crack | Broken | No Die | Foreign Substance | Non- Defective | Resolution |
---|---|---|---|---|---|---|---|---|
instance-level | 31 | 3 | 19 | / | 7 | 250 | 350*400 | |
image-level | 60 defective images in total | |||||||
instance-level | 40 | / | 9 | 7 | 4 | 250 | 340*400 | |
image-level | 60 defective images in total | |||||||
instance-level | 37 | 2 | 16 | / | 5 | 250 | 260*285 | |
image-level | 60 defective images in total | |||||||
instance-level | 52 | / | 12 | / | 6 | 250 | 250*200 | |
image-level | 70 defective images in total | |||||||
instance-level | 63 | / | / | 6 | / | 250 | 260*270 | |
image-level | 69 defective images in total |
Dataset | Type | Pollution | No Wires | No-Die | Wire Residue | Non- Defective | Resolution |
---|---|---|---|---|---|---|---|
instance-level | 75 | 1 | 5 | 6 | 250 | 340*340 | |
image-level | 87 defective images in total | ||||||
instance-level | 52 | 1 | / | 11 | 250 | 330*330 | |
image-level | 64 defective images in total |
Category | RIAD | CutPaste | InTra | EdgRec | DRAEM | OCRGAN | Ours | |
---|---|---|---|---|---|---|---|---|
Texture | Carpet | 84.2 | 93.1 | 98.8 | 97.4 | 97.0 | 99.4 | 99.0 |
Grid | 99.6 | 99.9 | 100.0 | 99.7 | 99.9 | 99.6 | 99.9 | |
Leather | 100.0 | 100.0 | 100.0 | 100.0 | 100.0 | 97.1 | 100.0 | |
Tile | 98.7 | 93.4 | 98.2 | 100.0 | 99.6 | 95.5 | 100.0 | |
Wood | 93.0 | 98.6 | 97.5 | 94.0 | 99.1 | 95.7 | 99.6 | |
Object | Bottle | 99.9 | 98.3 | 100.0 | 100.0 | 99.2 | 99.6 | 99.8 |
Capsule | 88.4 | 96.2 | 86.5 | 95.5 | 98.5 | 96.2 | 98.0 | |
Pill | 83.8 | 92.4 | 90.2 | 99.0 | 98.9 | 98.3 | 98.2 | |
Transistor | 90.9 | 95.5 | 95.8 | 99.8 | 93.1 | 98.3 | 97.4 | |
Zipper | 98.1 | 99.4 | 99.4 | 98.3 | 100.0 | 99.0 | 100.0 | |
Cable | 81.9 | 80.6 | 70.0 | 97.9 | 91.8 | 99.1 | 96.9 | |
Hazelnut | 83.3 | 97.3 | 95.7 | 98.4 | 100.0 | 98.5 | 99.9 | |
Matal nut | 88.5 | 99.3 | 96.9 | 97.3 | 98.7 | 99.5 | 99.6 | |
Screw | 84.5 | 86.3 | 95.7 | 89.9 | 93.9 | 100.0 | 98.7 | |
Toothbrush | 100.0 | 98.3 | 100.0 | 100.0 | 100.0 | 98.7 | 100.0 | |
Average | 95.1 | 97.0 | 98.9 | 98.2 | 99.1 | 97.5 | 99.7 | |
Average | 89.9 | 94.4 | 93.0 | 97.6 | 97.4 | 98.7 | 98.9 | |
Average | 91.7 | 95.2 | 95.0 | 97.8 | 98.0 | 98.3 | 99.1 |
Category | RIAD | CutPaste | InTra | EdgRec | DRAEM | OCRGAN | Ours | |
---|---|---|---|---|---|---|---|---|
Texture | Carpet | 96.3 | 98.3 | 99.2 | 99.4 | 95.5 | - | 94.0 |
Grid | 98.8 | 97.5 | 98.8 | 99.2 | 99.7 | - | 99.6 | |
Leather | 99.4 | 99.5 | 99.5 | 99.7 | 98.6 | - | 99.8 | |
Tile | 89.1 | 90.5 | 94.4 | 98.6 | 99.2 | - | 98.8 | |
Wood | 85.8 | 95.5 | 88.7 | 91.4 | 96.4 | - | 95.5 | |
Object | Bottle | 98.4 | 97.6 | 97.1 | 98.3 | 99.1 | - | 99.0 |
Capsule | 92.8 | 97.4 | 97.7 | 95.2 | 94.3 | - | 97.9 | |
Pill | 95.7 | 95.7 | 98.3 | 98.7 | 97.6 | - | 98.5 | |
Transistor | 87.7 | 93.0 | 96.1 | 94.3 | 90.9 | - | 94.3 | |
Zipper | 97.8 | 99.3 | 99.2 | 98.7 | 98.8 | - | 98.8 | |
Cable | 84.2 | 90.0 | 91.0 | 97.7 | 94.7 | - | 96.5 | |
Hazelnut | 96.1 | 97.3 | 98.3 | 99.4 | 99.7 | - | 99.5 | |
Matal nut | 92.5 | 93.1 | 93.3 | 98.0 | 99.5 | - | 98.4 | |
Screw | 98.8 | 96.7 | 99.5 | 97.7 | 97.6 | - | 99.3 | |
Toothbrush | 98.9 | 98.1 | 98.9 | 99.2 | 98.1 | - | 99.5 | |
Average | 93.9 | 96.3 | 96.1 | 97.7 | 97.6 | - | 97.5 | |
Average | 94.3 | 95.8 | 96.9 | 97.7 | 97.0 | - | 98.2 | |
Average | 94.2 | 96.0 | 96.6 | 97.7 | 97.3 | - | 98.0 |
Category | OCRGAN | DRAEM | RIAD | EdgRec | Ours |
---|---|---|---|---|---|
77.0 | 99.6 | 95.4 | 100.0 | 99.6 | |
60.6 | 100.0 | 98.8 | 100.0 | 99.7 | |
91.3 | 97.8 | 55.5 | 99.9 | 99.3 | |
76.1 | 94.3 | 96.1 | 99.4 | 98.1 | |
60.1 | 76.3 | 80.1 | 85.8 | 92.6 | |
98.7 | 94.6 | 95.7 | 89.3 | 95.8 | |
43.1 | 38.4 | 80.3 | 91.5 | 97.2 | |
Average | 69.7 | 85.9 | 86.0 | 95.1 | 97.5 |
Category | OCRGAN | DRAEM | RIAD | EdgRec | Ours |
---|---|---|---|---|---|
- | 93.6 | 88.7 | 96.5 | 99.0 | |
- | 99.4 | 97.6 | 98.9 | 99.6 | |
- | 93.6 | 79.6 | 95.1 | 98.8 | |
- | 93.6 | 91.4 | 96.9 | 97.7 | |
- | 93.9 | 96.6 | 94.8 | 98.0 | |
- | 85.2 | 91.0 | 87.8 | 96.4 | |
- | 86.7 | 93.1 | 96.4 | 98.7 | |
Average | - | 92.3 | 91.1 | 95.2 | 98.3 |
Dataset | Type | n = 1 | n = 2 | n = 3 | n = 4 | n = 5 |
---|---|---|---|---|---|---|
MVTec AD | Image-level | 98.9 | 99.1 | 99.1 | 99.0 | 99.0 |
Pixel-level | 97.6 | 98.0 | 97.7 | 97.5 | 97.2 | |
GTanoIC | Image-level | 97.5 | 97.5 | 97.5 | 97.5 | 97.5 |
Pixel-level | 98.1 | 98.3 | 98.3 | 98.2 | 98.0 |
Dataset | Swin. and | Hierarchical | Image-Level | Pixel-Level |
---|---|---|---|---|
UperNet | Feature Fusion | AUROC | AUROC | |
- | - | 98.0 | 97.3 | |
MVTec AD | ✔ | - | 98.2 | 97.4 |
✔ | ✔ | 99.1 | 98.0 | |
- | - | 94.8 | 97.3 | |
GTanoIC | ✔ | - | 96.4 | 98.0 |
✔ | ✔ | 97.5 | 98.3 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Liu, F.; Zhu, X.; Feng, P.; Zeng, L. Anomaly Detection via Progressive Reconstruction and Hierarchical Feature Fusion. Sensors 2023, 23, 8750. https://doi.org/10.3390/s23218750
Liu F, Zhu X, Feng P, Zeng L. Anomaly Detection via Progressive Reconstruction and Hierarchical Feature Fusion. Sensors. 2023; 23(21):8750. https://doi.org/10.3390/s23218750
Chicago/Turabian StyleLiu, Fei, Xiaoming Zhu, Pingfa Feng, and Long Zeng. 2023. "Anomaly Detection via Progressive Reconstruction and Hierarchical Feature Fusion" Sensors 23, no. 21: 8750. https://doi.org/10.3390/s23218750
APA StyleLiu, F., Zhu, X., Feng, P., & Zeng, L. (2023). Anomaly Detection via Progressive Reconstruction and Hierarchical Feature Fusion. Sensors, 23(21), 8750. https://doi.org/10.3390/s23218750