Commit 6e95bea8 authored by gadcam's avatar gadcam Committed by Facebook Github Bot

Warn users when eval is skipped (#624)

Summary:
Fix for #620 & #293.
Pull Request resolved: https://github.com/facebookresearch/Detectron/pull/624

Reviewed By: ir413

Differential Revision: D9574052

Pulled By: rbgirshick

fbshipit-source-id: f44cea71e5cf6e613d319322db62a60ecb814a75
parent 34f08e04
......@@ -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:
......@@ -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:
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment