Rethinking the competition between detection and ReID in Multi-Object Tracking
- Publication
- IEEE Transactions on Image Processing 2022Journal
- First submitted to arXiv
- arXiv:2010.12138
Cite this paper · BibTeX
The citation identifies the linked source version. It cites the original paper and its authors.
@misc{multiobjecttrackingcstrack2020,
title = {{Rethinking the competition between detection and ReID in Multi-Object Tracking}},
author = {Chao Liang and Zhipeng Zhang and Xue Zhou and Bing Li and Shuyuan Zhu and Weiming Hu},
year = {2020},
eprint = {2010.12138},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2010.12138}
}
JDE crammed detection and re-ID into one network. A single forward pass outputs both the boxes and the appearance features, and tracking finally got fast. The price was accuracy, which kept trailing the two-stage methods that detect first and then run a separate re-ID network.
In 2020, several papers went looking for the cause. FairMOT blamed the anchors, the feature levels and the feature dimension. This CSTrack paper, from the University of Electronic Science and Technology of China and the Institute of Automation of the Chinese Academy of Sciences, put the question another way. The two tasks share the same features, so could what each of them wants to get out of those features be in outright conflict?
Defining the problem

The authors sort the problems of one-shot trackers into two kinds of competition.
The first is in representation. Panel (a) shows two kinds of similarity on the same street scene. Detection wants a high response on every pedestrian: Alice and Bob are both "person", and the more alike they look, the better. Re-ID wants only that one particular person to light up, with Alice and Bob kept as far apart as possible. Starting from the same features, one task demands that members of a class look alike and the other demands that individuals look different, so the two pull against each other during training.
The second is in scale assignment. Modern detectors all use an FPN, handing large objects to low-resolution feature maps and small objects to high-resolution ones, which is how the boxes come out accurate. JDE's re-ID branch copies this assignment wholesale, and each box takes its appearance feature from the level it belongs to. The trouble is that when someone walks toward the camera from far away and grows from 60 to 200 pixels tall, the features of the first few frames may come from the 1/8 level and those of later frames from 1/16 or 1/32. Features from different levels sit at different semantic levels, so comparing the same person across frames amounts to measuring with two different rulers.
Solving the problem

CSTrack builds on JDE. It first swaps the detector from YOLOv3 to YOLOv5, then touches only the prediction head. Comparing panels (b) and (c), there are two differences. In (c), a REN sits in front of the two branches and splits the shared features into one copy for detection and one for re-ID; the re-ID branch is replaced by SAAN, which no longer outputs embeddings at three resolutions, only a single one at 1/8. The former deals with the first kind of competition, the latter with the second.
REN: each task regroups the channels its own way

REN stands for reciprocal network. Put plainly, it lets each of the two tasks decide for itself how to recombine the channels of the shared features.
Let's follow the shapes through, starting with the input , the feature map of one level, of size .
- Shrink first. Average-pool it to to get . This copy is only used to compute the relations between channels, so the original size isn't needed.
- Project separately. Two convolutions project into (detection) and (re-ID), which are then flattened to . Each channel is now a 60-dimensional vector recording its response at 60 positions.
- Self-relation. is a matrix whose entry in row , column says how similar channel and channel are within the detection branch. A softmax over each row gives . The re-ID side gives the same way.
- Cross-relation. Using instead measures how similar detection's channel is to re-ID's channel ; after the softmax this gives , and the reverse gives .
- Mix the two. A learnable weight weights the two kinds of relation:
Finally, the full-size goes through a 1×1 convolution and is flattened to , left-multiplied by , reshaped back to and added to the original features. Every row of is a set of weights summing to 1, so every output channel is a weighted combination of the input channels. Detection and re-ID each get their own regrouped copy of the features, which then goes into the corresponding branch.
Self-relation lets each task emphasize the channels it needs, and cross-relation lets it consult the channels the other task finds important. The two tasks still share the backbone and only take what they each need at this one step before entering their branches. Channel similarity is computed over just positions, so the extra computation is limited.
SAAN: everyone's features come from the same map

SAAN deals with the second kind of competition by simply not splitting by level at all. The 1/16 and 1/32 features are upsampled to 1/8, and all three levels are brought to 256 channels. Each level passes through its own spatial attention, which pushes the background down and brings out where the people are; the three levels are concatenated into 768 channels, channel attention then decides which channels matter more, and the output is a single 512-dimensional embedding map at 1/8.
Back to the person walking toward the camera from far away. Whether they are 60 or 200 pixels tall in the frame, their appearance feature is taken from the same 1/8 embedding map, at the location of the detection box. The map itself already fuses three resolutions, so frames are compared with the same ruler.
Training and tracking
The detection loss follows YOLOv5, with focal loss for classification and CIoU for box regression. Re-ID is treated as a classification problem, as in JDE, with one class per person in the training set and a cross-entropy loss. The total loss is , with set to 0.02; we'll see later just how sensitive that number is.
The tracking stage reuses JDE's association pipeline unchanged. Matching first uses the cosine similarity of appearance features, with the Kalman filter's predicted positions ruling out implausible pairs, and is solved with the Hungarian algorithm; whatever is left unmatched is matched once more by IoU. Each track's appearance template is updated with a momentum of 0.9, and a track ends after 30 consecutive frames without a match.
Discussion
The training data is the same as JDE's, six pedestrian datasets in all, with CrowdHuman added when comparing final results. Training runs for 30 epochs on a single RTX 2080 Ti. Evaluation is on MOT16, MOT17 and the more crowded MOT20, looking mainly at MOTA and IDF1, the latter being a better reflection of how well association works.
What each module contributes
| Setting | MOTA | IDF1 |
|---|---|---|
| JDE (YOLOv3) | 64.4 | 55.8 |
| JDE (YOLOv5) | 68.9 | 60.7 |
| + REN | 70.8 | 63.1 |
| + SAAN | 69.4 | 69.3 |
| + REN + SAAN | 72.9 | 71.6 |
Compiled from Table I of the paper, MOT16 test set, trained on six datasets.
Switching to YOLOv5 by itself brings 4.5 points of MOTA. On top of that, REN helps both metrics, adding 1.9 MOTA and 2.4 IDF1; SAAN moves almost nothing but IDF1, adding a full 8.6 in one go, which is just what you'd expect from a design that only changes the re-ID branch. With both, MOTA is 8.5 above the original JDE and IDF1 15.8 above.
The two kinds of relation inside REN were also tried separately. Self-relation alone is a little better than none at all. Cross-relation alone actually drops IDF1 from 68.7 to 67.2; learning only what the two tasks have in common can't resolve their conflict. A fixed half-and-half mix does worse than self-relation alone; only when is learned do they get the best 66.0 and 70.7, with a quarter fewer ID switches as well. The learned is 0.12 and is 0.32, so both tasks borrow heavily from the cross-relation, and detection borrows more than re-ID. The authors also swapped REN for ordinary convolutions of comparable cost, and REN still came out ahead, so the gain isn't just a matter of having more parameters.
How fierce is the competition?
What best shows that "the two tasks are fighting over the features" is the sweep of the loss weight .
| MOTA | IDF1 | |
|---|---|---|
| 1 | 21.1 | 35.2 |
| 0.6 | 54.2 | 60.5 |
| 0.2 | 64.5 | 69.0 |
| 0.02 | 66.0 | 70.7 |
| 0.005 | 65.8 | 67.2 |
Compiled from Table V of the paper, MOT17 validation set.
With the re-ID loss weighted equally to the detection loss, MOTA is only 21.1, and detection is all but wrecked. It only recovers once the weight is pushed down to 0.02, and pushing further makes IDF1 start dropping again. Even with REN and SAAN, the two tasks still rely on a hand-tuned number to stay balanced, and that number's usable range is quite narrow.
Against other trackers
On MOT16, CSTrack reaches 75.6 MOTA and 73.3 IDF1 at 16.4 frames per second; FairMOTv2, also one-shot and trained on the same data, gets 74.9 and 72.8 at 18.9 frames per second. On MOT17, both have an IDF1 of 72.3, with MOTA at 74.9 versus 73.7.
The gap opens up on MOT20, the most crowded of the three. CSTrack's MOTA is 66.6 to FairMOTv2's 61.8; FairMOTv2 has 103,440 false positives against CSTrack's 25,404, and ID switches drop from 5,243 to 3,196. The price is speed, with only 4.5 frames per second left on MOT20.
The authors also built a lightweight CSTrack-S, cutting the convolution channels and layers to 30% of the original. On MOT16, MOTA falls to 73.8 and IDF1 to 71.0, while speed rises to 34.6 frames per second.
With the detector out of the picture
To look at association on its own, the authors replaced the detections on the MOT16 training set with ground-truth boxes, with all three methods trained only on MOT17. Under these conditions, JDE's IDF1 is 87.6, DeepSORT-2, which uses a separate re-ID network, gets 95.6, and CSTrack 96.6. When every box is correct, CSTrack's appearance features already hold their own against running a separate re-ID network. Except that MOT16 and MOT17 use the same videos, so all three methods saw this footage in training; it's an exam made of the practice questions. Which of the three comes out ahead is still informative, but don't take the absolute scores in the nineties too seriously.
Limitations
The authors list two kinds of failure: the detector taking people for background when the image is blurry, and people who are only partly visible being missed under heavy occlusion. Both come from looking at single frames only, and the authors plan to bring in temporal information later.
Before using it, know that the official code lives in the MOT branch of SOTS, where REN goes by CCN, its name in the paper's first version. The README states that the released version reaches 70.7 MOTA on MOT16, nearly 5 points below the 75.6 of the paper's final version, and says a new version will be released. The branch was last updated at the end of 2021. (Nearly five years on, the new version is presumably still on its way)
Conclusion
Detection wants members of a class to look alike and re-ID wants individuals to look different, so the two are bound to fight when they share one set of features. CSTrack doesn't split them into two networks. Instead, it adds one extra step before they go their separate ways, letting each task regroup the channels its own way, and then has re-ID merge three resolutions into one map, so the same person is compared on the same ruler whether near or far.
The effect is clearest in crowded scenes, with false positives and ID switches on MOT20 both falling sharply. But the sweep is also a reminder that the conflict has only been eased; the balance between the two tasks still hangs on 0.02, a hand-tuned weight.