From ef0803b0418ed15e50a8d4f46ebaeb9547f3c96f Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Mon, 19 Jul 2021 07:27:38 +0000 Subject: [PATCH] fix bugs --- tests/ocr_det_params.txt | 2 +- tests/prepare.sh | 12 ++++++------ tests/test.sh | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/ocr_det_params.txt b/tests/ocr_det_params.txt index 3efe804e..141e8868 100644 --- a/tests/ocr_det_params.txt +++ b/tests/ocr_det_params.txt @@ -1,4 +1,4 @@ -===========================train_params=========================== +===========================train_params=========================== model_name:ocr_det python:python3.7 gpu_list:0|0,1 diff --git a/tests/prepare.sh b/tests/prepare.sh index 2811cb3f..c584ada5 100644 --- a/tests/prepare.sh +++ b/tests/prepare.sh @@ -24,10 +24,10 @@ function func_parser_value(){ } IFS=$'\n' # The training params -model_name=$(func_parser_value "${lines[0]}") -train_model_list=$(func_parser_value "${lines[0]}") +model_name=$(func_parser_value "${lines[1]}") +train_model_list=$(func_parser_value "${lines[1]}") -trainer_list=$(func_parser_value "${lines[10]}") +trainer_list=$(func_parser_value "${lines[14]}") # MODE be one of ['lite_train_infer' 'whole_infer' 'whole_train_infer'] @@ -62,11 +62,11 @@ elif [ ${MODE} = "whole_infer" ];then eval_batch_step=10 else rm -rf ./train_data/icdar2015 - wget -nc -P ./train_data https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ch_det_data_50.tar - if [ ${model_name} = "ocr_det" ]; then + if [[ ${model_name} = "ocr_det" ]]; then + wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ch_det_data_50.tar eval_model_name="ch_ppocr_mobile_v2.0_det_infer" wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_infer.tar - cd ./inference && tar xf ${eval_model_name}.tar && cd ../ + cd ./inference && tar xf ${eval_model_name}.tar && tar xf ch_det_data_50.tar && cd ../ else eval_model_name="ch_ppocr_mobile_v2.0_rec_train" wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_train.tar diff --git a/tests/test.sh b/tests/test.sh index 2c1591f6..39db2b4b 100644 --- a/tests/test.sh +++ b/tests/test.sh @@ -99,7 +99,7 @@ distill_key=$(func_parser_key "${lines[18]}") distill_trainer=$(func_parser_value "${lines[18]}") trainer_key1=$(func_parser_key "${lines[19]}") trainer_value1=$(func_parser_value "${lines[19]}") -trainer_key1=$(func_parser_key "${lines[20]}") +trainer_key2=$(func_parser_key "${lines[20]}") trainer_value2=$(func_parser_value "${lines[20]}") eval_py=$(func_parser_value "${lines[23]}") -- GitLab