From b9b356ea80367d26c5b68382cadd7d11fc5dc864 Mon Sep 17 00:00:00 2001 From: Yupeng Zhang Date: Mon, 6 Jun 2022 16:47:47 +0800 Subject: [PATCH] fix imgIds mismatch problem when imgIds bigger than int.Max, but less than uint.Max --- PythonAPI/pycocotools/cocoeval.py | 1 + 1 file changed, 1 insertion(+) diff --git a/PythonAPI/pycocotools/cocoeval.py b/PythonAPI/pycocotools/cocoeval.py index f4e3decb..9dac015a 100644 --- a/PythonAPI/pycocotools/cocoeval.py +++ b/PythonAPI/pycocotools/cocoeval.py @@ -131,6 +131,7 @@ def evaluate(self): p.iouType = 'segm' if p.useSegm == 1 else 'bbox' print('useSegm (deprecated) is not None. Running {} evaluation'.format(p.iouType)) print('Evaluate annotation type *{}*'.format(p.iouType)) + p.imgIds = np.array(p.imgIds, dtype=np.uint) p.imgIds = list(np.unique(p.imgIds)) if p.useCats: p.catIds = list(np.unique(p.catIds))