Skip to content

Commit

Permalink
Warn users when eval is skipped (facebookresearch#624)
Browse files Browse the repository at this point in the history
Summary:
Fix for facebookresearch#620 & facebookresearch#293.
Pull Request resolved: facebookresearch#624

Reviewed By: ir413

Differential Revision: D9574052

Pulled By: rbgirshick

fbshipit-source-id: f44cea71e5cf6e613d319322db62a60ecb814a75
  • Loading branch information
gadcam authored and xzhewei committed Dec 5, 2018
1 parent 2f3d2f7 commit 51861c6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions detectron/datasets/json_dataset_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ def evaluate_masks(
if json_dataset.name.find('test') == -1:
coco_eval = _do_segmentation_eval(json_dataset, res_file, output_dir)
else:
logger.warning(
'{} eval ignored as annotations are undisclosed on test: {} ignored'
.format("Segmentation", json_dataset.name)
)
coco_eval = None
# Optionally cleanup results json file
if cleanup:
Expand Down Expand Up @@ -137,6 +141,10 @@ def evaluate_boxes(
if json_dataset.name.find('test') == -1:
coco_eval = _do_detection_eval(json_dataset, res_file, output_dir)
else:
logger.warning(
'{} eval ignored as annotations are undisclosed on test: {} ignored'
.format("Bbox", json_dataset.name)
)
coco_eval = None
# Optionally cleanup results json file
if cleanup:
Expand Down Expand Up @@ -337,6 +345,10 @@ def evaluate_keypoints(
if json_dataset.name.find('test') == -1:
coco_eval = _do_keypoint_eval(json_dataset, res_file, output_dir)
else:
logger.warning(
'{} eval ignored as annotations are undisclosed on test: {} ignored'
.format("Keypoints", json_dataset.name)
)
coco_eval = None
# Optionally cleanup results json file
if cleanup:
Expand Down

0 comments on commit 51861c6

Please sign in to comment.