How to get the coordinates of the bounding box in YOLO object detection?

Shriram picture Shriram · Jun 14, 2017 · Viewed 22.4k times · Source

enter image description here

I need to get the bounding box coordinates generated in the above image using YOLO object detection.

Answer

Brian O'Donnell picture Brian O'Donnell · Jun 16, 2017

A quick solution is to modify the image.c file to print out the bounding box information:

...
if(bot > im.h-1) bot = im.h-1;

// Print bounding box values 
printf("Bounding Box: Left=%d, Top=%d, Right=%d, Bottom=%d\n", left, top, right, bot); 
draw_box_width(im, left, top, right, bot, width, red, green, blue);
...