Self-Supervised Out-of-Distribution Detection and Localization with Natural Synthetic Anomalies (NSA)

We introduce a new self-supervised task, NSA, for training an end-to-end model for anomaly detection and localization using only normal data. NSA uses Poisson image editing to seamlessly blend scaled patches of various sizes from separate images. This creates a wide range of synthetic anomalies which are more similar to natural sub-image irregularities than previous data-augmentation strategies for self-supervised anomaly detection. We evaluate the proposed method using natural and medical images. Our experiments with the MVTec AD dataset show that a model trained to localize NSA anomalies generalizes well to detecting real-world a priori unknown types of manufacturing defects. Our method achieves an overall detection AUROC of 97.2 outperforming all previous methods that learn from scratch without pre-training datasets.

[1]  Yedid Hoshen,et al.  Transformer-Based Anomaly Segmentation , 2020 .

[2]  A. Mack Inattentional Blindness , 2003 .

[3]  Alexander Binder,et al.  Deep One-Class Classification , 2018, ICML.

[4]  Giacomo Tarroni,et al.  Anomaly Detection Through Latent Space Restoration Using Vector Quantized Variational Autoencoders , 2020, 2021 IEEE 18th International Symposium on Biomedical Imaging (ISBI).

[5]  Romaric Audigier,et al.  PaDiM: a Patch Distribution Modeling Framework for Anomaly Detection and Localization , 2020, ICPR Workshops.

[6]  Ran El-Yaniv,et al.  Deep Anomaly Detection Using Geometric Transformations , 2018, NeurIPS.

[7]  Lu Wang,et al.  Image Anomaly Detection Using Normal Data Only by Latent Space Resampling , 2020, Applied Sciences.

[8]  Alexei A. Efros,et al.  Unsupervised Visual Representation Learning by Context Prediction , 2015, 2015 IEEE International Conference on Computer Vision (ICCV).

[9]  Patrick Pérez,et al.  Poisson image editing , 2003, ACM Trans. Graph..

[10]  Georg Langs,et al.  f‐AnoGAN: Fast unsupervised anomaly detection with generative adversarial networks , 2019, Medical Image Anal..

[11]  Jian Sun,et al.  Deep Residual Learning for Image Recognition , 2015, 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR).

[12]  Bernhard Kainz,et al.  Detecting Outliers with Foreign Patch Interpolation , 2020, ArXiv.

[13]  Nikos Komodakis,et al.  Unsupervised Representation Learning by Predicting Image Rotations , 2018, ICLR.

[14]  Simone Calderara,et al.  Latent Space Autoregression for Novelty Detection , 2018, 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).

[15]  Frank Hutter,et al.  SGDR: Stochastic Gradient Descent with Warm Restarts , 2016, ICLR.

[16]  Dorit Merhof,et al.  Modeling the Distribution of Normal Data in Pre-Trained Deep Features for Anomaly Detection , 2021, 2020 25th International Conference on Pattern Recognition (ICPR).

[17]  Zhiyong Lu,et al.  Automated abnormality classification of chest radiographs using deep convolutional neural networks , 2020, npj Digital Medicine.

[18]  Sungroh Yoon,et al.  Patch SVDD: Patch-level SVDD for Anomaly Detection and Segmentation , 2020, ArXiv.

[19]  Konstantinos Kamnitsas,et al.  Unsupervised Lesion Detection in Brain CT using Bayesian Convolutional Autoencoders , 2018 .

[20]  Quoc V. Le,et al.  EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks , 2019, ICML.

[21]  Natalia Gimelshein,et al.  PyTorch: An Imperative Style, High-Performance Deep Learning Library , 2019, NeurIPS.

[22]  Carsten Steger,et al.  The MVTec Anomaly Detection Dataset: A Comprehensive Real-World Dataset for Unsupervised Anomaly Detection , 2021, International Journal of Computer Vision.

[23]  Tomas Pfister,et al.  CutPaste: Self-Supervised Learning for Anomaly Detection and Localization , 2021, 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).

[24]  Jimmy Ba,et al.  Adam: A Method for Stochastic Optimization , 2014, ICLR.

[25]  Klaus H. Maier-Hein,et al.  Unsupervised Anomaly Localization using Variational Auto-Encoders , 2019, MICCAI.

[26]  Ronald M. Summers,et al.  ChestX-ray: Hospital-Scale Chest X-ray Database and Benchmarks on Weakly Supervised Classification and Localization of Common Thorax Diseases , 2019, Deep Learning and Convolutional Neural Networks for Medical Imaging and Clinical Informatics.