ByteTrack icon indicating copy to clipboard operation
ByteTrack copied to clipboard

ByteTrack output doesn't contain all detection results

Open michaeldwong opened this issue 2 years ago • 4 comments

I used another detector to get detection results and augmented ByteTrack to use those at every frame instead of using ByteTrack's detector. However, the tracking output from ByteTrack doesn't reflect all of the detections that I supplied. Here is an example of 2 frames from ByteTrack:

1,4,1105,374,1138,474,40.86,-1,-1,-1
1,5,182,398,211,498,95.27,-1,-1,-1
2,5,181,401,210,498,90.31,-1,-1,-1
2,7,862,380,903,478,80.75,-1,-1,-1

And here are the detection results I supplied for frames 1 and 2 respectively

left,top,right,bottom,class,confidence
1105,374,1135,476,person,40.861221
1061,382,1087,466,person,45.817993
877,376,918,475,person,72.918678
179,398,215,498,person,95.273239
917,381,948,480,person,95.795319
left,top,right,bottom,class,confidence
820,377,854,473,person,66.302063
146,409,173,470,person,66.384544
857,381,901,479,person,80.749580
180,402,212,499,person,90.314484

As you can see, the BytTrack results only show 2 objects per frame but in the detection results I supplied, frame 1 has 5 objects and frame 2 has 4 objects.

What I essentially did was store all of the bounding boxes + confidence scores and from these detection results and input them into tracker.update() instead of outputs[0] (https://github.com/ifzhang/ByteTrack/blob/main/tools/demo_track.py#L191). Is there a reason why all of the detections are not being shown? Thanks for the help!

michaeldwong avatar May 24 '22 16:05 michaeldwong

Have you solved this problem?

IIASHKA avatar Jul 01 '22 11:07 IIASHKA

Similar issue with C++ code.

InfiniteLife avatar Jul 09 '22 08:07 InfiniteLife

Well, it is because only high score detection bbox can init new tracks, and if detection bbox's score is below the assigned threshold , it will be skipped. As the code indicate:

if (track->score < this->high_thresh) // 0.6 continue;

poppinjie avatar Nov 19 '22 07:11 poppinjie

Is there a fix for this? C++ Tracker does not track properly even with 0.9 confidence.

Subalzero avatar Dec 01 '23 14:12 Subalzero