SEGMENT ANYTHING · RESEARCH PROJECT

Mask Refinement and Efficient Automatic Mask Generation for Lightweight SAM

Refine masks from points and boxes. Generate masks across an image faster with FSD-SAM’s shared computation and selective decoding.

TinySAM MobileSAM SAM ViT-H
PROMPT-ADAPTIVE REFINEMENT 01
Decoder referencePOINT
Brown bear in grassFrozen decoder reference mask
Reference candidate—
Refined prediction
Brown bear with refined predictionPrompt-adaptive model mask
First-click IoU—
Same image. Same initial prompt.
Qualitative example · TinySAM · COCO image 285
MODEL INTERFACE3 backbones
REFINEMENT6 modules / checkpoint
INTERACTIONPoint · Box · Everything
EVALUATIONSA-11K · COCO · LVIS
01 / APPROACH

Decisions at the decoder.

A shared interface. Distinct mechanisms for limited prompts, corrective interaction, and dense generation.

SEGANY / 01

First-click selection

Candidate tokens query local appearance, mask logits, and geometry to resolve ambiguity under a single positive click.

SEGANY / 02

Interaction-aware repair

Previous predictions inform later decisions. Bounded residual updates repair local errors while retaining prompt consistency.

SEGANY / 03

Box-guided comparison

An independent decoder proposes alternative masks. Added and removed regions provide evidence for evaluating each edit.

SEGEVERY / FSD-SAM

Explore the workflow in the research studio.

See the two-dimensional prompt grid, actual selected points and mask completion in the demo’s How FSD works tab.

Open FSD demo
02 / INTERACTIVE EXPLORER

Inspect the prediction.

Explore Point, Box, or Everything. Inspect corrective trajectories or individual automatically generated instances.

Example explorerRecorded predictions
Decoder reference—
Prompt-adaptive—
REFINED TRAJECTORY
LIVE MODEL COMPARISON

Continue with live inference.

Compare curated Point and Box targets, or upload your image for prompt-free Everything segmentation in the research studio.

03 / QUANTITATIVE EVALUATION

A better mask from the same prompt.

Original TinySAM, MobileSAM and SAM ViT-H → prompt-adaptive refinement. Compare one foreground click or one annotation box, with optional corrective clicks.

COCO val2017

mIoU (%) · 0–100 scale
Original modelOurs / TinySAMOurs / MobileSAMOurs / ViT-H

ONE CLICK / POINTTinySAM
55.65%
Original: 46.77%+8.88 pp vs original
ONE CLICK / POINTMobileSAM
55.00%
Original: 50.89%+4.10 pp vs original
ONE CLICK / POINTSAM ViT-H
60.83%
Original: 53.57%+7.26 pp vs original
36,335evaluated targets4,952 valid images

Initial prompt → after correction

Paper tables & protocol

Original→ Refined · IoU (%) · the same prompt stage

Original to refined IoU at initial, one correction and two correction stages
Dataset / backbonePoint promptsBox prompts
Initial point+1 correction+2 correctionsInitial box+1 correction+2 corrections

Start with a mask-center foreground click or an annotated box. Each method generates its own corrective clicks. Gains use unrounded IoUs. † Historical baselines: MobileSAM on SA-11K and SAM ViT-H on LVIS and SA-11K.

PAPER / COCO100

FSD-SAM on COCO100

Full results & protocol
100 COCO val2017 images · 709 targetsNVIDIA RTX 5060 TiFP3232 × 32 grid · batch 64
Dense, Hierarchical and FSD-SAM comparison on COCO100
Backbone / methodms/imageSpeedupAR@300 (%)ΔAR (pp)Best IoU (%)1-to-1 IoU (%)Points completed

Speedup and ΔAR use Dense on the same backbone as the baseline. End-to-end timing covers image encoding and mask generation, with three warm-ups and three timed runs per image.

04 / MODEL RELEASE

One backbone. One checkpoint.

The frozen base and all six refinement modules are packaged together. Download, load, and refine.

05 / GET STARTED

A compact research interface.

Read the documentation
QUICK START
# Download a complete checkpoint
python download_models.py --model tinysam

# Run a full COCO evaluation
python evaluate.py --model tinysam \
  --checkpoint weights/tinysam_prompt_adaptive_v1.pth \
  --dataset coco --data-root datasets/coco \
  --output runs/tinysam-coco
INTERACTIVE APPLICATION

Run inference locally.

Use the complete checkpoint with the image-upload application.

pip install -r demo/requirements.txt
python demo/server.py --host 127.0.0.1 --port 7860

Then open http://127.0.0.1:7860.

Deployment guide