Learning Diffusion Models for Multi-view Anomaly Detection

Chieh Liu, Yu-Min Chu, Ting-I Hsieh, Hwann-Tzong Chen, Tyng-Luh Liu

Introduction

In industrial inspection, a single image often fails to reveal critical defects. For instance, a scratch on a metallic surface might be obscured by specular reflections from one angle but clearly visible from another. Similarly, structural dents might be camouflaged by complex surface patterns in standard RGB photography while appearing distinctly in 3D depth maps.

Multi-view examples from the Eyecandies dataset, showing 6 RGB views under different lighting and 1 normal map.

Traditional Anomaly Detection (AD) methods typically focus on single-view RGB data. While some recent work incorporates 3D information, there is a lack of robust methods that can effectively integrate "multi-view" data—specifically, multiple images of the same object under different lighting conditions combined with 3D normal maps. The challenge lies in fusing these disparate modalities into a consistent representation that allows a model to identify anomalies regardless of the specific view.

Methodology

The proposed framework leverages the representational power of Latent Diffusion Models (LDMs) through a three-stage approach:

1. View-agnostic Latent Diffusion Model

The process begins with a pretrained LDM. The denoising UNet is fine-tuned on the entire multi-view dataset without explicit view labels. This forces the UNet to become a flexible feature extractor capable of processing both RGB images and 3D normal maps within a shared latent space.

2. View-invariant ControlNet

To fuse modalities effectively, the authors implement a ControlNet to add spatial conditioning. They employ a two-phase training strategy:

  • Phase I: An RGB view is used as input, conditioned on the 3D normal map.
  • Phase II: The 3D normal map is used as input, conditioned on an RGB view.

A Feature Consistency Loss is introduced to penalize discrepancies between internal feature maps of different views of the same object, ensuring the model learns a truly view-invariant representation.

Overview of the proposed framework, illustrating the two-phase training for the ControlNet and the feature extraction process.

3. Deterministic Feature Extraction via DDIM

Standard diffusion is stochastic, which is unsuitable for consistent anomaly detection. The authors utilize Denoising Diffusion Implicit Models (DDIM) inversion to make the process deterministic. Features from normal samples are extracted and stored in a "memory bank." During inference, the features of a test sample are compared against this bank; a large distance indicates a potential anomaly.

Key Results and Insights

The method achieved state-of-the-art (SOTA) results on the Eyecandies benchmark, reaching an Img-AUROC of 0.948, outperforming existing methods like MMRD (0.940) and M3DM (0.897). Ablation studies confirmed that the ControlNet and feature consistency loss provided a measurable boost (approx. 1.4% Img-AUROC) and significantly improved anomaly localization.

Key takeaways include:

  • Complementarity: Some defects are "RGB-only" (discoloration) while others are "3D-only" (structural deformations), necessitating a multi-modal approach.
  • ControlNet as a Fuser: Beyond image generation, ControlNet serves as a powerful cross-modal feature fuser for discriminative tasks.
  • Stability: DDIM inversion successfully transforms generative models into stable, deterministic feature extractors for reliable industrial inspection.

Limitations and Future Work

While effective, the diffusion-based approach involves higher computational overhead compared to simple CNN or Transformer backbones due to the iterative nature of DDIM inversion. Additionally, while the model generalizes well to real-world datasets like MVTec 3D-AD (0.949 Img-AUROC), acquiring high-quality multi-view data with precise lighting control remains a challenge in many industrial settings. Future research may explore more efficient architectures and the application of this view-invariant fusion technique to other multi-modal computer vision tasks.

Summary updated

BibTeX
@inproceedings{liu2024learning,
  author = {Chieh Liu and Yu-Min Chu and Ting-I Hsieh and Hwann-Tzong Chen and Tyng-Luh Liu},
  title = {{Learning Diffusion Models for Multi-view Anomaly Detection}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-73414-4\_19},
}
Figure