diff --git a/test_tipc/configs/ch_PP-OCRv2/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt b/test_tipc/configs/ch_PP-OCRv2/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt index b31e102b620c9b69c6e3944fa13ce35909d96c8c..a0c49a0812c5cb47c848d4b6e68e0b10f835c760 100644 --- a/test_tipc/configs/ch_PP-OCRv2/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt +++ b/test_tipc/configs/ch_PP-OCRv2/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt @@ -3,7 +3,7 @@ model_name:ch_PP-OCRv2 use_opencv:True infer_model:./inference/ch_PP-OCRv2_det_infer/ infer_quant:False -inference:./deploy/cpp_infer/build/ppocr --rec_char_dict_path=./ppocr/utils/ppocr_keys_v1.txt +inference:./deploy/cpp_infer/build/ppocr --rec_char_dict_path=./ppocr/utils/ppocr_keys_v1.txt --rec_img_h=32 --use_gpu:True|False --enable_mkldnn:False --cpu_threads:6 diff --git a/test_tipc/configs/ch_PP-OCRv2_rec/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt b/test_tipc/configs/ch_PP-OCRv2_rec/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt index 60f47883708811a39da4e2fe0ccea9b1c2ae80c8..b1bff00b09cedbe5abac50a471091fb2daedf8f3 100644 --- a/test_tipc/configs/ch_PP-OCRv2_rec/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt +++ b/test_tipc/configs/ch_PP-OCRv2_rec/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt @@ -3,7 +3,7 @@ model_name:ch_PP-OCRv2_rec use_opencv:True infer_model:./inference/ch_PP-OCRv2_rec_infer/ infer_quant:False -inference:./deploy/cpp_infer/build/ppocr --rec_char_dict_path=./ppocr/utils/ppocr_keys_v1.txt +inference:./deploy/cpp_infer/build/ppocr --rec_char_dict_path=./ppocr/utils/ppocr_keys_v1.txt --rec_img_h=32 --use_gpu:True|False --enable_mkldnn:False --cpu_threads:6 diff --git a/test_tipc/configs/ch_ppocr_mobile_v2.0/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt b/test_tipc/configs/ch_ppocr_mobile_v2.0/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt index 8f76631aa4ee38c5ae36512a965e4da4939d4b8d..b42ab9db362b0ba56d795096fdc58a645b425480 100644 --- a/test_tipc/configs/ch_ppocr_mobile_v2.0/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt +++ b/test_tipc/configs/ch_ppocr_mobile_v2.0/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt @@ -3,7 +3,7 @@ model_name:ch_ppocr_mobile_v2.0 use_opencv:True infer_model:./inference/ch_ppocr_mobile_v2.0_det_infer/ infer_quant:False -inference:./deploy/cpp_infer/build/ppocr --rec_char_dict_path=./ppocr/utils/ppocr_keys_v1.txt +inference:./deploy/cpp_infer/build/ppocr --rec_char_dict_path=./ppocr/utils/ppocr_keys_v1.txt --rec_img_h=32 --use_gpu:True|False --enable_mkldnn:False --cpu_threads:6 diff --git a/test_tipc/configs/ch_ppocr_mobile_v2.0_rec/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt b/test_tipc/configs/ch_ppocr_mobile_v2.0_rec/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt index 25b0dcf3c07eb841701a94ab46b075c90826894d..480fb16cddfc4c2f4784cc8fa88512f063f7b2ae 100644 --- a/test_tipc/configs/ch_ppocr_mobile_v2.0_rec/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt +++ b/test_tipc/configs/ch_ppocr_mobile_v2.0_rec/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt @@ -3,7 +3,7 @@ model_name:ch_ppocr_mobile_v2.0_rec use_opencv:True infer_model:./inference/ch_ppocr_mobile_v2.0_rec_infer/ infer_quant:False -inference:./deploy/cpp_infer/build/ppocr --rec_char_dict_path=./ppocr/utils/ppocr_keys_v1.txt +inference:./deploy/cpp_infer/build/ppocr --rec_char_dict_path=./ppocr/utils/ppocr_keys_v1.txt --rec_img_h=32 --use_gpu:True|False --enable_mkldnn:False --cpu_threads:6 diff --git a/test_tipc/configs/ch_ppocr_server_v2.0/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt b/test_tipc/configs/ch_ppocr_server_v2.0/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt index b03130a15f23b9bbe66fe06ce27d754333959b46..7c980b2baeef7161a93dea360089b333f2003a31 100644 --- a/test_tipc/configs/ch_ppocr_server_v2.0/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt +++ b/test_tipc/configs/ch_ppocr_server_v2.0/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt @@ -3,7 +3,7 @@ model_name:ch_ppocr_server_v2.0 use_opencv:True infer_model:./inference/ch_ppocr_server_v2.0_det_infer/ infer_quant:False -inference:./deploy/cpp_infer/build/ppocr --rec_char_dict_path=./ppocr/utils/ppocr_keys_v1.txt +inference:./deploy/cpp_infer/build/ppocr --rec_char_dict_path=./ppocr/utils/ppocr_keys_v1.txt --rec_img_h=32 --use_gpu:True|False --enable_mkldnn:False --cpu_threads:6 diff --git a/test_tipc/configs/ch_ppocr_server_v2.0_rec/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt b/test_tipc/configs/ch_ppocr_server_v2.0_rec/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt index 79fee95a1a0e03b0833b6bd70c0d679fc41f97ce..cbec272cce544e332fd908d4946321a15543fcae 100644 --- a/test_tipc/configs/ch_ppocr_server_v2.0_rec/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt +++ b/test_tipc/configs/ch_ppocr_server_v2.0_rec/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt @@ -3,7 +3,7 @@ model_name:ch_ppocr_server_v2.0_rec use_opencv:True infer_model:./inference/ch_ppocr_server_v2.0_rec_infer/ infer_quant:False -inference:./deploy/cpp_infer/build/ppocr --rec_char_dict_path=./ppocr/utils/ppocr_keys_v1.txt +inference:./deploy/cpp_infer/build/ppocr --rec_char_dict_path=./ppocr/utils/ppocr_keys_v1.txt --rec_img_h=32 --use_gpu:True|False --enable_mkldnn:False --cpu_threads:6 diff --git a/test_tipc/prepare.sh b/test_tipc/prepare.sh index 501e597b1600ac98deddf7fd803603ea62e6f190..4609cc24c1d0c18899237b83db66544b727b5611 100644 --- a/test_tipc/prepare.sh +++ b/test_tipc/prepare.sh @@ -328,7 +328,6 @@ if [ ${MODE} = "klquant_whole_infer" ]; then cd ./inference && tar xf rec_inference.tar && tar xf ch_PP-OCRv2_rec_infer.tar && cd ../ fi if [ ${model_name} = "ch_PP-OCRv3_rec_KL" ]; then - # TODO check model link wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar --no-check-certificate wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/rec_inference.tar --no-check-certificate wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ic15_data.tar --no-check-certificate @@ -341,7 +340,6 @@ if [ ${MODE} = "klquant_whole_infer" ]; then cd ./inference && tar xf ch_PP-OCRv2_det_infer.tar && tar xf ch_det_data_50.tar && cd ../ fi if [ ${model_name} = "ch_PP-OCRv3_det_KL" ]; then - # TODO check model link wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ch_det_data_50.tar --no-check-certificate wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_det_infer.tar --no-check-certificate cd ./inference && tar xf ch_PP-OCRv3_det_infer.tar && tar xf ch_det_data_50.tar && cd ../ @@ -417,9 +415,9 @@ if [ ${MODE} = "serving_infer" ];then IFS='|' array=(${python_name_list}) python_name=${array[0]} - # ${python_name} -m pip install paddle-serving-server-gpu==0.8.3.post101 - # ${python_name} -m pip install paddle_serving_client==0.8.3 - # ${python_name} -m pip install paddle-serving-app==0.8.3 + ${python_name} -m pip install paddle-serving-server-gpu==0.8.3.post101 + ${python_name} -m pip install paddle_serving_client==0.8.3 + ${python_name} -m pip install paddle-serving-app==0.8.3 # wget model if [[ ${model_name} =~ "ch_ppocr_mobile_v2.0" ]]; then wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_infer.tar --no-check-certificate @@ -447,7 +445,7 @@ if [ ${MODE} = "paddle2onnx_infer" ];then # prepare serving env python_name=$(func_parser_value "${lines[2]}") ${python_name} -m pip install paddle2onnx - ${python_name} -m pip install onnxruntime==1.4.0 + ${python_name} -m pip install onnxruntime # wget model if [[ ${model_name} =~ "ch_ppocr_mobile_v2.0" ]]; then wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_infer.tar --no-check-certificate diff --git a/test_tipc/test_inference_cpp.sh b/test_tipc/test_inference_cpp.sh index d759d2858e7372c1132b3dd31c1f8111347e3880..c0c7c18a38a46b00c839757e303049135a508691 100644 --- a/test_tipc/test_inference_cpp.sh +++ b/test_tipc/test_inference_cpp.sh @@ -189,6 +189,9 @@ else wget -nc $PADDLEInfer --no-check-certificate fi tar zxf paddle_inference.tgz + if [ ! -d "paddle_inference" ]; then + ln -s paddle_inference_install_dir paddle_inference + fi echo "################### download paddle inference finished ###################" fi LIB_DIR=$(pwd)/paddle_inference/ @@ -218,11 +221,10 @@ echo "################### build PaddleOCR demo finished ###################" # set cuda device GPUID=$2 if [ ${#GPUID} -le 0 ];then - env=" " + env="export CUDA_VISIBLE_DEVICES=0" else env="export CUDA_VISIBLE_DEVICES=${GPUID}" fi -set CUDA_VISIBLE_DEVICES eval $env