Back to paper library
arXiv 2022ECCV 2022Object trackingPaper notes

TETer

Wrong Hat, Right Head

Original paper

Tracking Every Thing in the Wild

Paper authors

Siyuan Li · Martin Danelljan · Henghui Ding · Thomas E. Huang · Fisher Yu

Publication
ECCV 2022Conference
First submitted to arXiv
arXiv:2207.12978
Cite this paper · BibTeX

The citation identifies the linked source version. It cites the original paper and its authors.

@misc{multiobjecttrackingteter2022,
  title = {{Tracking Every Thing in the Wild}},
  author = {Siyuan Li and Martin Danelljan and Henghui Ding and Thomas E. Huang and Fisher Yu},
  year = {2022},
  eprint = {2207.12978},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2207.12978}
}
On this page

One white van, handed to two trackers.

Original Fig. 1. Three frames of the same white van and the results of two trackers. Tracker A follows it in all three frames with the same green box and the same ID, but labels it Bus; Tracker B gets Van right, but uses three different IDs across the three frames.
Original Fig. 1, Li et al., from PDF page 2, CC BY 4.0.

Tracker A follows the vehicle from start to finish, but mistakes the van for a bus. Tracker B correctly identifies it as a van in every frame, but treats it as a new vehicle in every frame.

Which one is better?

By the metrics of the time, A scores 0 on MOTA, IDF1 and HOTA alike; B gets 33 on MOTA and IDF1, and 44 on HOTA.

For a self-driving car, whether the vehicle ahead is a bus or a van, path planning has to steer around it all the same; being able to keep knowing "it's still the one from a moment ago" matters far more. Starting from this example, Siyuan Li, Martin Danelljan and colleagues in Fisher Yu's team at ETH Zurich argue that in tracking problems with many classes, classification should be separated from tracking, in evaluation and in the model alike.

Defining the problem

Classify first, then you get to track

Multi-class tracking inherited the single-class approach and handles each class separately. Metrics group results by predicted class, and trackers only associate objects within the same class.

That amounts to assuming classification is almost never wrong. On a pedestrian-only dataset like MOT17, the assumption is fine; on a long-tailed dataset with hundreds of classes like TAO, it falls apart.

Original Fig. 6. Faster R-CNN's AP on the TAO validation set, split by class frequency into four groups: rare, common, frequent and all. Requiring the correct class, they are 0.08, 0.19, 0.38 and 0.26; ignoring class (class agnostic), 0.56, 0.51, 0.56 and 0.54.
Original Fig. 6, Li et al., from PDF page 9, CC BY 4.0.

For the same detector, requiring the class to be right as well gives rare classes an AP of just 0.08; ignoring class and looking only at where the box is gives 0.56, about the same as common classes. The detector can actually find these rare things; it just can't name them.

Once the name is wrong, a metric that groups by class can't see how well the tracking went after that; and a tracker that associates by class breaks its tracks whenever the predicted class jumps around.

Is a box on an unlabeled object an error?

The second problem comes from how TAO is annotated. TAO labels at most 10 objects per video, and most classes are not exhaustively labeled.

MOTA, IDF1 and HOTA assume everything in the frame is labeled, so any prediction that doesn't match an annotation counts as a false positive. On TAO, that wrongly penalizes many objects that were in fact tracked correctly but that nobody labeled.

TAO's own Track mAP goes to the other extreme. It follows LVIS's federated evaluation and doesn't penalize unverified classes, with the result that large numbers of false positives go unpunished.

Original Fig. 3. On the left, the ground-truth annotation of a TAO street scene, with only a few human boxes; on the right, the output on the same frame from AOA, the top-ranked tracker on the TAO metric, with the image covered by dozens of overlapping low-confidence boxes labeled street_sign, banner, poster, umbrella and so on, most with scores close to 0.
Original Fig. 3, Li et al., from PDF page 5, CC BY 4.0.

On the right is the output of AOA, winner of the ECCV 2020 TAO challenge. Boxes are stacked layer upon layer, most with scores of only a few hundredths. A result that ranks first on the TAO metric is, in practice, hard to put to any use. The TAO paper's own SORT baseline, too, only got its Track mAP up by pushing the detection score threshold down to 0.0005 and outputting ten thousand boxes per image.

When the class prediction is wrong, can tracking still be evaluated fairly? And when annotations are incomplete, which false positives can safely be penalized?

Solving the problem

TETA: grouping by location instead

The core change in TETA (Track Every Thing Accuracy) is how results are grouped. Group by class, and the moment the class is wrong, there is nothing left to evaluate; TETA groups by location instead.

Original Fig. 4. The left panel is the cumulative distribution of pairwise IoU between ground-truth boxes in four fully annotated datasets (BDD100K, COCO, MOT17, MOT20), with a very small share above an IoU of 0.5; the right panel illustrates local clusters: each ground-truth box (GT) has a cluster around it, containing a matched prediction (TPL) and unmatched predictions (FPL), while predictions outside every cluster are marked Ignore.
Original Fig. 4, Li et al., from PDF page 6, CC BY 4.0.

Each ground-truth box is the center of a cluster. Each predicted box looks for the ground-truth box it has the highest IoU with, and if that IoU exceeds a threshold rr, it goes into that cluster. Predictions that end up in no cluster are simply ignored in evaluation.

Why does this tell false positives apart? The left panel measures how much pairs of real objects overlap in four fully annotated datasets. In the real world, the boxes of two different objects rarely overlap heavily. If a predicted box overlaps a ground-truth box heavily but wasn't chosen as its match, it's most likely a duplicate or a misaligned box, and it can safely count as a false positive. The authors estimate that with rr set at 0.7 or above, even in scenes as crowded as MOT20, the chance of this judgment being wrong is under 1%.

A prediction far from every annotation could be a false positive, or it could be a real object nobody labeled. TETA chooses not to judge.

Take a single frame with just one labeled person, where the tracker outputs three boxes:

  1. Box A has an IoU of 0.9 with the person and is chosen as the match, a true positive (TPL).
  2. Box B has an IoU of 0.6 with the person. With r=0.5r = 0.5 it belongs to this cluster but isn't matched, so it counts as a false positive (FPL).
  3. Box C is on the other side of the frame, around a street lamp nobody labeled; it belongs to no cluster and is ignored.

The localization score LocA is a Jaccard index:

LocA=∣TPL∣∣TPL∣+∣FPL∣+∣FNL∣\text{LocA}=\frac{|\text{TPL}|}{|\text{TPL}|+|\text{FPL}|+|\text{FNL}|}

FNL counts the unmatched ground-truth boxes, and this frame has none. So LocA =1/(1+1+0)=0.5=1/(1+1+0)=0.5. Count the MOTA way, and both B and C are false positives; under TAO's Track mAP, whether B and C are penalized depends on whether this video has been verified for their classes.

Three scores, each on its own

TETA splits tracking into three scores:

  1. Localization, LocA: the one computed above.
  2. Association, AssocA: follows HOTA's definition. For each true-positive box, compare how much the predicted track it belongs to overlaps the ground-truth track to get an association score, then average over all true positives.
  3. Classification, ClsA: looks only at true positives that are localized well enough (IoU of at least 0.5), comparing predicted and true classes class by class, again in the form TP/(TP+FP+FN).

That's how classification gets split off. The van that Tracker A called a bus earns points in both LocA and AssocA and loses points only in ClsA.

The final TETA is the arithmetic mean of the three:

TETA=LocA+AssocA+ClsA3\text{TETA}=\frac{\text{LocA}+\text{AssocA}+\text{ClsA}}{3}

HOTA uses a geometric mean. The authors switched to an arithmetic mean because ClsA can be close to 0 on long-tailed datasets, and a geometric mean would drag the whole score down to 0 with it, hiding the fact that localization and association are actually doing fine. Also, as with HOTA, the official implementation averages LocA and AssocA over multiple IoU thresholds.

TETer: find same-kind candidates first, then tell individuals apart

Original Fig. 5. TETer's association pipeline. Objects in two adjacent frames first go through Class Exemplar Matching, which uses class encodings learned by contrastive learning to find possible pairs, for example with lion, cat and dog in one group and cow and buffalo in another; instance association then runs within each group; finally, temporal information from the whole track corrects each frame's class, for example changing a cow misclassified in one frame back to buffalo.
Original Fig. 5, Li et al., from PDF page 8, CC BY 4.0.

TETer (Track Every Thing tracker) has four parts.

Class-agnostic NMS. Ordinary detectors run non-maximum suppression (NMS) within each class. TETer runs it across all classes together. The AP figure above already showed that the detector's weakness is classification; ignoring class, its localization is actually fine.

Associate every object with every other. Whatever the predicted class, all objects in adjacent frames can be matched; the authors call this AET (Associate Every Thing). The main cue is appearance; motion patterns differ too much across classes for a motion model to be easy to learn, while different classes usually look very different.

Class exemplar matching (CEM). Throwing class information away entirely would be a waste, though. Telling a red bus from a red truck takes details that instance appearance features don't easily learn, and detection datasets happen to have plenty of class labels to use.

CEM extracts a "class exemplar" vector from each of the detector's candidate boxes (RoIs). Training uses contrastive learning on a detection dataset's class labels; the TAO model uses LVIS and COCO. Only candidate boxes with an IoU above 0.7 with a ground-truth box get a class label, and candidates of the same class are pulled together while different classes are pushed apart:

LC=−∑q1∣Q+(q)∣∑q+log⁡es(q,q+)D(q)D(q)=PosD(q)+∑q−es(q,q−)\begin{aligned} \mathcal{L}_C &= -\sum_{q}\frac{1}{|Q^+(q)|}\sum_{q^+}\log\frac{e^{s(q,q^+)}}{D(q)} \\ D(q) &= \text{PosD}(q)+\sum_{q^-}e^{s(q,q^-)} \end{aligned}

ss is cosine similarity divided by a temperature τ=0.07\tau=0.07, and Q+(q)Q^+(q) and q−q^- are the candidate boxes of the same class as qq and of other classes, respectively. This is a modified version of supervised contrastive learning (SupCon). Among detection candidates, the number of same-class samples each qq can find keeps changing; the authors add PosD(q)\text{PosD}(q), the average of es(q,q+)e^{s(q,q^+)} over all positives, to the denominator, so the loss's lower bound doesn't drift with the number of positives.

During association, for an object qq in a track, the objects in the next frame whose class exemplar similarity exceeds 0.5 are first picked as candidates. This step asks "could they be the same kind of thing?", and the answer is soft. The exemplars of a bus and a van are very similar, so both get into the candidate set, and a wrong class prediction doesn't shut the right object out.

Telling individuals apart comes only after the candidates are picked. Within the candidates, QDTrack's quasi-dense instance features are scored with bidirectional softmax plus cosine similarity, and if the top score exceeds 0.5, the match is made.

Temporal class correction (TCC). Once a track has been followed through, a majority vote decides its class, and the tracker goes back to correct each frame's prediction. The same object ought to keep the same class from start to finish.

Discussion

Copy, paste, score

Before comparing trackers, the authors first check the metrics themselves.

Original Fig. 9. (a) TETer's tracking result on a video, following a deer but misclassifying it as a goat; (b) the existing track copied several times and pasted with other low-confidence classes from the detector, stacking several boxes on the same deer.
Original Fig. 9, Li et al., from PDF page 12, CC BY 4.0.

TETer locks onto the deer but gets its name wrong, so the Track mAP for this video is 0. Then, with no training at all, the track is simply copied several times, each copy pasted with another class the detector had guessed, and "deer" is hidden in one of the copies.

MetricBeforeAfter
TAO Track mAP062.9
Federated HOTA4.268.7
TETA47.613.8
LocA80.13.3
AssocA59.610.2
ClsA3.227.9

Compiled from Table 1 of the paper, for the video in the figure above.

Track mAP jumps from 0 to 62.9, and federated HOTA from 4.2 to 68.7. TETA, on the other hand, falls from 47.6 to 13.8.

The copied boxes coincide exactly with the original predicted box and overlap the ground-truth box closely, so they all land inside the cluster, and all but one are false positives; LocA collapses from 80.1 to 3.3. The only score that improves is ClsA, because one of the copies got the class right.

Another experiment progressively merges the classes of the same tracking result, taking several different class counts between 1 and 302 and evaluating each. The tracks don't change at all, yet the TAO metric drops sharply as the number of classes grows; TETA's LocA and AssocA barely move, and only ClsA drops along with it, so it's obvious at a glance that the problem lies in classification.

The authors also ran a cross-dataset check. They selected the best trackers on TAO and tested them directly on the fully annotated BDD100K, where 7 of the 8 classes overlap with TAO. Trackers selected by the TAO metric perform poorly on BDD100K; the ranking TETA gives agrees with BDD100K's own IDF1.

Comparison on TAO

MethodTETALocAAssocAClsA
SORT24.8548.1314.3212.08
DeepSORT25.9848.3517.5212.09
Tracktor++27.9749.0422.8112.05
AOA25.2723.4030.5621.86
QDTrack30.0050.5327.3612.11
TETer33.2551.5835.0213.16
TETer-HTC36.8557.5337.5315.70

Compiled from Table 2 of the paper, TAO validation set, 302 classes, r=0.5r = 0.5, at most 50 predictions per image; all except AOA and TETer-HTC use the same Faster R-CNN and class-agnostic NMS.

AOA combines several few-shot detection and re-ID models trained on external data, and its ClsA of 21.86 is the highest in the table. But its LocA is only 23.40; all those low-confidence boxes piled across the frame are counted as false positives here.

With the same detector, TETer beats QDTrack by 3.25 in TETA and 7.66 in AssocA. With the stronger HTC detector, TETA reaches 36.85.

On the fully annotated BDD100K, TETer improves as well. On the validation set, mMOTA rises from QDTrack's 36.6 to 39.1, mIDF1 from 51.6 to 53.3, and TETA from 47.84 to 50.83; on the test set, TETA also goes from 49.17 to 50.42. For a less common class like bus, MOTA rises from 40.8 to 48.2.

What each design contributes

SettingLocAAssocAClsA
QDTrack46.6027.7612.37
+ class-agnostic NMS50.5327.3612.11
+ CEM51.5535.0012.06
+ TCC51.5535.0013.16

Compiled from Table 4 of the paper, known classes of the TAO validation set.

Each of the three designs takes care of one score. Class-agnostic NMS adds nearly 4 points of LocA, class exemplar matching adds more than 7 points of AssocA, and temporal correction adds 1 point of ClsA.

The authors merged TAO's 345 free-form classes into a single "unknown" class and evaluated it separately. Class exemplar matching works here too, raising AssocA from 26.50 to 34.61. Exemplar vectors give a soft similarity, so even things never seen before can find candidates that look alike.

To see how class information should be used, the authors compared four approaches on the TAO validation set, by AssocA:

  1. No class information at all: 33.5.
  2. Associate only within the same predicted class: 27.4, worse than using none. One wrong class and the track breaks.
  3. Turn class names into word vectors with BERT and pick candidates by semantic similarity: 27.8, also worse than using none.
  4. Class exemplar matching: 35.0, the only approach that beats using no class information.

Adding class exemplar matching to DeepSORT, Tracktor++ and QDTrack raises AssocA on TAO by at least 2 points for each, and by 7 for QDTrack.

Grouped by class frequency, ClsA on rare classes is almost 0, with QDTrack at 0.0 and TETer at 0.4. But in the same group, LocA is 52.7 and 54.5, and AssocA 27.4 and 35.3, not far from the common classes. Localization and association already generalize to rare classes; what's left is classification.

Limitations

TETA adds a threshold, rr. Raise rr from 0.5 to 0.9 and the clusters tighten, fewer boxes are counted as false positives, and QDTrack's LocA rises from 50.5 to 53.0. Scores can only be compared at the same rr.

With the arithmetic mean, ClsA always carries just a third of the weight, so a tracker that never gets a class right can still earn a respectable total from localization and association. The authors suggest looking at the three scores separately, depending on the application.

TETer's own failure cases mostly have to do with TAO's one-frame-per-second annotation. Fast-moving objects change appearance a lot between adjacent annotated frames, and occlusion also throws off localization. Class exemplars occasionally get things wrong too, such as an occluded hand taken for a mouse, or monkeys and bears taken for gorillas.

Conclusion

If the class is wrong, does the tracking still count? TETA's answer is to group by location, split localization, association and classification into three scores, and use local clusters to judge false positives on incompletely annotated data. The same copy-and-paste trick that pumps Track mAP from 0 to 62.9 only lowers the score under TETA.

TETer's answer is to stop trusting the detector's class predictions without throwing class information away. Class exemplar matching turns "is it the same kind of thing?" into a soft similarity, so a bus and a van can both be candidates for the same vehicle.

Later, OVTrack's open-vocabulary tracking and MASA from the same team both switched to reporting TETA on TAO. As for the question at the start, under TETA, Tracker A earns points for both localization and association and loses points only in ClsA; which of A and B is better depends on which score your application cares about.