Self-Supervised Guided Segmentation Framework for Unsupervised Anomaly Detection

Peng Xing, Yanpeng Sun, Zechao LiarXiv 2022 · DOI

Abstract

Unsupervised Anomaly Detection (UAD) is critical for industrial quality control where defective samples are scarce. Traditional methods often suffer from excessive reconstruction capability or a distribution gap between synthetic training anomalies and real-world defects. This paper introduces the Self-Supervised Guided Segmentation Framework (SGSF), which addresses these issues through a Saliency Augmentation Module (SAM) for realistic defect synthesis and a Self-supervised Guidance Network (SGN) that utilizes a contrast set of normal images to guide the segmentation process. Experimental results on benchmarks like MVTec AD and KolektorSDD2 demonstrate that SGSF achieves state-of-the-art performance in both anomaly classification and localization.

Introduction

In industrial manufacturing, identifying rare defects such as scratches, discolorations, or structural deformations is vital. Because anomalous data is difficult to collect, models must typically learn from purely "normal" datasets. This task, Unsupervised Anomaly Detection (UAD), faces two primary hurdles. First, reconstruction-based models (like Autoencoders) often generalize too well, inadvertently reconstructing the anomalies they are meant to detect. Second, the common practice of training on "forged" anomalies often fails because these synthetic defects do not match the complex textures and shapes of real-world industrial anomalies.

Methodology

The SGSF framework overcomes these challenges by integrating two innovative modules: the Saliency Augmentation Module (SAM) and the Self-supervised Guidance Network (SGN).

Overview of the SGSF framework, illustrating the Saliency Augmentation Module (SAM) for training and the Self-supervised Guidance Network (SGN) for feature-guided segmentation.

Saliency Augmentation Module (SAM)

To bridge the distribution gap, SAM generates synthetic defects that are contextually relevant. Instead of random noise, it produces "Saliency Perlin Noise"—organic, irregular shapes—and constrains their placement to the salient regions of the object identified via a saliency map. This forces the model to learn discriminative features on the object's surface rather than ignoring noise in the background.

Self-supervised Guidance Network (SGN)

The SGN introduces a "guidance" mechanism to prevent the model from over-reconstructing anomalies. For every test image, the system identifies a "contrast set" of the most similar normal images from the training data. A self-supervised Autoencoder then extracts "clean" features from these normal references. These guidance features are fused with the test image's features at multiple scales within a segmentation network. By comparing the test features against these "normal" templates, the model can precisely localize deviations as anomalies.

Experimental Results

The framework was rigorously evaluated on the MVTec AD, KolektorSDD2, and DAGM benchmarks.

Comparison of SGSF against state-of-the-art methods on the MVTec AD dataset across 15 categories.

On the MVTec AD dataset, SGSF achieved a mean AUROC of 96.7% for classification and 97.2% for localization. Notably, it significantly outperformed existing methods like DRAEM and PaDim in localization precision, showing a 5% and 18% improvement in Average Precision (AP), respectively. On the challenging KolektorSDD2 surface defect dataset, SGSF reached an AP of 86.3%, far exceeding other unsupervised baselines such as U-Std (65.3%).

Discussion and Conclusion

SGSF demonstrates that contextual comparison against a contrast set is more effective than absolute image reconstruction for anomaly detection. By focusing on salient regions during training and using multi-scale feature fusion for guidance, the model effectively identifies both subtle textural changes and larger structural defects.

Despite its success, the framework faces challenges with semantic anomalies, such as bent or missing components in complex assemblies (e.g., the "transistor" category in MVTec AD). Future research will focus on improving feature alignment and semantic understanding to address these complex structural variations. In summary, SGSF provides a robust and precise solution for industrial unsupervised anomaly detection, setting a new benchmark for the field.

Summary updated

BibTeX
@misc{xing2022self,
  author = {Peng Xing and Yanpeng Sun and Zechao Li},
  title = {{Self-Supervised Guided Segmentation Framework for Unsupervised Anomaly Detection}},
  year = {2022},
  eprint = {2209.12440},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2209.12440},
}
Figure