Paper · 2023-07-28 · cs.CV
MeMOTR: Long-Term Memory-Augmented Transformer for Multi-Object Tracking
MeMOTR is an end-to-end DETR-style tracker with a per-track long-term memory, an exponential running average of each track's output, injected into the track embedding through memory attention. A detection decoder layer separates newborn detection from tracking. Author-reported: 68.5 HOTA and 58.4 AssA on DanceTrack test.
Visual object trackingObject queries (learned query slots in transformer decoders)Memory-augmented neural networktrackingtransformermemoryassociation
arXivPDFCodeMarkdown17 min read
AI-compiled by claude-haiku-5-5 on 2026-11-08, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.
In plain words
Following several people at once in a video is hard when they look alike and move in erratic ways. Most recent trackers that work end to end only remember what a person looked like in the previous frame or two. If the same person is hard to see for a while, the tracker can lose track of who is who.
MeMOTR adds a memory for each tracked person. The memory changes slowly, so it is a steadier summary of that person than the last frame alone. Before the tracker decides where each person is now, it blends this memory into the person's internal representation. A second step lets the people in the same frame compare themselves to each other, so each one stays distinct from its look-alikes. The authors also split the first decoder step off to find new people, so that finding newcomers and following known people do not compete as much.
The result is aimed at association: keeping the right identity on the right person over time. The authors report the largest gains on crowded dance videos, where people look alike and move unpredictably.
TL;DR
MeMOTR is a Transformer tracker that maintains one long-term memory vector per tracked object, updated as an exponential running average of the object's output eq. 1. The memory is injected into the track embedding through a memory-attention layer §3.4. On DanceTrack the authors report 68.5 HOTA and 58.4 AssA on the test set, against 54.2 and 40.2 for MOTR tab. 1. Use it if association on crowded or irregular motion is the bottleneck. Expect weaker detection than the best detector-based trackers. The official code is MIT licensed and the paper's training schedule differs from the code in places (see Paper vs code).
Problem
Tracking by detection links per-frame boxes with appearance and linear motion cues, which fail when motion is irregular or many people look alike §1 §2. Transformer tracking-by-query methods such as MOTR track objects end to end, but they mainly use the states of objects in the two adjacent frames §1 §2. The authors argue that this leaves out long-term temporal information, which matters when appearances are similar, motion is erratic, or a person is occluded §1. They also argue that DETR's learnable detect query has no object-specific meaning, while a track query does, and that mixing the two in one decoder causes misalignment §3.2.
The paper's main benchmark, DanceTrack, is chosen because it stresses association more than pedestrian benchmarks do §4.1. Its results therefore show the largest gains on association metrics and smaller gains on detection tab. 1.
Method
Overview §3.1 fig. 1. A ResNet-50 backbone and a Transformer encoder produce image features for each frame, following DETR-family detectors. The model has two kinds of query. Detect queries are learnable and find newborn objects. Track queries carry each tracked object forward. The decoder is split: one detection-only layer runs on the detect queries §3.2, and the remaining layers jointly process detect and track embeddings §3.2. Each tracked object also has a long-term memory M, which is injected into its track embedding by the temporal interaction module (TIM) §3.3 §3.4.
Detection decoder §3.2. The first decoder layer uses only the learnable detect query and produces a detect embedding. The detect embedding is then concatenated with the track embeddings for the joint layers. The authors report that a single detection-only layer gives the best association result among the depths they tried tab. 4.
Long-term memory §3.3. A newborn object's memory is initialised from its current output §3.3. After each frame, the memory is updated as an exponential running average with rate λ, set to 0.01 in the experiments eq. 1 tab. 7:
\widetilde{M}_{tck}^{t+1} = (1 - \lambda)\, M_{tck}^{t} + \lambda\, O_{tck}^{t} eq. 1
Temporal interaction module (TIM) §3.4 fig. 2. The TIM runs in four steps for each tracked object.
- A channel-wise confidence weight is computed from the current output as a sigmoid of a small MLP applied to it eq. 2. W_{tck}^{t} = \mathrm{Sigmoid}(\mathrm{MLP}(O_{tck}^{t})) eq. 2
- Adaptive aggregation: the weighted current output is concatenated with the previous frame's output, and a two-layer MLP fuses them. The previous output is not weighted §3.4 tab. 5.
- Memory attention: a multi-head attention layer uses the aggregated feature as query, the long-term memory as key, and the current output as value §3.4.
- The attention result is added to the long-term memory and passed through an FFN to give the next track embedding §3.4. The memory itself is updated by eq. 1.
Inference and updating §3.5. A detection with confidence above τ_det = 0.5 becomes a newborn track. A tracked object whose confidence is at or below τ_track = 0.5 is kept as inactive and removed after T_miss frames. T_miss is 30 on DanceTrack, 15 on MOT17 and 10 on BDD100K §3.5. Only objects with confidence above τ_next = 0.5 have their track embedding and memory updated eq. 3. The others keep their previous values.
[E^{t+1}_i, M^{t+1}_i] = \begin{cases} [\widetilde{E}^{t+1}_i, \widetilde{M}^{t+1}_i], & c_i^t > \tau_{next} \\ [E^{t}_i, M^{t}_i], & c_i^t \leq \tau_{next} \end{cases} eq. 3
Training §4.2. The model is built on DAB-Deformable-DETR with a ResNet-50 backbone, initialised from COCO-pretrained DAB-Deformable-DETR weights. A clip of 2 to 5 consecutive frames is sampled with a random interval between 1 and 10 frames. The longest clip length grows over training (schedule in Hyperparameters). Training uses AdamW with an initial learning rate of 2.0e-4, batch size 1 per GPU, and 8 V100 GPUs. A gradient-checkpointed version is described as fitting within 10 GB §4.2.
Pseudocode for one tracked object, from the paper's description. It is a paraphrase of §3.4 eq. 1 eq. 2 eq. 3, not the released code. See Paper vs code for the differences.
# Temporal interaction module for one track [§3.4]
# Input: out (C,) current output; out_prev (C,) previous output;
# memory (C,) long-term memory; embed (C,) track embedding;
# score (scalar) current confidence
# Output: next track embedding and next memory
def temporal_interaction(out, out_prev, memory, embed, score):
# 1. Channel-wise confidence weight from the current output [eq. 2]
weight = sigmoid(mlp_weight(out))
# 2. Adaptive aggregation over current and previous outputs [§3.4]
fused = mlp_fuse(concat(weight * out, out_prev))
# 3. Memory attention: query fused, key memory, value out [§3.4]
attended = memory_attention(query=fused, key=memory, value=out)
# 4. Add memory to the attention result, then apply an FFN [§3.4]
next_embed = ffn(memory + attended)
# 5. Exponential running average of the output, lambda = 0.01 [eq. 1]
next_memory = (1 - lam) * memory + lam * out
# 6. Update only when the score is above 0.5 [eq. 3]
if score > 0.5:
return next_embed, next_memory
return embed, memory# Newborn track start [§3.3]
# Input: out_det (C,) output of the detection for the new object
# Output: initial long-term memory
def start_track(out_det):
# The memory starts from the current output [§3.3]
memory = out_det
return memoryHyperparameters
Values are as stated in the paper unless marked "code". Code values are from
the official repository at code_commit and are the training configs shipped
there.
| Name | Value | Where | Notes |
|---|---|---|---|
| Backbone | ResNet-50 | §4.2 | DAB-Deformable-DETR, COCO-pretrained weights §4.2 |
| Hidden dimension | 256 | code: configs/train_dancetrack.yaml#L60 | not stated in paper |
| FFN dimension | 2048 | code: configs/train_dancetrack.yaml#L61 | not stated in paper; the Deformable-DETR config uses 1024 |
| Decoder layers | 6, first 1 detection-only | §3.2 code: configs/train_dancetrack.yaml#L67-L68 | tab. 4 for depth ablation |
| Detect queries | 300 | code: configs/train_dancetrack.yaml#L90 | not stated in paper |
| Memory update rate λ | 0.01 | §3.3 tab. 7 code: configs/train_dancetrack.yaml#L75 | |
| Memory-attention heads | 8 | code: models/query_updater.py#L45 | not stated in paper |
| τ_det, τ_track, τ_next | 0.5 | §3.5 code: configs/train_dancetrack.yaml#L27-L28 | |
| τ_update, τ_IoU (training) | 0.5, 0.5 | §4.2 code: models/query_updater.py#L190-L192 | see Pitfalls for the shipped branch |
| T_miss | DanceTrack 30, MOT17 15, BDD100K 10 | §3.5 code: configs/train_dancetrack.yaml#L30 | |
| Input size, train | shorter side 800, max 1536 | §4.2 | training code uses multi-scale 608–992 (max 1536) code: data/dancetrack.py#L153-L168 |
| Input size, test | not stated in paper | code: data/dancetrack.py#L179 | 800, max 1333 |
| Augmentations | not stated in paper | code: data/dancetrack.py#L155-L168 | horizontal flip and HSV jitter in code |
| Batch size | 1 per GPU | §4.2 | 8 V100 GPUs §4.2 |
| Clip interval | random 1 to 10 frames | §4.2 code: data/dancetrack.py#L87 | DanceTrack config SAMPLE_INTERVALS [10] |
| Optimizer | AdamW | §4.2 code: train_engine.py#L54 | |
| Learning rate, initial | 2.0e-4 | §4.2 code: configs/train_dancetrack.yaml#L94 | |
| Learning rate, backbone | not stated in paper | code: configs/train_dancetrack.yaml#L95 | 2.0e-5 |
| Learning rate, sampling offsets and reference points | not stated in paper | code: configs/train_dancetrack.yaml#L96 | 1.0e-5 on DanceTrack, 2.0e-5 on MOT17 (code: configs/train_mot17.yaml#L96) |
| Weight decay | not stated in paper | code: configs/train_dancetrack.yaml#L97 | 5.0e-4 |
| Gradient clip norm | not stated in paper | code: train_engine.py#L242 | 0.1 |
| LR decay factor | 0.1 | §4.2 code: configs/train_dancetrack.yaml#L100 | step schedule train_engine.py |
| DanceTrack schedule | 18 epochs, decay at epoch 12 | §4.2 | code: 20 epochs, see Paper vs code |
| DanceTrack clip length | 2, then 3, 4, 5 at epochs 6, 10, 14 | §4.2 code: configs/train_dancetrack.yaml#L80-L81 | |
| MOT17 schedule | 130 epochs, decay at 120; clip 2, then 3 and 4 at 60 and 100 | §4.2 code: configs/train_mot17.yaml#L79-L101 | CrowdHuman val added to training §4.2 |
| BDD100K schedule | 14 epochs, decay at 12; clip length change at 6 and 10 | §4.2 code: configs/train_bdd100k.yaml#L66-L72 | code: 13 epochs, fixed interval 4 |
| Matching cost weights | class 2, box L1 5, GIoU 2 | not stated in paper code: configs/train_dancetrack.yaml#L103-L105 | |
| Loss weights | focal 2, L1 5, GIoU 2; aux 1 per layer | not stated in paper code: configs/train_dancetrack.yaml#L107-L111 | |
| Focal parameters (matcher) | alpha 0.25, gamma 2 | not stated in paper code: models/matcher.py#L102-L103 | checked for the matcher cost only |
| Track frames at test | MISS_TOLERANCE 30 on DanceTrack | code: configs/train_dancetrack.yaml#L30 |
Results
Author-reported. The setup for every table is given in §4.1: DanceTrack train and test sets, MOT17 with CrowdHuman, BDD100K val, and SportsMOT. Gray rows in the paper use extra training data and are listed for context only.
DanceTrack test tab. 1. Caption: existing methods' results are from the DanceTrack paper. MeMOTR* is the Deformable-DETR variant.
| Methods | HOTA | DetA | AssA | MOTA | IDF1 |
|---|---|---|---|---|---|
| w/o extra data | |||||
| FairMOT | 39.7 | 66.7 | 23.8 | 82.2 | 40.8 |
| CenterTrack | 41.8 | 78.1 | 22.6 | 86.8 | 35.7 |
| TraDeS | 43.3 | 74.5 | 25.4 | 86.2 | 41.2 |
| TransTrack | 45.5 | 75.9 | 27.5 | 88.4 | 45.2 |
| ByteTrack | 47.7 | 71.0 | 32.1 | 89.6 | 53.9 |
| GTR | 48.0 | 72.5 | 31.9 | 84.7 | 50.3 |
| QDTrack | 54.2 | 80.1 | 36.8 | 87.7 | 50.4 |
| MOTR | 54.2 | 73.5 | 40.2 | 79.7 | 51.5 |
| OC-SORT | 55.1 | 80.3 | 38.3 | 92.0 | 54.6 |
| C-BIoU | 60.6 | 81.3 | 45.4 | 91.6 | 61.6 |
| MeMOTR* (ours) | 63.4 | 77.0 | 52.3 | 85.4 | 65.5 |
| MeMOTR (ours) | 68.5 | 80.5 | 58.4 | 89.9 | 71.2 |
| with extra data (gray in paper) | |||||
| MT_IoT | 66.7 | 84.1 | 53.0 | 94.0 | 70.6 |
| MOTRv2 | 69.9 | 83.0 | 59.0 | 91.9 | 71.7 |
MOT17 test tab. 2. Caption: the best Transformer-based result is in bold. MOTRv2 is listed as hybrid because it uses YOLOX proposals.
| Methods | HOTA | DetA | AssA | MOTA | IDF1 |
|---|---|---|---|---|---|
| CNN based | |||||
| Tracktor++ | 44.8 | 44.9 | 45.1 | 53.5 | 52.3 |
| CenterTrack | 52.2 | 53.8 | 51.0 | 67.8 | 64.7 |
| TraDeS | 52.7 | 55.2 | 50.8 | 69.1 | 63.9 |
| QDTrack | 53.9 | 55.6 | 52.7 | 68.7 | 66.3 |
| GTR | 59.1 | 61.6 | 57.0 | 75.3 | 71.5 |
| FairMOT | 59.3 | 60.9 | 58.0 | 73.7 | 72.3 |
| DeepSORT | 61.2 | 63.1 | 59.7 | 78.0 | 74.5 |
| SORT | 63.0 | 64.2 | 62.2 | 80.1 | 78.2 |
| ByteTrack | 63.1 | 64.5 | 62.0 | 80.3 | 77.3 |
| Quo Vadis | 63.1 | 64.6 | 62.1 | 80.3 | 77.7 |
| OC-SORT | 63.2 | 63.2 | 63.4 | 78.0 | 77.5 |
| C-BIoU | 64.1 | 64.8 | 63.7 | 81.1 | 79.7 |
| Transformer based | |||||
| TrackFormer | not reported | not reported | not reported | 74.1 | 68.0 |
| TransTrack | 54.1 | 61.6 | 47.9 | 74.5 | 63.9 |
| TransCenter | 54.5 | 60.1 | 49.7 | 73.2 | 62.2 |
| MeMOT | 56.9 | not reported | 55.2 | 72.5 | 69.0 |
| MOTR | 57.2 | 58.9 | 55.8 | 71.9 | 68.4 |
| MeMOTR (ours) | 58.8 | 59.6 | 58.4 | 72.8 | 71.5 |
| Hybrid (gray in paper) | |||||
| MOTRv2 | 62.0 | 63.8 | 60.6 | 78.6 | 75.0 |
BDD100K val tab. 3. Caption: existing methods' results are from TETer. The text says MOTR was re-evaluated on the new metrics with its official model (see Pitfalls).
| Method | mTETA | mHOTA | mLocA | mAssocA | mAssA |
|---|---|---|---|---|---|
| QDTrack | 47.8 | not reported | 45.9 | 48.5 | not reported |
| DeepSORT | 48.0 | not reported | 46.4 | 46.7 | not reported |
| MOTR | 50.7 | 37.0 | 35.8 | 51.0 | 47.3 |
| TETer | 50.8 | not reported | 47.2 | 52.9 | not reported |
| MeMOTR (ours) | 53.6 | 40.4 | 38.1 | 56.7 | 52.6 |
SportsMOT test tab. 10 app. D. Gray rows use extra data. The caption says ByteTrack and OC-SORT were run with their official code and trained only on the SportsMOT training set.
| Methods | HOTA | DetA | AssA | MOTA | IDF1 |
|---|---|---|---|---|---|
| FairMOT | 49.3 | 70.2 | 34.7 | 86.4 | 53.5 |
| QDTrack | 60.4 | 77.5 | 47.2 | 90.1 | 62.3 |
| ByteTrack | 62.1 | 76.5 | 50.5 | 93.4 | 69.1 |
| OC-SORT | 68.1 | 84.8 | 54.8 | 93.4 | 68.0 |
| MeMOTR* (ours) | 68.8 | 82.0 | 57.8 | 90.2 | 69.9 |
| MeMOTR (ours) | 70.0 | 83.1 | 59.1 | 91.5 | 71.4 |
| with extra data (gray in paper) | |||||
| GTR | 54.5 | 64.8 | 45.9 | 67.9 | 55.8 |
| CenterTrack | 62.7 | 82.1 | 48.0 | 90.8 | 60.0 |
| ByteTrack | 62.8 | 77.1 | 51.2 | 94.1 | 69.8 |
| TransTrack | 68.9 | 82.7 | 57.5 | 92.6 | 71.5 |
| OC-SORT | 71.9 | 86.4 | 59.8 | 94.5 | 72.2 |
Ablations on DanceTrack val (trained on train, evaluated on val §4.6).
Detection decoder depth, L_det = number of detection-only layers tab. 4:
| L_det | HOTA | DetA | AssA | MOTA | IDF1 |
|---|---|---|---|---|---|
| 0 | 62.1 | 74.3 | 52.2 | 83.1 | 65.6 |
| 1 | 63.9 | 74.6 | 55.0 | 83.4 | 67.1 |
| 2 | 63.2 | 73.8 | 54.3 | 81.9 | 65.8 |
Adaptive aggregation tab. 5. Columns: O_{t-1} = previous output used; W = channel-wise weight used.
| O_{t-1} | W | HOTA | DetA | AssA | IDF1 |
|---|---|---|---|---|---|
| no | no | 62.3 | 73.9 | 52.7 | 64.6 |
| no | yes | 62.4 | 74.5 | 52.5 | 64.6 |
| yes | no | 62.7 | 74.4 | 53.1 | 65.3 |
| yes | yes | 63.9 | 74.6 | 55.0 | 67.1 |
Long-term memory and memory-attention tab. 6. "naïve" is a single FFN on O_t without aggregation or memory.
| M (memory) | attn | HOTA | DetA | AssA | IDF1 |
|---|---|---|---|---|---|
| naïve | 61.1 | 74.2 | 50.6 | 63.7 | |
| no | no | 61.9 | 73.8 | 52.1 | 64.1 |
| yes | no | 62.5 | 74.2 | 52.9 | 64.7 |
| no | yes | 61.1 | 74.0 | 50.7 | 62.4 |
| yes | yes | 63.9 | 74.6 | 55.0 | 67.1 |
Memory update rate λ tab. 7:
| λ | HOTA | DetA | AssA | IDF1 | IDsw |
|---|---|---|---|---|---|
| 0.005 | 62.6 | 74.2 | 53.1 | 65.1 | 1383 |
| 0.01 | 63.9 | 74.6 | 55.0 | 67.1 | 1237 |
| 0.02 | 63.2 | 75.0 | 53.5 | 66.0 | 1213 |
| 0.04 | 63.5 | 75.1 | 54.0 | 66.3 | 1295 |
Supplemental DanceTrack ablation tab. 8 app. A. Columns: val (left) and test (right). "D-D-DETR" is Deformable-DETR; "DAB-D-DETR" is DAB-Deformable-DETR. Rows marked gray use an extra detector.
| # | Configuration | val HOTA | val DetA | val AssA | val MOTA | val IDF1 | test HOTA | test DetA | test AssA | test MOTA | test IDF1 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | MOTR (baseline) | 51.7 | 69.4 | 38.7 | 75.6 | 49.7 | 54.2 | 73.5 | 40.2 | 79.7 | 51.5 |
| 2 | #1 + memory augment (D-D-DETR) | 56.5 | 70.4 | 45.5 | 78.4 | 58.8 | 62.5 | 77.0 | 50.9 | 85.1 | 63.5 |
| 3 | #2 + L_d, L_j = 1, 5 | 61.0 | 71.2 | 52.5 | 79.2 | 64.1 | 63.4 | 77.0 | 52.3 | 85.4 | 65.5 |
| 4 | #3 + anchor | 61.1 | 73.0 | 51.3 | 81.3 | 63.8 | 64.6 | 78.4 | 53.4 | 87.6 | 67.3 |
| 5 | #2 + DAB-D-DETR | 62.1 | 74.3 | 52.2 | 83.1 | 65.6 | 65.9 | 78.8 | 55.2 | 87.9 | 68.9 |
| 6 | #5 + L_d, L_j = 1, 5 (MeMOTR) | 63.9 | 74.6 | 55.0 | 83.4 | 67.1 | 68.5 | 80.5 | 58.4 | 89.8 | 71.2 |
| 7 | #5 + L_d, L_j = 2, 4 | 63.2 | 73.8 | 54.3 | 81.9 | 65.8 | 66.2 | 80.2 | 54.8 | 89.5 | 68.7 |
| 8 | #6 + YOLOX (gray) | 66.8 | 78.7 | 57.0 | 88.1 | 70.5 | 70.0 | 81.8 | 60.1 | 90.3 | 72.5 |
Difficult DanceTrack val sequences tab. 9 app. B. The eight sequences with the lowest MOTR AssA. MOTR results come from the official checkpoint.
| Sequence | MOTR HOTA | MOTR DetA | MOTR AssA | MeMOTR HOTA | MeMOTR DetA | MeMOTR AssA |
|---|---|---|---|---|---|---|
| dancetrack0041 | 30.6 | 50.9 | 18.8 | 32.9 | 49.4 | 22.4 |
| dancetrack0081 | 35.7 | 63.9 | 20.0 | 46.0 | 69.6 | 30.4 |
| dancetrack0063 | 30.5 | 44.9 | 20.7 | 43.2 | 57.4 | 32.6 |
| dancetrack0019 | 40.8 | 79.3 | 21.0 | 49.7 | 84.2 | 29.3 |
| dancetrack0014 | 43.7 | 79.4 | 24.2 | 47.6 | 80.0 | 28.4 |
| dancetrack0004 | 44.1 | 77.0 | 25.3 | 66.2 | 82.7 | 53.0 |
| dancetrack0034 | 42.3 | 65.7 | 27.3 | 56.9 | 73.2 | 44.3 |
| dancetrack0090 | 45.1 | 65.1 | 31.5 | 55.4 | 70.5 | 43.7 |
| average | 39.1 | 65.8 | 23.6 | 49.7 | 70.9 | 35.5 |
The paper's Figure 3 visualises anchors before and after the detection decoder fig. 3. Figure 4 visualises t-SNE of track embeddings for the four combinations of memory and memory-attention fig. 4. Appendix app. C extends this to two more sequences fig. 5. These are qualitative only.
Paper vs code
Repository: https://github.com/MCG-NJU/MeMOTR, MIT license, commit
eb7a177b9cbcb89742ec69b2545ab3af2ea31a80. The repository is linked from the
paper's abstract, and its LICENSE names the Multimedia Computing Group,
Nanjing University. Each difference below was checked against the code.
- DanceTrack epochs. The paper trains 18 epochs §4.2. The shipped config sets 20 train_dancetrack.yaml and says it changed some parameters from the paper for more stable convergence [code: configs/train_dancetrack.yaml#L3]. The saved run config also has 20 [code: outputs/memotr_dancetrack/train/config.yaml#L23].
- BDD100K epochs and interval. The paper trains 14 epochs §4.2. The config sets 13 with the comment "or 14, is OK" [code: configs/train_bdd100k.yaml#L72]. The paper says nothing about the interval, and the config uses a fixed interval of 4 [code: configs/train_bdd100k.yaml#L69].
- Newborn memory. The paper initialises the memory from the current output
§3.3. The code stores the query embedding in the newborn's
query_embedand uses that as memory query_updater.py [code: models/criterion.py#L333-L334]. For the DAB model,query_embedisaux_outputs[-1]["queries"].set_aux_losspairs the first five layers withqueries[1:]memotr.py, and the query tensor is appended before each layer runs deformable_decoder.py. That makes the newborn memory the state entering the last decoder layer, not the finaloutput_embed(outputs[-1]) memotr.py. This is a different tensor from the one the paper names. - Memory-attention positional term. The paper describes the query, key and
value without a positional term. The code adds a sine embedding of each
track's reference box, passed through
query_pos_head, to both the query and the key query_updater.py [code: models/query_updater.py#L120-L125]. - Order of memory and attention. The paper adds the memory to the attention
result and then applies one FFN §3.4. The code applies attention with a
residual on
output_embed, a LayerNorm and an FFN, then adds the memory, a LayerNorm and a second FFN query_updater.py. - Reference boxes. The code overwrites the reference point of each confident track with its current predicted box before computing the positional term query_updater.py. The paper does not describe this.
- Filter during training. The paper says tracked objects below score 0.5 and IoU 0.5 are filtered out during training §4.2. The shipped configs set both augmentation rates to 0, so the code takes the branch that keeps every tracked ID and sets the ID to -1 when IoU is below 0.5 [code: models/query_updater.py#L186-L192]. The dropping filter, with IoU above 0.5 and ID non-negative, runs only when a rate is above 0 [code: models/query_updater.py#L194-L195].
- Input size. The paper resizes the shorter side to 800 with max 1536 §4.2. Training in the code samples a shorter side from 608 to 992 with max 1536, or resizes to 800 to 1200 and crops dancetrack.py. Evaluation uses 800 with max 1333 dancetrack.py. Horizontal flip and HSV jitter are in the code only [code: data/dancetrack.py#L155] dancetrack.py.
- Optimiser and loss. AdamW with weight decay 5e-4, backbone LR 2e-5, sampling-offset LR 1e-5 (DanceTrack) or 2e-5 (MOT17), gradient-norm clip 0.1, matching and loss weights 2/5/2, aux weight 1 per layer. The paper does not state these train_engine.py train_engine.py [code: configs/train_dancetrack.yaml#L94-L111] train_mot17.yaml. The clip call uses the literal 0.1, not the configured value [code: train_engine.py#L242].
- Learning-rate milestone. The paper says "decay at the 12th epoch". The
config passes
[12]to a step scheduler stepped once per epoch [code: train_engine.py#L57-L60] train_engine.py. Decay therefore starts at 0-based epoch 12, which is the 13th epoch counting from 1. - Query-updater-only phase.
ONLY_TRAIN_QUERY_UPDATER_AFTERzeroes the learning rate of the backbone, sampling points and query updater from that epoch on train_engine.py. It is set equal toEPOCHSfor DanceTrack, SportsMOT and MOT17, and to 1000 for BDD100K, so it is inactive in every shipped config. - Track placeholder. When no track survives the filter, the code inserts a placeholder with random embeddings and ID -2 [code: models/query_updater.py#L219-L241].
- Inference thresholds. The runtime tracker's defaults (0.7, 0.6, miss 5) differ from the configs (0.5, 0.5, 30). The submit path reads the config values [code: models/runtime_tracker.py#L14-L15] submit_engine.py.
- Pseudo-trajectories for MOT17. The paper describes CenterTrack-style random shifts of CrowdHuman images to make pseudo trajectories §4.2. This was not checked in the code; the loader's CrowdHuman handling is at [code: data/mot17.py#L36-L37] and mot17.py.
No discrepancies were found in the core memory update rule eq. 1, the confidence weight eq. 2, the update rule eq. 3, the detection-only first layer §3.2, λ = 0.01 §3.3, or the DanceTrack clip-length schedule §4.2.
Pitfalls
- Paper-internal inconsistencies. Four statements in the paper do not
match its own tables:
- λ ablation: the text says DetA decreases as λ grows §4.6. Table 7 shows DetA rising from 74.2 to 75.1 tab. 7.
- Adaptive aggregation: the text gives +2.6 HOTA for using both O_{t-1} and W §4.6. Table 5 shows 63.9 against 62.3 with neither, a gap of 1.6, and 63.9 against 62.4 with W only, a gap of 1.5 tab. 5. The +2.3 AssA claim matches the table.
- DanceTrack test MOTA is 89.9 in Table 1 tab. 1 and 89.8 in Table 8, row 6 tab. 8.
- BDD100K: the caption says the existing methods are from TETer tab. 3, while the text says MOTR was re-evaluated with its official model §4.5.
- Abstract figures are absolute points. The abstract's "7.9%" and "13.0%" are differences in points to C-BIoU's Table 1 values (60.6 HOTA, 45.4 AssA) [abstract] tab. 1. They are not relative gains.
- Extra-data baselines. MOTRv2, which uses extra data, reports 69.9 HOTA against MeMOTR's 68.5 tab. 1. The headline "state of the art" claim is against methods without extra data.
- Detection trade-off. MeMOTR's DetA on DanceTrack is 80.5 against 81.3 for C-BIoU tab. 1. The authors note weaker detection in crowds §4.7.
- Detector dependence. The Deformable-DETR variant reaches 63.4 HOTA, against 68.5 with DAB-Deformable-DETR tab. 1 tab. 8. Part of the gain is the detector, not the memory tab. 8.
- Epoch count versus paper. Use the config values (20 for DanceTrack) if you reproduce the released code, and the paper's 18 if you follow the text.
- Memory is per track, constant size. Memory is one vector per track, so storage does not grow with clip length §3.3. The compute cost is the per-frame sequential loop with an attention over tracks; the paper's gradient-checkpointed build is what fits in 10 GB §4.2.
- Random clip interval. The interval is drawn uniformly from 1 to the stage maximum, capped by the frames left in the video dancetrack.py. A short video yields smaller intervals than the paper's wording suggests.
- Empty track set. Training inserts random embeddings when no track survives the filter query_updater.py. The paper does not mention this. This card did not trace whether the placeholder reaches the loss.
- Training-only filter. The IoU filter that removes tracked objects with low IoU is in the branch that the shipped configs do not use. Reproducing the paper's filter exactly means using the other branch.
- Memory-update threshold. The same 0.5 threshold gates both the track embedding and the memory eq. 3. A track below 0.5 keeps its previous embedding and memory unchanged eq. 3 until it is re-confirmed or retired §3.5. The paper does not say how stale a memory may get.
Lineage
- Builds on: DETR for end-to-end set prediction §3.2; Deformable DETR and DAB-Deformable-DETR for the detector, the latter with learnable anchors §3.1 §4.2 app. A; MOTR for the tracking-by-query paradigm §1 §2. The paper's bibliography has no arXiv identifiers for these, so they are not linked. The exponential running average in eq. 1 is attributed to an earlier work cited in §3.3.
- Compared against: MeMOT, a memory-bank tracker §2 tab. 2; MOTRv2, a hybrid method that adds YOLOX proposals §4.4 app. A; ByteTrack, OC-SORT, C-BIoU and TransTrack tab. 1 tab. 2.
- Superseded by: not stated.
Source and license
Adapted from “MeMOTR: Long-Term Memory-Augmented Transformer for Multi-Object Tracking” by Ruopeng Gao, Limin Wang (arXiv:2307.15700), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors. Code citations refer to https://github.com/MCG-NJU/MeMOTR at commit eb7a177b9cbc (MIT). Any quoted code is shown under that license.