Patch SVDD: Patch-level SVDD for Anomaly Detection and Segmentation

Jihun Yi, Sungroh Yoon

Introduction

In industrial quality control, identifying anomalies is a "one-class" classification challenge: while "normal" samples are plentiful, "defective" ones are rare and highly variable. Traditional approaches like Deep SVDD attempt to map an entire image into a single "normal" hypersphere in feature space. However, this global approach often fails to capture local nuances and cannot pinpoint the exact location of a defect.

Comparison between Deep SVDD (image-level) and Patch SVDD (patch-level).

Methodology: From Images to Patches

Patch SVDD addresses these limitations by shifting the inspection granularity from the whole image to small, overlapping patches. This allows the model to learn a more flexible, multi-modal representation of "normalcy."

Core Innovations

  • Patch-wise Inspection: By generating embeddings for individual patches, the model naturally supports anomaly segmentation, creating a precise heatmap of defects.
  • Self-Supervised Learning: To ensure the encoder learns semantically meaningful features, the authors employ a "relative position" pretext task. The model learns to predict the spatial relationship between patches, which is particularly effective for complex objects.
  • Hierarchical Encoding: The framework utilizes multiple encoders with varying receptive fields (e.g., 32x32 and 64x64). This multi-scale approach ensures that both large structural irregularities and tiny surface scratches are detected.
  • Nearest Neighbor Scoring: During inference, a patch's anomaly score is calculated as its distance to the nearest "normal" patch in a pre-computed feature bank.
Hierarchical anomaly maps and their aggregation for precise defect localization.

Key Insights and Results

A major advantage of Patch SVDD is its ability to handle multi-modal distributions. While standard Deep SVDD forces all features into one cluster, Patch SVDD allows different parts of an object (e.g., the corner vs. the center of a chip) to form distinct clusters in the feature space.

The model was rigorously tested on the MVTec AD benchmark, a standard for industrial anomaly detection. Patch SVDD significantly outperformed existing state-of-the-art (SOTA) methods:

  • Anomaly Detection: Achieved 0.921 AUROC, a 9.8% improvement over previous SOTA.
  • Anomaly Segmentation: Achieved 0.957 AUROC, a 7.0% improvement over previous SOTA.
  • Efficiency: Compared to the original image-level Deep SVDD, the patch-based approach improved detection performance by a remarkable 55.6%.

Conclusion

Patch SVDD represents a significant leap forward in anomaly detection by leveraging patch-level features and self-supervised learning. By providing both high-level detection and pixel-level segmentation, it offers a robust solution for automated industrial inspection. Future research may explore further optimizations in feature bank management to reduce computational latency for real-time applications.

Summary updated

BibTeX
@inproceedings{yi2020patch,
  author = {Jihun Yi and Sungroh Yoon},
  title = {{Patch SVDD: Patch-level SVDD for Anomaly Detection and Segmentation}},
  booktitle = {ACCV},
  year = {2020},
  url = {https://openreview.net/forum?id=5Tmzy932Et},
}
Figure