wikillm

Paper · 2016-04-13 · cs.CV

Online Multi-Target Tracking Using Recurrent Neural Networks

Online multi-target tracking with RNNs: an RNN predicts and updates every target's box, an LSTM solves per-frame data association one target at a time, and an existence probability handles births and deaths. Trained on synthetic trajectories. Author-reported on MOTChallenge 2015 test: 19.0% MOTA at 165.2 FPS, with no appearance features.

Recurrent neural network (RNN)Visual object trackingBipartite matching for set-prediction lossestrackingdata-associationrecurrent-neural-network

arXivPDFCodeMarkdown13 min read

AI-compiled by claude-haiku-5-5 on 2026-10-18, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.

In plain words

Following several objects through a video means knowing where each one is in every frame, and which detection in the new frame belongs to which object. Objects also appear and disappear, and detectors miss things or invent false hits. Classical trackers handle this with hand-tuned rules and matching algorithms.

This paper replaces most of that machinery with neural networks that are trained end to end. A recurrent network (one that carries a memory from frame to frame) predicts where each target will be and updates that estimate when new detections arrive. A second network, an LSTM (a recurrent network with a gated memory), decides which detection goes to which target, one target at a time. A separate score per target says how likely it is that the target still exists, so that new tracks can start and old ones can end.

The networks are trained on artificial trajectories generated from simple statistics of real annotated sequences, because labelled tracking video is scarce. The result runs online, meaning each frame is answered before the next one arrives, and it is fast on a CPU. It is less accurate than the best methods on the benchmark, and the authors say that appearance features would likely help.

TL;DR

  • Online tracker in which RNNs handle motion prediction, state update and track birth/death, and an LSTM handles frame-by-frame data association § Our Approach.
  • Targets are boxes (x, y, w, h); each target is modelled independently with one shared network, and existence is a per-target probability [§ Preliminaries and Notation].
  • Trained only on synthetic trajectories sampled from a simple model fitted to MOTChallenge sequences § Training Data.
  • MOTChallenge 2015 test: 19.0% MOTA, 71.0% MOTP, 165.2 FPS (author-reported) tab. 2. Not competitive on accuracy; faster than the listed methods.

Problem

Multi-target tracking needs three things at once: a continuous state estimate for each target, a discrete data-association decision that matches detections to targets, and a decision about when targets begin and end. The number of targets is unknown and changes over time § Introduction fig. 1.

Earlier deep-learning work either handled state estimation alone, on simulated data with a known number of targets and smooth linear motion, or treated tracking as occupancy estimation without explicit association § Introduction. Classical online methods use heuristics on consecutive misses to start and stop tracks § Background, Bayesian Filtering. Joint probabilistic data association (JPDA) is named as the strong but combinatorial alternative § Data Association with LSTMs.

The paper also assumes that the detector gives the only evidence: no appearance model and no optical flow are used § Benchmark results.

Method

The system has two learned blocks § Multi-Target Tracking with RNNs:

  1. Motion block (RNN). At each frame it outputs four vectors for the next frame: predicted states, updated states, existence probabilities, and existence smoothness terms § Target Motion fig. 2.
  2. Association block (LSTM). Using the predicted states and the detections, it outputs a row-normalised assignment matrix that gives each target a distribution over the detections plus one "missing" column § Data Association with LSTMs fig. 2.

Both blocks are trained separately § Benchmark results [§ Multi-Target Tracking with RNNs].

Notation. The state holds N targets with D = 4 coordinates each. The paper uses N = 1 for the motion network, so one shared RNN runs for every target. M is the maximum number of detections per frame. The assignment matrix A has N rows and M+1 columns. The existence vector E has one value per target in (0, 1) § Preliminaries and Notation.

Motion and update. The predicted state for the next frame depends only on the current state and the RNN's hidden state § Target Motion. After the association for the next frame is known, each target's update is a weighted combination of its assigned detection and its predicted state, using the assignment probabilities § Target Motion.

Recurrence. The RNN hidden state is tanh of a linear map of the layer below and the previous hidden state § Background, Recurrent Neural Networks. The LSTM uses the standard gates: input, forget and output gates are sigmoids of a linear map of the same inputs, and the memory cell mixes the old memory and a candidate eq. 1 § Background, Recurrent Neural Networks. The hidden and memory equations in that section are not numbered.

Association. For each target i the LSTM takes the whole cost row as input, where the cost is the Euclidean distance between target i's predicted state and each detection j. It is processed one target per step, so the model handles one row at a time. A softmax over the row gives A_i [§ Data Association with LSTMs] fig. 2.

Existence. The existence output for the next frame is computed from the current state, the current existence values, the next-frame detections and the next-frame assignment § Target Motion. A target is kept when its existence exceeds a threshold, which the paper sets to 0.6 [§ Initiation and Termination].

Pseudocode
# One online tracking step, per frame  (reconstructed from the text; the
# paper has no algorithm box)
# Input:  states (N, D), existence (N,), detections (M, D), hidden state
# Output: updated states, existence (kept targets only), hidden state

def track_step(states, existence, detections, hidden):
    # 1. Predict each target's next state from its current state and the
    #    RNN hidden state  [§ Target Motion]
    predicted, hidden = motion_rnn(states, hidden)    # (N, D)
    # 2. Distance between each predicted state and each detection
    #    [§ Data Association with LSTMs]
    cost = pairwise_distance(predicted, detections)   # (N, M)
    # 3. Targets are handled one at a time by the LSTM; each row gets a
    #    softmax over M detections plus one "missing" column
    #    [§ Data Association with LSTMs]
    assignment = lstm_associate(cost)                 # (N, M + 1)
    # 4. Weighted update of each target from its assigned evidence
    #    [§ Target Motion]
    states = weighted_update(predicted, detections, assignment)
    # 5. Existence probability for the next frame  [§ Target Motion]
    existence = existence_head(states, existence, detections, assignment)
    # 6. Discard targets whose existence is 0.6 or lower
    #    [§ Initiation and Termination]
    keep = existence > 0.6
    return states[keep], existence[keep], hidden

Training loss. The total loss for a sample is the sum of four terms, averaged over the frames of the sequence eq. 3 § Loss:

\mathcal{L}(x^*, x, \mathcal{E}, \tilde{x}, \tilde{\mathcal{E}}) = \frac{\lambda}{ND} \sum \lVert x^* - \tilde{x} \rVert^2 + \frac{\kappa}{ND} \lVert x - \tilde{x} \rVert^2 + \nu\, \mathcal{L}_{\mathcal{E}}(\mathcal{E}, \tilde{\mathcal{E}}) + \xi\, \mathcal{E}^* eq. 3

Here x* is the predicted state, x the updated state, E the existence probability, and the tilde marks ground truth. The existence term is given in eq. 4 and the smoothness term E* is defined in [§ Initiation and Termination]. The paper gives no values for λ, κ, ν or ξ.

\mathcal{L}_{\mathcal{E}}(\mathcal{E}, \tilde{\mathcal{E}}) = \tilde{\mathcal{E}} \log \mathcal{E} + (1 - \tilde{\mathcal{E}}) \log (1 - \mathcal{E}) eq. 4

The paper calls this binary cross entropy. As written, it is a log-likelihood without a minus sign, so it has to be negated to be minimised (see Pitfalls).

The smoothness prior penalises the absolute change in existence between consecutive frames § Initiation and Termination. Association is trained with a negative log-likelihood on the correct measurement for each target row eq. 5:

\mathcal{L}(\mathcal{A}^i, \tilde{a}) = -\log(\mathcal{A}_{i\tilde{a}}) eq. 5

Pseudocode
# Training loss for one sample of 20 frames  [eq. 3] [eq. 4]
# (equation numbers as compiled; the paper gives no algorithm box)
# (N, D) state tensors; existence is (N,) in (0, 1)

def sample_loss(pred_states, states, existence, gt_states, gt_existence):
    # Prediction term: squared error of predicted states, scaled by lambda
    #  [eq. 3]
    loss = lam / (N * D) * sum_sq_error(pred_states, gt_states)
    # Update term: squared error of updated states, scaled by kappa  [eq. 3]
    loss += kappa / (N * D) * sum_sq_error(states, gt_states)
    # Existence term: binary cross entropy against 0/1 truth  [eq. 4]
    loss += nu * binary_cross_entropy(existence, gt_existence)
    # Smoothness prior on existence changes between frames
    #  [§ Initiation and Termination]
    loss += xi * sum(abs(existence - previous_existence))
    return loss

Data association loss. For one target row, the loss is

Pseudocode
# Association loss for one target row  [eq. 5]

def assignment_loss(assignment_row, correct_index):
    # Negative log-probability of the correct detection  [eq. 5]
    return -log(assignment_row[correct_index])

Synthetic training data. The trajectory model is fitted per training sequence. It estimates the mean and variance of two features: the start location x_1 and the average velocity. Up to N tracks are then sampled from a normal distribution with these parameters. Samples do not include observations § Training Data. Figure 4 shows a 20-frame synthetic example with five targets and clutter fig. 4 § Experiments.

Hyperparameters

Values as stated in the paper and in the official code at code_commit. Where the paper says nothing, the cell says "not stated". Code values are taken from the training configs and defaults; they are not the paper's claims.

NamePaperCodeWhere
State per targetD = 4 (x, y, w, h); velocity not usedstate_dim 4§ Preliminaries and Notation configBF.txt
Targets per motion networkN = 1max_n 1§ Preliminaries and Notation fig. 5 configBF.txt
Motion RNN size300 hidden units, 1 layerrnn_size 50, num_layers 1§ Network size configBF.txt
Association LSTM size500 hidden units, 2 layersrnn_size 50, num_layers 1§ Network size configDA.txt
OptimiserRMSpropRMSprop, decay (alpha) 0.97§ Optimisation trainBF.lua
Initial learning rate0.00030.0005 (BF config), 0.005 (DA config), 0.01 (script default)§ Optimisation configBF.txt configDA.txt trainBF.lua
Learning-rate decay×0.95 (5%) every 20,000 iterations×0.95 every max_epochs/10 iterations§ Optimisation trainBF.lua
Maximum iterations200,000max_epochs 50000§ Optimisation configBF.txt
Mini-batch size10 samples10§ Data configBF.txt
Sequence length20 framessynth_training 20 (unit not stated)§ Data configBF.txt
Training sequencesabout 100K 20-frame sequencesnot stated§ Data
Input normalisationFixed, relative to image size, to [-0.5, 0.5]norm_mean 1, norm_std -1 (meaning not stated)§ Data configBF.txt
Forget-gate bias11§ Implementation Details trainBF.lua
Existence threshold0.60.5 (script default)§ Initiation and Termination trainBF.lua rnnTracker.lua
Loss weights λ, κ, ν, ξnot statedBF config: κ=1, λ=1, ν=1, ξ=1; script defaults: κ=5, λ=5, ν=1, ξ=1configBF.txt trainBF.lua
Gradient clippingnot stated1 (config); 0.1 (script default)configBF.txt trainBF.lua
Dropoutnot stated0.02 (BF), 0.03 (DA)configBF.txt configDA.txt
Training timeabout 30 hours on a CPUnot stated§ Optimisation
Hyperparameter search"standard grid search"; values not listednot stated§ Implementation Details fig. 5

The hyperparameter sweep in fig. 5 marks the chosen values: the RNN size optimum is circled near 300 and the learning-rate optimum near 3×10⁻⁴. Both sweeps were measured on the prediction/update block with N = 1, so the values carry over to the full system only as the paper's choice.

Results

Author-reported. Setup: MOTChallenge 2015, pedestrian tracking with the detector outputs provided by the benchmark § Benchmark results. The MOTChallenge 2015 benchmark has 22 sequences, 11 for training and 11 for testing. Test ground truth is unpublished and evaluated on the benchmark server § Experiments. The models are trained on synthetic trajectories sampled from a model fitted to the training sequences, not on observed tracks § Training Data. Hardware for the speed figures is "a standard CPU" with no model given § Abstract. Tables are reproduced from the paper tab. 1 tab. 2.

Training set (MOTChallenge, tab. 1). Starred rows are offline post-processing.

MethodRcll↑Prcn↑MT↑ML↓FP↓FN↓IDs↓FM↓MOTA↑MOTP↑
Kalman-HA28.579.0323343,03128,52068583719.269.9
Kalman-HA2*28.383.4393542,24528,62610534222.469.4
JPDA_m*30.681.7383482,72827,70710938023.569.0
RNN_HA37.875.2502674,98424,83251896324.068.7
RNN_LSTM37.173.5502605,32725,09457298322.369.0

RNN_HA uses the learned motion model with Hungarian association. RNN_LSTM learns both parts § Baseline comparison.

Test set (MOTChallenge 2015, tab. 2). Starred rows are offline or delayed methods.

MethodMOTA↑MOTP↑MT%↑ML%↓FP↓FN↓IDs↓FM↓FPS↑
MDP (Xiang et al. 2015)30.3%71.3%13.038.49,71732,4226801,5001.1
SCEA (Hong Yoon et al. 2016)29.1%71.7%8.947.36,06036,9126041,1826.8
JPDA_m* (Rezatofighi et al. 2015)23.8%68.2%5.058.16,37340,08436586932.6
TC_ODAL (Bae and Yoon 2014)15.1%70.5%3.255.812,97038,5386371,7161.7
RNN_LSTM (ours)19.0%71.0%5.545.611,57836,7061,4902,081165.2

The authors say the method is not at the top of the online pedestrian ranking but is about two orders of magnitude faster § Benchmark results.

Synthetic data. Qualitative only: on a 20-frame synthetic sequence with five targets and clutter, the existence probability rises after a delay at the start of a track and falls after a delay at its end, which the authors call inherent to purely online operation fig. 4.

Qualitative real data. Four frames of the MOTChallenge sequence ADL-Rundle-3 (frames 104, 149, 203, 235) show the identity colour of each box fig. 6.

Paper vs code

Code: https://github.com/antonmil/rnntracking at 10fc88e0a66d31bc822f3769cbda1c0bbead8401. The paper's footnote links bitbucket.org/amilan/rnntracking, which returned 404 when checked. The search for an official repository found the GitHub repository above, owned by the account antonmil. Its README cites this paper and lists all five authors, so it is used here as the official code. The repository has no LICENSE file; its README says "BSD License", which is the only license statement. The GitHub API reports no license.

  • Exit threshold. Paper: 0.6 § Initiation and Termination. Code: 0.5 rnnTracker.lua trainBF.lua.
  • Motion network width. Paper: 300 hidden units § Network size. Config for the motion model: rnn_size 50 configBF.txt. The bundled model file is named rnnTracker_r300_l1_n1_m1_d4.t7, which suggests 300 units rnnTracker_r300_l1_n1_m1_d4.t7. This is an inference from the file name, not a stated fact.
  • Association network. Paper: 2 layers, 500 units § Network size. Config: num_layers 1, rnn_size 50 configDA.txt.
  • Learning rate. Paper: 0.0003 § Optimisation. Configs: 0.0005 for the motion model configBF.txt and 0.005 for the association model configDA.txt.
  • Schedule and length. Paper: ×0.95 every 20,000 iterations, 200,000 maximum § Optimisation. Code: ×0.95 every max_epochs/10 iterations, with max_epochs 50000 in the motion config trainBF.lua configBF.txt.
  • Smoothness prior. Paper: penalises the absolute difference of existence between frames § Initiation and Termination. Code: the model computes an absolute difference RNNBF.lua, but the criterion applied to it is MSECriterion with weight ξ trainBF.lua. The effective penalty is therefore squared on the absolute difference, which is not what the paper describes. The paper does not say which form it uses in training.
  • Gradient clipping and dropout. Not stated in the paper. The config sets clipping to 1 configBF.txt; the script default is 0.1 trainBF.lua. Dropout is 0.02 for the motion model configBF.txt.
  • Loss weights. The paper gives no values. The motion config uses κ=λ=ν=ξ=1 configBF.txt, while the script defaults are κ=λ=5 trainBF.lua.
  • Data association training code. The README says that code is "not included yet". The repository does contain src/trainDA.lua and config/configDA.txt. Whether these reproduce the paper's association model was not verified.
  • Software. The code is in Lua with Torch7, as the paper says § Implementation Details. It cannot be run without a Torch install. The README notes that training with real data is not supported.

Pitfalls

  • No section numbers in the compiled paper. The class option sets section numbering to 0, so the PDF shows headings without numbers. Citations here use section titles, for example [§ Target Motion], instead of [§3.2]. Equations are numbered 1 to 5 in the PDF and figures and tables are numbered normally.
  • Speed claim differs between sections. The abstract says "≈300 Hz on a standard CPU", while tab. 2 reports 165.2 FPS for RNN_LSTM. The CPU model is not stated.
  • Existence term sign. eq. 4 is written as a log-likelihood but called binary cross entropy. Minimise its negative. The code uses nn.BCECriterion, which is the negative form trainBF.lua.
  • Loss sum and normalisation. eq. 3 has an unindexed sum, so it is not stated what is summed over. The paper says the loss is averaged over all frames of a sample. The normalisation by N·D is written in the equation.
  • Existence threshold. 0.6 in the text, 0.5 in the code (see Paper vs code). Use the value you are evaluating against.
  • Synthetic training only. The trajectory generator is simple and samples no observations. The authors say this makes data easy to generate but does not reflect real measurements § Training Data. Results on real video come from a model trained only on synthetic tracks.
  • One-to-one assignment is learned. The LSTM handles one target row at a time, and the one-to-one constraint is not built into the architecture. The paper says the LSTM learns it from data, and calls this non-trivial § Data Association with LSTMs § Discussion and Future Work.
  • Results depend on the detector. The authors deliberately use the provided detections for a fair comparison, and say that a better detector improves tracking results generally § Benchmark results. Absolute numbers are not comparable to methods that use their own detections.
  • Test versus training numbers. RNN_LSTM has MOTA 22.3 on the training set tab. 1 and 19.0 on the test set tab. 2. The paper does not discuss this gap.
  • Offline rows. Kalman-HA2 and JPDA_m are marked offline or post-processed in tab. 1. JPDA_m is marked offline in tab. 2. The text calls the compared methods "online" § Benchmark results, but the table marks one as offline.
  • Unstated values. Optimiser momentum or decay, dropout, gradient clipping, the loss weights, and the exact sampling distribution for training data are not stated in the paper. Use the code values only if you accept that they are not the paper's claims.
  • Figure 5 sweeps. They use the prediction/update block alone with N = 1, so the MOTA values in those plots are not full-system numbers.
  • Velocity. The method notes that velocity could be added to the state, but the paper uses only box coordinates § Preliminaries and Notation.

Lineage

  • Builds on: the Bayesian filtering view of tracking (Kalman filter and particle filter) § Background, Bayesian Filtering; LSTM recurrence § Background, Recurrent Neural Networks; and JPDA as the reference association method § Data Association with LSTMs.
  • Related: the deep-recurrent state-estimation work of Ondruska and Posner, which the paper discusses as an exception in deep tracking § Introduction.
  • Compared against: Kalman filter with Hungarian association (Kalman-HA), JPDA with post-processing (JPDA_m), MDP, SCEA, TC_ODAL tab. 1 tab. 2.
  • The paper says that a more sophisticated association, such as learned JPDA, or a short time delay could improve results § Baseline comparison. Superseded: not known from content in this wiki.

Source and license

Adapted from “Online Multi-Target Tracking Using Recurrent Neural Networks” by Anton Milan, S. Hamid Rezatofighi, Anthony Dick, Ian Reid, Konrad Schindler (arXiv:1604.03635), 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/antonmil/rnntracking at commit 10fc88e0a66d (BSD (per README; the repository has no LICENSE file)). Any quoted code is shown under that license.