bug: can not parse lableme special type , "shape_type": "polygon"
franztao opened this issue · 2 comments
ValueError Traceback (most recent call last)
in
1 src=r"C:\Users\franztao\Desktop\0819_project\data\tsr_anno"
----> 2 bbs_ground_true=get_ground_true(src)
3 # dst=r"C:\Users\franztao\Desktop\0819_project\data\tsr_anno_single"
in get_ground_true(src)
6 continue
7 print(root,file)
----> 8 labelme_bbs: BoundingBox = converter.labelme2bb(os.path.join(root, file))
9 bbs = bbs + labelme_bbs
10 return bbs
C:\ProgramData\Anaconda3\lib\site-packages\src-0.1.0-py3.8.egg\src\utils\converter.py in labelme2bb(annotations_path)
216 for obj in json_object['shapes']:
217 obj_label = obj['label']
--> 218 ((x1, y1), (x2, y2)) = obj['points']
219 # If there is no bounding box annotations, bb coordinates could have been set to None
220 if x1 is None and y1 is None and x2 is None and y2 is None:
Hi @hengfanz,
This is not a bug.
The annotations must be in bounding box formats ("shape_type":"rectangle"
), not polygons.
Please, check here examples of label me files.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.