Closed xumix closed 1 year ago
Managed to fix the error with this
if "rectanglelabels" in label or 'labels' in label:
x, y, w, h = self.rotated_rectangle(label)
annotations.append([category_id, (x + w / 2) / 100, (y + h / 2) / 100, w / 100, h / 100])
elif "polygonlabels" in label:
points_abs = [(x / 100, y / 100) for x, y in label["points"]]
x, y = zip(*points_abs)
annotations.append([category_id] + [coord for point in points_abs for coord in point])
else:
raise ValueError(f"Unknown label type {label}")
Describe the bug Started getting this error when added polygon selection tool, rectangles alone worked ok. I've got this error while exporting to YOLO format(export to Pascal VOC & COCO works fine):
To Reproduce Steps to reproduce the behavior:
Change config to:
Expected behavior Normal export.
Environment (please complete the following information):