From adab004a8cea45daf5ce48ec94de6419471dad65 Mon Sep 17 00:00:00 2001 From: JavierClearImageAI <44587516+JavierClearImageAI@users.noreply.github.com> Date: Sun, 14 Mar 2021 17:47:44 +0100 Subject: [PATCH] Update coco.py --- PythonAPI/pycocotools/coco.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PythonAPI/pycocotools/coco.py b/PythonAPI/pycocotools/coco.py index e4182c74..a354c792 100644 --- a/PythonAPI/pycocotools/coco.py +++ b/PythonAPI/pycocotools/coco.py @@ -238,7 +238,7 @@ def showAnns(self, anns, draw_bbox=False): """ if len(anns) == 0: return 0 - if 'segmentation' in anns[0] or 'keypoints' in anns[0]: + if 'bbox' in anns[0] or 'segmentation' in anns[0] or 'keypoints' in anns[0]: datasetType = 'instances' elif 'caption' in anns[0]: datasetType = 'captions' @@ -438,4 +438,4 @@ def annToMask(self, ann): """ rle = self.annToRLE(ann) m = maskUtils.decode(rle) - return m \ No newline at end of file + return m