提交 e66447b3 编写于 作者: H HydrogenSulfate

skip python inference when test for mainbody_det

上级 56e8313f
...@@ -9,8 +9,8 @@ python:python3.7 ...@@ -9,8 +9,8 @@ python:python3.7
--opset_version:11 --opset_version:11
--enable_onnx_checker:True --enable_onnx_checker:True
inference_model_url:https://paddledet.bj.bcebos.com/models/picodet_lcnet_x2_5_640_mainbody_infer.tar inference_model_url:https://paddledet.bj.bcebos.com/models/picodet_lcnet_x2_5_640_mainbody_infer.tar
inference:./python/predict_cls.py inference:null
Global.use_onnx:True Global.use_onnx:null
Global.inference_model_dir:./models/picodet_lcnet_x2_5_640_mainbody_infer Global.inference_model_dir:null
Global.use_gpu:False Global.use_gpu:null
-c:configs/inference_cls.yaml -c:null
\ No newline at end of file \ No newline at end of file
...@@ -59,13 +59,15 @@ function func_paddle2onnx(){ ...@@ -59,13 +59,15 @@ function func_paddle2onnx(){
status_check $last_status "${trans_model_cmd}" "${status_log}" "${model_name}" status_check $last_status "${trans_model_cmd}" "${status_log}" "${model_name}"
# python inference # python inference
set_model_dir=$(func_set_params "${inference_model_dir_key}" "${inference_model_dir_value}") if [[ ${inference_py} != "null" ]]; then
set_use_onnx=$(func_set_params "${use_onnx_key}" "${use_onnx_value}") set_model_dir=$(func_set_params "${inference_model_dir_key}" "${inference_model_dir_value}")
set_hardware=$(func_set_params "${inference_hardware_key}" "${inference_hardware_value}") set_use_onnx=$(func_set_params "${use_onnx_key}" "${use_onnx_value}")
set_inference_config=$(func_set_params "${inference_config_key}" "${inference_config_value}") set_hardware=$(func_set_params "${inference_hardware_key}" "${inference_hardware_value}")
infer_model_cmd="cd deploy && ${python} ${inference_py} -o ${set_model_dir} -o ${set_use_onnx} -o ${set_hardware} ${set_inference_config} > ${_save_log_path} 2>&1 && cd ../" set_inference_config=$(func_set_params "${inference_config_key}" "${inference_config_value}")
eval $infer_model_cmd infer_model_cmd="cd deploy && ${python} ${inference_py} -o ${set_model_dir} -o ${set_use_onnx} -o ${set_hardware} ${set_inference_config} > ${_save_log_path} 2>&1 && cd ../"
status_check $last_status "${infer_model_cmd}" "${status_log}" "${model_name}" eval $infer_model_cmd
status_check $last_status "${infer_model_cmd}" "${status_log}" "${model_name}"
fi
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册