Skip to content

Commit

Permalink
Avoid overwriting of the explicit ignore flag by the isCrowd flag
Browse files Browse the repository at this point in the history
This is from cocodataset#465
  • Loading branch information
Atila Orhon authored and yutakawabe-mor committed Mar 4, 2022
1 parent 7f05337 commit 51fe4bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PythonAPI/pycocotools/cocoeval.py
Original file line number Diff line number Diff line change
Expand Up @@ -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['ignore'] = ('iscrowd' in gt and gt['iscrowd']) or gt['ignore']
if p.iouType == 'keypoints':
gt['ignore'] = (gt['num_keypoints'] == 0) or gt['ignore']
self._gts = defaultdict(list) # gt for evaluation
Expand Down

0 comments on commit 51fe4bd

Please sign in to comment.