IDTCount: Counting Every Instance in Open Vocabulary Video Counting
Abstract
Open-vocabulary video counting counts distinct objects that match a text query across a video. The core challenge is maintaining consistent object identities across scene changes to prevent double counting or merged identities. To address this, we introduce IDTCount, an identity-driven temporal counting framework that maintains and validates persistent object identities across a video. It recovers lost identities during tracking and uses evidence from completed trajectories to resolve duplicate identities and suppress spurious ones. Across five counting benchmarks spanning long-tailed scenes, dense crowds, and long videos, IDTCount outperforms CountVid and SAM3Count, reducing CountVid's counting error (MAE) by 62.5% on BURST-Count and 78.2% on TAO-Count, and SAM3Count's by 9.6% and 27.6%. Furthermore, on three video instance segmentation benchmarks, IDTCount improves identity tracking over CountVid by up to 8.8% in AssA, 55.8% in HOTA, and 78.1% in IDF1. Code is available at https://github.com/Joan947/IDTCount
Figures & tables
| Dataset | Method | AssA (%) | HOTA (%) | DetA (%) | IDF1 (%) | ID Sw. | Long Rec. (%) |
|---|---|---|---|---|---|---|---|
| OVIS-test | CountVid [ 4 ] (AAAI ’26) | 81.21 | 65.79 | 53.50 | 70.92 | 484 | 76.64 |
| ByteTrack [ 61 ] (ECCV ’22) | 63.98 | 67.23 | 70.92 | 70.01 | 1300 | 14.46 | |
| MASA [ 28 ] (CVPR ’24) | 63.04 | 67.26 | 72.10 | 69.62 | 2196 | 45.19 | |
| SAM3 [ 9 ] (ICLR ’26) | 86.54 | 78.31 | 71.02 | 84.93 | 308 | 82.52 | |
| SAM3Count [ 38 ] | 83.02 | 75.90 | 69.55 | 83.94 | 199 | 80.77 | |
| IDTCount (ours) | 87.23 | 80.24 | 73.97 | 87.48 | 169 | 80.95 |
| BURST-Count | TAO-Count | Penguins | MOT20-Count | AnimalTrack-Count | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Method | MAE | RMSE | MAE | RMSE | MAE | RMSE | MAE | RMSE | MAE | RMSE |
| CountVid [ 4 ] | 1.433 | 4.750 | 2.595 | 5.894 | 4.0 | 5.3 | 50.0 | 61.3 | 8.7 | 14.5 |
| SAM3 [ 9 ] | 0.654 | 1.792 | 0.653 | 1.606 | 2.7 | 3.4 | – | – | – | – |
| SAM3Count [ 38 ] | 0.594 | 1.525 | 0.78 | 1.63 | 2.7 | 3.2 | – | – | – | – |
| IDTCount (ours) | 0.537 | 1.301 | 0.565 | 1.314 | 2.0 | 2.9 | 11.0 | 12.9 | 7.6 | 11.2 |
| Text only | Text + IR | |||
|---|---|---|---|---|
| Method | MAE | RMSE | MAE | RMSE |
| SAM3 | 74.71 | 89.45 | 74.71 | 89.45 |
| SAM3 + IDTCount | 74.71 | 89.45 | 74.71 | 89.45 |
| CountVid [ 4 ] | 69.00 | 86.01 | 27.86 | 45.04 |
| CVD + IDTCount | 64.86 | 83.23 | 23.86 | 36.27 |
| CGD-BX + SAM3 + IDT | 64.71 | 83.09 | 17.29 | 32.00 |
| BURST-Count | TAO-Count | OVIS-test | LV-VIS | |||||
|---|---|---|---|---|---|---|---|---|
| Method | MAE | RMSE | MAE | RMSE | HOTA (%) | IDF1 (%) | HOTA (%) | IDF1 (%) |
| ByteTrack | 4.106 | 8.243 | 3.892 | 7.797 | 67.23 | 70.01 | 71.52 | 73.20 |
| ByteTrack + IDTCount | 2.640 | 4.816 | 2.552 | 4.696 | 68.62 | 73.06 | 71.81 | 73.85 |
| MASA | 2.650 | 6.386 | 2.482 | 5.659 | 67.26 | 69.62 | 73.08 | 75.56 |
| MASA + IDTCount | 2.338 | 5.112 | 2.202 | 4.717 | 67.38 | 70.40 | 73.19 | 75.77 |
| Variant | AssA (%) | ID Sw. |
|---|---|---|
| SAM3 | 29.68 | 341 |
| + association module | 29.67 | 327 |
| + merge | 29.67 | 326 |
| + verifier | 29.88 | 186 |
| # | Feature | Definition |
|---|---|---|
| 1 | Appearance cosine | Cosine similarity between the mask-pooled features of the observation and the bank entry. |
| 2 | Appearance margin | Candidate similarity minus the best competing-candidate similarity. |
| 3 | Mask IoU | Overlap with the dormant identity’s last mask, when available. |
| 4 | Box IoU | IoU between the observation box and the candidate’s last observed box. |
| 5 | Center distance | Euclidean center displacement, normalized by the image diagonal. |
| 6 | Log area ratio | Absolute log ratio of observation and candidate box areas. |
| # | Feature | Definition |
|---|---|---|
| 1 | Log observation count | Logarithm of the number of frames with an accepted observation of the identity. |
| 2 | Span | Time between the first and last observation, in seconds. |
| 3 | Density | , where is the observation count, the span in seconds, and the processing rate. |
| 4 | Relative area | Median box area divided by the median over all identities of the query. |
| 5 | Aspect ratio | Median box height divided by median box width. |
| 6 | Maximum overlap | Largest IoU with another identity’s box over the lifetime. |
| Source | Raw train | Trainable | Selection |
|---|---|---|---|
| OVIS | 7,213 | 4,038 | 1,389 (692) |
| YouTube-VIS | 7,456 | 2,193 | 227 (94) |
| LV-VIS | 7,935 | 1,262 | 65 (4) |
| CityFlowV2 | 23,921 | 23,921 | 7,754 (7,754) |
| Total | 46,525 | 31,414 | 9,435 (8,544) |
| Source | Training | Selection | Evaluation | Eval. overlap |
|---|---|---|---|---|
| OVIS | train split, 607 videos (7,213 ev.) | valid split, 140 videos (1,389 ev.) | test split, 154 videos, 224 queries | none |
| YT-VIS | train split, 1,662 videos (7,456 ev.) | 30 train-split videos (227 ev.) | valid split, 308 videos, 481 queries | none |
| LV-VIS | train split, 2,575 videos (7,935 ev.) | 26 train-split videos (65 ev.) | val split, 679 videos, 2,462 queries | none |
| CityFlowV2 | S01 and S04, 30 cameras (23,921 ev.) | S03, 5 cameras (7,754 ev.) | not evaluated | – |
| Data source | Videos | Queries | Classes | Objects | Frames | FPS |
| Counting | ||||||
| BURST-Count [ 5 ] | 868 | 1,556 | 274 | 1–10 | 37–235 | 3 |
| TAO-Count [ 11 , 4 ] | 357 | 639 | 139 | 1–10 | 24–235 | 3 |
| MOT20-Count [ 13 , 4 ] | 3 | 3 | 1 | 80–1,203 | 52–398 | 3 |
| AnimalTrack-Count [ 60 ] | 25 | 25 | 10 | 8–134 | 196–2,126 | 30 |
| Penguins [ 4 ] | 3 | 3 | 1 | 28–59 | 34–94 | 3 |
| Dataset | Method | Count MAE | Count RMSE | Exact (%) | Over (%) | Under (%) | Frag. | Dup. (%) |
|---|---|---|---|---|---|---|---|---|
| OVIS-test | CountVid | 1.008 | 1.987 | 54.18 | 15.18 | 30.64 | 123 | 3.62 |
| OVIS-test | IDTCount | 0.394 | 0.816 | 71.06 | 13.39 | 15.55 | 67 | 3.21 |
| YT-VIS | CountVid | 1.179 | 4.460 | 60.32 | 19.54 | 20.14 | 64 | 2.21 |
| YT-VIS | IDTCount | 0.806 | 3.580 | 73.32 | 19.59 | 7.09 | 51 | 1.90 |
| LV-VIS | CountVid | 1.130 | 2.809 | 33.12 | 18.81 | 48.07 | 47 | 0.91 |
| LV-VIS | IDTCount | 0.421 | 1.419 | 74.04 | 10.74 | 15.23 | 36 | 0.45 |
| Video | Frames | Peak GiB | Ground Truth | IDTCount |
|---|---|---|---|---|
| MOT20-01 | 52 | 18.7 | 80 | 78 |
| MOT20-02 | 334 | 45.7 | 278 | 260 |
| MOT20-05 | 398 | 36.5 | 1,203 | 1,216 |
| BURST-Count | ||
| Variant | MAE [95% CI] | Over / under |
| SAM3 | 0.656 [0.572, 0.750] | 426 / 150 |
| + association module | 0.651 [0.572, 0.747] | 423 / 153 |
| + merge | 0.643 [0.567, 0.735] | 421 / 154 |
| + verifier | 0.537 [0.477, 0.605] | 373 / 166 |
| Method / Video | ma2035_023 | ma2035_024 | ma2035_039 | ma2035_040 | ma2035_069 | ma2035_072 | ma2035_169 |
|---|---|---|---|---|---|---|---|
| Ground truth | 111 | 154 | 27 | 37 | 109 | 77 | 8 |
| Text only | |||||||
| SAM3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| CountVid | 1 | 1 | 11 | 9 | 11 | 2 | 11 |
| CountVid + IDTCount | 1 | 1 | 17 | 21 | 23 | 5 | 15 |
| CountGD-Box + SAM3 + IDTCount | 1 | 1 | 17 | 21 | 24 | 5 | 15 |
| SAM3 | BURST-Count | TAO-Count | ms/frame | Peak GiB |
|---|---|---|---|---|
| As released | 0.654 / 1.792 | 0.653 / 1.606 | 95.3 | 6.88 |
| With eviction | 0.656 / 1.782 | 0.651 / 1.603 | 108.1 | 6.73 |
| Setting | Value | MAE | RMSE | [95% CI] |
|---|---|---|---|---|
| Retention window | 5 s | 0.3861 | 0.901 | +0.0043 [0.000, +0.011] |
| 10 s | 0.3861 | 0.901 | +0.0043 [0.000, +0.011] | |
| 15 s | 0.3796 | 0.885 | 0.0022 [ 0.010, +0.004] | |
| 30 s (reference) | 0.3818 | 0.891 | 0 (reference) | |
| Lost-track gate | 0.167 s (reference) | 0.3818 | 0.891 | 0 (reference) |
| 0.67 s | 0.3839 | 0.900 | +0.0022 [0.000, +0.007] |
| Method | Latency (ms) | Peak GPU (GiB) |
|---|---|---|
| CountVid [ 4 ] (AAAI ’26) | 1,424.3 | 14.63 |
| SAM3 [ 9 ] (ICLR ’26) | 95.3 | 6.88 |
| SAM3Count [ 38 ] | 123.5 | 6.91 |
| IDTCount (ours) | 105.2 | 6.73 |
Multi-Object Tracking
Multi-object tracking (MOT) links detections across video frames to maintain object identities through motion, occlusion, and changing viewpoints.
See all 210 papers