Skip to content

Commit 51fe4bd

Browse files
Atila Orhonc-m-y-kawabe
Atila Orhon
authored andcommitted
Avoid overwriting of the explicit ignore flag by the isCrowd flag
This is from cocodataset#465
1 parent 7f05337 commit 51fe4bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PythonAPI/pycocotools/cocoeval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def _toMask(anns, coco):
106106
# set ignore flag
107107
for gt in gts:
108108
gt['ignore'] = gt['ignore'] if 'ignore' in gt else 0
109-
gt['ignore'] = 'iscrowd' in gt and gt['iscrowd']
109+
gt['ignore'] = ('iscrowd' in gt and gt['iscrowd']) or gt['ignore']
110110
if p.iouType == 'keypoints':
111111
gt['ignore'] = (gt['num_keypoints'] == 0) or gt['ignore']
112112
self._gts = defaultdict(list) # gt for evaluation

0 commit comments

Comments
 (0)