SAM2MOT: A Novel Paradigm of Multi-Object Tracking by Segmentation
- Publication
- AAAI 2026Conference
- First submitted to arXiv
- arXiv:2504.04519
Cite this paper · BibTeX
The citation identifies the linked source version. It cites the original paper and its authors.
@misc{multiobjecttrackingsam2mot2025,
title = {{SAM2MOT: A Novel Paradigm of Multi-Object Tracking by Segmentation}},
author = {Junjie Jiang and Zelin Wang and Manqi Zhao and Yin Li and DongSheng Jiang},
year = {2025},
eprint = {2504.04519},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2504.04519}
}
For years, the mainstream approach to multi-object tracking has been to run a detector on every frame and then match this frame's boxes to the previous frame's tracks. Matching relies on position and appearance, and whatever the detector misses or boxes crookedly has to be patched up somehow later on.
This paper from Huawei Cloud swaps the two roles. The detector is only responsible for spotting newly arrived objects and providing a box as a prompt; after that, each object is handed to its own SAM 2 tracker, which segments it all the way through the video on its own, and the tracking box is computed straight from the mask. Both the detector and SAM 2 use off-the-shelf pretrained weights, with no fine-tuning on any tracking data. On DanceTrack, its HOTA comes out at 75.8, 2.1 higher than MOTIP, which was trained on DanceTrack.
Defining the problem
With detect-then-match methods, success or failure hinges largely on the detector. When people crowd together and block one another, detection boxes flicker in and out, and the matching goes wrong along with them. End-to-end methods learn detection and association together in a single model, but they need large amounts of tracking data labeled with identities; data like that, with IDs labeled frame by frame, is both expensive and scarce.
In multi-object tracking, segmentation has always played a supporting role. MASA learns association features from regions cut out by SAM, and systems like TrackAnything piece SAM together with a video tracker, but the backbone of tracking is still the box.
SAM 2 made the authors want to try a different direction. Give it a box and it keeps following that object through the video, relying on the features of the first frame and the most recent 6 frames in its memory bank. In the single-object case, SAMURAI has already shown that this mechanism packs a real punch.
The most direct idea is to open one SAM 2 per object and let each track its own. Doing that runs into three problems.
First, who provides the prompts? In multi-object tracking, objects keep entering and leaving the frame, so clicking once on the first frame won't do.
Second, once SAM 2 has a prompt, it just keeps tracking. It has no notion of "this isn't actually a person." Once a false positive from the detector is taken as a prompt, it becomes a fake track that never ends. Conversely, after an object leaves the frame, SAM 2 still outputs a mask, just with lower confidence, and the system has to decide for itself whether the object has really gone.
Third, trackers that each go their own way get into trouble during occlusion. When B is blocked by A, B's tracker can easily switch over to following A, and that frame's error gets written into B's memory, after which B is hard to recognize again.
Solving the problem

In the middle of panel (a) is a row of SAM 2 trackers, one per object. The Trajectory Manager System above them handles the first two problems, deciding when to add a new object, when to remove one and when to re-prompt; the Cross-object Interaction at the bottom right handles the third, having the trackers check one another. The detector is only an assistant here, and the boxes finally output come from SAM 2's masks.
When to add a new object
On every frame, SAM 2 outputs masks and tracking boxes for the objects already being tracked, and the detector produces a batch of detection boxes. A candidate new object has to pass three checks.
- Confidence threshold. Co-DINO-L detection boxes need a score of 0.5 or more; for Grounding DINO-L it's 0.4.
- Hungarian matching. The remaining detection boxes are matched against SAM 2's tracking boxes. Those that match are existing objects, and only the unmatched ones are candidates for new objects.
- Free-space check. Take the union of the masks of all tracked objects and invert it, which gives the pixels in the frame "not yet claimed by anyone":
Then compute what fraction of the candidate box falls in . Only above is it initialized as a new object.
The third check is the more unusual part of this design. Suppose a dancer walks in from the edge of the frame with a detection box of 100 × 200 pixels, 5,000 of which are already covered by a neighboring dancer's mask. The free-space ratio is 75%, so the dancer can be added. If the box actually sits between two overlapping dancers, with 8,000 pixels already taken, only 60% is free, and nothing is added.
The bar is set this high because SAM 2's mistakes are hard to take back. In a detect-then-match method, a false positive that isn't detected again on the next frame simply disappears; once a SAM2MOT tracker is started by a wrong box, it keeps on tracking. A box showing only half a body won't do either. A prompt built from partial appearance is the most likely to confuse one person with another once occlusion comes along.
When to remove, and when to re-prompt
On every frame, SAM 2 gives each mask a logit score. The authors use three thresholds to sort objects into four states:
| State | logit range | Meaning |
|---|---|---|
| reliable | above 8 | Clearly visible |
| pending | 6 to 8 | Slight occlusion or aging memory |
| suspicious | 2 to 6 | Heavy occlusion, only partly visible |
| lost | 2 or below | Almost fully blocked or already gone |
An object that stays lost for more than 25 consecutive frames is removed from the tracks. The paper does nothing extra with the suspicious state and leaves it for future extensions.
The pending state triggers quality reconstruction. An object's appearance, size and position keep changing, so the prompt from its first frame slowly goes stale. If an object is pending and its tracking box happens to match a high-confidence detection box, the system uses that detection box as a new prompt and updates the object's keyframe. The authors added in a GitHub issue that the implementation clears the object's old memory entirely and reinitializes it under the same ID.
Under occlusion, trackers check each other

This is the biggest difference between SAM2MOT and simply giving each object its own SAM 2.
First, the system has to notice that something has gone wrong. If two objects' masks have an IoU above 0.8, the two trackers have latched onto the same thing, and one of them must be wrong.
Next, it works out which one is wrong, in two steps. If A's logit is two or more points higher than B's, B is the wrong one. If the two scores are close, it looks at the variance of each one's logits over the past 10 frames:
The authors observe that A's score usually declines gradually as its memory slowly ages, while B's drops suddenly the moment B is blocked. The one that drops suddenly has the larger variance.
Let's try it with some numbers. Over 10 frames, A's logit falls steadily from 9.0 to 8.2. B sits at 9.8 for the first 7 frames, then is blocked for the last three, which come out at 9.0, 8.5 and 8.3. The two are now only 0.1 apart, so the first step can't separate them. The variances come to about 0.07 for A and about 0.33 for B, and B is judged to be the one with the confused identity.
Once that's decided, B's memory from this frame isn't written to the memory bank. The authors explained in an issue that the implementation sets this frame's score to −1 so that it gets filtered out at the memory-attention stage. SAM 2's original low-confidence filter is kept too, but with a lower threshold, so it removes only badly degraded frames. That way B's memory holds only how B looked before being blocked, and when B shows up again, it can still be recognized.
The judgment assumes B's drop is large enough, or that B stays low for the last few frames. A steady gradual decline and a drop in the very last frame, of about the same total size, actually give fairly similar variances over 10 frames. The paper doesn't analyze how often it misjudges in that situation.
Implementation settings
Two detectors are used, neither of them fine-tuned. Co-DINO-L is pretrained on COCO only, and Grounding DINO-L on COCO and Objects365. Segmentation uses the SAM2.1-L weights. All datasets share the same set of hyperparameters.
Discussion
DanceTrack
DanceTrack is a group of similarly dressed dancers moving around a stage. They are almost indistinguishable in appearance and move irregularly, which makes it a dedicated test of association. The main metric is HOTA; AssA measures association, DetA measures detection, and HOTA is roughly the geometric mean of the two.

Only SAM2MOT is orange in the plot. Neither its detector nor its tracker was trained on DanceTrack, yet it lands in the far top right. Broken down by metric:
| Method | HOTA | IDF1 | AssA | DetA |
|---|---|---|---|---|
| ByteTrack | 47.3 | 52.5 | 31.4 | 71.6 |
| OC-SORT | 54.6 | 54.6 | 40.2 | 80.4 |
| MOTRv2 | 69.9 | 71.7 | 59.0 | 83.0 |
| MOTIP | 73.7 | 79.4 | 65.9 | 82.6 |
| SAM2MOT | 75.8 | 83.9 | 72.2 | 79.7 |
Compiled from Table 1 of the paper, with Grounding DINO-L for the SAM2MOT row.
Nearly all of the lead comes from association. AssA is 6.3 higher than MOTIP's and IDF1 4.5 higher; DetA is actually 2.9 lower, and MOTA likewise trails, 88.5 against 92.7. A detector without fine-tuning still can't match the detection quality of one trained on the stage.
Swapping in the same detector
ByteTrack in the table above uses a detector fine-tuned on DanceTrack. The authors also hooked ByteTrack and OC-SORT up to Co-DINO-L, so that all three are compared with the same detector.
With Co-DINO-L, ByteTrack's HOTA rises from 47.3 to 56.1. The large detector brings quite a lot of improvement by itself, and part of SAM2MOT's lead comes from there too. With the same detector, SAM2MOT gets 75.5, still nearly 20 points higher, and that stretch is what segmentation-based tracking contributes.
Missed targets drop from ByteTrack's 29,373 to 14,584, cut in half; ID switches fall from 1,650 to 854. False positives, however, rise from 6,028 to 15,653, 2.6 times as many as before. SAM 2 keeps segmenting people who are blocked, recovering many targets the detector missed, while also adding some masks that shouldn't be there.
Ablation
| Setting | HOTA | MOTA | IDF1 |
|---|---|---|---|
| Baseline | 62.9 | 55.6 | 69.6 |
| + Object addition | 67.9 | 69.7 | 74.4 |
| + Addition + quality reconstruction | 69.1 | 69.2 | 76.0 |
| + Addition + cross-object interaction | 73.8 | 87.4 | 80.9 |
| All | 75.5 | 89.2 | 83.4 |
Compiled from Table 3 of the paper, Co-DINO-L, DanceTrack test set.
The baseline's MOTA is only 55.6, which shows how many false positives and wrong tracks come from using detection boxes directly as prompts. The three-check filter lifts MOTA to 69.7. Cross-object interaction has the biggest effect, taking MOTA straight up to 87.4 and adding nearly 6 points of HOTA.
Two other datasets
UAVDT is vehicle tracking from a drone's viewpoint. Under the standard IoU 0.5 evaluation, SAM2MOT reaches a MOTA of 55.6 and an IDF1 of 74.4, above DroneMOT, the best in the table (50.1 and 69.6). The authors consider UAVDT's annotations noisy and also report results at IoU 0.4, where MOTA reaches 66.1; that is a relaxed evaluation and can't be compared with the other methods.
BDD100K is dashcam video. Under the standard 8-class setting, SAM2MOT's MOTA is 57.5, lower than QDTrack (63.5), MOTRv2 (65.6) and UNINEXT (67.1) in the table, and its IDF1 of 70.8 is also below most methods. The authors attribute this to the detector, which without fine-tuning can't tell apart categories that look alike. In the 3-class setting, MOTA is 63.0 and IDF1 73.7, but there the only comparison is ByteTrack with the same detector. The abstract claims state-of-the-art results on all three datasets; on BDD100K, the claim doesn't hold under the standard 8-class setting, and the 3-class setting lacks comparisons with other methods.
Limitations
The first limitation the authors point out themselves is speed, yet the paper gives no FPS figures at all. With one SAM 2 per object, computation grows with the number of objects, and there's a large detector in front of all that. The authors suggest three ways to speed things up: switching to a lighter detector (YOLOE, for example), accelerating segmentation with methods like EdgeTAM, and running several SAM 2 instances in parallel.
The second limitation comes from segmentation itself. When only a person's head is showing, SAM 2 segments only the visible part, and the tracking box covers only the head; in detect-then-match methods, the detector directly infers a box for the whole person. On benchmarks like MOTChallenge, annotated with full-body boxes, this costs points directly. The third is long-term memory. SAM 2's memory is mostly short-term, so after a long occlusion it still tends to lose track.
The paper's first page gives a GitHub link, but as of November 2026 the repository holds only a README and two images, with no code at all. In a September 2025 issue, the authors said the code would be open-sourced if the paper was accepted at AAAI 2026; even after the paper came out, people have kept asking about it in the issues. Another user noted that SAM 2 loads the whole video at inference, so long videos use a lot of GPU memory, and frames and state have to be moved to the CPU, trading time for space.
Conclusion
Handing each object to its own SAM 2 makes for a simple skeleton. What makes it work is the ring of rules around it: a strict entry check blocks false positives, four score levels decide who stays and who goes, and when masks overlap, comparing how the scores have changed keeps the one being blocked from writing its error into memory.
The DanceTrack results show that segmentation plus memory really is good at telling people apart in scenes where "everyone looks the same," and without any tracking annotations. The cost lies on the detection side and the speed side. An un-fine-tuned detector struggles in multi-category scenes like BDD100K, and one SAM 2 per object is bound to be slow. Another use the authors mention, generating pre-annotations for tracking data, may be the most practical way forward for now, though that will have to wait until the code is actually released.