Matching Anything by Segmenting Anything

Siyuan Li, Lei Ke, Martin Danelljan, Luigi Piccinelli, Mattia Segu +2 more
2/9/2026

No official code found. Best implementation: siyuanliii/masa (1,377 stars, Apache-2.0, last commit 2025-05-01).

Abstract

The robust association of the same objects across video frames in complex scenes is crucial for many applications, especially multiple object tracking (MOT). Current methods predominantly rely on labeled domain-specific video datasets, which limits the cross-domain generalization of learned similarity embeddings. We propose MASA, a novel method for robust instance association learning, capable of matching any objects within videos across diverse domains without tracking labels. Leveraging the rich object segmentation from the Segment Anything Model (SAM), MASA learns instance-level correspondence through exhaustive data transformations. We treat the SAM outputs as dense object region proposals and learn to match those regions from a vast image collection. We further design a universal MASA adapter which can work in tandem with foundational segmentation or detection models and enable them to track any detected objects. Those combinations present strong zero-shot tracking ability in complex domains. Extensive tests on multiple challenging MOT and MOTS benchmarks indicate that the proposed method, using only unlabeled static images, achieves even better performance than state-of-the-art methods trained with fully annotated in-domain video sequences, in zero-shot association. Our code is available at github.com/siyuanliii/masa.

View on arXivView PDF

Code Implementations(1)

siyuanliii/masaCommunity100%
Apache-2.0

Official Implementation of CVPR24 highlight paper: Matching Anything by Segmenting Anything

1,37790Shell, PythonMar 28, 20241 years agoApache-2.0
self-supervisiontracking-everything

Similar Papers

Cite this paper

@article{li2026matching,
  title  = {Matching Anything by Segmenting Anything},
  author = {Siyuan Li and Lei Ke and Martin Danelljan and Luigi Piccinelli and Mattia Segu and L. V. Gool and Fisher Yu},
  year   = {2026},
  eprint = {2406.04221},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2406.04221},
  journal = {CVPR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2406.04221.svg)](https://codeofpaper.com/paper/2406.04221)

Discussion