High-Fidelity Zero-Shot Texture Anomaly Localization Using Feature Correspondence Analysis

Andrei-Timotei Ardelean, Tim WeyrichWACV 2024

TL;DR

This paper introduces Feature Correspondence Analysis (FCA), a novel method for zero-shot texture anomaly localization that achieves high-fidelity results by precisely comparing local patch statistics. FCA significantly outperforms previous state-of-the-art methods, reducing errors by over 40% on the MVTec AD dataset, and offers a more robust approach to identifying subtle anomalies in textures.

What Problem Does This Paper Address?

Anomaly detection (AD) is the task of identifying unusual patterns in data. Anomaly localization (AL) goes a step further by pinpointing the exact location of these anomalies. While humans can often spot anomalies intuitively, automating this process is crucial for applications like manufacturing defect detection, medical imaging, and fraud detection. The challenge is particularly acute in "zero-shot" scenarios, where the system must detect anomalies without ever having seen examples of them during training. This paper focuses on zero-shot anomaly localization specifically for textures, which are typically homogeneous but can contain subtle defects that break this uniformity. Existing methods often struggle to achieve pixel-level precision, especially when dealing with limited training data or when anomalies are not drastically different from normal patterns.

Methods

The core innovation of this paper is Feature Correspondence Analysis (FCA). FCA operates within a general framework for zero-shot anomaly localization that involves three components: feature extraction, patch statistics comparison, and reference selection.

  • Feature Extraction: The authors leverage deep features extracted from a pretrained neural network (specifically, a WideResnet-50 network). This is a common practice in modern AD/AL, as these networks capture rich semantic information.
  • Patch Statistics Comparison (FCA): This is the paper's main contribution. Instead of comparing global distributions of features or simple averages, FCA uses a bijective mapping derived from the Wasserstein distance. It analyzes how the statistics of a pixel's local context (within a patch) correspond to the statistics of a reference set. By aggregating the "non-compliance" of a pixel across all patches it belongs to, FCA achieves higher precision in identifying anomalous pixels. This approach is a refinement of earlier methods like Sample-Weighted Wasserstein (SWW), which served as a conceptual bridge.
  • Reference Selection: The paper explores different strategies for selecting a reference set of normal features. They find that using the median of features across all patches offers a good balance between fidelity and speed, outperforming simpler methods like random selection or global averages, especially for multimodal textures.

Datasets

The authors evaluate their method on several datasets:

  • MVTec AD: A widely used benchmark for anomaly detection, containing 5 texture classes with high-resolution images.
  • Woven Fabric Textures (WFT): A smaller dataset with two woven fabric textures.
  • DTD-Synthetic: An artificial dataset created by adding defects to textures from the Describable Texture Dataset, designed to test anomaly detection on anisotropic textures.
  • Aitex: A dataset of uniform fabric textures.

Key Insights and Ideas

  • Pixel-level precision matters: Holistic distances between distributions are too coarse for precise anomaly localization. FCA's focus on pixel-wise correspondence within local contexts is key to its high-fidelity results.
  • Wasserstein distance as a bridge: The paper cleverly uses the Wasserstein distance's properties to develop a more precise comparison mechanism, moving beyond simple moments or histograms.
  • Deep features are essential: Pretrained neural networks provide the robust feature representations needed to capture subtle textural anomalies.
  • Reference selection impacts performance: The choice of how to represent "normality" significantly affects the anomaly score, with median-based selection proving effective for diverse textures.
  • Zero-shot is a hard but important problem: The paper demonstrates that achieving state-of-the-art results in zero-shot settings is possible with the right approach, even outperforming some multi-shot methods.

Key Results

  • Significant error reduction: FCA achieved over a 40% reduction in error compared to the previous state-of-the-art on the MVTec AD dataset in a zero-shot setting.
  • Outperforms baselines: FCA consistently outperformed other zero-shot methods like Aota et al. [4] and April-GAN [16] across various metrics (PRO(0.3), AUROC, F1-score) on MVTec AD, DTD-Synthetic, WFT, and Aitex datasets.
  • Competitive with multi-shot methods: In some cases, FCA even surpassed established multi-shot methods like PatchCore and RD++.
  • Scalability: The method shows good scalability with image resolution, with full-resolution processing yielding better results.
  • Qualitative improvements: Visualizations show FCA producing anomaly maps with higher fidelity, more precise localization, fewer false positives, and better coverage of anomalous regions compared to competitors.

Limitations and Future Work

  • Texture-specific: The current FCA method is designed for textures and may not generalize well to generic objects with highly variable feature statistics across different regions.
  • Computational Complexity: While FCA offers high fidelity, its computational complexity is higher than simpler methods like moments or histograms, particularly for large images. The paper notes that methods like Aota et al. and Ours + k-NN scale poorly with large image sizes.
  • Subjectivity in Ground Truth: The authors acknowledge that ground-truth masks for datasets like MVTec AD can have some subjectivity, which can relativize accuracy scores.

Future work could explore extending FCA to handle generic objects and further optimizing its computational efficiency.

Summary updated

BibTeX
@inproceedings{ardelean2024high,
  author = {Andrei-Timotei Ardelean and Tim Weyrich},
  title = {{High-Fidelity Zero-Shot Texture Anomaly Localization Using Feature Correspondence Analysis}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2024},
}

Loading related content...

Figure