2021-07-14 14:19:08 +08:00
|
|
|
#!/bin/bash
|
2021-11-11 20:16:16 +08:00
|
|
|
source test_tipc/common_func.sh
|
|
|
|
|
2021-07-14 14:19:08 +08:00
|
|
|
FILENAME=$1
|
2021-09-07 15:53:01 +08:00
|
|
|
|
2021-10-28 10:13:05 +08:00
|
|
|
# MODE be one of ['lite_train_lite_infer' 'lite_train_whole_infer' 'whole_train_whole_infer',
|
|
|
|
# 'whole_infer', 'klquant_whole_infer',
|
2021-11-11 12:16:32 +08:00
|
|
|
# 'cpp_infer', 'serving_infer']
|
2021-10-12 14:53:50 +08:00
|
|
|
|
2021-07-14 14:19:08 +08:00
|
|
|
MODE=$2
|
|
|
|
|
|
|
|
dataline=$(cat ${FILENAME})
|
|
|
|
|
|
|
|
# parser params
|
|
|
|
IFS=$'\n'
|
|
|
|
lines=(${dataline})
|
2021-11-11 20:16:16 +08:00
|
|
|
|
2021-07-14 14:19:08 +08:00
|
|
|
# The training params
|
2021-07-19 15:27:38 +08:00
|
|
|
model_name=$(func_parser_value "${lines[1]}")
|
2021-07-14 14:19:08 +08:00
|
|
|
|
2021-07-19 15:27:38 +08:00
|
|
|
trainer_list=$(func_parser_value "${lines[14]}")
|
2021-07-28 15:47:53 +08:00
|
|
|
|
2022-01-19 14:44:02 +08:00
|
|
|
if [ ${MODE} = "benchmark_train" ];then
|
2022-01-19 17:09:53 +08:00
|
|
|
pip install -r requirements.txt
|
2022-02-10 10:58:26 +08:00
|
|
|
if [[ ${model_name} =~ "det_mv3_db_v2_0" || ${model_name} =~ "det_r50_vd_east_v2_0" || ${model_name} =~ "det_r50_vd_pse_v2_0" || ${model_name} =~ "det_r18_db_v2_0" ]];then
|
2022-01-19 14:44:02 +08:00
|
|
|
rm -rf ./train_data/icdar2015
|
2022-02-21 19:31:30 +08:00
|
|
|
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/pretrained/MobileNetV3_large_x0_5_pretrained.pdparams --no-check-certificate
|
|
|
|
wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/icdar2015.tar --no-check-certificate
|
|
|
|
cd ./train_data/ && tar xf icdar2015.tar && cd ../
|
|
|
|
fi
|
|
|
|
if [[ ${model_name} =~ "det_r50_vd_east_v2_0" || ${model_name} =~ "det_r50_vd_pse_v2_0" ]];then
|
|
|
|
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/pretrained/ResNet50_vd_ssld_pretrained.pdparams --no-check-certificate
|
|
|
|
wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/icdar2015.tar --no-check-certificate
|
|
|
|
cd ./train_data/ && tar xf icdar2015.tar && cd ../
|
|
|
|
fi
|
|
|
|
if [[ ${model_name} =~ "det_r18_db_v2_0" ]];then
|
|
|
|
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/pretrained/ResNet18_vd_pretrained.pdparams --no-check-certificate
|
2022-01-19 14:44:02 +08:00
|
|
|
wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/icdar2015.tar --no-check-certificate
|
|
|
|
cd ./train_data/ && tar xf icdar2015.tar && cd ../
|
|
|
|
fi
|
|
|
|
fi
|
2021-07-14 14:19:08 +08:00
|
|
|
|
2021-10-28 10:13:05 +08:00
|
|
|
if [ ${MODE} = "lite_train_lite_infer" ];then
|
2021-07-28 15:49:25 +08:00
|
|
|
# pretrain lite train data
|
2021-11-01 10:19:09 +08:00
|
|
|
wget -nc -P ./pretrain_models/ https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_large_x0_5_pretrained.pdparams --no-check-certificate
|
|
|
|
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/en/det_mv3_db_v2.0_train.tar --no-check-certificate
|
2022-05-26 20:09:48 +08:00
|
|
|
if [[ ${model_name} =~ "ch_PP-OCRv2_det" ]];then
|
2021-11-01 10:19:09 +08:00
|
|
|
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_det_distill_train.tar --no-check-certificate
|
2021-10-27 10:24:36 +08:00
|
|
|
cd ./pretrain_models/ && tar xf ch_PP-OCRv2_det_distill_train.tar && cd ../
|
|
|
|
fi
|
2022-05-26 20:09:48 +08:00
|
|
|
if [[ ${model_name} =~ "ch_PP-OCRv3_det" ]];then
|
2022-05-12 19:59:02 +08:00
|
|
|
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_det_distill_train.tar --no-check-certificate
|
|
|
|
cd ./pretrain_models/ && tar xf ch_PP-OCRv3_det_distill_train.tar && cd ../
|
|
|
|
fi
|
2021-08-26 17:40:32 +08:00
|
|
|
cd ./pretrain_models/ && tar xf det_mv3_db_v2.0_train.tar && cd ../
|
2021-07-28 15:49:25 +08:00
|
|
|
rm -rf ./train_data/icdar2015
|
2021-08-05 14:18:44 +08:00
|
|
|
rm -rf ./train_data/ic15_data
|
2021-11-01 10:19:09 +08:00
|
|
|
wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/icdar2015_lite.tar --no-check-certificate
|
|
|
|
wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ic15_data.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 ./deploy/slim/prune https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/sen.pickle --no-check-certificate
|
2021-08-26 17:21:19 +08:00
|
|
|
|
2021-08-05 14:18:44 +08:00
|
|
|
cd ./train_data/ && tar xf icdar2015_lite.tar && tar xf ic15_data.tar
|
2021-07-28 15:49:25 +08:00
|
|
|
ln -s ./icdar2015_lite ./icdar2015
|
|
|
|
cd ../
|
2021-08-17 15:20:30 +08:00
|
|
|
cd ./inference && tar xf rec_inference.tar && cd ../
|
2022-05-26 20:09:48 +08:00
|
|
|
if [ ${model_name} == "ch_PP-OCRv2_det" ] || [ ${model_name} == "ch_PP-OCRv2_det_PACT" ]; then
|
2022-04-01 13:50:22 +08:00
|
|
|
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_det_train.tar --no-check-certificate
|
|
|
|
cd ./pretrain_models/ && tar xf ch_ppocr_server_v2.0_det_train.tar && cd ../
|
2022-03-25 14:54:44 +08:00
|
|
|
fi
|
2022-05-26 20:09:48 +08:00
|
|
|
if [ ${model_name} == "ch_PP-OCRv2_rec" ] || [ ${model_name} == "ch_PP-OCRv2_rec_PACT" ]; then
|
2022-04-07 16:26:20 +08:00
|
|
|
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_rec_train.tar --no-check-certificate
|
|
|
|
cd ./pretrain_models/ && tar xf ch_PP-OCRv2_rec_train.tar && cd ../
|
|
|
|
fi
|
2022-05-26 20:09:48 +08:00
|
|
|
if [ ${model_name} == "ch_PP-OCRv3_rec" ] || [ ${model_name} == "ch_PP-OCRv3_rec_PACT" ]; then
|
2022-05-12 19:59:02 +08:00
|
|
|
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar --no-check-certificate
|
|
|
|
cd ./pretrain_models/ && tar xf ch_PP-OCRv3_rec_train.tar && cd ../
|
|
|
|
fi
|
2022-03-25 14:54:44 +08:00
|
|
|
if [ ${model_name} == "det_r18_db_v2_0" ]; then
|
2022-03-24 17:52:36 +08:00
|
|
|
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/pretrained/ResNet18_vd_pretrained.pdparams --no-check-certificate
|
|
|
|
fi
|
2021-11-25 11:39:32 +08:00
|
|
|
if [ ${model_name} == "en_server_pgnetA" ]; then
|
2021-11-24 16:46:16 +08:00
|
|
|
wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/total_text_lite.tar --no-check-certificate
|
|
|
|
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/pgnet/en_server_pgnetA.tar --no-check-certificate
|
|
|
|
cd ./pretrain_models/ && tar xf en_server_pgnetA.tar && cd ../
|
2021-11-26 18:28:01 +08:00
|
|
|
cd ./train_data && tar xf total_text_lite.tar && ln -s total_text_lite total_text && cd ../
|
2021-11-24 16:46:16 +08:00
|
|
|
fi
|
2021-11-25 11:39:32 +08:00
|
|
|
if [ ${model_name} == "det_r50_vd_sast_icdar15_v2.0" ] || [ ${model_name} == "det_r50_vd_sast_totaltext_v2.0" ]; then
|
2021-11-25 11:30:33 +08:00
|
|
|
wget -nc -P ./pretrain_models/ https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet50_vd_ssld_pretrained.pdparams --no-check-certificate
|
2021-12-08 14:48:50 +08:00
|
|
|
wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/total_text_lite.tar --no-check-certificate
|
2021-12-07 17:24:50 +08:00
|
|
|
cd ./train_data && tar xf total_text_lite.tar && ln -s total_text_lite total_text && cd ../
|
2021-11-25 11:30:33 +08:00
|
|
|
fi
|
2022-02-08 10:24:02 +08:00
|
|
|
if [ ${model_name} == "det_mv3_db_v2_0" ]; then
|
2021-11-26 10:11:00 +08:00
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/en/det_mv3_db_v2.0_train.tar --no-check-certificate
|
|
|
|
cd ./inference/ && tar xf det_mv3_db_v2.0_train.tar && cd ../
|
2021-11-26 10:05:40 +08:00
|
|
|
fi
|
|
|
|
if [ ${model_name} == "det_r50_db_v2.0" ]; then
|
|
|
|
wget -nc -P ./pretrain_models/ https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet50_vd_ssld_pretrained.pdparams --no-check-certificate
|
2021-11-26 10:11:00 +08:00
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/en/det_r50_vd_db_v2.0_train.tar --no-check-certificate
|
|
|
|
cd ./inference/ && tar xf det_r50_vd_db_v2.0_train.tar && cd ../
|
2021-11-26 10:05:40 +08:00
|
|
|
fi
|
2021-11-30 15:12:05 +08:00
|
|
|
if [ ${model_name} == "ch_ppocr_mobile_v2.0_rec_FPGM" ]; then
|
|
|
|
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_train.tar --no-check-certificate
|
|
|
|
cd ./pretrain_models/ && tar xf ch_ppocr_mobile_v2.0_rec_train.tar && cd ../
|
|
|
|
fi
|
2022-04-07 16:26:20 +08:00
|
|
|
if [ ${model_name} == "det_mv3_east_v2.0" ]; then
|
|
|
|
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/en/det_mv3_east_v2.0_train.tar --no-check-certificate
|
|
|
|
cd ./pretrain_models/ && tar xf det_mv3_east_v2.0_train.tar && cd ../
|
|
|
|
fi
|
2021-11-25 11:30:33 +08:00
|
|
|
|
2021-10-28 10:13:05 +08:00
|
|
|
elif [ ${MODE} = "whole_train_whole_infer" ];then
|
2021-11-01 10:19:09 +08:00
|
|
|
wget -nc -P ./pretrain_models/ https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_large_x0_5_pretrained.pdparams --no-check-certificate
|
2021-07-28 15:49:25 +08:00
|
|
|
rm -rf ./train_data/icdar2015
|
2021-08-05 14:18:44 +08:00
|
|
|
rm -rf ./train_data/ic15_data
|
2021-11-01 10:19:09 +08:00
|
|
|
wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/icdar2015.tar --no-check-certificate
|
|
|
|
wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ic15_data.tar --no-check-certificate
|
2021-08-05 14:18:44 +08:00
|
|
|
cd ./train_data/ && tar xf icdar2015.tar && tar xf ic15_data.tar && cd ../
|
2022-05-26 20:09:48 +08:00
|
|
|
if [ ${model_name} == "ch_PP-OCRv2_det" ]; then
|
2021-11-01 10:19:09 +08:00
|
|
|
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_det_distill_train.tar --no-check-certificate
|
2021-10-27 10:24:36 +08:00
|
|
|
cd ./pretrain_models/ && tar xf ch_PP-OCRv2_det_distill_train.tar && cd ../
|
|
|
|
fi
|
2022-05-26 20:09:48 +08:00
|
|
|
if [ ${model_name} == "ch_PP-OCRv3_det" ]; then
|
2022-05-12 19:59:02 +08:00
|
|
|
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_det_distill_train.tar --no-check-certificate
|
|
|
|
cd ./pretrain_models/ && tar xf ch_PP-OCRv3_det_distill_train.tar && cd ../
|
|
|
|
fi
|
2021-11-25 11:39:32 +08:00
|
|
|
if [ ${model_name} == "en_server_pgnetA" ]; then
|
2021-12-07 17:24:50 +08:00
|
|
|
wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/total_text_lite.tar --no-check-certificate
|
2021-11-25 11:30:33 +08:00
|
|
|
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/pgnet/en_server_pgnetA.tar --no-check-certificate
|
|
|
|
cd ./pretrain_models/ && tar xf en_server_pgnetA.tar && cd ../
|
2021-12-07 17:24:50 +08:00
|
|
|
cd ./train_data && tar xf total_text.tar && ln -s total_text_lite total_text && cd ../
|
2021-11-25 11:30:33 +08:00
|
|
|
fi
|
2021-11-25 11:39:32 +08:00
|
|
|
if [ ${model_name} == "det_r50_vd_sast_totaltext_v2.0" ]; then
|
2021-11-25 11:30:33 +08:00
|
|
|
wget -nc -P ./pretrain_models/ https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet50_vd_ssld_pretrained.pdparams --no-check-certificate
|
2021-12-07 17:24:50 +08:00
|
|
|
wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/total_text_lite.tar --no-check-certificate
|
|
|
|
cd ./train_data && tar xf total_text.tar && ln -s total_text_lite total_text && cd ../
|
2021-11-25 11:30:33 +08:00
|
|
|
fi
|
2021-10-28 10:13:05 +08:00
|
|
|
elif [ ${MODE} = "lite_train_whole_infer" ];then
|
2021-11-01 10:19:09 +08:00
|
|
|
wget -nc -P ./pretrain_models/ https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_large_x0_5_pretrained.pdparams --no-check-certificate
|
2021-07-28 15:49:25 +08:00
|
|
|
rm -rf ./train_data/icdar2015
|
2021-08-05 14:18:44 +08:00
|
|
|
rm -rf ./train_data/ic15_data
|
2021-11-01 10:19:09 +08:00
|
|
|
wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/icdar2015_infer.tar --no-check-certificate
|
|
|
|
wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ic15_data.tar --no-check-certificate
|
2021-08-05 14:18:44 +08:00
|
|
|
cd ./train_data/ && tar xf icdar2015_infer.tar && tar xf ic15_data.tar
|
2021-07-28 15:49:25 +08:00
|
|
|
ln -s ./icdar2015_infer ./icdar2015
|
|
|
|
cd ../
|
2022-05-26 20:09:48 +08:00
|
|
|
if [ ${model_name} == "ch_PP-OCRv2_det" ]; then
|
2021-11-01 10:19:09 +08:00
|
|
|
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_det_distill_train.tar --no-check-certificate
|
2021-10-27 10:24:36 +08:00
|
|
|
cd ./pretrain_models/ && tar xf ch_PP-OCRv2_det_distill_train.tar && cd ../
|
|
|
|
fi
|
2022-05-26 20:09:48 +08:00
|
|
|
if [ ${model_name} == "ch_PP-OCRv3_det" ]; then
|
2022-05-12 19:59:02 +08:00
|
|
|
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_det_distill_train.tar --no-check-certificate
|
|
|
|
cd ./pretrain_models/ && tar xf ch_PP-OCRv3_det_distill_train.tar && cd ../
|
|
|
|
fi
|
2021-10-28 10:13:05 +08:00
|
|
|
elif [ ${MODE} = "whole_infer" ];then
|
2021-11-25 11:30:33 +08:00
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ch_det_data_50.tar --no-check-certificate
|
2021-12-10 15:32:42 +08:00
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/rec_inference.tar --no-check-certificate
|
2021-12-15 19:26:36 +08:00
|
|
|
cd ./inference && tar xf rec_inference.tar && tar xf ch_det_data_50.tar && cd ../
|
2021-11-25 11:39:32 +08:00
|
|
|
if [ ${model_name} = "ch_ppocr_mobile_v2.0_det" ]; then
|
2021-08-27 10:35:32 +08:00
|
|
|
eval_model_name="ch_ppocr_mobile_v2.0_det_train"
|
2021-08-05 14:18:44 +08:00
|
|
|
rm -rf ./train_data/icdar2015
|
2021-11-01 10:19:09 +08:00
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_train.tar --no-check-certificate
|
2021-11-08 19:07:20 +08:00
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ${eval_model_name}.tar && tar xf ch_det_data_50.tar && tar xf ch_ppocr_mobile_v2.0_det_infer.tar && cd ../
|
2021-12-15 14:13:03 +08:00
|
|
|
elif [ ${model_name} = "ch_ppocr_mobile_v2.0_det_PACT" ]; then
|
|
|
|
eval_model_name="ch_ppocr_mobile_v2.0_det_prune_infer"
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/slim/ch_ppocr_mobile_v2.0_det_prune_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ${eval_model_name}.tar && tar xf ch_det_data_50.tar && cd ../
|
2021-11-25 11:39:32 +08:00
|
|
|
elif [ ${model_name} = "ch_ppocr_server_v2.0_det" ]; then
|
2021-11-01 10:19:09 +08:00
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_det_train.tar --no-check-certificate
|
2021-10-12 11:09:16 +08:00
|
|
|
cd ./inference && tar xf ch_ppocr_server_v2.0_det_train.tar && tar xf ch_det_data_50.tar && cd ../
|
2021-11-26 10:05:40 +08:00
|
|
|
elif [ ${model_name} = "ch_ppocr_mobile_v2.0" ]; then
|
2021-11-01 10:19:09 +08:00
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_infer.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_infer.tar --no-check-certificate
|
2021-08-27 15:03:13 +08:00
|
|
|
cd ./inference && tar xf ch_ppocr_mobile_v2.0_det_infer.tar && tar xf ch_ppocr_mobile_v2.0_rec_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
2021-11-26 10:05:40 +08:00
|
|
|
elif [ ${model_name} = "ch_ppocr_server_v2.0" ]; then
|
2021-11-01 10:19:09 +08:00
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_det_infer.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_rec_infer.tar --no-check-certificate
|
2021-09-08 15:57:18 +08:00
|
|
|
cd ./inference && tar xf ch_ppocr_server_v2.0_det_infer.tar && tar xf ch_ppocr_server_v2.0_rec_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
2021-12-10 15:32:42 +08:00
|
|
|
elif [ ${model_name} = "ch_ppocr_mobile_v2.0_rec_PACT" ]; then
|
2021-12-15 14:13:03 +08:00
|
|
|
eval_model_name="ch_ppocr_mobile_v2.0_rec_slim_infer"
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_slim_infer.tar --no-check-certificate
|
2021-12-10 15:32:42 +08:00
|
|
|
cd ./inference && tar xf ${eval_model_name}.tar && cd ../
|
|
|
|
elif [ ${model_name} = "ch_ppocr_mobile_v2.0_rec_FPGM" ]; then
|
2021-12-15 14:13:03 +08:00
|
|
|
eval_model_name="ch_PP-OCRv2_rec_infer"
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_rec_infer.tar --no-check-certificate
|
2021-12-10 15:32:42 +08:00
|
|
|
cd ./inference && tar xf ${eval_model_name}.tar && cd ../
|
2021-07-28 15:49:25 +08:00
|
|
|
fi
|
2022-05-12 19:59:02 +08:00
|
|
|
if [[ ${model_name} =~ "ch_PP-OCRv2" ]]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_det_infer.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_rec_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv2_det_infer.tar && tar xf ch_PP-OCRv2_rec_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
|
|
|
fi
|
|
|
|
if [[ ${model_name} =~ "ch_PP-OCRv3" ]]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_det_infer.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv3_det_infer.tar && tar xf ch_PP-OCRv3_rec_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
|
|
|
fi
|
2022-05-26 20:09:48 +08:00
|
|
|
if [[ ${model_name} =~ "ch_PP-OCRv2_det" ]]; then
|
2021-10-27 10:24:36 +08:00
|
|
|
eval_model_name="ch_PP-OCRv2_det_infer"
|
2021-11-01 10:19:09 +08:00
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_det_infer.tar --no-check-certificate
|
2021-10-27 10:24:36 +08:00
|
|
|
cd ./inference && tar xf ${eval_model_name}.tar && tar xf ch_det_data_50.tar && cd ../
|
2021-12-10 16:24:09 +08:00
|
|
|
fi
|
2022-05-26 20:09:48 +08:00
|
|
|
if [[ ${model_name} =~ "ch_PP-OCRv3_det" ]]; then
|
2022-05-12 19:59:02 +08:00
|
|
|
eval_model_name="ch_PP-OCRv3_det_infer"
|
|
|
|
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 ${eval_model_name}.tar && tar xf ch_det_data_50.tar && cd ../
|
|
|
|
fi
|
2022-05-26 20:09:48 +08:00
|
|
|
if [[ ${model_name} =~ "ch_PP-OCRv2_rec" ]]; then
|
2021-12-10 16:24:09 +08:00
|
|
|
eval_model_name="ch_PP-OCRv2_rec_infer"
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_rec_infer.tar --no-check-certificate
|
2021-12-15 14:13:03 +08:00
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_rec_slim_quant_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ${eval_model_name}.tar && tar xf ch_PP-OCRv2_rec_slim_quant_infer.tar && cd ../
|
2021-12-10 15:32:42 +08:00
|
|
|
fi
|
2022-05-26 20:09:48 +08:00
|
|
|
if [[ ${model_name} =~ "ch_PP-OCRv3_rec" ]]; then
|
2022-05-12 19:59:02 +08:00
|
|
|
eval_model_name="ch_PP-OCRv3_rec_infer"
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar --no-check-certificate
|
2022-05-20 15:03:21 +08:00
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_slim_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ${eval_model_name}.tar && tar xf ch_PP-OCRv3_rec_slim_infer.tar && cd ../
|
|
|
|
fi
|
2022-05-26 20:09:48 +08:00
|
|
|
if [[ ${model_name} == "ch_PP-OCRv3_rec_PACT" ]]; then
|
2022-05-20 15:03:21 +08:00
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_slim_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv3_rec_slim_infer.tar && cd ../
|
2022-05-12 19:59:02 +08:00
|
|
|
fi
|
2021-11-25 11:39:32 +08:00
|
|
|
if [ ${model_name} == "en_server_pgnetA" ]; then
|
2021-11-25 11:30:33 +08:00
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/pgnet/en_server_pgnetA.tar --no-check-certificate
|
2021-12-09 20:03:40 +08:00
|
|
|
cd ./inference && tar xf en_server_pgnetA.tar && tar xf ch_det_data_50.tar && cd ../
|
2021-11-25 11:30:33 +08:00
|
|
|
fi
|
2021-11-25 11:39:32 +08:00
|
|
|
if [ ${model_name} == "det_r50_vd_sast_icdar15_v2.0" ]; then
|
2021-11-25 11:30:33 +08:00
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/en/det_r50_vd_sast_icdar15_v2.0_train.tar --no-check-certificate
|
2021-12-09 20:03:40 +08:00
|
|
|
cd ./inference/ && tar xf det_r50_vd_sast_icdar15_v2.0_train.tar && tar xf ch_det_data_50.tar && cd ../
|
2021-11-25 11:30:33 +08:00
|
|
|
fi
|
2021-12-15 20:00:15 +08:00
|
|
|
if [ ${model_name} == "rec_mv3_none_none_ctc_v2.0" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/en/rec_mv3_none_none_ctc_v2.0_train.tar --no-check-certificate
|
2021-12-15 20:47:24 +08:00
|
|
|
cd ./inference/ && tar xf rec_mv3_none_none_ctc_v2.0_train.tar && cd ../
|
2021-12-15 20:00:15 +08:00
|
|
|
fi
|
|
|
|
if [ ${model_name} == "rec_r34_vd_none_none_ctc_v2.0" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/en/rec_r34_vd_none_none_ctc_v2.0_train.tar --no-check-certificate
|
2021-12-15 20:47:24 +08:00
|
|
|
cd ./inference/ && tar xf rec_r34_vd_none_none_ctc_v2.0_train.tar && cd ../
|
2021-12-15 20:00:15 +08:00
|
|
|
fi
|
|
|
|
if [ ${model_name} == "rec_mv3_none_bilstm_ctc_v2.0" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/en/rec_mv3_none_bilstm_ctc_v2.0_train.tar --no-check-certificate
|
2021-12-15 20:47:24 +08:00
|
|
|
cd ./inference/ && tar xf rec_mv3_none_bilstm_ctc_v2.0_train.tar && cd ../
|
2021-12-15 20:00:15 +08:00
|
|
|
fi
|
|
|
|
if [ ${model_name} == "rec_r34_vd_none_bilstm_ctc_v2.0" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/en/rec_r34_vd_none_bilstm_ctc_v2.0_train.tar --no-check-certificate
|
2021-12-15 20:47:24 +08:00
|
|
|
cd ./inference/ && tar xf rec_r34_vd_none_bilstm_ctc_v2.0_train.tar && cd ../
|
2021-12-15 20:00:15 +08:00
|
|
|
fi
|
|
|
|
if [ ${model_name} == "rec_mv3_tps_bilstm_ctc_v2.0" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/en/rec_mv3_tps_bilstm_ctc_v2.0_train.tar --no-check-certificate
|
2021-12-15 20:47:24 +08:00
|
|
|
cd ./inference/ && tar xf rec_mv3_tps_bilstm_ctc_v2.0_train.tar && cd ../
|
2021-12-15 20:00:15 +08:00
|
|
|
fi
|
|
|
|
if [ ${model_name} == "rec_r34_vd_tps_bilstm_ctc_v2.0" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/en/rec_r34_vd_tps_bilstm_ctc_v2.0_train.tar --no-check-certificate
|
2021-12-15 20:47:24 +08:00
|
|
|
cd ./inference/ && tar xf rec_r34_vd_tps_bilstm_ctc_v2.0_train.tar && cd ../
|
2021-12-15 20:00:15 +08:00
|
|
|
fi
|
|
|
|
if [ ${model_name} == "ch_ppocr_server_v2.0_rec" ]; then
|
2021-12-30 09:51:18 +08:00
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_rec_train.tar --no-check-certificate
|
2021-12-15 20:47:24 +08:00
|
|
|
cd ./inference/ && tar xf ch_ppocr_server_v2.0_rec_train.tar && cd ../
|
2021-12-15 20:00:15 +08:00
|
|
|
fi
|
2021-12-16 11:29:28 +08:00
|
|
|
if [ ${model_name} == "ch_ppocr_mobile_v2.0_rec" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_train.tar --no-check-certificate
|
|
|
|
cd ./inference/ && tar xf ch_ppocr_mobile_v2.0_rec_train.tar && cd ../
|
|
|
|
fi
|
|
|
|
if [ ${model_name} == "rec_mtb_nrtr" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/en/rec_mtb_nrtr_train.tar --no-check-certificate
|
|
|
|
cd ./inference/ && tar xf rec_mtb_nrtr_train.tar && cd ../
|
|
|
|
fi
|
|
|
|
if [ ${model_name} == "rec_mv3_tps_bilstm_att_v2.0" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/en/rec_mv3_tps_bilstm_att_v2.0_train.tar --no-check-certificate
|
|
|
|
cd ./inference/ && tar xf rec_mv3_tps_bilstm_att_v2.0_train.tar && cd ../
|
|
|
|
fi
|
|
|
|
if [ ${model_name} == "rec_r34_vd_tps_bilstm_att_v2.0" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/en/rec_r34_vd_tps_bilstm_att_v2.0_train.tar --no-check-certificate
|
|
|
|
cd ./inference/ && tar xf rec_r34_vd_tps_bilstm_att_v2.0_train.tar && cd ../
|
|
|
|
fi
|
|
|
|
if [ ${model_name} == "rec_r31_sar" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.1/rec/rec_r31_sar_train.tar --no-check-certificate
|
|
|
|
cd ./inference/ && tar xf rec_r31_sar_train.tar && cd ../
|
|
|
|
fi
|
|
|
|
if [ ${model_name} == "rec_r50_fpn_vd_none_srn" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/en/rec_r50_vd_srn_train.tar --no-check-certificate
|
|
|
|
cd ./inference/ && tar xf rec_r50_vd_srn_train.tar && cd ../
|
|
|
|
fi
|
2021-12-15 20:00:15 +08:00
|
|
|
|
2021-12-15 19:26:36 +08:00
|
|
|
if [ ${model_name} == "det_r50_vd_sast_totaltext_v2.0" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/en/det_r50_vd_sast_totaltext_v2.0_train.tar --no-check-certificate
|
|
|
|
cd ./inference/ && tar xf det_r50_vd_sast_totaltext_v2.0_train.tar && cd ../
|
|
|
|
fi
|
2022-02-08 10:24:02 +08:00
|
|
|
if [ ${model_name} == "det_mv3_db_v2_0" ]; then
|
2021-11-26 10:05:40 +08:00
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/en/det_mv3_db_v2.0_train.tar --no-check-certificate
|
2021-12-09 20:03:40 +08:00
|
|
|
cd ./inference/ && tar xf det_mv3_db_v2.0_train.tar && tar xf ch_det_data_50.tar && cd ../
|
2021-11-26 10:05:40 +08:00
|
|
|
fi
|
|
|
|
if [ ${model_name} == "det_r50_db_v2.0" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/en/det_r50_vd_db_v2.0_train.tar --no-check-certificate
|
2021-12-09 20:03:40 +08:00
|
|
|
cd ./inference/ && tar xf det_r50_vd_db_v2.0_train.tar && tar xf ch_det_data_50.tar && cd ../
|
2021-11-25 11:30:33 +08:00
|
|
|
fi
|
2021-12-15 19:26:36 +08:00
|
|
|
if [ ${model_name} == "det_mv3_pse_v2.0" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.1/en_det/det_mv3_pse_v2.0_train.tar --no-check-certificate
|
|
|
|
cd ./inference/ && tar xf det_mv3_pse_v2.0_train.tar & cd ../
|
|
|
|
fi
|
2022-02-10 10:02:33 +08:00
|
|
|
if [ ${model_name} == "det_r50_vd_pse_v2_0" ]; then
|
2021-12-15 19:26:36 +08:00
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.1/en_det/det_r50_vd_pse_v2.0_train.tar --no-check-certificate
|
|
|
|
cd ./inference/ && tar xf det_r50_vd_pse_v2.0_train.tar & cd ../
|
|
|
|
fi
|
|
|
|
if [ ${model_name} == "det_mv3_east_v2.0" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/en/det_mv3_east_v2.0_train.tar --no-check-certificate
|
|
|
|
cd ./inference/ && tar xf det_mv3_east_v2.0_train.tar & cd ../
|
|
|
|
fi
|
2022-02-10 10:07:02 +08:00
|
|
|
if [ ${model_name} == "det_r50_vd_east_v2_0" ]; then
|
2021-12-15 19:45:16 +08:00
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/en/det_r50_vd_east_v2.0_train.tar --no-check-certificate
|
|
|
|
cd ./inference/ && tar xf det_r50_vd_east_v2.0_train.tar & cd ../
|
2021-12-15 19:26:36 +08:00
|
|
|
fi
|
2021-11-26 10:58:18 +08:00
|
|
|
fi
|
2021-12-15 19:26:36 +08:00
|
|
|
|
2021-10-28 16:23:42 +08:00
|
|
|
if [ ${MODE} = "klquant_whole_infer" ]; then
|
2021-11-26 13:53:17 +08:00
|
|
|
wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/icdar2015_lite.tar --no-check-certificate
|
2022-01-05 15:07:24 +08:00
|
|
|
cd ./train_data/ && tar xf icdar2015_lite.tar && rm -rf ./icdar2015 && ln -s ./icdar2015_lite ./icdar2015 && cd ../
|
2021-11-26 12:53:17 +08:00
|
|
|
if [ ${model_name} = "ch_ppocr_mobile_v2.0_det_KL" ]; then
|
2021-11-01 10:19:09 +08:00
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_infer.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ch_det_data_50.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_ppocr_mobile_v2.0_det_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
2021-10-12 14:53:50 +08:00
|
|
|
fi
|
2022-05-26 20:09:48 +08:00
|
|
|
if [ ${model_name} = "ch_PP-OCRv2_rec_KL" ]; then
|
2021-12-28 10:28:17 +08:00
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_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
|
2022-01-06 17:49:27 +08:00
|
|
|
wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ic15_data.tar --no-check-certificate
|
|
|
|
cd ./train_data/ && tar xf ic15_data.tar && cd ../
|
2021-12-28 10:28:17 +08:00
|
|
|
cd ./inference && tar xf rec_inference.tar && tar xf ch_PP-OCRv2_rec_infer.tar && cd ../
|
|
|
|
fi
|
2022-05-26 20:09:48 +08:00
|
|
|
if [ ${model_name} = "ch_PP-OCRv3_rec_KL" ]; then
|
2022-05-12 19:59:02 +08:00
|
|
|
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
|
|
|
|
cd ./train_data/ && tar xf ic15_data.tar && cd ../
|
|
|
|
cd ./inference && tar xf rec_inference.tar && tar xf ch_PP-OCRv3_rec_infer.tar && cd ../
|
|
|
|
fi
|
2022-05-26 20:09:48 +08:00
|
|
|
if [ ${model_name} = "ch_PP-OCRv2_det_KL" ]; then
|
2021-11-01 10:19:09 +08:00
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ch_det_data_50.tar --no-check-certificate
|
2021-12-28 10:28:17 +08:00
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_det_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv2_det_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
2021-10-27 10:24:36 +08:00
|
|
|
fi
|
2022-05-26 20:09:48 +08:00
|
|
|
if [ ${model_name} = "ch_PP-OCRv3_det_KL" ]; then
|
2022-05-12 19:59:02 +08:00
|
|
|
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 ../
|
|
|
|
fi
|
2021-11-26 17:26:29 +08:00
|
|
|
if [ ${model_name} = "ch_ppocr_mobile_v2.0_rec_KL" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_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
|
|
|
|
cd ./train_data/ && tar xf ic15_data.tar && cd ../
|
|
|
|
cd ./inference && tar xf ch_ppocr_mobile_v2.0_rec_infer.tar && tar xf rec_inference.tar && cd ../
|
|
|
|
fi
|
2021-10-28 16:23:42 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ${MODE} = "cpp_infer" ];then
|
2022-05-26 20:09:48 +08:00
|
|
|
if [ ${model_name} = "ch_ppocr_mobile_v2.0_det" ]; then
|
2021-11-01 10:19:09 +08:00
|
|
|
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/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_infer.tar --no-check-certificate
|
2021-09-07 21:16:35 +08:00
|
|
|
cd ./inference && tar xf ch_ppocr_mobile_v2.0_det_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
2022-06-07 14:59:13 +08:00
|
|
|
elif [ ${model_name} = "ch_ppocr_mobile_v2.0_det_KL" ]; then
|
|
|
|
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/tipc_fake_model/ch_ppocr_mobile_v2.0_det_klquant_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_ppocr_mobile_v2.0_det_klquant_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
|
|
|
elif [ ${model_name} = "ch_ppocr_mobile_v2.0_det_PACT" ]; then
|
|
|
|
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/tipc_fake_model/ch_ppocr_mobile_v2.0_det_pact_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_ppocr_mobile_v2.0_det_pact_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
2022-05-26 20:09:48 +08:00
|
|
|
elif [ ${model_name} = "ch_ppocr_mobile_v2.0_rec" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/rec_inference.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_ppocr_mobile_v2.0_rec_infer.tar && tar xf rec_inference.tar && cd ../
|
2022-06-07 14:59:13 +08:00
|
|
|
elif [ ${model_name} = "ch_ppocr_mobile_v2.0_rec_KL" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/rec_inference.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_ppocr_mobile_v2.0_rec_klquant_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_ppocr_mobile_v2.0_rec_klquant_infer.tar && tar xf rec_inference.tar && cd ../
|
|
|
|
elif [ ${model_name} = "ch_ppocr_mobile_v2.0_rec_PACT" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/rec_inference.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_ppocr_mobile_v2.0_rec_pact_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_ppocr_mobile_v2.0_rec_pact_infer.tar && tar xf rec_inference.tar && cd ../
|
2022-05-26 20:09:48 +08:00
|
|
|
elif [ ${model_name} = "ch_ppocr_server_v2.0_det" ]; then
|
|
|
|
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/dygraph_v2.0/ch/ch_ppocr_server_v2.0_det_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_ppocr_server_v2.0_det_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
|
|
|
elif [ ${model_name} = "ch_ppocr_server_v2.0_rec" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/rec_inference.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_rec_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_ppocr_server_v2.0_rec_infer.tar && tar xf rec_inference.tar && cd ../
|
|
|
|
elif [ ${model_name} = "ch_PP-OCRv2_det" ]; then
|
|
|
|
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-OCRv2/chinese/ch_PP-OCRv2_det_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv2_det_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
2022-06-07 14:59:13 +08:00
|
|
|
elif [ ${model_name} = "ch_PP-OCRv2_det_KL" ]; then
|
|
|
|
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/tipc_fake_model/ch_PP-OCRv2_det_klquant_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv2_det_klquant_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
|
|
|
elif [ ${model_name} = "ch_PP-OCRv2_det_PACT" ]; then
|
|
|
|
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/tipc_fake_model/ch_PP-OCRv2_det_pact_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv2_det_pact_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
2022-05-26 20:09:48 +08:00
|
|
|
elif [ ${model_name} = "ch_PP-OCRv2_rec" ]; then
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/rec_inference.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_rec_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv2_rec_infer.tar && tar xf rec_inference.tar && cd ../
|
2022-06-07 14:59:13 +08:00
|
|
|
elif [ ${model_name} = "ch_PP-OCRv2_rec_KL" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/rec_inference.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_PP-OCRv2_rec_klquant_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv2_rec_klquant_infer.tar && tar xf rec_inference.tar && cd ../
|
|
|
|
elif [ ${model_name} = "ch_PP-OCRv2_rec_PACT" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/rec_inference.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_PP-OCRv2_rec_pact_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv2_rec_pact_infer.tar && tar xf rec_inference.tar && cd ../
|
2022-05-26 20:09:48 +08:00
|
|
|
elif [ ${model_name} = "ch_PP-OCRv3_det" ]; then
|
2022-05-12 19:59:02 +08:00
|
|
|
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 ../
|
2022-06-07 14:59:13 +08:00
|
|
|
elif [ ${model_name} = "ch_PP-OCRv3_det_KL" ]; then
|
|
|
|
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/tipc_fake_model/ch_PP-OCRv3_det_klquant_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv3_det_klquant_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
|
|
|
elif [ ${model_name} = "ch_PP-OCRv3_det_PACT" ]; then
|
|
|
|
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/tipc_fake_model/ch_PP-OCRv3_det_pact_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv3_det_pact_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
2022-05-26 20:09:48 +08:00
|
|
|
elif [ ${model_name} = "ch_PP-OCRv3_rec" ]; then
|
2022-05-12 19:59:02 +08:00
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/rec_inference.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv3_rec_infer.tar && tar xf rec_inference.tar && cd ../
|
2022-06-07 14:59:13 +08:00
|
|
|
elif [ ${model_name} = "ch_PP-OCRv3_rec_KL" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/rec_inference.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_PP-OCRv3_rec_klquant_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv3_rec_klquant_infer.tar && tar xf rec_inference.tar && cd ../
|
|
|
|
elif [ ${model_name} = "ch_PP-OCRv3_rec_PACT" ]; then
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/rec_inference.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_PP-OCRv3_rec_pact_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv3_rec_pact_infer.tar && tar xf rec_inference.tar && cd ../
|
2022-05-26 20:09:48 +08:00
|
|
|
elif [ ${model_name} = "ch_ppocr_mobile_v2.0" ]; then
|
2021-11-01 10:19:09 +08:00
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_infer.tar --no-check-certificate
|
|
|
|
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/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_infer.tar --no-check-certificate
|
2021-09-07 21:16:35 +08:00
|
|
|
cd ./inference && tar xf ch_ppocr_mobile_v2.0_det_infer.tar && tar xf ch_ppocr_mobile_v2.0_rec_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
2022-05-26 20:09:48 +08:00
|
|
|
elif [ ${model_name} = "ch_ppocr_server_v2.0" ]; then
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_det_infer.tar --no-check-certificate
|
|
|
|
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/dygraph_v2.0/ch/ch_ppocr_server_v2.0_rec_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_ppocr_server_v2.0_det_infer.tar && tar xf ch_ppocr_server_v2.0_rec_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
|
|
|
elif [ ${model_name} = "ch_PP-OCRv2" ]; then
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_det_infer.tar --no-check-certificate
|
|
|
|
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-OCRv2/chinese/ch_PP-OCRv2_rec_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv2_det_infer.tar && tar xf ch_PP-OCRv2_rec_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
|
|
|
elif [ ${model_name} = "ch_PP-OCRv3" ]; then
|
2022-05-12 19:59:02 +08:00
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_det_infer.tar --no-check-certificate
|
|
|
|
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_rec_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv3_det_infer.tar && tar xf ch_PP-OCRv3_rec_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
2021-09-07 21:16:35 +08:00
|
|
|
fi
|
2021-07-28 15:49:25 +08:00
|
|
|
fi
|
2021-08-05 14:18:44 +08:00
|
|
|
|
2021-09-07 15:50:04 +08:00
|
|
|
if [ ${MODE} = "serving_infer" ];then
|
|
|
|
# prepare serving env
|
2021-11-23 15:40:18 +08:00
|
|
|
python_name_list=$(func_parser_value "${lines[2]}")
|
|
|
|
IFS='|'
|
|
|
|
array=(${python_name_list})
|
|
|
|
python_name=${array[0]}
|
2022-06-01 15:20:14 +08:00
|
|
|
${python_name} -m pip install paddle-serving-server-gpu
|
|
|
|
${python_name} -m pip install paddle_serving_client
|
|
|
|
${python_name} -m pip install paddle-serving-app
|
2022-05-26 20:09:48 +08:00
|
|
|
# wget model
|
2022-06-07 17:22:46 +08:00
|
|
|
if [ ${model_name} == "ch_ppocr_mobile_v2.0_det_KL" ] || [ ${model_name} == "ch_ppocr_mobile_v2.0_rec_KL" ] ; then
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_ppocr_mobile_v2.0_det_klquant_infer.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_ppocr_mobile_v2.0_rec_klquant_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_ppocr_mobile_v2.0_det_klquant_infer.tar && tar xf ch_ppocr_mobile_v2.0_rec_klquant_infer.tar && cd ../
|
|
|
|
elif [ ${model_name} == "ch_PP-OCRv2_det_KL" ] || [ ${model_name} == "ch_PP-OCRv2_rec_KL" ] ; then
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_PP-OCRv2_det_klquant_infer.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_PP-OCRv2_rec_klquant_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv2_det_klquant_infer.tar && tar xf ch_PP-OCRv2_rec_klquant_infer.tar && cd ../
|
|
|
|
elif [ ${model_name} == "ch_PP-OCRv3_det_KL" ] || [ ${model_name} == "ch_PP-OCRv3_rec_KL" ] ; then
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_PP-OCRv3_det_klquant_infer.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_PP-OCRv3_rec_klquant_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv3_det_klquant_infer.tar && tar xf ch_PP-OCRv3_rec_klquant_infer.tar && cd ../
|
|
|
|
elif [ ${model_name} == "ch_ppocr_mobile_v2.0_det_PACT" ] || [ ${model_name} == "ch_ppocr_mobile_v2.0_rec_PACT" ] ; then
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_ppocr_mobile_v2.0_det_pact_infer.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_ppocr_mobile_v2.0_rec_pact_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_ppocr_mobile_v2.0_det_pact_infer.tar && tar xf ch_ppocr_mobile_v2.0_rec_pact_infer.tar && cd ../
|
|
|
|
elif [ ${model_name} == "ch_PP-OCRv2_det_PACT" ] || [ ${model_name} == "ch_PP-OCRv2_rec_PACT" ] ; then
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_PP-OCRv2_det_pact_infer.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_PP-OCRv2_rec_pact_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv2_det_pact_infer.tar && tar xf ch_PP-OCRv2_rec_pact_infer.tar && cd ../
|
|
|
|
elif [ ${model_name} == "ch_PP-OCRv3_det_PACT" ] || [ ${model_name} == "ch_PP-OCRv3_rec_PACT" ] ; then
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_PP-OCRv3_det_pact_infer.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_PP-OCRv3_rec_pact_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv3_det_pact_infer.tar && tar xf ch_PP-OCRv3_rec_pact_infer.tar && cd ../
|
|
|
|
elif [[ ${model_name} =~ "ch_ppocr_mobile_v2.0" ]]; then
|
2022-05-26 20:09:48 +08:00
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_infer.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_ppocr_mobile_v2.0_det_infer.tar && tar xf ch_ppocr_mobile_v2.0_rec_infer.tar && cd ../
|
|
|
|
elif [[ ${model_name} =~ "ch_ppocr_server_v2.0" ]]; then
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_det_infer.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_rec_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_ppocr_server_v2.0_det_infer.tar && tar xf ch_ppocr_server_v2.0_rec_infer.tar && cd ../
|
|
|
|
elif [[ ${model_name} =~ "ch_PP-OCRv2" ]]; then
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_det_infer.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_rec_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv2_det_infer.tar && tar xf ch_PP-OCRv2_rec_infer.tar && cd ../
|
|
|
|
elif [[ ${model_name} =~ "ch_PP-OCRv3" ]]; then
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_det_infer.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv3_det_infer.tar && tar xf ch_PP-OCRv3_rec_infer.tar && cd ../
|
|
|
|
fi
|
|
|
|
# wget data
|
2022-06-07 17:22:46 +08:00
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ch_det_data_50.tar --no-check-certificate
|
2022-05-12 19:59:02 +08:00
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/rec_inference.tar --no-check-certificate
|
2022-06-07 17:22:46 +08:00
|
|
|
cd ./inference && tar xf ch_det_data_50.tar && tar xf rec_inference.tar && cd ../
|
2021-09-07 15:50:04 +08:00
|
|
|
fi
|
2021-10-26 21:51:49 +08:00
|
|
|
|
2021-10-28 13:40:45 +08:00
|
|
|
if [ ${MODE} = "paddle2onnx_infer" ];then
|
|
|
|
# prepare serving env
|
|
|
|
python_name=$(func_parser_value "${lines[2]}")
|
2022-05-12 19:59:02 +08:00
|
|
|
${python_name} -m pip install paddle2onnx
|
2022-06-01 15:12:26 +08:00
|
|
|
${python_name} -m pip install onnxruntime
|
2021-10-28 13:40:45 +08:00
|
|
|
# wget model
|
2022-05-26 20:09:48 +08:00
|
|
|
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
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_ppocr_mobile_v2.0_det_infer.tar && tar xf ch_ppocr_mobile_v2.0_rec_infer.tar && cd ../
|
|
|
|
elif [[ ${model_name} =~ "ch_ppocr_server_v2.0" ]]; then
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_det_infer.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_rec_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_ppocr_server_v2.0_det_infer.tar && tar xf ch_ppocr_server_v2.0_rec_infer.tar && cd ../
|
|
|
|
elif [[ ${model_name} =~ "ch_PP-OCRv2" ]]; then
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_det_infer.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_rec_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv2_det_infer.tar && tar xf ch_PP-OCRv2_rec_infer.tar && cd ../
|
|
|
|
elif [[ ${model_name} =~ "ch_PP-OCRv3" ]]; then
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_det_infer.tar --no-check-certificate
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar --no-check-certificate
|
|
|
|
cd ./inference && tar xf ch_PP-OCRv3_det_infer.tar && tar xf ch_PP-OCRv3_rec_infer.tar && cd ../
|
|
|
|
fi
|
|
|
|
|
2021-10-28 13:40:45 +08:00
|
|
|
# wget data
|
|
|
|
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ch_det_data_50.tar
|
|
|
|
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/rec_inference.tar
|
2022-05-26 20:09:48 +08:00
|
|
|
cd ./inference && tar xf ch_det_data_50.tar && tar xf rec_inference.tar && cd ../
|
2021-10-28 13:40:45 +08:00
|
|
|
|
|
|
|
fi
|