From f3f8408aea7fceaef95f4da9e534b66217ae3f25 Mon Sep 17 00:00:00 2001 From: gadcam <1693643+gadcam@users.noreply.github.com> Date: Fri, 31 Aug 2018 07:39:03 +0200 Subject: [PATCH] Warn users when eval is skipped --- detectron/datasets/json_dataset_evaluator.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/detectron/datasets/json_dataset_evaluator.py b/detectron/datasets/json_dataset_evaluator.py index b7e77a31f..c1bf4e99d 100644 --- a/detectron/datasets/json_dataset_evaluator.py +++ b/detectron/datasets/json_dataset_evaluator.py @@ -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: