Towards Total Recall in Industrial Anomaly Detection

Being able to spot defective parts is a critical component in large-scale industrial manufacturing. A particular chal-lenge that we address in this work is the cold-start problem: fit a model using nominal (non-defective) example images only. While handcrafted solutions per class are possible, the goal is to build systems that work well simultaneously on many different tasks automatically. The best peform-ing approaches combine embeddings from ImageNet models with an outlier detection model. In this paper, we extend on this line of work and propose PatchCore , which uses a maximally representative memory bank of nominal patch-features. PatchCore offers competitive inference times while achieving state-of-the-art performance for both detection and localization. On the challenging, widely used MVTec AD benchmark PatchCore achieves an image-level anomaly detection AUROC score of up to 99 . 6% , more than halving the error compared to the next best competitor. We further report competitive results on two additional datasets and also find competitive results in the few samples regime.

[1]  Toby P. Breckon,et al.  GANomaly: Semi-Supervised Anomaly Detection via Adversarial Training , 2018, ACCV.

[2]  Samy Bengio,et al.  Density estimation using Real NVP , 2016, ICLR.

[3]  Geoffrey E. Hinton,et al.  Distilling the Knowledge in a Neural Network , 2015, ArXiv.

[4]  Yu Cheng,et al.  Deep Structured Energy Based Models for Anomaly Detection , 2016, ICML.

[5]  Kenneth L. Clarkson,et al.  Coresets, sparse greedy approximation, and the Frank-Wolfe algorithm , 2008, SODA '08.

[6]  Nikos Komodakis,et al.  Wide Residual Networks , 2016, BMVC.

[7]  Rajat Vikram Singh,et al.  Attention Guided Anomaly Localization in Images , 2019, ECCV.

[8]  Prafulla Dhariwal,et al.  Glow: Generative Flow with Invertible 1x1 Convolutions , 2018, NeurIPS.

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

[10]  Jeff Johnson,et al.  Billion-Scale Similarity Search with GPUs , 2017, IEEE Transactions on Big Data.

[11]  Andreas Krause,et al.  Scalable Training of Mixture Models via Coresets , 2011, NIPS.

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

[13]  Marius Kloft,et al.  Image Anomaly Detection with Generative Adversarial Networks , 2018, ECML/PKDD.

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

[15]  Carsten Steger,et al.  MVTec AD — A Comprehensive Real-World Dataset for Unsupervised Anomaly Detection , 2019, 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).

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

[17]  Paul Bergmann,et al.  Uninformed Students: Student-Teacher Anomaly Detection With Discriminative Latent Embeddings , 2019, 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).

[18]  Thomas Brox,et al.  Anomaly Detection With Multiple-Hypotheses Predictions , 2018, ICML.

[19]  Salvatore J. Stolfo,et al.  A Geometric Framework for Unsupervised Anomaly Detection , 2002, Applications of Data Mining in Computer Security.

[20]  Ted K. Ralphs,et al.  Integer and Combinatorial Optimization , 2013 .

[21]  Yoshua Bengio,et al.  Small-GAN: Speeding Up GAN Training Using Core-sets , 2019, ICML.

[22]  Ramesh Nallapati,et al.  OCGAN: One-Class Novelty Detection Using GANs With Constrained Latent Representations , 2019, 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).

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

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

[25]  Hamid R. Rabiee,et al.  Multiresolution Knowledge Distillation for Anomaly Detection , 2020, 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).

[26]  Vladimir Braverman,et al.  Data-Independent Neural Pruning via Coresets , 2020, ICLR.

[27]  Stanislav Pidhorskyi,et al.  Generative Probabilistic Novelty Detection with Adversarial Autoencoders , 2018, NeurIPS.

[28]  Matthias Bethge,et al.  Approximating CNNs with Bag-of-local-Features models works surprisingly well on ImageNet , 2019, ICLR.

[29]  Mahmood Fathy,et al.  Adversarially Learned One-Class Classifier for Novelty Detection , 2018, 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition.

[30]  Evgeniy Faerman,et al.  Unsupervised Anomaly Detection for X-Ray Images , 2020, ArXiv.

[31]  Shenghua Gao,et al.  Future Frame Prediction for Anomaly Detection - A New Baseline , 2017, 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition.

[32]  Yedid Hoshen,et al.  Sub-Image Anomaly Detection with Deep Pyramid Correspondences , 2020, ArXiv.

[33]  Yongsub Lim,et al.  RaPP: Novelty Detection with Reconstruction along Projection Pathway , 2020, ICLR.

[34]  Carsten Steger,et al.  Improving Unsupervised Defect Segmentation by Applying Structural Similarity to Autoencoders , 2018, VISIGRAPP.

[35]  Chandan Srivastava,et al.  Support Vector Data Description , 2011 .

[36]  Kasturi R. Varadarajan,et al.  Geometric Approximation via Coresets , 2007 .

[37]  Towards Visually Explaining Variational Autoencoders , 2019, 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).

[38]  Yibin Huang,et al.  Surface defect saliency of magnetic tile , 2018, The Visual Computer.

[39]  Bodo Rosenhahn,et al.  Same Same But DifferNet: Semi-Supervised Defect Detection with Normalizing Flows , 2020, 2021 IEEE Winter Conference on Applications of Computer Vision (WACV).

[40]  Joseph Paul Cohen,et al.  Revisiting Training Strategies and Generalization Performance in Deep Metric Learning , 2020, ICML.

[41]  Bernhard Schölkopf,et al.  Support Vector Method for Novelty Detection , 1999, NIPS.

[42]  Rodrigo Fernandes de Mello,et al.  Are pre-trained CNNs good feature extractors for anomaly detection in surveillance videos? , 2018, ArXiv.

[43]  Silvio Savarese,et al.  Active Learning for Convolutional Neural Networks: A Core-Set Approach , 2017, ICLR.

[44]  Lewis D. Griffin,et al.  Transfer representation-learning for anomaly detection , 2016, ICML 2016.

[45]  Fei-Fei Li,et al.  ImageNet: A large-scale hierarchical image database , 2009, 2009 IEEE Conference on Computer Vision and Pattern Recognition.

[46]  Svetha Venkatesh,et al.  Memorizing Normality to Detect Anomaly: Memory-Augmented Deep Autoencoder for Unsupervised Anomaly Detection , 2019, 2019 IEEE/CVF International Conference on Computer Vision (ICCV).

[47]  Oriel Frigo,et al.  Iterative energy-based projection on a normal data manifold for anomaly localization , 2020, ICLR.

[48]  Bo Zong,et al.  Deep Autoencoding Gaussian Mixture Model for Unsupervised Anomaly Detection , 2018, ICLR.

[49]  Cewu Lu,et al.  Inverse-Transform AutoEncoder for Anomaly Detection , 2019, ArXiv.

[50]  Abhishek Das,et al.  Grad-CAM: Visual Explanations from Deep Networks via Gradient-Based Localization , 2016, 2017 IEEE International Conference on Computer Vision (ICCV).

[51]  Eero P. Simoncelli,et al.  Image quality assessment: from error visibility to structural similarity , 2004, IEEE Transactions on Image Processing.

[52]  Takehisa Yairi,et al.  Anomaly Detection Using Autoencoders with Nonlinear Dimensionality Reduction , 2014, MLSDA'14.

[53]  Yedid Hoshen,et al.  Deep Nearest Neighbor Anomaly Detection , 2020, ArXiv.

[54]  Sanjoy Dasgupta,et al.  An elementary proof of a theorem of Johnson and Lindenstrauss , 2003, Random Struct. Algorithms.

[55]  Zhuowen Tu,et al.  Aggregated Residual Transformations for Deep Neural Networks , 2016, 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR).

[56]  P. Mahalanobis On the generalized distance in statistics , 1936 .

[57]  Tolga Bolukbasi,et al.  XRAI: Better Attributions Through Regions , 2019, 2019 IEEE/CVF International Conference on Computer Vision (ICCV).

[58]  Fred L. Drake,et al.  Python 3 Reference Manual , 2009 .