Skip to main content
QUICK REVIEW

[Paper Review] AI-SAM: Automatic and Interactive Segment Anything Model

Yimu Pan, Sitao Zhang|arXiv (Cornell University)|Dec 5, 2023
Visual Attention and Saliency DetectionComputer Science7 citations
TL;DR

AI-SAM blends automatic and interactive segmentation by introducing AI-Prompter to generate point prompts automatically, while still allowing user input to refine masks, achieving SOTA performance in automatic and interactive tasks.

ABSTRACT

Semantic segmentation is a core task in computer vision. Existing methods are generally divided into two categories: automatic and interactive. Interactive approaches, exemplified by the Segment Anything Model (SAM), have shown promise as pre-trained models. However, current adaptation strategies for these models tend to lean towards either automatic or interactive approaches. Interactive methods depend on prompts user input to operate, while automatic ones bypass the interactive promptability entirely. Addressing these limitations, we introduce a novel paradigm and its first model: the Automatic and Interactive Segment Anything Model (AI-SAM). In this paradigm, we conduct a comprehensive analysis of prompt quality and introduce the pioneering Automatic and Interactive Prompter (AI-Prompter) that automatically generates initial point prompts while accepting additional user inputs. Our experimental results demonstrate AI-SAM's effectiveness in the automatic setting, achieving state-of-the-art performance. Significantly, it offers the flexibility to incorporate additional user prompts, thereby further enhancing its performance. The project page is available at https://github.com/ymp5078/AI-SAM.

Motivation & Objective

  • Propose a unified automatic and interactive segmentation paradigm that preserves promptability while achieving automatic segmentation performance.
  • Analyze prompt quality and establish a framework to evaluate prompts for semantic segmentation.
  • Develop AI-Prompter to automatically generate robust point prompts guided by a specialized loss for accurate object localization.
  • Enable end-to-end training that integrates automatic prompt generation with a SAM-based interactive segmentation model.
  • Demonstrate state-of-the-art results on medical and generic segmentation tasks and show compatibility with existing SAM-based adaptation methods.

Proposed method

  • Introduce AI-SAM comprising AI-Prompter for automatic point-prompt generation and a SAM-based segmentation backbone.
  • Use generalized point representations P_g = W^T P to encode prompts, with a differentiable pipeline feeding P_g into the prompt encoder.
  • Train AI-Prompter with a prompt heuristic loss L_ph that combines point correctness loss L_pc, point sharpness loss L_ps, and prompt diversity loss L_pd.
  • Leverage two-way transformer-like architecture with convolutional blocks in the AI-Prompter to generate point prompts conditioned on image features and class c.
  • In inference, AI-SAM autonomously generates prompts and masks, while allowing user adjustments such as additional points or bounding boxes.
  • Evaluate AI-SAM on medical and camouflage/shadow segmentation benchmarks to demonstrate automatic and interactive improvements.

Experimental results

Research questions

  • RQ1How can a model seamlessly combine automatic and interactive segmentation capabilities without sacrificing performance or promptability?
  • RQ2What constitutes effective prompts for automatic and interactive segmentation, and how can they be quantitatively analyzed?
  • RQ3Can automatic prompt generation (AI-Prompter) produce high-quality, modifiable point prompts that improve segmentation when combined with SAM?
  • RQ4Does integrating automatic prompt generation with SAM-based adaptation methods yield state-of-the-art results across datasets and modalities?

Key findings

  • AI-SAM achieves state-of-the-art performance in automatic segmentation on Synapse and ACDC datasets.
  • In interactive settings, AI-SAM with class labels or ground-truth box prompts attains top performance among evaluated methods.
  • The AI-Prompter improves SAM-based adaptation methods (e.g., SAM-Adapter) on camouflage and shadow detection tasks.
  • Prompt quality analysis via Prompt Confusion Matrix (PCM) and Output Confusion Matrix (OCM) supports prioritizing high semantic similarity (TSS) with low false similarity (FSS).
  • Generalized point representations enable differentiable, adaptable prompts that can be tuned with point correctness, point sharpness, and diversity losses.
  • The framework preserves SAM’s promptability while delivering automatic segmentation capabilities and robust user-guided refinement.

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.