Skip to main content
QUICK REVIEW

[Paper Review] Matcher: Segment Anything with One Shot Using All-Purpose Feature Matching

Yang Liu, Muzhi Zhu|arXiv (Cornell University)|May 22, 2023
Multimodal Machine Learning ApplicationsComputer Science15 citations
TL;DR

Matcher is a training-free framework that combines off-the-shelf vision foundation models to segment anything from a single in-context example, achieving strong one-shot and few-shot segmentation across multiple tasks without training.

ABSTRACT

Powered by large-scale pre-training, vision foundation models exhibit significant potential in open-world image understanding. However, unlike large language models that excel at directly tackling various language tasks, vision foundation models require a task-specific model structure followed by fine-tuning on specific tasks. In this work, we present Matcher, a novel perception paradigm that utilizes off-the-shelf vision foundation models to address various perception tasks. Matcher can segment anything by using an in-context example without training. Additionally, we design three effective components within the Matcher framework to collaborate with these foundation models and unleash their full potential in diverse perception tasks. Matcher demonstrates impressive generalization performance across various segmentation tasks, all without training. For example, it achieves 52.7% mIoU on COCO-20$^i$ with one example, surpassing the state-of-the-art specialist model by 1.6%. In addition, Matcher achieves 33.0% mIoU on the proposed LVIS-92$^i$ for one-shot semantic segmentation, outperforming the state-of-the-art generalist model by 14.4%. Our visualization results further showcase the open-world generality and flexibility of Matcher when applied to images in the wild. Our code can be found at https://github.com/aim-uofa/Matcher.

Motivation & Objective

  • Motivate the use of vision foundation models for diverse perception tasks without task-specific training.
  • Leverage a reference image and mask to guide segmentation on a target image via in-context inference.
  • Design components to enable robust cross-image matching and diverse prompt generation for SAM.
  • Achieve high generalization in one-shot and few-shot semantic and part segmentation, and extend to video object segmentation.

Proposed method

  • Extract patch-level features from reference and target images using off-the-shelf encoders (e.g., DINOv2) to form a correspondence matrix S via cosine similarity.
  • Use bidirectional patch matching and mask filtering to produce robust forward and reverse correspondences and suppress outliers.
  • Introduce a robust prompt sampler that generates part-, instance-, and global-prompts from matched points to create diverse SAM prompts.
  • Perform instance-level matching between the reference mask and SAM-derived proposals using optimal transport (Earth Mover’s Distance) with a cost C = 1/2(1−S), plus purity and coverage metrics to score proposals.
  • Merge high-quality masks and produce controllable outputs by adjusting the number of merged masks for same-semantics instances.
  • All steps are designed to operate without any training of the underlying models.

Experimental results

Research questions

  • RQ1How can vision foundation models be composed to perform segmentation tasks without task-specific training?
  • RQ2Can in-context examples guide cross-image semantic matching to produce accurate masks across different datasets?
  • RQ3What components are essential to transform a class-agnostic segmentation model into a generalist perceptual system?
  • RQ4How far can one-shot and few-shot segmentation generalize across datasets like COCO-20i, FSS-1000, and LVIS-92i?
  • RQ5Is it feasible to extend the approach to video object segmentation without training?

Key findings

  • Matcher achieves 52.7% mean IoU on COCO-20i (one-shot) and 60.7% (few-shot).
  • Matcher achieves 87.0% mean IoU on FSS-1000 (one-shot) and 89.6% (few-shot).
  • Matcher achieves 33.0% mean IoU on LVIS-92i (one-shot) and 40.0% (few-shot).
  • Compared with state-of-the-art specialist models and generalist models, Matcher shows superior or competitive performance across the evaluated datasets.
  • Matcher significantly outperforms training-free PerSAM and PerSAM-F on COCO-20i, FSS-1000, and LVIS-92i, indicating the value of combining foundation models rather than relying on SAM alone.
  • In video object segmentation, Matcher delivers competitive results without training, outperforming some models trained with non-video data.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.