AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.77k stars 7.96k forks source link

darknet.py output understanding #1553

Open RJVisee44 opened 6 years ago

RJVisee44 commented 6 years ago

Hello all,

Using darknet.py we get

list of tuples like ('obj_label', confidence, (bounding_box_x_px, bounding_box_y_px, bounding_box_width_px, bounding_box_height_px)) The X and Y coordinates are from the center of the bounding box. Subtract half the width or height to get the lower corner.>

I can't seem to understand how we can convert this to xmin, ymin, xmax, ymax (exact bounding box coordinates). Please help!

RJVisee44 commented 6 years ago

Actually, Think I get it now...

xmin = bounding_box_x_px - (bounding_box_width_px/2) ymin = bounding_box_y_px - (bounding_box_height_px/2) xmax = xmin + bounding_box_width_px ymax = ymin + bounding_box_height_px

PeterQuinn925 commented 6 years ago

Yes. If you want an example, you could look at mine - https://github.com/PeterQuinn925/Squirrel/blob/master/sort_photos.py

Are you missing dividing by 2 for xmax and ymax?

RJVisee44 commented 6 years ago

@PeterQuinn925 Thank you. Random questions, have you ever worked with the ALOV300++ Dataset (http://alov300pp.joomlafree.it/) for tracking. I cannot for the life of me understand how to interpret their ground truth annotations.