abewley / sort

Simple, online, and realtime tracking of multiple objects in a video sequence.
GNU General Public License v3.0
3.82k stars 1.07k forks source link

The format of the "dets" in Sort::update #118

Open mchlsdrv opened 3 years ago

mchlsdrv commented 3 years ago

As I've seen the format should be [x1,y1,x2,y2,score] (where x1,y1 is the top left and x2,y2 is the bottom right), and not in [[x,y,w,h,score],[x,y,w,h,score],...], as stated in the description, as the associate_detections_to_trackers() uses iou() function that expects this format.

bamboosdu commented 3 years ago

I found the same problem. It's really confused!

abewley commented 3 years ago

Thanks for highlighting this. The description for batch_iou() is now updated to show that the boxes should be [x1, y1, x2, y2] (or left, top, right, bottom respectively).

If using stored detections (i.e. using the code as-is) then the box format in the detection file should be [x1, y1, w, h] and it will be converted to [x1, y1, x2, y2] on this line: https://github.com/abewley/sort/blob/master/sort.py#L302 .

bamboosdu commented 3 years ago

Thanks for highlighting this. The description for batch_iou() is now updated to show that the boxes should be [x1, y1, x2, y2] (or left, top, right, bottom respectively).

If using stored detections (i.e. using the code as-is) then the box format in the detection file should be [x1, y1, w, h] and it will be converted to [x1, y1, x2, y2] on this line: https://github.com/abewley/sort/blob/master/sort.py#L302 .

Thanks!