MetaUAS: Universal Anomaly Segmentation with One-Prompt Meta-Learning
Bin-Bin Gao
TL;DR
MetaUAS addresses universal anomaly segmentation without language guidance by reframing anomaly detection as change segmentation and training on a large synthetic base of paired images. It employs a pure visual foundation with an encoder, soft feature alignment, and a UNet-inspired decoder, all optimized under a one-prompt meta-learning objective using synthetic change data. The approach uses a single normal image prompt at inference, with a class-aware prompt pool or best-match prompting to handle unknown categories, and demonstrates competitive to state-of-the-art performance across MVTec, VisA, and Goods with favorable efficiency. This work provides a practical, language-free alternative for open-world anomaly segmentation, enabling fast deployment and broad applicability in industrial settings.
Abstract
Zero- and few-shot visual anomaly segmentation relies on powerful vision-language models that detect unseen anomalies using manually designed textual prompts. However, visual representations are inherently independent of language. In this paper, we explore the potential of a pure visual foundation model as an alternative to widely used vision-language models for universal visual anomaly segmentation. We present a novel paradigm that unifies anomaly segmentation into change segmentation. This paradigm enables us to leverage large-scale synthetic image pairs, featuring object-level and local region changes, derived from existing image datasets, which are independent of target anomaly datasets. We propose a one-prompt Meta-learning framework for Universal Anomaly Segmentation (MetaUAS) that is trained on this synthetic dataset and then generalizes well to segment any novel or unseen visual anomalies in the real world. To handle geometrical variations between prompt and query images, we propose a soft feature alignment module that bridges paired-image change perception and single-image semantic segmentation. This is the first work to achieve universal anomaly segmentation using a pure vision model without relying on special anomaly detection datasets and pre-trained visual-language models. Our method effectively and efficiently segments any anomalies with only one normal image prompt and enjoys training-free without guidance from language. Our MetaUAS significantly outperforms previous zero-shot, few-shot, and even full-shot anomaly segmentation methods. The code and pre-trained models are available at https://github.com/gaobb/MetaUAS.
