From 3a1e9c668cf9f1b28ebfdc64f44f57d800c0eb5a Mon Sep 17 00:00:00 2001 From: Xingyi Zhou Date: Fri, 26 Apr 2019 10:53:05 -0500 Subject: [PATCH] revert pascal evaluation format --- src/lib/datasets/dataset/pascal.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/datasets/dataset/pascal.py b/src/lib/datasets/dataset/pascal.py index fc31d1b..d6a8ca0 100644 --- a/src/lib/datasets/dataset/pascal.py +++ b/src/lib/datasets/dataset/pascal.py @@ -46,7 +46,7 @@ class PascalVOC(data.Dataset): print('==> initializing pascal {} data.'.format(_ann_name[split])) self.coco = coco.COCO(self.annot_path) - self.images = self.coco.getImgIds() + self.images = sorted(self.coco.getImgIds()) self.num_samples = len(self.images) print('Loaded {} {} samples'.format(split, self.num_samples)) @@ -61,9 +61,9 @@ class PascalVOC(data.Dataset): img_id = self.images[i] for j in range(1, self.num_classes + 1): if isinstance(all_bboxes[img_id][j], np.ndarray): - detections[j][img_id] = all_bboxes[img_id][j].tolist() + detections[j][i] = all_bboxes[img_id][j].tolist() else: - detections[j][img_id] = all_bboxes[img_id][j] + detections[j][i] = all_bboxes[img_id][j] return detections def __len__(self):