Search code examples
pythondeep-learningcomputer-visionobject-detection

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


enter image description here

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


Solution

  • 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);
    ...