Pith. sign in

Toward Generalist Anomaly Detection via In-context Residual Learning with Few-shot Sample Prompts

1 Pith paper cite this work. Polarity classification is still indexing.

1 Pith paper citing it
abstract

This paper explores the problem of Generalist Anomaly Detection (GAD), aiming to train one single detection model that can generalize to detect anomalies in diverse datasets from different application domains without any further training on the target data. Some recent studies have shown that large pre-trained Visual-Language Models (VLMs) like CLIP have strong generalization capabilities on detecting industrial defects from various datasets, but their methods rely heavily on handcrafted text prompts about defects, making them difficult to generalize to anomalies in other applications, e.g., medical image anomalies or semantic anomalies in natural images. In this work, we propose to train a GAD model with few-shot normal images as sample prompts for AD on diverse datasets on the fly. To this end, we introduce a novel approach that learns an in-context residual learning model for GAD, termed InCTRL. It is trained on an auxiliary dataset to discriminate anomalies from normal samples based on a holistic evaluation of the residuals between query images and few-shot normal sample prompts. Regardless of the datasets, per definition of anomaly, larger residuals are expected for anomalies than normal samples, thereby enabling InCTRL to generalize across different domains without further training. Comprehensive experiments on nine AD datasets are performed to establish a GAD benchmark that encapsulate the detection of industrial defect anomalies, medical anomalies, and semantic anomalies in both one-vs-all and multi-class setting, on which InCTRL is the best performer and significantly outperforms state-of-the-art competing methods. Code is available at https://github.com/mala-lab/InCTRL.

citation-role summary

background 1

citation-polarity summary

fields

cs.CV 1

years

2025 1

verdicts

CONDITIONAL 1

roles

background 1

polarities

support 1

representative citing papers

One-to-Normal: Anomaly Personalization for Few-shot Anomaly Detection

cs.CV · 2025-02-03 · conditional · novelty 7.0

A DreamBooth-style diffusion model personalizes each query image into a normal counterpart, and a triplet CLIP comparison combines query-versus-personalized, query-versus-normal-samples, and query-versus-text scores for few-shot anomaly detection.

citing papers explorer

Showing 1 of 1 citing paper.

  • One-to-Normal: Anomaly Personalization for Few-shot Anomaly Detection cs.CV · 2025-02-03 · conditional · none · ref 45 · internal anchor

    A DreamBooth-style diffusion model personalizes each query image into a normal counterpart, and a triplet CLIP comparison combines query-versus-personalized, query-versus-normal-samples, and query-versus-text scores for few-shot anomaly detection.