YOLO物体检测中如何获取边界框的坐标?

问题描述

我需要使用YOLO物体检测得到上图中生成的边界框坐标.

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


解决方案

一个快速的解决方案是修改 image.c 文件打印出边界框信息:

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
", left, top, right, bot); 
draw_box_width(im, left, top, right, bot, width, red, green, blue);
...

相关文章