cocodataset / cocoapi

COCO API - Dataset @ http://cocodataset.org/
Other
6.05k stars 3.75k forks source link

showAnns should display bbox even if segmentation is not present #482

Open jnothman opened 3 years ago

jnothman commented 3 years ago

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;

https://github.com/cocodataset/cocoapi/blob/8c9bcc3cf640524c4c20a9c40e89cb6a2f2fa0e9/PythonAPI/pycocotools/coco.py#L241

jnothman commented 3 years ago

Ping @geezacoleman

bendominguez0111 commented 5 months ago

Any updated on this?