From 7da14fddfe5414e0c9901b748f7e8ef173698587 Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Mon, 18 May 2020 18:38:31 +0800 Subject: [PATCH] fix bug when running det eval --- doc/detection.md | 4 ++-- tools/eval.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/detection.md b/doc/detection.md index 47c85d78..71034876 100644 --- a/doc/detection.md +++ b/doc/detection.md @@ -79,10 +79,10 @@ python3 tools/eval.py -c configs/det/det_mv3_db.yml -o Global.checkpoints="./ou 测试单张图像的检测效果 ``` -python3 tools/infer_det.py -c config/det/det_mv3_db.yml -o TestReader.single_img_path="./doc/imgs_en/img_10.jpg" +python3 tools/infer_det.py -c config/det/det_mv3_db.yml -o TestReader.single_img_path="./doc/imgs_en/img_10.jpg" Global.checkpoints="./output/det_db/best_accuracy" ``` 测试文件夹下所有图像的检测效果 ``` -python3 tools/infer_det.py -c config/det/det_mv3_db.yml -o TestReader.single_img_path="./doc/imgs_en/" +python3 tools/infer_det.py -c config/det/det_mv3_db.yml -o TestReader.single_img_path="./doc/imgs_en/" Global.checkpoints="./output/det_db/best_accuracy" ``` diff --git a/tools/eval.py b/tools/eval.py index 949f3a34..304a1340 100755 --- a/tools/eval.py +++ b/tools/eval.py @@ -72,12 +72,12 @@ def main(): init_model(config, eval_program, exe) if alg in ['EAST', 'DB']: - eval_reader = reader_main(config=config, mode="test") + eval_reader = reader_main(config=config, mode="eval") eval_info_dict = {'program':eval_program,\ 'reader':eval_reader,\ 'fetch_name_list':eval_fetch_name_list,\ 'fetch_varname_list':eval_fetch_varname_list} - metrics = eval_det_run(exe, config, eval_info_dict, "test") + metrics = eval_det_run(exe, config, eval_info_dict, "eval") else: reader_type = config['Global']['reader_yml'] if "benchmark" not in reader_type: -- GitLab