From 39f74fb3bf25bf86a20a9716e7c9e65a7d83bbb5 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Sun, 11 Aug 2019 15:30:41 +0200 Subject: [PATCH] Changed data code to load all images for testing Signed-off-by: Jim Martens --- src/twomartens/masterthesis/data.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/twomartens/masterthesis/data.py b/src/twomartens/masterthesis/data.py index 34a47b8..4223e0c 100644 --- a/src/twomartens/masterthesis/data.py +++ b/src/twomartens/masterthesis/data.py @@ -294,12 +294,11 @@ def load_coco_val_ssd(clean_dataset: callable, annotation_file_minival = f"{coco_path}/annotations/instances_minival2014.json" resized_shape = (image_size, image_size) cats_to_classes, classes_to_cats, _, _ = coco_utils.get_coco_category_maps(annotation_file_minival) - inlier_cat_ids = [classes_to_cats[i] for i in range(1, 61)] coco_val = coco.COCO(annotation_file_minival) img_ids = coco_val.getImgIds() # return all image IDs belonging to given category images = coco_val.loadImgs(img_ids) # load all images - annotation_ids = coco_val.getAnnIds(img_ids, catIds=inlier_cat_ids) + annotation_ids = coco_val.getAnnIds(img_ids) annotations = coco_val.loadAnns(annotation_ids) # load all image annotations file_names = {image['id']: f"{coco_path}/val2014/{image['file_name']}" for image in images} ids_to_images = {image['id']: image for image in images}