I was trying to develop some way to convert annotations between formats, and it's quit hard to find information but here I have :
This one is PASCAL VOC
<width>800</width>
<height>450</height>
<depth>3</depth>
<bndbox>
<xmin>474</xmin>
<ymin>2</ymin>
<xmax>726</xmax> <!-- shape_width = 252 -->
<ymax>449</ymax> <!-- shape_height = 447 -->
</bndbox>
convert to YOLO darknet
2 0.750000 0.501111 0.315000 0.993333
note initial 2
it's a category
dirs
and theclasses
arguments to fit your training/test images and classification labels (respectively). gist.github.com/Amir22010/a99f18ca19112bc7db0872a36a03a1ec – Ernesternesta