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

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

References (79)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer bbUz6/10 · confidence 3/52024-06-25

Summary

This work presents a novel approach for universal anomaly segmentation (AS) by framing AS as Change segmentation. This change of perspective motivates them to create a synthetic training set based on change detection (e.g. by stitching additional objects from a different dataset). With this synthetic dataset they train a change segmentation model which they later transfer directly for anomaly segmentation without fine-tuning.

Strengths

The idea of framing Anomaly Segmentation as Change Segmentation is interesting and worth exploring. The results are encouraging, especially in the Gooods dataset.

Weaknesses

The paper is confusing at times, with some important concepts not clearly defined: - For instance, the different method variants i.e. MetaUAS/MetaUAS*/MetaUAS*+ should be explained more thoroughly in the methodology section. - Also there should be consistency in the naming (MetaUAS vs MetaAS). - The highlighted numbers (red and blue) in the tables are excluding UniAD in Table 1 (which is marked in gray) and I could not find out why. Missing comparison with change segmentation methods. The paper proposes that AS can be tackled as change segmentation between one normal (reference) image and the query image with the anomaly, which sounds reasonable. However, I would expect then that existing Change Segmentation methods could be applied to AS (just like authors do with their method). Thus, it would be sensible to include a comparison with one or two baselines of recent change segmentation methods applied to AS the same way that MetaUAS is applied.

Questions

Can the authors explain what are the differences between MetaUAS/*/*+ ? Why is UniAD excluded from the comparison in Table1? Could all change segmentation methods be applied to anomaly segmentation "off-the-shelf"? If yes, why not include some existing methods as baseline? If no, please explain what are the particular differences that make MetaUAS applicable to AS while other change segmentation methods can not.

Rating

6

Confidence

3

Soundness

3

Presentation

3

Contribution

3

Limitations

Limitations and social impact are well addressed.

Reviewer sm3a6/10 · confidence 3/52024-07-06

Summary

The authors introduce a method for anomaly segmentation that relies solely on visual information and does not require any anomaly training data or language guidance. Their method is based on change segmentation, which allows for the synthesis of large-scale image pairs for training the anomaly segmentation model. The proposed MetaUAS framework demonstrates its generalizability across three industrial anomaly segmentation datasets: MVTec, VisA, and Goods, using one normal image per class as a prompt. Within their framework, the authors extensively experimented with different modules, including an image encoder, feature alignment, and a segmentation decoder. Notably, their feature alignment approach, which is based on a weighted combination of image prompt features, proves to be highly effective for anomaly segmentation by bringing together features of semantic segmentation and change segmentation.

Strengths

- A novel approach is presented by formulating anomaly segmentation as change segmentation. - Extensive experiments on multiple datasets and in different model configurations demonstrate the effectiveness of the presented method, MetaUAS. In particular, the anomaly segmentation performance benefits from the specifically designed soft alignment module. - It is shown how efficiently a change segmentation dataset can be created with synthetic data, which is then used for training anomaly segmentation. - MetaUAS, trained on synthetic data, generalizes well to real-world problems. Notably, the method does not require any anomalous data for training but still outperforms existing methods that use such auxiliary data. - Unlike other existing methods, MetaUAS does not require guidance from language and solely relies on visual information.

Weaknesses

- At least one normal image per class is always needed as a prompt to perform anomaly segmentation. All prompts must be processed by the encoder to extract their features, which could become expensive as the number of classes increases. - The prompt features can be stored offline as a prompt pool to reduce forward passes at test time when using MetaUAS. However, it is unclear whether a single example can represent all normal examples for a class effectively (Figure 4 highlights the issue of different prompts). Searching for the best matching normal image for each query image is obviously resource-intensive. - The anomalies shown in the industrial datasets relate to small changes in the appearance of the objects. The objects are also always displayed in the same scene. It is noted that the orientation of the object affects the anomaly segmentation performance. To further investigate the limitations, it would be interesting to see what would happen if the scenes changed more dramatically, which is realistic in open-world settings. For example, would MetaUAS be robust if the same normal object were shown with a different background? - Minor: The paper could benefit from better writing and structure. There are a few typos throughout the text, and the figures and tables could be placed differently. It is not always easy to follow.

Questions

- Some more details on the training process would be appreciated. For instance, there is no information on how much training data was required to achieve the presented performance or how robust the model training was. The training data seems to be created in an automated fashion; to what extent does the amount of training data affect the anomaly segmentation performance? - One could use more than one image as a prompt to potentially obtain more robust anomaly scores. How efficient is the inference? In particular, compared to other existing approaches, could one afford a larger prompt pool or multiple forward passes of MetaUAS? - Relying on the changes in the visual appearance of objects seems to be a valid approach for anomaly segmentation in industrial settings. The same objects often appear in the same scene, and the anomalies are clear, small visual changes. Therefore, guidance with language seems unnecessary, as the semantic information is not crucial for this kind of anomaly segmentation. However, for other datasets on anomaly segmentation, semantic information seems crucial, such as the [SMIYC](https://segmentmeifyoucan.com/) benchmark, where any obstacle on the road is considered an anomaly. Could MetaUAS also be applied to such more challenging tasks where the normal "object" itself (e.g., the road) could have varying visual appearances as well?

Rating

6

Confidence

3

Soundness

3

Presentation

2

Contribution

2

Limitations

The authors have discussed limitations. Potential negative social impact have not been mentioned.

Reviewer gb5F6/10 · confidence 4/52024-07-12

Summary

The proposed method reformulates the one-shot anomaly detection task as a change detection task. The proposed method is trained with a synthesitzed change dataset, where objects are added, deleted or exchanged. Additionally, local changes are generated by pasting out-of-distribution textures on images in random locations. The proposed method is trained in a meta-learning manner where each meta-task is a prompt+query pair where a specific change must be detected and accurately segmented. The trained model is applied to industrial anomaly detection, where a single anomaly-free image is used as the prompt while a potentially anomalous image is used as the query. The model must then segment potential changes between the prompt and query image.

Strengths

- The proposed method is interesting and it deviates significantly from the top performing few-shot anomaly detection methods since most recent methods are based on CLIP. - The ablation study is mostly well done and individual components seem to be evaluated properly. - The proposed method achieves good results - The change detection dataset generation is an interesting approach to creating a dataset and it is interesting that the method generalizes well to industrial inspection datasets even though the training dataset is from a different domain.

Weaknesses

- Clarity issues in the paper (Exactly how prompt pooling is performed in Section 3.4.) - The way CLIP is added to the architecture in MetaAS*+ is not clear. - Figure 4 - First column and the rest of the figure should be separated better. Currently it seems like the entire row depicts GT masks or queries. - The evaluation of backbones is limited to convolutional models. The only transformer is used with the MetaAS*+ model. - MetaAS*+ uses CLIP and achieves the best performance. Why this helps with the one-shot anomaly detection task is not intuitive and a further discussion would be beneficial for the reader.

Questions

- Why are only convolutional networks used? Transformer networks should also work well here? A Transformer backbone in the ablation in Table 3b would be nice. - How is the visual prior from CLIP introduced to the framework. In Table 2 the complexity of MetaAS*+ suggests that Eb4 and ViT are both run but this is not well explained. - Couldn’t this be extended to the few-shot setup at inference by just adding more prompts and aligning features? If no, why not? If yes, why limit the evaluation to one-shot?

Rating

6

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

The authors have adequately addressed the limitations.

Reviewer DDkp7/10 · confidence 5/52024-07-12

Summary

This paper considers the anomaly segmentation task as a change segmentation task. Then the large-scale image pairs with object-level and local region changes are synthesized to train a universal anomaly segmentation framework MetaUAS. This only needs one normal image as the prompt. The soft feature alignment module is proposed to handle geometrical variations between prompt and query images. This method achieves state-of-the-art performance on MVTec AD, VisA, and Goods datasets.

Strengths

1. This paper synthesizes large-scale image pairs with object-level and local region changes, and desiges a universal anomaly segmentation framework that only need one normal image as prompt. This idea is novel and has practical implications. 2. This paper propose the soft feature alignment module to handle geometrical variations between prompt and query images. This is a novel, simple and effective alignment method. 3. This method is compatible with various feature extractors, and is not limited to CLIP like some previous methods. 4. The authors conducted experiments on three anomaly detection datasets. Significant improvement has been achieved, which proves the powerful generalization ability of this method.

Weaknesses

1. The three fused features and two low-level original features are input into decoder. How these features are used in the decoder needs to be explained in more detail. 2. CLIPSeg [1] also uses one image as the prompt to perform segmentation tasks. It is beneficial to discuss and compare with CLIPSeg in this paper. [1] Lüddecke T, Ecker A. Image segmentation using text and image prompts[C]//Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2022: 7086-7096.

Questions

See the weaknesses.

Rating

7

Confidence

5

Soundness

3

Presentation

4

Contribution

4

Limitations

None.

Reviewer DDkp2024-08-08

Response to Author Rebuttal

Thank the authors for their response. I'm inclined to keep my rating. This is a very interesting and novel paper, but this method does not seem to be very robust to different normal image prompts, which makes it impossible to continue to improve the rating to Strong Accept.

Authorsrebuttal2024-08-09

Response to Reviewer Concerns on Robustness

Thank you for your thoughtful feedback and for maintaining your rating (**Accept**). We appreciate your recognition of the novelty and interest in our work. We understand your concerns regarding the robustness of our method to different normal image prompts and would like to address these as follows to clarify our approach further. Firstly, as demonstrated in Figure 4, our MetaUAS shows robustness to different normal image prompts within the same category, particularly in those categories with significant geometric variations, such as grid and screw. This indicates that our method can effectively handle different prompts within the same category. Secondly, to quantitatively evaluate the robustness of our MetaUAS, we report performance metrics including the mean and variance based on the results from five different normal image prompts (generated with random seeds). It can be observed that our MetaUAS achieves higher means and lower variances compared to WinCLIP+ across most metrics, demonstrating its superior stability. Lastly, we have found that matching the optimal prompt (as shown in MetaUAS* in Table 1) or using few-shot normal prompts (e.g., 5-shot) can further result in significant performance improvements or enhance robustness (as detailed in the gb5F-Q3). We hope these explanations adequately address your concerns regarding the robustness of our method. We are grateful for the opportunity to discuss these aspects further and thank you once again for your valuable feedback.

Reviewer bbUz2024-08-09

Thank you for the authors response

The author response clarified my questions and after reading the other reviewers comments I will increase my score to weak accept.

Reviewer sm3a2024-08-12

Thanks for the efforts in the rebuttal. I will maintain my score.

Reviewer gb5F2024-08-13

Thanks for the insightful rebuttal. The adaptation to the few-shot scenario is interesting. It would also be interesting to see the performance of the MetaUAS* on the few-shot setup due to the difference in performance to MetaUAS in the one-shot scenario. But otherwise my concerns have been addressed.

Authorsrebuttal2024-08-14

Response to Reviewer Concerns on Few-Shot MetaUAS*

We are pleased to hear that our rebuttal has addressed most of your concerns, and we appreciate your continued engagement in this discussion. In response to your interest in the few-shot MetaUAS*, we have included the results in the table below. |Shot |I-ROC |I-PR |P-ROC |P-PR |P-PRO| | :---: | :---: | :---: | :---: | :---: | :---: | |1 |94.2 |97.6 |95.3 |63.7 |83.1| |3 |95.0 |98.0 |96.2 |66.0 |85.9| |5 |**95.2** |**98.1** |**96.4** |**66.4** |**86.4**| It is important to note that the one-shot MetaUAS* is based on the best-matched normal image prompt. Consequently, for the 3-shot and 5-shot MetaUAS*, we utilized the top 3 and top 5 normal image prompts, respectively. As shown, the performance trend of MetaUAS* is similar to that of MetaUAS (gb5F-Q3) as the shot number of normal image prompts increases. We acknowledge that our current extension from one-shot to few-shot is quite straightforward. We consider it a preliminary approach, leaving room for future work. Thank you for your feedback.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC