Prototypical Learning Guided Context-Aware Segmentation Network for Few-Shot Anomaly Detection

📅 2025-12-17
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
To address domain shift between pre-trained features and target scenarios in few-shot anomaly detection (FSAD), this paper proposes Prototype-guided Context-aware Segmentation Network (PCSNet). PCSNet introduces a novel prototype-based feature adaptation mechanism, integrated with a context-aware segmentation architecture enhanced by pseudo-anomaly synthesis and a pixel-level discrepancy classification loss, enabling fine-grained, pixel-level anomaly localization using only a few normal samples. Its core innovations lie in prototype-driven feature alignment to mitigate domain shift and contextual modeling to enhance local discriminability. Under the 8-shot setting on MVTec and MPDD benchmarks, PCSNet achieves image-level AUROC scores of 94.9% and 80.2%, respectively. Furthermore, it demonstrates strong generalization and practical utility in an industrial quality inspection task for automotive plastic components.

Technology Category

Application Category

📝 Abstract
Few-shot anomaly detection (FSAD) denotes the identification of anomalies within a target category with a limited number of normal samples. Existing FSAD methods largely rely on pre-trained feature representations to detect anomalies, but the inherent domain gap between pre-trained representations and target FSAD scenarios is often overlooked. This study proposes a Prototypical Learning Guided Context-Aware Segmentation Network (PCSNet) to address the domain gap, thereby improving feature descriptiveness in target scenarios and enhancing FSAD performance. In particular, PCSNet comprises a prototypical feature adaption (PFA) sub-network and a context-aware segmentation (CAS) sub-network. PFA extracts prototypical features as guidance to ensure better feature compactness for normal data while distinct separation from anomalies. A pixel-level disparity classification loss is also designed to make subtle anomalies more distinguishable. Then a CAS sub-network is introduced for pixel-level anomaly localization, where pseudo anomalies are exploited to facilitate the training process. Experimental results on MVTec and MPDD demonstrate the superior FSAD performance of PCSNet, with 94.9% and 80.2% image-level AUROC in an 8-shot scenario, respectively. Real-world applications on automotive plastic part inspection further demonstrate that PCSNet can achieve promising results with limited training samples. Code is available at https://github.com/yuxin-jiang/PCSNet.
Problem

Research questions and friction points this paper is trying to address.

Addresses domain gap in few-shot anomaly detection
Improves feature descriptiveness for target scenarios
Enhances anomaly localization with limited normal samples
Innovation

Methods, ideas, or system contributions that make the work stand out.

Prototypical feature adaption sub-network for domain gap reduction
Pixel-level disparity classification loss for anomaly distinction
Context-aware segmentation sub-network for precise anomaly localization
🔎 Similar Papers
No similar papers found.
Y
Yuxin Jiang
State Key Laboratory of Digital Manufacturing Equipment and Technology, Huazhong University of Science and Technology, Wuhan 430074, China
Yunkang Cao
Yunkang Cao
Hunan University
Visual Anomaly DetectionIndustrial Foundation ModelEmbodied Intelligence
Weiming Shen
Weiming Shen
Huazhong University of Science and Technology