From 3a78674d7d52691c93aeee102ba2cb47b05a1c6d Mon Sep 17 00:00:00 2001 From: EricJin2002 <769327841@qq.com> Date: Sat, 22 Apr 2023 14:32:55 +0800 Subject: [PATCH] Fix gt['ignore'] in cocoeval.py --- PythonAPI/pycocotools/cocoeval.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PythonAPI/pycocotools/cocoeval.py b/PythonAPI/pycocotools/cocoeval.py index f4e3decb..3d8fc4ab 100644 --- a/PythonAPI/pycocotools/cocoeval.py +++ b/PythonAPI/pycocotools/cocoeval.py @@ -106,7 +106,7 @@ def _toMask(anns, coco): # set ignore flag for gt in gts: gt['ignore'] = gt['ignore'] if 'ignore' in gt else 0 - gt['ignore'] = 'iscrowd' in gt and gt['iscrowd'] + gt['iscrowd'] = 'iscrowd' in gt and gt['iscrowd'] if p.iouType == 'keypoints': gt['ignore'] = (gt['num_keypoints'] == 0) or gt['ignore'] self._gts = defaultdict(list) # gt for evaluation