Skip to main content
QUICK REVIEW

[Paper Review] DRAEM -- A discriminatively trained reconstruction embedding for surface anomaly detection

Vitjan Zavrtanik, Matej Kristan|arXiv (Cornell University)|Aug 17, 2021
Anomaly Detection Techniques and Applications27 references38 citations
TL;DR

DRAEM jointly learns a reconstruction sub-network and a discriminative module trained on simulated anomalies to locally detect and segment surface anomalies, achieving state-of-the-art results on MVTec and strong performance on DAGM without real anomaly data.

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.

Motivation & Objective

  • Motivate robust surface anomaly detection under highly imbalanced, anomaly-free training data.
  • Propose a discriminative end-to-end model that jointly learns reconstruction and anomaly boundary.
  • Enable per-pixel anomaly localization without heavy post-processing.
  • Use synthetic, just-out-of-distribution anomalies to train and generalize to real-world anomalies.

Proposed method

  • Reconstructive sub-network trained to produce anomaly-free reconstructions from corrupted inputs.
  • Discriminative sub-network (U-Net like) takes concatenated [input, reconstruction] to output per-pixel anomaly map.
  • Anomaly simulation creates I_a from I using Perlin noise, random textures, and blending; no need for real anomalies.
  • Total training loss L = L_rec(I, I_r) + L_seg(M_a, M) with L_rec using SSIM + L2, and L_seg via Focal loss on M (anomaly map).
  • Anomaly score at image level η is max-pooled over a smoothed anomaly map M_o.
  • Localization and detection implemented via a simple mean-filter smoothing and taking the max as η.

Experimental results

Research questions

  • RQ1Can a joint reconstruction-discrimination framework improve generalization to real-world anomalies without real anomaly data?
  • RQ2Does synthetic anomaly generation suffice to train accurate per-pixel anomaly localization?
  • RQ3Is end-to-end discriminative training over the joint original and reconstructed appearance superior to purely generative or purely discriminative approaches?
  • RQ4How does DRÆM perform on standard benchmarks (MVTec, DAGM) compared to unsupervised and supervised methods?

Key findings

  • On MVTec AD, DRÆM achieves state-of-the-art results, with the highest AUROC in 9 of 15 classes for image-level detection and strong localization performance.
  • DRÆM improves localization by about 13.4–13.5 AP points compared with previous methods.
  • On DAGM, DRÆM surpasses unsupervised methods in image-level anomaly detection and, importantly, achieves localization accuracy that rivals or exceeds some supervised approaches.
  • Ablation studies show that using both reconstructive and discriminative components is crucial, and that simulated anomalies with augmentation and opacity randomization tightly bound the decision boundary.
  • DRÆM remains effective even when anomaly textures are generated from minimal texture datasets or even simple homogeneous colors, indicating robustness to anomaly appearance variation.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.