journal article·2020-12-03Open access

Image Anomaly Detection Using Normal Data Only by Latent Space Resampling

Lu Wang, Dongkai Zhang, Jiahao Guo, Yuexing Han

Applied Sciences· Volume 10· Issue 23

Abstract

Detecting image anomalies automatically in industrial scenarios can improve economic efficiency, but the scarcity of anomalous samples increases the challenge of the task. Recently, autoencoder has been widely used in image anomaly detection without using anomalous images during training. However, it is hard to determine the proper dimensionality of the latent space, and it often leads to unwanted reconstructions of the anomalous parts. To solve this problem, we propose a novel method based on the autoencoder. In this method, the latent space of the autoencoder is estimated using a discrete probability model. With the estimated probability model, the anomalous components in the latent space can be well excluded and undesirable reconstruction of the anomalous parts can be avoided. Specifically, we first adopt VQ-VAE as the reconstruction model to get a discrete latent space of normal samples. Then, PixelSail, a deep autoregressive model, is used to estimate the probability model of the discrete latent space. In the detection stage, the autoregressive model will determine the parts that deviate from the normal distribution in the input latent space. Then, the deviation code will be resampled from the normal distribution and decoded to yield a restored image, which is closest to the anomaly input. The anomaly is then detected by comparing the difference between the restored image and the anomaly image. Our proposed method is evaluated on the high-resolution industrial inspection image datasets MVTec AD which consist of 15 categories. The results show that the AUROC of the model improves by 15% over autoencoder and also yields competitive performance compared with state-of-the-art methods.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Anomaly Detection Techniques and Applications · Bacillus and Francisella bacterial research · Fault Detection and Control Systems

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

School of Computer Engineering and Science, Shanghai University, Shanghai 200444, China

Shanghai Institute for Advanced Communication and Data Science, Shanghai University, 99 Shangda Road, Shanghai 200444, China

Funding

Natural Science Foundation of Shanghai · National Key Research and Development Program of China

References (42)

Show source-provided references
1. Image Anomalies: A Review and Synthesis of Detection Methods10.1007/s10851-019-00885-0 ↗
2. Chalapathy, R., and Chawla, S. (2019). Deep learning for anomaly detection: A survey. arXiv.10.1145/3394486.3406704 ↗
3. Pang, G., Shen, C., Cao, L., and Hengel, A.v.d. (2020). Deep Learning for Anomaly Detection: A Review. arXiv.
4. Novelty detection: A review—Part 1: Statistical approaches10.1016/j.sigpro.2003.07.018 ↗
5. Bennamoun, M., and Bodnarova, A. (1998, January 14). Automatic visual inspection and flaw detection in textile materials: Past, present and future. Proceedings of the IEEE International Conference on Systems, Man, and Cybernetics (SMC), San Diego, CA, USA.
6. Voorhees, H. (1987). Finding Texture Boundaries in Images, Computer Science and Artificial Intelligence Lab (CSAIL). Technical Report.
7. Amet, A.L., Ertuzun, A., and Erçil, A. (1998, January 5–7). Texture defect detection using subband domain co-occurrence matrices. Proceedings of the IEEE Southwest Symposium on Image Analysis and Interpretation (SSIAI), Tucson, AZ, USA.
8. Zimmerer, D., Kohl, S.A., Petersen, J., Isensee, F., and Maier-Hein, K.H. (2018). Context-encoding variational autoencoder for unsupervised anomaly detection. arXiv.
9. Bergmann, P., Löwe, S., Fauser, M., Sattlegger, D., and Steger, C. (2019, January 25–27). Improving Unsupervised Defect Segmentation by Applying Structural Similarity to Autoencoders. Proceedings of the International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications (VISIGRAPP), SCITEPRESS, Prague, Czech.10.5220/0007364500002108 ↗
10. Baur, C., Wiestler, B., Albarqouni, S., and Navab, N. (2018). Deep Autoencoding Models for Unsupervised Anomaly Segmentation in Brain MR Images, Springer. International MICCAI Brainlesion Workshop.10.1007/978-3-030-11723-8_16 ↗
11. Variational autoencoder based anomaly detection using reconstruction probability
12. Goodfellow, I., Bengio, Y., and Courville, A. (2016). Deep Learning, MIT Press.
13. Van Den Oord, A., Vinyals, O., and Kavukcuoglu, K. (2017, January 4–9). Neural discrete representation learning. Proceedings of the Neural Information Processing Systems (NIPS), Long Beach, CA, USA.
14. Chen, X., Mishra, N., Rohaninejad, M., and Abbeel, P. (2018, January 10–15). Pixelsnail: An improved autoregressive generative model. Proceedings of the International Conference on Machine Learning (ICML), Stockholmsmässan, Stockholm, Sweden.
15. Bergmann, P., Fauser, M., Sattlegger, D., and Steger, C. (2019, January 16–20). MVTec AD—A Comprehensive Real-World Dataset for Unsupervised Anomaly Detection. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA.10.1109/CVPR.2019.00982 ↗
16. PCA-Based algorithm for unsupervised bridge crack detection10.1016/j.advengsoft.2006.06.002 ↗
17. Automatic target defect identification for TFT-LCD array process inspection using kernel FCM-based fuzzy SVDD ensemble10.1016/j.eswa.2007.12.015 ↗
18. Tout, K., Cogranne, R., and Retraint, F. (September, January 29). Fully automatic detection of anomalies on wheels surface using an adaptive accurate model and hypothesis testing theory. Proceedings of the European Signal Processing Conference (EUSIPCO), Budapest, Hungary.
19. Mao, T., Ren, L., Yuan, F., Li, C., Zhang, L., Zhang, M., and Chen, Y. (2019, January 9–11). Defect Recognition Method Based on HOG and SVM for Drone Inspection Images of Power Transmission Line. Proceedings of the International Conference on High Performance Big Data and Intelligent Systems (HPBD&IS), Shenzhen, China.10.1109/HPBDIS.2019.8735466 ↗
20. Steel Surface Defect Detection Using a New Haar–Weibull-Variance Model in Unsupervised Manner10.1109/TIM.2017.2712838 ↗
21. Napoletano, P., Piccoli, F., and Schettini, R. (2018). Anomaly detection in nanofibrous materials by cnn-based self-similarity. Sensors, 18.10.3390/s18010209 ↗
22. Ruff, L., Görnitz, N., Deecke, L., Siddiqui, S., Vandermeulen, R.A., Binder, A., Müller, E., and Kloft, M. (2018, January 10–15). Deep One-Class Classification. Proceedings of the International Conference on Machine Learning (ICML), Stockholmsmässan, Stockholm, Sweden.
23. Random-Selection-Based Anomaly Detector for Hyperspectral Imagery10.1109/TGRS.2010.2081677 ↗
24. TEXEMS: Texture Exemplars for Defect Detection on Random Textured Surfaces10.1109/TPAMI.2007.1038 ↗
25. Ozdemir, S., and Ercil, A. (1996, January 18–21). Markov random fields and Karhunen-Loeve transforms for defect inspection of textile products. Proceedings of the IEEE Conference on Emerging Technologies and Factory Automation, (ETFA), Kauai, HI, USA.
26. Real-time texture error detection on textured surfaces with compressed sensing10.1134/S1054661816010053 ↗
27. Decoding by linear programming10.1109/TIT.2005.858979 ↗
28. Richter, J., and Streitferdt, D. (2018, January 1–3). Deep Learning Based Fault Correction in 3D Measurements of Printed Circuit Boards. Proceedings of the IEEE Annual Information Technology, Electronics and Mobile Communication Conference (IEMCON), UBC, Vancouver, BC, Canada.10.1109/IEMCON.2018.8614932 ↗
29. Van den Oord, A., Kalchbrenner, N., Espeholt, L., Vinyals, O., and Graves, A. (2016, January 5–10). Conditional image generation with pixelcnn decoders. Proceedings of the Neural Information Processing Systems (NIPS), Barcelona, Spain.
30. Shafaei, A., Schmidt, M., and Little, J.J. (2018). A less biased evaluation of out-of-distribution sample detectors. arXiv.
31. From Sparse Solutions of Systems of Equations to Sparse Modeling of Signals and Images10.1137/060657704 ↗
32. Boracchi, G., Carrera, D., and Wohlberg, B. (2014, January 9–12). Novelty detection in images by sparse representations. Proceedings of the IEEE Symposium on Intelligent Embedded Systems (IES), Orlando, FL, USA.10.1109/INTELES.2014.7008985 ↗
33. Exploring uncertainty measures in deep networks for Multiple sclerosis lesion detection and segmentation10.1016/j.media.2019.101557 ↗
34. Venkataramanan, S., Peng, K.C., Singh, R.V., and Mahalanobis, A. (2019). Attention Guided Anomaly Detection and Localization in Images. arXiv.10.1007/978-3-030-58520-4_29 ↗
35. Liu, W., Li, R., Zheng, M., Karanam, S., Wu, Z., Bhanu, B., Radke, R.J., and Camps, O. (2020, January 13–19). Towards Visually Explaining Variational Autoencoders. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA.10.1109/CVPR42600.2020.00867 ↗
36. Grad-CAM: Visual Explanations from Deep Networks via Gradient-Based Localization10.1007/s11263-019-01228-7 ↗
37. Haselmann, M., Gruber, D.P., and Tabatabai, P. (2018, January 17–20). Anomaly Detection Using Deep Learning Based Image Completion. Proceedings of the 17th IEEE International Conference on Machine Learning and Applications (ICMLA), Orlando, FL, USA.10.1109/ICMLA.2018.00201 ↗
38. Dehaene, D., Frigo, O., Combrexelle, S., and Eline, P. (2020). Iterative energy-based projection on a normal data manifold for anomaly localization. arXiv.
39. Schlegl, T., Seeböck, P., Waldstein, S.M., Schmidt-Erfurth, U., and Langs, G. (2017). Unsupervised Anomaly Detection with Generative Adversarial Networks to Guide Marker Discovery. Lecture Notes in Computer Science, Springer.10.1007/978-3-319-59050-9_12 ↗
40. f-AnoGAN: Fast unsupervised anomaly detection with generative adversarial networks10.1016/j.media.2019.01.010 ↗
41. Akcay, S., Atapour-Abarghouei, A., and Breckon, T.P. (2019). GANomaly: Semi-supervised Anomaly Detection via Adversarial Training. Computer Vision–ACCV 2018, Springer.10.1007/978-3-030-20893-6_39 ↗
42. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł., and Polosukhin, I. (2017, January 4–9). Attention is all you need. Proceedings of the Neural Information Processing Systems (NIPS), Long Beach, CA, USA.