AlexeyAB / Yolo_mark

GUI for marking bounded boxes of objects in images for training neural network Yolo v3 and v2
https://github.com/AlexeyAB/darknet
The Unlicense
1.81k stars 682 forks source link

Bounding box coordinates #90

Closed luczeng closed 6 years ago

luczeng commented 6 years ago

Hello,

I am outputting the bounding box coordinates by adding : printf("x_center: %d , y_center: %d , width: %d , height: %d \n",(right + left) / 2, (bot - top) / 2, right - left, bot - top); in image.c

However when I plot the center in my file, the y coordinate is biased (the x coordinate is ok). I'm not sure how to fix this, or the reasons for this result. Here is an example :

x_center: 1375 , y_center: 57 , width: 147 , height: 114. However I visually see that the target has a y_center of 540. My image is of size 3616 × 3040. The saved image prediction.jpg puts the bounding box at the right location !

There's probably a bias that is not corrected somewhere due to the network input size. Any idea ?

Thanks