cheind / py-motmetrics

:bar_chart: Benchmark multiple object trackers (MOT) in Python
MIT License
1.36k stars 258 forks source link

Understanding how switches are counted #159

Open TECOLOGYxyz opened 2 years ago

TECOLOGYxyz commented 2 years ago

I'm having some trouble understanding how switches are counted for the MOTA score.

Let's say I have a bunch of bounding boxes with both ground truth ids as well as a tracking id associated to them. Meaning, tracking has been done on the ground truth boxes without any detections, for example with simple centroid tracking.

If I had to count the number of switches, would I:

Follow along each ground truth path and count how many times the associated track id switches?

FRAME GT ID TRACK ID 1 GA T1 2 GA T1
3 GA T1 4 GA T2 5 GA T1

Which in the above example would be 2.

Or, would I:

Follow along each track path and count how many times the associated ground truth id switches? In which case, the above would not give any switches:

FRAME GT ID TRACK ID 1 GA T1 2 GA T1
3 GA T1 5 GA T1

Associated question: If bounding boxes for two ground truth tracks, separated by some empty frames, are all given a single track ID, is this an error? Since there are no switches in each ground truth track individually, but the track ID has been used for several ground truth tracks.

I have some data in the described format, but I struggle to manually count the same number of switches as is output from the py-motmetrics.