Anomaly Multi-classification in Industrial Scenarios: Transferring Few-shot Learning to a New Task
Jie Liu, Yao Wu, Xiaotong Luo, Zongze Wu
TL;DR
This work tackles anomaly multi-classification in industrial settings where labeled defect types are scarce. It proposes a three-part framework that combines PatchCore-based residual features, a RelationNet-inspired vanilla baseline, and a contrastive classifier, with pretraining on generated pseudo-defect categories to enable effective few-shot transfer. Key contributions include the residual feature construction for anomaly-focused classification, a proxy task via pseudo categories, and a contrastive learning boost that yields consistent improvements on MVTEC AD and MVTEC 3D AD datasets. The method offers a practical path to reliable defect-type classification in data-scarce industrial environments and can be integrated with existing anomaly detectors to extend their capabilities.
Abstract
In industrial scenarios, it is crucial not only to identify anomalous items but also to classify the type of anomaly. However, research on anomaly multi-classification remains largely unexplored. This paper proposes a novel and valuable research task called anomaly multi-classification. Given the challenges in applying few-shot learning to this task, due to limited training data and unique characteristics of anomaly images, we introduce a baseline model that combines RelationNet and PatchCore. We propose a data generation method that creates pseudo classes and a corresponding proxy task, aiming to bridge the gap in transferring few-shot learning to industrial scenarios. Furthermore, we utilize contrastive learning to improve the vanilla baseline, achieving much better performance than directly fine-tune a ResNet. Experiments conducted on MvTec AD and MvTec3D AD demonstrate that our approach shows superior performance in this novel task.
