DRAEM -- A discriminatively trained reconstruction embedding for surface anomaly detection

Vitjan Zavrtanik,Matej Kristan,Danijel Skočaj
DOI: https://doi.org/10.48550/arXiv.2108.07610
2021-09-27
Abstract:Visual surface anomaly detection aims to detect local image regions that significantly deviate from normal appearance. Recent surface anomaly detection methods rely on generative models to accurately reconstruct the normal areas and to fail on anomalies. These methods are trained only on anomaly-free images, and often require hand-crafted post-processing steps to localize the anomalies, which prohibits optimizing the feature extraction for maximal detection capability. In addition to reconstructive approach, we cast surface anomaly detection primarily as a discriminative problem and propose a discriminatively trained reconstruction anomaly embedding model (DRAEM). The proposed method learns a joint representation of an anomalous image and its anomaly-free reconstruction, while simultaneously learning a decision boundary between normal and anomalous examples. The method enables direct anomaly localization without the need for additional complicated post-processing of the network output and can be trained using simple and general anomaly simulations. On the challenging MVTec anomaly detection dataset, DRAEM outperforms the current state-of-the-art unsupervised methods by a large margin and even delivers detection performance close to the fully-supervised methods on the widely used DAGM surface-defect detection dataset, while substantially outperforming them in localization accuracy.
Computer Vision and Pattern Recognition
What problem does this paper attempt to address?
The problem that this paper attempts to solve is how to more effectively identify and locate local abnormal regions in images during surface anomaly detection. Specifically, existing surface anomaly detection methods mainly rely on generative models to reconstruct normal regions and detect anomalies where the reconstruction fails. These methods are usually trained only with anomaly - free images and often require manually - designed post - processing steps to accurately locate anomalies, which limits feature extraction optimization for maximum detection capabilities. Moreover, these methods are difficult to effectively detect anomalies that are not significantly different from normal appearance, because these anomalies can often be well reconstructed as well. To solve the above problems, this paper proposes a new method - DRÆM (Discriminatively Trained Reconstruction Embedding for Surface Anomaly Detection), which mainly views surface anomaly detection as a discriminative problem rather than relying solely on reconstruction models. DRÆM achieves direct anomaly location without additional complex network output post - processing steps by jointly learning the representations of abnormal images and their anomaly - free reconstructions and simultaneously learning the decision boundaries between normal and abnormal samples. This method can be trained by simple general - purpose anomaly simulation, thereby significantly outperforming current unsupervised methods on the challenging MVTec anomaly detection dataset and significantly outperforming fully - supervised methods in terms of localization accuracy on the widely - used DAGM surface defect detection dataset.