Skip to content

Commit e86c6f1

Browse files
author
Christopher Woodall
committed
avoid raising an error when visualizing annotations containing only bboxes cocodataset#495
1 parent 052b089 commit e86c6f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PythonAPI/pycocotools/coco.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def showAnns(self, anns, draw_bbox=False):
239239
"""
240240
if len(anns) == 0:
241241
return 0
242-
if 'segmentation' in anns[0] or 'keypoints' in anns[0]:
242+
if 'bbox' in anns[0] or 'segmentation' in anns[0] or 'keypoints' in anns[0]:
243243
datasetType = 'instances'
244244
elif 'caption' in anns[0]:
245245
datasetType = 'captions'

0 commit comments

Comments
 (0)