Skip to content

Commit

Permalink
fix coco testing (fix facebookresearch#275)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: fairinternal/detectron2#323

Differential Revision: D18413967

Pulled By: ppwwyyxx

fbshipit-source-id: f48aae8ce50f89bd926c31c8dbdbbd50450209d2
  • Loading branch information
ppwwyyxx authored and facebook-github-bot committed Nov 9, 2019
1 parent ffa5213 commit afaf2e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions detectron2/data/datasets/builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
),
"coco_2017_train": ("coco/train2017", "coco/annotations/instances_train2017.json"),
"coco_2017_val": ("coco/val2017", "coco/annotations/instances_val2017.json"),
"coco_2017_test": ("coco/test2017", "coco/annotations/image_info_test2017.json"),
"coco_2017_test-dev": ("coco/test2017", "coco/annotations/image_info_test-dev2017.json"),
"coco_2017_val_100": ("coco/val2017", "coco/annotations/instances_val2017_100.json"),
}

Expand Down
2 changes: 1 addition & 1 deletion detectron2/evaluation/coco_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __init__(self, dataset_name, cfg, distributed, output_dir=None):
self._kpt_oks_sigmas = cfg.TEST.KEYPOINT_OKS_SIGMAS
# Test set json files do not contain annotations (evaluation must be
# performed using the COCO evaluation server).
self._do_evaluation = len(self._coco_api.getAnnIds()) > 0
self._do_evaluation = "annotations" in self._coco_api.dataset

def reset(self):
self._predictions = []
Expand Down

0 comments on commit afaf2e4

Please sign in to comment.