未验证 提交 50280922 编写于 作者: K Kaipeng Deng 提交者: GitHub

add --map_type to set voc_eval map_type (#3260)

上级 3ead31f0
......@@ -8,6 +8,7 @@ max_iters: 28000
snapshot_iter: 2000
log_smooth_window: 1
metric: VOC
map_type: 11point
save_dir: output
weights: output/ssd_mobilenet_v1_voc/model_final/
num_classes: 21
......
......@@ -8,6 +8,7 @@ snapshot_iter: 10000
log_smooth_window: 20
log_iter: 20
metric: VOC
map_type: 11point
pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/VGG16_caffe_pretrained.tar
save_dir: output
weights: output/ssd_vgg16_300_voc/model_final/
......
......@@ -8,6 +8,7 @@ snapshot_iter: 10000
log_smooth_window: 20
log_iter: 20
metric: VOC
map_type: 11point
pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/VGG16_caffe_pretrained.tar
save_dir: output
weights: output/ssd_vgg16_512_voc/model_final/
......
......@@ -8,6 +8,7 @@ log_smooth_window: 20
save_dir: output
snapshot_iter: 2000
metric: VOC
map_type: 11point
pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/DarkNet53_pretrained.tar
weights: output/yolov3_darknet_voc/model_final
num_classes: 20
......
......@@ -8,6 +8,7 @@ log_smooth_window: 20
save_dir: output
snapshot_iter: 2000
metric: VOC
map_type: 11point
pretrain_weights: http://paddle-imagenet-models-name.bj.bcebos.com/MobileNetV1_pretrained.tar
weights: output/yolov3_mobilenet_v1_voc/model_final
num_classes: 20
......
......@@ -8,6 +8,7 @@ log_smooth_window: 20
save_dir: output
snapshot_iter: 2000
metric: VOC
map_type: 11point
pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/ResNet34_pretrained.tar
weights: output/yolov3_r34_voc/model_final
num_classes: 20
......
......@@ -17,8 +17,10 @@ snapshot_iter: 10000
log_smooth_window: 20
# The log in training is displayed once every period.
log_iter: 20
# Evalution method, COCO and VOC are available.
# Evaluation method, COCO and VOC are available.
metric: COCO
# Evaluation mAP calculation method in VOC metric, 11point and integral are available.
map_type: 11point
# The path of final model for evaluation and test.
pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/VGG16_caffe_pretrained.tar
# The directory to save models.
......
......@@ -96,7 +96,8 @@ def eval_results(results,
num_classes,
resolution=None,
is_bbox_normalized=False,
output_directory=None):
output_directory=None,
map_type='11point'):
"""Evaluation for evaluation program results"""
box_ap_stats = []
if metric == 'COCO':
......@@ -129,7 +130,9 @@ def eval_results(results,
box_ap_stats.append(res * 100.)
elif 'bbox' in results[0]:
box_ap = voc_bbox_eval(
results, num_classes, is_bbox_normalized=is_bbox_normalized)
results, num_classes,
is_bbox_normalized=is_bbox_normalized,
map_type=map_type)
box_ap_stats.append(box_ap)
return box_ap_stats
......
......@@ -137,7 +137,7 @@ def main():
if 'mask' in results[0]:
resolution = model.mask_head.resolution
eval_results(results, eval_feed, cfg.metric, cfg.num_classes, resolution,
is_bbox_normalized, FLAGS.output_eval)
is_bbox_normalized, FLAGS.output_eval, cfg.map_type)
if __name__ == '__main__':
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册