Skip to main content
QUICK REVIEW

[Paper Review] Anomaly localization by modeling perceptual features

David Dehaene, Pierre Eline|arXiv (Cornell University)|Aug 12, 2020
Anomaly Detection Techniques and ApplicationsComputer Science24 references28 citations
TL;DR

This paper proposes Feature-Augmented Variational Autoencoders (FAVAE), which improve anomaly detection and localization by jointly reconstructing images in both pixel space and perceptual feature spaces extracted from a pre-trained VGG16 network. By modeling high-level, ImageNet-pretrained features, FAVAE achieves state-of-the-art performance on the MVTec AD dataset, significantly outperforming vanilla VAEs and prior methods in both anomaly detection and localization tasks.

ABSTRACT

Although unsupervised generative modeling of an image dataset using a Variational AutoEncoder (VAE) has been used to detect anomalous images, or anomalous regions in images, recent works have shown that this method often identifies images or regions that do not concur with human perception, even questioning the usability of generative models for robust anomaly detection. Here, we argue that those issues can emerge from having a simplistic model of the anomaly distribution and we propose a new VAE-based model expressing a more complex anomaly model that is also closer to human perception. This Feature-Augmented VAE is trained by not only reconstructing the input image in pixel space, but also in several different feature spaces, which are computed by a convolutional neural network trained beforehand on a large image dataset. It achieves clear improvement over state-of-the-art methods on the MVTec anomaly detection and localization datasets.

Motivation & Objective

  • Address the limitation of standard VAEs in detecting anomalies that align with human perception, especially when anomalies are rare or structurally complex.
  • Overcome the issue where standard VAEs assign higher likelihoods to anomalous samples than to normal ones, contradicting human judgment.
  • Improve anomaly localization by incorporating multi-scale, high-level features from pre-trained networks instead of relying solely on pixel reconstruction.
  • Demonstrate that perceptually meaningful features from ImageNet-trained models are essential for robust anomaly modeling beyond pixel-level reconstruction.
  • Establish a framework that models both pixel and perceptual feature distributions to better reflect human perception in anomaly detection.

Proposed method

  • Train a Variational Autoencoder (VAE) to reconstruct input images not only in pixel space but also in multiple intermediate feature spaces extracted from a pre-trained VGG16 network.
  • Use feature maps from the 2nd, 3rd, and 4th max-pooling layers (before activation) of VGG16 as perceptual feature targets for reconstruction.
  • Jointly optimize the VAE by minimizing reconstruction losses in both pixel space and perceptual feature spaces, using a weighted sum of L2 losses.
  • Apply gradient stopping to the feature extractor during training to prevent it from being fine-tuned, preserving its pre-trained, perceptually meaningful features.
  • Use the log-probability of the reconstructed samples across both spaces as the anomaly score, with higher scores indicating normality.
  • Apply histogram equalization to anomaly maps before visualization and use a jet colormap for consistent qualitative comparison across datasets.

Experimental results

Research questions

  • RQ1Can modeling perceptual features from a pre-trained network improve anomaly detection and localization beyond pixel-level reconstruction in VAEs?
  • RQ2Does using high-level, transferable features from ImageNet-trained models lead to better alignment with human perception in anomaly detection?
  • RQ3How do different configurations of feature extractors (e.g., random weights, fine-tuned, or frozen) affect anomaly localization performance?
  • RQ4Is the improvement due to multi-scale feature representation or specifically due to perceptually meaningful features from pre-training?
  • RQ5Can a unified model that reconstructs both pixels and deep features outperform existing state-of-the-art methods on benchmark datasets like MVTec AD?

Key findings

  • FAVAE with VGG16 features achieves state-of-the-art performance on all subsets of the MVTec AD dataset, outperforming both vanilla VAE and prior SOTA methods.
  • The model with a pre-trained VGG16 feature extractor (M 3b) achieves the best results in both detection (AUROC) and localization (Pixel AUROC), confirming the importance of perceptually meaningful features.
  • Using randomly initialized VGG16 weights (M 3b) or self-encoding features from the encoder (M 3b) improves localization over vanilla VAE, indicating that multi-scale features help even without pre-training.
  • When the feature extractor is allowed to be fine-tuned (M 3b and M 3b), performance degrades significantly, showing that unmodified, pre-trained features are crucial for robustness.
  • The ablation study confirms that perceptual features from ImageNet pre-training are essential—models using random or trainable features perform worse than those with frozen, pre-trained features.
  • FAVAE achieves superior results without hyperparameter tuning, demonstrating robustness and generalization across diverse anomaly types in industrial inspection.

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.