Keep the fine detail
A convolutional branch adds local RGB detail to upsampled SAM features at quarter resolution, retaining cues for thin structures, boundaries, and narrow gaps before matching.
A VISUAL CORRESPONDENCE FRAMEWORK
1Sichuan University2RAWMANTIC (Chengdu Yuan Sanwei Technology Co., Ltd.)3Tianjin University4University of Electronic Science and Technology of China5University of Bologna
A point tells us where. A visual prompt tells us what.
Download MARSET Dataset1.04M images · 34.33M masks · Pixel-aligned supervisionPromptable segmentation tells a model where the target is but not what it looks like, so even correct point prompts can leak into the background or leave holes. We recast the task as correspondence matching and introduce MARS: each positive point becomes a visual prompt pairing its position with the image feature sampled there, and a ViT matches these prompts against the whole image before a DPT head decodes the mask. Trained on MARSET, a new dataset of high-resolution renders with pixel-accurate masks, MARS outperforms SAM and HQ-SAM in most settings, keeps improving as prompts are added, and transfers to specialized domains and one-shot segmentation.
SEE THE DIFFERENCE
A correct positive point identifies a location on the target, yet the predicted mask can omit target regions or include the background. MARS uses local appearance at the prompted locations to match the target across the image.
These are precomputed results with the same five positive points. Drag the slider or select an example to inspect target coverage and background inclusion.
MARS combines local appearance at each positive point with its position, then jointly processes visual prompts and image tokens to predict a dense target mask.
A convolutional branch adds local RGB detail to upsampled SAM features at quarter resolution, retaining cues for thin structures, boundaries, and narrow gaps before matching.
Sample a local image feature at each positive point and combine it with its positional encoding to form a visual prompt.
A ViT jointly updates image and prompt tokens. A DPT head combines image features from multiple transformer depths to predict the target mask.
MARSET · CLEAN SUPERVISION AT SCALE
A model learns which pixels belong to an object from its training masks. MARSET supplies high-resolution, pixel-aligned supervision that preserves the openings and fine structures a segmentation model needs to learn.
Same visual-prompt and ViT-DPT configuration. Different training data. These examples compare the paper's models (c) and (d), trained on COCONut-S and MARSET, respectively, with the same five positive points.
MARSET better preserves the glass stems and the background gaps between neighboring glasses.
The loops in the leash retain their interior openings.
More of the egret's thin legs is recovered.
MARSET better preserves the small openings in the intricate headdress.
Annotation quality becomes prediction quality. In these examples, MARSET supervision better preserves background openings and thin foreground regions.
Explore MARSETHIGH-RESOLUTION SEGMENTATION DATASET
High-quality supervision at scale: 1.04 million rendered images and 34.33 million image–mask pairs. MARSET uses Unreal Engine and 3D asset identifiers to produce pixel-aligned masks, preserving detailed object contours and interior openings.
Labels come from 3D asset identifiers, aligning image pixels with their target masks.
Native 1920 × 1080 renders retain small objects, thin structures, and object boundaries.
Millions of image–mask pairs cover ten scenes with varied viewpoints, lighting, and occlusion.
The gallery spans commercial, residential, and public interiors, as well as a rooftop garden, with varied viewpoints, lighting, object scales, and occlusion.
We compare MARS with SAM and HQ-SAM on COCO 2017, COCONut-S, LVIS v1, and HQSeg-44K using 1, 5, and 100 positive foreground points. Results report mask mIoU and boundary mBIoU.
| Prompts | SAM | HQ-SAM | MARS | |||
|---|---|---|---|---|---|---|
| mIoU | mBIoU | mIoU | mBIoU | mIoU | mBIoU | |
| 1 point | 44.23 | 35.97 | 81.90 | 70.80 | 71.29 | 64.12 |
| 5 points | 81.90 | 70.80 | 86.46 | 77.97 | 84.10 | 76.68 |
| 100 points | 74.55 | 63.55 | 84.78 | 76.14 | 88.20 | 81.62 |
All methods receive the same points for each target. Higher scores are better; bold, shaded cells indicate the best result for each metric and prompt setting.
From 5 to 100 points, MARS improves on all four benchmarks, while SAM and HQ-SAM decline. At 100 points, MARS has the best reported mIoU and mBIoU in each benchmark. HQ-SAM remains stronger at 1 and 5 points on HQSeg-44K; SAM leads at 1 point on LVIS v1.
We evaluate transfer to camouflaged objects (COD10K), leaf lesions (Leaf Disease), industrial defects (CDS2K), and colorectal polyps (CVC-ColonDB), using five positive points per target. These domains contain targets that resemble their surroundings or have subtle boundaries. MARS achieves the highest reported mIoU and mBIoU on each of the four datasets.
| Dataset | Domain | SAM | HQ-SAM | MARS | |||
|---|---|---|---|---|---|---|---|
| mIoU | mBIoU | mIoU | mBIoU | mIoU | mBIoU | ||
| COD10K | Camouflage | 75.00 | 65.22 | 76.95 | 67.25 | 78.89 | 69.52 |
| Leaf Disease | Agriculture | 40.75 | 24.59 | 47.73 | 30.09 | 51.58 | 33.85 |
| CDS2K | Industrial | 46.62 | 39.71 | 50.84 | 42.87 | 56.54 | 47.71 |
| CVC-ColonDB | Medical | 62.78 | 46.99 | 68.85 | 49.92 | 80.56 | 61.42 |
Each method receives a reference image, its target mask, and a query image. For MARS, a frozen DINOv3 encoder matches the reference foreground to the query to generate up to five positive points. These points jointly condition the prediction of the query mask.
| Method | mIoU | mBIoU | Time (s) | Memory (GB) |
|---|---|---|---|---|
| PerSAM | 88.30 | 70.49 | 6.51 | 2.11 |
| Matcher | 90.64 | 73.71 | 12.81 | 3.68 |
| MARS | 93.26 | 81.28 | 6.79 | 3.33 |
Average runtime and peak GPU memory are measured on an RTX 3080. MARS strikes a balance between segmentation accuracy and computational efficiency.
We thank the authors and maintainers of Segment Anything (SAM), DINOv3, DPT, and Depth Anything V2 for making their research and implementations publicly available.
We also thank the creators of the datasets used in our evaluations for supporting reproducible segmentation research.
If you use MARS in your research, please reference the project with the following BibTeX entry.
Dataset-specific citation information is available in the dataset repository.
@misc{deng_mars,
title = {MARS: Segment Anything via Correspondence Matching},
author = {Deng, Yufei and Zhang, Youmin and Yuan, Junchao and Fu, Chenyang and Wan, Yuchen and Xiao, Rong and Tosi, Fabio and Poggi, Matteo},
url = {https://dyfffffer.github.io/mars/},
note = {Manuscript}
}The MARS model weights are released under the Apache License 2.0, as specified in the model card.
For dataset-specific terms, please refer to the dataset repository. Third-party components retain their respective licenses.