diff --git a/tools/configure.py b/tools/configure.py index 84b031c393daaee99186caa22b3d7d54e5747d8b..8b43b00bc2e694eb13fe0dd721b4c048e20f05d0 100644 --- a/tools/configure.py +++ b/tools/configure.py @@ -35,6 +35,7 @@ MISC_CONFIG = { "save_dir": "", "weights": "", "metric": "", + "map_type": "11point", "log_smooth_window": 20, "snapshot_iter": 10000, "use_gpu": True, diff --git a/tools/eval.py b/tools/eval.py index 3df77b21fd73d8d994df2083e1d596dd323b0bfe..d1be939081e4e4a7c67bf69f8e9e807ceafd6914 100644 --- a/tools/eval.py +++ b/tools/eval.py @@ -136,8 +136,10 @@ def main(): resolution = None if 'mask' in results[0]: resolution = model.mask_head.resolution + # if map_type not set, use default 11point, only use in VOC eval + map_type = cfg.map_type if 'map_type' in cfg else '11point' eval_results(results, eval_feed, cfg.metric, cfg.num_classes, resolution, - is_bbox_normalized, FLAGS.output_eval, cfg.map_type) + is_bbox_normalized, FLAGS.output_eval, map_type) if __name__ == '__main__': diff --git a/tools/train.py b/tools/train.py index 619ea972b0611316aa4b840491eb40d7f2056048..abcb7814a0d36ce818fc3ad866c24c11b3d537ea 100644 --- a/tools/train.py +++ b/tools/train.py @@ -163,6 +163,9 @@ def main(): callable(model.is_bbox_normalized): is_bbox_normalized = model.is_bbox_normalized() + # if map_type not set, use default 11point, only use in VOC eval + map_type = cfg.map_type if 'map_type' in cfg else '11point' + train_stats = TrainingStats(cfg.log_smooth_window, train_keys) train_pyreader.start() start_time = time.time() @@ -200,7 +203,7 @@ def main(): if 'mask' in results[0]: resolution = model.mask_head.resolution box_ap_stats = eval_results(results, eval_feed, cfg.metric, cfg.num_classes, - resolution, is_bbox_normalized, FLAGS.output_eval) + resolution, is_bbox_normalized, FLAGS.output_eval, map_type) if box_ap_stats[0] > best_box_ap_list[0]: best_box_ap_list[0] = box_ap_stats[0] best_box_ap_list[1] = it