SAM1K

Tracking over a Thousand Objects with Frozen SAM

Kaining Ying  ·  Henghui DingFudan University
1,024
targets tracked
on one 48 GiB GPU
14.6×
faster than full‑frame
windows, SAM 2.1
7.9 GiB
SAM1K-3 peak
at 1,024 targets
0
weights changed
training-free
SAM1K-3  ·  stored prediction
MOSE1K 000 Interchange · Frame 0 / 300
One streaming pass

Every car is prompted with its first-frame mask, and the frozen SAM 3 tracks all of them at once.

1,028
prompted targets
77.5
J&F of this video
86.7
IDF1 of this video
8.0GiB
peak, MOSE1K Short
Gray objects are cars that SAM1K-3 no longer segments in that frame. Every second frame is shown.
Abstract

Segment Anything Models such as SAM 2.1 and SAM 3 perform full-frame tracking independently for each prompted object. This makes tracking hundreds or thousands of objects, such as cells and people in crowds, computationally expensive. To reduce this cost, we present SAM1K, a training-free method that preserves the original model weights, restricts object-specific computation to adaptive windows around each object, and shares object-independent context across all objects. Specifically, each object maintains a small memory patch, while a shared background memory is computed once per frame. A small number of satellite tokens allow each window to access object-specific memory outside its boundaries. When tracking 1024 targets on a single 48 GiB GPU, SAM1K runs 13.4× to 14.6× faster than full-frame tracking with the same SAM 2.1 and SAM 3 models. To facilitate research on tracking thousands of objects, we further introduce MOSE1K, a rendered benchmark containing over a thousand prompted targets per video, on which the released SAM 2.1, SAM 3.1, and SAM-MT predictors all run out of memory. SAM1K tracks all targets in a single streaming pass. On real-world videos, both SAM1K-2.1 and SAM1K-3 maintain tracking accuracy within a 1.5-point margin of their original trackers across all sparse and dense datasets. All code and the MOSE1K dataset are publicly released.

Examples

A Thousand Masks, Frame by Frame

Stored predictions of SAM1K-2.1 and SAM1K-3 on the five MOSE1K Short videos, against the rendered ground truth. Each target keeps one colour in every view, and objects left gray carry no mask. Switch views while the video plays, and hover it to magnify.

J&F scores each target's own mask over frames 1 to 299. Jvis and IDF1 score visible frames, and FP is the share of absent target-frames with a mask.
Speed

Same Video, Same GPU

Each clip advances exactly as fast as its method tracks the 1,028 cars of MOSE1K 000 on one 48 GiB GPU, played ten times faster than real time. Frame times, memory and J&F are the paper's timing runs on this video.

Out of memory on this video:
Method

Compute Where the Object Is

SAM1K keeps every module and weight of SAM 2.1 or SAM 3 and changes only where the object-specific stages run. Context that does not depend on any object is computed once per frame and read by all of them.

Queries per object
S² + K  vs  G²

An 8×8 window with 64 satellites holds 128 queries, against 4,096 for the 64×64 grid of SAM 2.1.

Shared per frame
Bt, one full-grid pass

The background memory and the pass without object pointers are computed once, however many objects there are.

Same weights
Full windows = SAM

With every window at full size SAM1K reduces to the official per-object tracker, and a frame with only full windows skips the shared pass.

MOSE1K

Over a Thousand Targets per Video

MOSE1K renders procedural 3D scenes with Blender, so every target has an exact mask in every frame, empty when it is occluded or out of view. Lighting and weather range from clear sky and snow to night and dim indoor light. The released SAM 2.1, SAM 3.1 and SAM-MT predictors run out of memory on every video.

10
benchmark videos
5 Short · 5 Long
6,500
frames at
1920 × 1080
1,636
targets in the
densest video
50%
of Short targets
under 16 × 16 pixels
Results

Scaling Without Losing Accuracy

Numbers from the paper. Timing is the median frame time on one 48 GiB GPU, and accuracy is J&F under the VOS protocol.

From 16 to 1,024 Targets

Mean over seven 100-frame stress clips with nested random subsets of MOSE1K targets. A cross marks the last count before a method runs out of memory.

MOSE1K

Every target scored. Chunks and Freed run what the released trackers cannot fit.

Freed keeps the outputs of the last 16 frames, and Chunks tracks 64-target chunks one after another. FP is the share of absent target-frames that receive a mask, lower is better.

Real Videos

Median frame time of the base tracker and SAM1K, and the paired J&F difference.

Base trackerSAM1K
Obj. is the median number of objects per video. Bars share one log scale per base. Hatched bars ran out of memory.
Citation

BibTeX

@article{ying2026sam1k, title = {Tracking over a Thousand Objects with Frozen SAM}, author = {Ying, Kaining and Ding, Henghui}, journal = {arXiv preprint}, year = {2026} }