jwwangchn / AI-TOD

Official code for "Tiny Object Detection in Aerial Images".
MIT License
194 stars 21 forks source link

Clarification Needed on Bounding Box Coordinate Conversion for AI-TOD Dataset in YOLO Format #30

Open sinanutkuulu opened 1 year ago

sinanutkuulu commented 1 year ago

Hello,

I have converted the AI-TOD dataset to the YOLO format. In your paper, you describe the bounding box representations as bi = (cxi, cyi, wi, hi), where cxi and cyi are the center coordinates. During the conversion process, I interpreted cxi and cyi as the actual center coordinates. However, I encountered an issue during training: YOLO does not accept negative values, and some of my bounding box representations contain negative values.

I believe this issue arose because I might have misunderstood the representation of cxi and cyi. To clarify, should I have calculated these center coordinates by summing the two values and then dividing by two? Or was my initial interpretation of using cxi and cyi as direct center coordinates correct?

I'm seeking clarification to understand if my conversion approach was incorrect. Any guidance would be greatly appreciated.

Chasel-Tsui commented 1 year ago

Hi, we follow the coco format in AI-TOD, the (x, y) in (x, y, w, h) seem to be the top left corner point coordinates. The boxes with negative values may be introduced during the image cropping or labelling process, I think they only account for a very small proportion of the dataset, you can simply filter out them. In order to obtain the YOLO format, you need to convert the coordinates to center coordinates, you need also to normalize them by the image size.