Skip to main content
QUICK REVIEW

[Paper Review] DSR -- A dual subspace re-projection network for surface anomaly detection

Vitjan Zavrtanik, Matej Kristan|arXiv (Cornell University)|Aug 2, 2022
Anomaly Detection Techniques and ApplicationsComputer Science6 citations
TL;DR

DSR proposes a dual subspace re-projection network for unsupervised surface anomaly detection that generates anomalies in the quantized feature space rather than image space, enabling robust detection of near-in-distribution anomalies without relying on external anomaly synthesis datasets. It achieves state-of-the-art performance, improving AP by 10% in anomaly detection and 35% in localization on the challenging KSDD2 dataset.

ABSTRACT

The state-of-the-art in discriminative unsupervised surface anomaly detection relies on external datasets for synthesizing anomaly-augmented training images. Such approaches are prone to failure on near-in-distribution anomalies since these are difficult to be synthesized realistically due to their similarity to anomaly-free regions. We propose an architecture based on quantized feature space representation with dual decoders, DSR, that avoids the image-level anomaly synthesis requirement. Without making any assumptions about the visual properties of anomalies, DSR generates the anomalies at the feature level by sampling the learned quantized feature space, which allows a controlled generation of near-in-distribution anomalies. DSR achieves state-of-the-art results on the KSDD2 and MVTec anomaly detection datasets. The experiments on the challenging real-world KSDD2 dataset show that DSR significantly outperforms other unsupervised surface anomaly detection methods, improving the previous top-performing methods by 10% AP in anomaly detection and 35% AP in anomaly localization.

Motivation & Objective

  • To address the limitation of existing unsupervised surface anomaly detection methods that rely on image-level anomaly synthesis from external datasets, which often fails on near-in-distribution anomalies.
  • To improve detection of subtle, in-distribution anomalies that are difficult to simulate realistically using traditional image-level augmentation techniques.
  • To develop a method that generates synthetic anomalies directly in the discrete latent feature space, enabling more realistic and controlled anomaly simulation.
  • To achieve state-of-the-art performance on both the real-world KSDD2 and standard MVTec anomaly detection benchmarks without requiring annotated anomalies during training.
  • To enable effective use of limited annotated anomalous samples in weakly supervised settings, improving performance with few examples.

Proposed method

  • The method employs a dual-branch decoder architecture that jointly reconstructs the input image and its features using a shared encoder with a discrete latent representation.
  • It utilizes a vector-quantized autoencoder (VQ-VAE) framework to learn a discrete, quantized latent space from normal images, enabling structured feature representation.
  • Anomalies are generated by sampling from the codebook vectors in the latent space that are similar to the features of normal regions, using a learned similarity bound to control the realism of synthetic anomalies.
  • The network is trained with a combined loss comprising image reconstruction loss ($L_{img}$), feature reconstruction loss ($L_{feat}$), and a perceptual loss to preserve structural consistency.
  • An upsampling module is used to refine the anomaly map at higher resolution, improving localization accuracy.
  • The anomaly generation process is guided by the similarity between the latent code of a normal patch and candidate codebook vectors, ensuring that generated anomalies are visually plausible and close to normal appearance.

Experimental results

Research questions

  • RQ1Can anomaly detection be significantly improved by generating synthetic anomalies in the latent feature space instead of image space?
  • RQ2Does feature-level anomaly generation lead to better detection of near-in-distribution anomalies that are hard to simulate with image-level methods?
  • RQ3Can a discrete latent space representation enable robust reconstruction of normal appearances while still allowing effective anomaly detection?
  • RQ4How does the choice of sampling strategy in the codebook affect the performance of anomaly detection and localization?
  • RQ5Can the proposed method generalize to weakly supervised settings with only a few annotated anomalous examples?

Key findings

  • DSR achieves a 10% absolute improvement in average precision (AP) for anomaly detection and a 35% improvement in AP for anomaly localization on the real-world KSDD2 dataset compared to the previous state-of-the-art.
  • On the MVTec dataset, DSR achieves state-of-the-art performance with an AUROC of 98.2% and an AP of 70.2%.
  • The ablation study shows that uniform sampling from the codebook (DSR random) leads to a 2.6% drop in AP compared to the proposed similarity-based sampling, proving the importance of the sampling strategy.
  • Training with only image reconstruction loss ($L_{img}$) or only feature reconstruction loss ($L_{feat}$) results in a 2.7 p.p. drop in AUROC and a 5.0 p.p. drop in AP, demonstrating the necessity of both components.
  • Removing the upsampling module reduces localization AP by 5.0 p.p., indicating its critical role in high-resolution anomaly map prediction.
  • DSR runs at 58 FPS, making it suitable for real-time industrial applications.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.