sort icon indicating copy to clipboard operation
sort copied to clipboard

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

Open mchlsdrv opened this issue 4 years ago • 3 comments

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.

mchlsdrv avatar Oct 13 '20 22:10 mchlsdrv

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

bamboosdu avatar Oct 24 '20 09:10 bamboosdu

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 .

abewley avatar Oct 25 '20 18:10 abewley

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!

bamboosdu avatar Oct 26 '20 02:10 bamboosdu