Many datasets have bounding boxes and no segmentation. It seems reasonable to support such datasets in a COCO-style format. The current logic in (Python) showAnns requires 'segmentation' to be present to display bounding boxes. Changing the following line to include or 'bbox' in anns[0] would enable showing datasets with bbox but not segmentation annotations;
Many datasets have bounding boxes and no segmentation. It seems reasonable to support such datasets in a COCO-style format. The current logic in (Python) showAnns requires
'segmentation'
to be present to display bounding boxes. Changing the following line to includeor 'bbox' in anns[0]
would enable showing datasets with bbox but not segmentation annotations;https://github.com/cocodataset/cocoapi/blob/8c9bcc3cf640524c4c20a9c40e89cb6a2f2fa0e9/PythonAPI/pycocotools/coco.py#L241