未验证 提交 1b144011 编写于 作者: M MissPenguin 提交者: GitHub

Merge pull request #3829 from LDOUBLEV/fix_cpp

add export model for infer MODE
...@@ -34,13 +34,13 @@ distill_export:null ...@@ -34,13 +34,13 @@ distill_export:null
export1:null export1:null
export2:null export2:null
## ##
infer_model:./inference/ch_ppocr_mobile_v2.0_det_infer/ train_model:./inference/ch_ppocr_mobile_v2.0_det_train/best_accuracy
infer_export:null infer_export:tools/export_model.py -c configs/det/det_mv3_db.yml -o
infer_quant:False infer_quant:False
inference:tools/infer/predict_det.py inference:tools/infer/predict_det.py
--use_gpu:True|False --use_gpu:True|False
--enable_mkldnn:True|False --enable_mkldnn:True|False
--cpu_threads:1|6 --cpu_threads:6
--rec_batch_num:1 --rec_batch_num:1
--use_tensorrt:False|True --use_tensorrt:False|True
--precision:fp32|fp16|int8 --precision:fp32|fp16|int8
......
...@@ -63,10 +63,10 @@ elif [ ${MODE} = "whole_infer" ];then ...@@ -63,10 +63,10 @@ elif [ ${MODE} = "whole_infer" ];then
cd ../ cd ../
elif [ ${MODE} = "infer" ] || [ ${MODE} = "cpp_infer" ];then elif [ ${MODE} = "infer" ] || [ ${MODE} = "cpp_infer" ];then
if [ ${model_name} = "ocr_det" ]; then if [ ${model_name} = "ocr_det" ]; then
eval_model_name="ch_ppocr_mobile_v2.0_det_infer" eval_model_name="ch_ppocr_mobile_v2.0_det_train"
rm -rf ./train_data/icdar2015 rm -rf ./train_data/icdar2015
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/ch_det_data_50.tar
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_infer.tar wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_train.tar
cd ./inference && tar xf ${eval_model_name}.tar && tar xf ch_det_data_50.tar && cd ../ cd ./inference && tar xf ${eval_model_name}.tar && tar xf ch_det_data_50.tar && cd ../
elif [ ${model_name} = "ocr_server_det" ]; then elif [ ${model_name} = "ocr_server_det" ]; then
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_det_infer.tar wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_det_infer.tar
......
...@@ -332,9 +332,7 @@ if [ ${MODE} = "infer" ]; then ...@@ -332,9 +332,7 @@ if [ ${MODE} = "infer" ]; then
export_cmd="${python} ${norm_export} ${set_export_weight} ${set_save_infer_key}" export_cmd="${python} ${norm_export} ${set_export_weight} ${set_save_infer_key}"
eval $export_cmd eval $export_cmd
status_export=$? status_export=$?
if [ ${status_export} = 0 ];then status_check $status_export "${export_cmd}" "${status_log}"
status_check $status_export "${export_cmd}" "${status_log}"
fi
else else
save_infer_dir=${infer_model} save_infer_dir=${infer_model}
fi fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册