I've recently tried to make a custom yolov7 dataset based on this notebook (moving forward from the VOC conversion) and unfortunately lost a bit of time because a crucial little detail wasn't visible: the annotion bounding box is in <object-class-id> <center-x> <center-y> <width> <height> format.
This was already present in the notebook:
However it never got rendered on github:
(perhaps the < and > symbols make the annotation details line turn into HTML tags or ignored).
This trivial PR simply swapt < for [ and > for ] so the line renders:
(I found information pointing to the fact that the values are normalised, but it was unclear wether the format is 'xmin', 'xmax', 'ymin', 'ymax' format, etc. The info on the official repo wasn't clear on this either. In hind sight this line: x, y, w, h = (box[0] + box[1]) / 2.0 - 1, (box[2] + box[3]) / 2.0 - 1, box[1] - box[0], box[3] - box[2] in convert_label explains the same, but I missed it. Hopefully this helps others looking for the info in a hurry)
Hello there,
I've recently tried to make a custom yolov7 dataset based on this notebook (moving forward from the VOC conversion) and unfortunately lost a bit of time because a crucial little detail wasn't visible: the annotion bounding box is in
<object-class-id> <center-x> <center-y> <width> <height>
format.This was already present in the notebook:
However it never got rendered on github: (perhaps the
<
and>
symbols make the annotation details line turn into HTML tags or ignored).This trivial PR simply swapt
<
for[
and>
for]
so the line renders:(I found information pointing to the fact that the values are normalised, but it was unclear wether the format is 'xmin', 'xmax', 'ymin', 'ymax' format, etc. The info on the official repo wasn't clear on this either. In hind sight this line:
x, y, w, h = (box[0] + box[1]) / 2.0 - 1, (box[2] + box[3]) / 2.0 - 1, box[1] - box[0], box[3] - box[2]
inconvert_label
explains the same, but I missed it. Hopefully this helps others looking for the info in a hurry)