Table of Contents
Fetching ...

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.

MetaUAS: Universal Anomaly Segmentation with One-Prompt Meta-Learning

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.
Paper Structure (14 sections, 7 equations, 5 figures, 6 tables)

This paper contains 14 sections, 7 equations, 5 figures, 6 tables.

Figures (5)

  • Figure 1: The proposed MetaUAS consists of an encoder, a feature alignment module (FAM), and a decoder. It is trained on a synthesized dataset in a one-prompt meta-learning manner for change segmentation tasks. Once trained, it can segment any anomalies providing only one normal image prompt.
  • Figure 2: Selected synthesizing image pairs and their change masks. (a) and (b) simulate "appearance" and "disappearance" synthesizing with mask inpainting wacv2022lama, and wacv2023change, (c) simulate "exchange" synthesizing with random pasting, and (d) simulate local region changes synthesizing with DRAEM iccv2021draem.
  • Figure 3: Qualitative comparisons with state-of-the-art methods on MVTec, VisA and Goods. In both two sub-figures (left and right), (b) and (g) represent query images and their anomaly masks, while (a) represent the corresponding normal image prompts. The predicted anomaly maps are shown using different methods, including (c) WinCLIP+ cvpr2023winclip, (d) AnomalyCLIP iclr2024anomalyclip, (e) UniAD neurips2022uniad and (f) our MetaUAS. Best viewed in color and zoom-in.
  • Figure 4: Anomaly segmentation for query images with different normal image prompts including 5 random prompts and the optimal prompt (denoting as prompt$\star$). The anomaly segmentation maps are generated with MetaUAS, MetaUAS$\star$ and MetaUAS$\star+$.
  • Figure A1: Qualitative comparisons with state-of-the-art methods on MVTec, VisA and Goods. In both two sub-figures (left and right), (b) and (g) represent query images and their anomaly masks, while (a) represent the corresponding normal image prompts. The predicted anomaly maps are shown using different methods, including (c) WinCLIP+ cvpr2023winclip, (d) AnomalyCLIP iclr2024anomalyclip, (e) UniAD neurips2022uniad and (f) our MetaUAS. Best viewed in color and zoom-in.