Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_41840029
PaddleOCR
提交
7c1bec94
P
PaddleOCR
项目概览
weixin_41840029
/
PaddleOCR
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleOCR
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleOCR
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
7c1bec94
编写于
6月 07, 2022
作者:
A
andyjpaddle
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add kl pact to serving python
上级
b5f282c4
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
288 addition
and
12 deletion
+288
-12
test_tipc/configs/ch_PP-OCRv2_det_KL/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
..._linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
+23
-0
test_tipc/configs/ch_PP-OCRv2_det_PACT/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
..._linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
+23
-0
test_tipc/configs/ch_PP-OCRv2_rec_KL/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
..._linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
+23
-0
test_tipc/configs/ch_PP-OCRv2_rec_PACT/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
..._linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
+23
-0
test_tipc/configs/ch_PP-OCRv3_det_KL/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
..._linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
+23
-0
test_tipc/configs/ch_PP-OCRv3_det_PACT/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
..._linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
+23
-0
test_tipc/configs/ch_PP-OCRv3_rec_KL/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
..._linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
+23
-0
test_tipc/configs/ch_PP-OCRv3_rec_PACT/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
..._linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
+23
-0
test_tipc/configs/ch_ppocr_mobile_v2.0_det_KL/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
..._linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
+23
-0
test_tipc/configs/ch_ppocr_mobile_v2.0_det_PACT/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
..._linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
+23
-0
test_tipc/configs/ch_ppocr_mobile_v2.0_rec_KL/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
..._linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
+23
-0
test_tipc/configs/ch_ppocr_mobile_v2.0_rec_PACT/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
..._linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
+23
-0
test_tipc/test_paddle2onnx.sh
test_tipc/test_paddle2onnx.sh
+6
-6
test_tipc/test_serving_infer_python.sh
test_tipc/test_serving_infer_python.sh
+6
-6
未找到文件。
test_tipc/configs/ch_PP-OCRv2_det_KL/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
0 → 100644
浏览文件 @
7c1bec94
===========================serving_params===========================
model_name:ch_PP-OCRv2_det_KL
python:python3.7
trans_model:-m paddle_serving_client.convert
--det_dirname:./inference/ch_PP-OCRv2_det_klquant_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--det_serving_server:./deploy/pdserving/ppocr_det_v2_kl_serving/
--det_serving_client:./deploy/pdserving/ppocr_det_v2_kl_client/
--rec_dirname:null
--rec_serving_server:null
--rec_serving_client:null
serving_dir:./deploy/pdserving
web_service:web_service_det.py --config=config.yml --opt op.det.concurrency="1"
op.det.local_service_conf.devices:gpu|null
op.det.local_service_conf.use_mkldnn:False
op.det.local_service_conf.thread_num:6
op.det.local_service_conf.use_trt:False
op.det.local_service_conf.precision:fp32
op.det.local_service_conf.model_config:
op.rec.local_service_conf.model_config:
pipline:pipeline_http_client.py
--image_dir:../../doc/imgs/1.jpg
test_tipc/configs/ch_PP-OCRv2_det_PACT/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
0 → 100644
浏览文件 @
7c1bec94
===========================serving_params===========================
model_name:ch_PP-OCRv2_det_PACT
python:python3.7
trans_model:-m paddle_serving_client.convert
--det_dirname:./inference/ch_PP-OCRv2_det_pact_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--det_serving_server:./deploy/pdserving/ppocr_det_v2_pact_serving/
--det_serving_client:./deploy/pdserving/ppocr_det_v2_pact_client/
--rec_dirname:null
--rec_serving_server:null
--rec_serving_client:null
serving_dir:./deploy/pdserving
web_service:web_service_det.py --config=config.yml --opt op.det.concurrency="1"
op.det.local_service_conf.devices:gpu|null
op.det.local_service_conf.use_mkldnn:False
op.det.local_service_conf.thread_num:6
op.det.local_service_conf.use_trt:False
op.det.local_service_conf.precision:fp32
op.det.local_service_conf.model_config:
op.rec.local_service_conf.model_config:
pipline:pipeline_http_client.py
--image_dir:../../doc/imgs/1.jpg
test_tipc/configs/ch_PP-OCRv2_rec_KL/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
0 → 100644
浏览文件 @
7c1bec94
===========================serving_params===========================
model_name:ch_PP-OCRv2_rec_KL
python:python3.7
trans_model:-m paddle_serving_client.convert
--det_dirname:null
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--det_serving_server:null
--det_serving_client:null
--rec_dirname:./inference/ch_PP-OCRv2_rec_klquant_infer/
--rec_serving_server:./deploy/pdserving/ppocr_rec_v2_kl_serving/
--rec_serving_client:./deploy/pdserving/ppocr_rec_v2_kl_client/
serving_dir:./deploy/pdserving
web_service:web_service_rec.py --config=config.yml --opt op.rec.concurrency="1"
op.det.local_service_conf.devices:gpu|null
op.det.local_service_conf.use_mkldnn:False
op.det.local_service_conf.thread_num:6
op.det.local_service_conf.use_trt:False
op.det.local_service_conf.precision:fp32
op.det.local_service_conf.model_config:
op.rec.local_service_conf.model_config:
pipline:pipeline_http_client.py --det=False
--image_dir:../../inference/rec_inference
test_tipc/configs/ch_PP-OCRv2_rec_PACT/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
0 → 100644
浏览文件 @
7c1bec94
===========================serving_params===========================
model_name:ch_PP-OCRv2_rec_PACT
python:python3.7
trans_model:-m paddle_serving_client.convert
--det_dirname:null
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--det_serving_server:null
--det_serving_client:null
--rec_dirname:./inference/ch_PP-OCRv2_rec_pact_infer/
--rec_serving_server:./deploy/pdserving/ppocr_rec_v2_pact_serving/
--rec_serving_client:./deploy/pdserving/ppocr_rec_v2_pact_client/
serving_dir:./deploy/pdserving
web_service:web_service_rec.py --config=config.yml --opt op.rec.concurrency="1"
op.det.local_service_conf.devices:gpu|null
op.det.local_service_conf.use_mkldnn:False
op.det.local_service_conf.thread_num:6
op.det.local_service_conf.use_trt:False
op.det.local_service_conf.precision:fp32
op.det.local_service_conf.model_config:
op.rec.local_service_conf.model_config:
pipline:pipeline_http_client.py --det=False
--image_dir:../../inference/rec_inference
test_tipc/configs/ch_PP-OCRv3_det_KL/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
0 → 100644
浏览文件 @
7c1bec94
===========================serving_params===========================
model_name:ch_PP-OCRv3_det_KL
python:python3.7
trans_model:-m paddle_serving_client.convert
--det_dirname:./inference/ch_PP-OCRv3_det_klquant_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--det_serving_server:./deploy/pdserving/ppocr_det_v3_kl_serving/
--det_serving_client:./deploy/pdserving/ppocr_det_v3_kl_client/
--rec_dirname:null
--rec_serving_server:null
--rec_serving_client:null
serving_dir:./deploy/pdserving
web_service:web_service_det.py --config=config.yml --opt op.det.concurrency="1"
op.det.local_service_conf.devices:gpu|null
op.det.local_service_conf.use_mkldnn:False
op.det.local_service_conf.thread_num:6
op.det.local_service_conf.use_trt:False
op.det.local_service_conf.precision:fp32
op.det.local_service_conf.model_config:
op.rec.local_service_conf.model_config:
pipline:pipeline_http_client.py
--image_dir:../../doc/imgs/1.jpg
test_tipc/configs/ch_PP-OCRv3_det_PACT/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
0 → 100644
浏览文件 @
7c1bec94
===========================serving_params===========================
model_name:ch_PP-OCRv3_det_PACT
python:python3.7
trans_model:-m paddle_serving_client.convert
--det_dirname:./inference/ch_PP-OCRv3_det_pact_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--det_serving_server:./deploy/pdserving/ppocr_det_v3_pact_serving/
--det_serving_client:./deploy/pdserving/ppocr_det_v3_pact_client/
--rec_dirname:null
--rec_serving_server:null
--rec_serving_client:null
serving_dir:./deploy/pdserving
web_service:web_service_det.py --config=config.yml --opt op.det.concurrency="1"
op.det.local_service_conf.devices:gpu|null
op.det.local_service_conf.use_mkldnn:False
op.det.local_service_conf.thread_num:6
op.det.local_service_conf.use_trt:False
op.det.local_service_conf.precision:fp32
op.det.local_service_conf.model_config:
op.rec.local_service_conf.model_config:
pipline:pipeline_http_client.py
--image_dir:../../doc/imgs/1.jpg
test_tipc/configs/ch_PP-OCRv3_rec_KL/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
0 → 100644
浏览文件 @
7c1bec94
===========================serving_params===========================
model_name:ch_PP-OCRv3_rec_KL
python:python3.7
trans_model:-m paddle_serving_client.convert
--det_dirname:null
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--det_serving_server:null
--det_serving_client:null
--rec_dirname:./inference/ch_PP-OCRv3_rec_klquant_infer/
--rec_serving_server:./deploy/pdserving/ppocr_rec_v3_kl_serving/
--rec_serving_client:./deploy/pdserving/ppocr_rec_v3_kl_client/
serving_dir:./deploy/pdserving
web_service:web_service_rec.py --config=config.yml --opt op.rec.concurrency="1"
op.det.local_service_conf.devices:gpu|null
op.det.local_service_conf.use_mkldnn:False
op.det.local_service_conf.thread_num:6
op.det.local_service_conf.use_trt:False
op.det.local_service_conf.precision:fp32
op.det.local_service_conf.model_config:
op.rec.local_service_conf.model_config:
pipline:pipeline_http_client.py --det=False
--image_dir:../../inference/rec_inference
test_tipc/configs/ch_PP-OCRv3_rec_PACT/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
0 → 100644
浏览文件 @
7c1bec94
===========================serving_params===========================
model_name:ch_PP-OCRv3_rec_PACT
python:python3.7
trans_model:-m paddle_serving_client.convert
--det_dirname:null
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--det_serving_server:null
--det_serving_client:null
--rec_dirname:./inference/ch_PP-OCRv3_rec_pact_infer/
--rec_serving_server:./deploy/pdserving/ppocr_rec_v3_pact_serving/
--rec_serving_client:./deploy/pdserving/ppocr_rec_v3_pact_client/
serving_dir:./deploy/pdserving
web_service:web_service_rec.py --config=config.yml --opt op.rec.concurrency="1"
op.det.local_service_conf.devices:gpu|null
op.det.local_service_conf.use_mkldnn:False
op.det.local_service_conf.thread_num:6
op.det.local_service_conf.use_trt:False
op.det.local_service_conf.precision:fp32
op.det.local_service_conf.model_config:
op.rec.local_service_conf.model_config:
pipline:pipeline_http_client.py --det=False
--image_dir:../../inference/rec_inference
test_tipc/configs/ch_ppocr_mobile_v2.0_det_KL/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
0 → 100644
浏览文件 @
7c1bec94
===========================serving_params===========================
model_name:ch_ppocr_mobile_v2.0_det_KL
python:python3.7
trans_model:-m paddle_serving_client.convert
--det_dirname:./inference/ch_ppocr_mobile_v2.0_det_klquant_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--det_serving_server:./deploy/pdserving/ppocr_det_mobile_kl_serving/
--det_serving_client:./deploy/pdserving/ppocr_det_mobile_kl_client/
--rec_dirname:null
--rec_serving_server:null
--rec_serving_client:null
serving_dir:./deploy/pdserving
web_service:web_service_det.py --config=config.yml --opt op.det.concurrency="1"
op.det.local_service_conf.devices:gpu|null
op.det.local_service_conf.use_mkldnn:False
op.det.local_service_conf.thread_num:6
op.det.local_service_conf.use_trt:False
op.det.local_service_conf.precision:fp32
op.det.local_service_conf.model_config:
op.rec.local_service_conf.model_config:
pipline:pipeline_http_client.py
--image_dir:../../doc/imgs/1.jpg
test_tipc/configs/ch_ppocr_mobile_v2.0_det_PACT/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
0 → 100644
浏览文件 @
7c1bec94
===========================serving_params===========================
model_name:ch_ppocr_mobile_v2.0_det_PACT
python:python3.7
trans_model:-m paddle_serving_client.convert
--det_dirname:./inference/ch_ppocr_mobile_v2.0_det_pact_infer/
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--det_serving_server:./deploy/pdserving/ppocr_det_mobile_pact_serving/
--det_serving_client:./deploy/pdserving/ppocr_det_mobile_pact_client/
--rec_dirname:null
--rec_serving_server:null
--rec_serving_client:null
serving_dir:./deploy/pdserving
web_service:web_service_det.py --config=config.yml --opt op.det.concurrency="1"
op.det.local_service_conf.devices:gpu|null
op.det.local_service_conf.use_mkldnn:False
op.det.local_service_conf.thread_num:6
op.det.local_service_conf.use_trt:False
op.det.local_service_conf.precision:fp32
op.det.local_service_conf.model_config:
op.rec.local_service_conf.model_config:
pipline:pipeline_http_client.py
--image_dir:../../doc/imgs/1.jpg
test_tipc/configs/ch_ppocr_mobile_v2.0_rec_KL/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
0 → 100644
浏览文件 @
7c1bec94
===========================serving_params===========================
model_name:ch_ppocr_mobile_v2.0_rec_KL
python:python3.7
trans_model:-m paddle_serving_client.convert
--det_dirname:null
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--det_serving_server:null
--det_serving_client:null
--rec_dirname:./inference/ch_ppocr_mobile_v2.0_rec_klquant_infer/
--rec_serving_server:./deploy/pdserving/ppocr_rec_mobile_kl_serving/
--rec_serving_client:./deploy/pdserving/ppocr_rec_mobile_kl_client/
serving_dir:./deploy/pdserving
web_service:web_service_rec.py --config=config.yml --opt op.rec.concurrency="1"
op.det.local_service_conf.devices:gpu|null
op.det.local_service_conf.use_mkldnn:False
op.det.local_service_conf.thread_num:6
op.det.local_service_conf.use_trt:False
op.det.local_service_conf.precision:fp32
op.det.local_service_conf.model_config:
op.rec.local_service_conf.model_config:
pipline:pipeline_http_client.py --det=False
--image_dir:../../inference/rec_inference
test_tipc/configs/ch_ppocr_mobile_v2.0_rec_PACT/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
0 → 100644
浏览文件 @
7c1bec94
===========================serving_params===========================
model_name:ch_ppocr_mobile_v2.0_rec_PACT
python:python3.7
trans_model:-m paddle_serving_client.convert
--det_dirname:null
--model_filename:inference.pdmodel
--params_filename:inference.pdiparams
--det_serving_server:null
--det_serving_client:null
--rec_dirname:./inference/ch_ppocr_mobile_v2.0_rec_pact_infer/
--rec_serving_server:./deploy/pdserving/ppocr_rec_mobile_pact_serving/
--rec_serving_client:./deploy/pdserving/ppocr_rec_mobile_pact_client/
serving_dir:./deploy/pdserving
web_service:web_service_rec.py --config=config.yml --opt op.rec.concurrency="1"
op.det.local_service_conf.devices:gpu|null
op.det.local_service_conf.use_mkldnn:False
op.det.local_service_conf.thread_num:6
op.det.local_service_conf.use_trt:False
op.det.local_service_conf.precision:fp32
op.det.local_service_conf.model_config:
op.rec.local_service_conf.model_config:
pipline:pipeline_http_client.py --det=False
--image_dir:../../inference/rec_inference
test_tipc/test_paddle2onnx.sh
浏览文件 @
7c1bec94
...
@@ -77,7 +77,7 @@ function func_paddle2onnx(){
...
@@ -77,7 +77,7 @@ function func_paddle2onnx(){
eval
$trans_model_cmd
eval
$trans_model_cmd
last_status
=
${
PIPESTATUS
[0]
}
last_status
=
${
PIPESTATUS
[0]
}
status_check
$last_status
"
${
trans_model_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
status_check
$last_status
"
${
trans_model_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
elif
[
${
model_name
}
=
"ch_PP-OCRv2_det"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3_det"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2.0_det"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2.0_det"
]
;
then
elif
[
[
${
model_name
}
=
~
"det"
]
]
;
then
# trans det
# trans det
set_dirname
=
$(
func_set_params
"--model_dir"
"
${
det_infer_model_dir_value
}
"
)
set_dirname
=
$(
func_set_params
"--model_dir"
"
${
det_infer_model_dir_value
}
"
)
set_model_filename
=
$(
func_set_params
"
${
model_filename_key
}
"
"
${
model_filename_value
}
"
)
set_model_filename
=
$(
func_set_params
"
${
model_filename_key
}
"
"
${
model_filename_value
}
"
)
...
@@ -89,7 +89,7 @@ function func_paddle2onnx(){
...
@@ -89,7 +89,7 @@ function func_paddle2onnx(){
eval
$trans_model_cmd
eval
$trans_model_cmd
last_status
=
${
PIPESTATUS
[0]
}
last_status
=
${
PIPESTATUS
[0]
}
status_check
$last_status
"
${
trans_model_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
status_check
$last_status
"
${
trans_model_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
elif
[
${
model_name
}
=
"ch_PP-OCRv2_rec"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3_rec"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2.0_rec"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2.0_rec"
]
;
then
elif
[
[
${
model_name
}
=
~
"rec"
]
]
;
then
# trans rec
# trans rec
set_dirname
=
$(
func_set_params
"--model_dir"
"
${
rec_infer_model_dir_value
}
"
)
set_dirname
=
$(
func_set_params
"--model_dir"
"
${
rec_infer_model_dir_value
}
"
)
set_model_filename
=
$(
func_set_params
"
${
model_filename_key
}
"
"
${
model_filename_value
}
"
)
set_model_filename
=
$(
func_set_params
"
${
model_filename_key
}
"
"
${
model_filename_value
}
"
)
...
@@ -113,10 +113,10 @@ function func_paddle2onnx(){
...
@@ -113,10 +113,10 @@ function func_paddle2onnx(){
set_det_model_dir
=
$(
func_set_params
"
${
det_model_key
}
"
"
${
det_save_file_value
}
"
)
set_det_model_dir
=
$(
func_set_params
"
${
det_model_key
}
"
"
${
det_save_file_value
}
"
)
set_rec_model_dir
=
$(
func_set_params
"
${
rec_model_key
}
"
"
${
rec_save_file_value
}
"
)
set_rec_model_dir
=
$(
func_set_params
"
${
rec_model_key
}
"
"
${
rec_save_file_value
}
"
)
infer_model_cmd
=
"
${
python
}
${
inference_py
}
${
set_gpu
}
${
set_img_dir
}
${
set_det_model_dir
}
${
set_rec_model_dir
}
--use_onnx=True >
${
_save_log_path
}
2>&1 "
infer_model_cmd
=
"
${
python
}
${
inference_py
}
${
set_gpu
}
${
set_img_dir
}
${
set_det_model_dir
}
${
set_rec_model_dir
}
--use_onnx=True >
${
_save_log_path
}
2>&1 "
elif
[
${
model_name
}
=
"ch_PP-OCRv2_det"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3_det"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2.0_det"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2.0_det"
]
;
then
elif
[
[
${
model_name
}
=
~
"det"
]
]
;
then
set_det_model_dir
=
$(
func_set_params
"
${
det_model_key
}
"
"
${
det_save_file_value
}
"
)
set_det_model_dir
=
$(
func_set_params
"
${
det_model_key
}
"
"
${
det_save_file_value
}
"
)
infer_model_cmd
=
"
${
python
}
${
inference_py
}
${
set_gpu
}
${
set_img_dir
}
${
set_det_model_dir
}
--use_onnx=True >
${
_save_log_path
}
2>&1 "
infer_model_cmd
=
"
${
python
}
${
inference_py
}
${
set_gpu
}
${
set_img_dir
}
${
set_det_model_dir
}
--use_onnx=True >
${
_save_log_path
}
2>&1 "
elif
[
${
model_name
}
=
"ch_PP-OCRv2_rec"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3_rec"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2.0_rec"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2.0_rec"
]
;
then
elif
[
[
${
model_name
}
=
~
"rec"
]
]
;
then
set_rec_model_dir
=
$(
func_set_params
"
${
rec_model_key
}
"
"
${
rec_save_file_value
}
"
)
set_rec_model_dir
=
$(
func_set_params
"
${
rec_model_key
}
"
"
${
rec_save_file_value
}
"
)
infer_model_cmd
=
"
${
python
}
${
inference_py
}
${
set_gpu
}
${
set_img_dir
}
${
set_rec_model_dir
}
--use_onnx=True >
${
_save_log_path
}
2>&1 "
infer_model_cmd
=
"
${
python
}
${
inference_py
}
${
set_gpu
}
${
set_img_dir
}
${
set_rec_model_dir
}
--use_onnx=True >
${
_save_log_path
}
2>&1 "
fi
fi
...
@@ -132,10 +132,10 @@ function func_paddle2onnx(){
...
@@ -132,10 +132,10 @@ function func_paddle2onnx(){
set_det_model_dir
=
$(
func_set_params
"
${
det_model_key
}
"
"
${
det_save_file_value
}
"
)
set_det_model_dir
=
$(
func_set_params
"
${
det_model_key
}
"
"
${
det_save_file_value
}
"
)
set_rec_model_dir
=
$(
func_set_params
"
${
rec_model_key
}
"
"
${
rec_save_file_value
}
"
)
set_rec_model_dir
=
$(
func_set_params
"
${
rec_model_key
}
"
"
${
rec_save_file_value
}
"
)
infer_model_cmd
=
"
${
python
}
${
inference_py
}
${
set_gpu
}
${
set_img_dir
}
${
set_det_model_dir
}
${
set_rec_model_dir
}
--use_onnx=True >
${
_save_log_path
}
2>&1 "
infer_model_cmd
=
"
${
python
}
${
inference_py
}
${
set_gpu
}
${
set_img_dir
}
${
set_det_model_dir
}
${
set_rec_model_dir
}
--use_onnx=True >
${
_save_log_path
}
2>&1 "
elif
[
${
model_name
}
=
"ch_PP-OCRv2_det"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3_det"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2.0_det"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2.0_det"
]
;
then
elif
[
[
${
model_name
}
=
~
"det"
]
]
;
then
set_det_model_dir
=
$(
func_set_params
"
${
det_model_key
}
"
"
${
det_save_file_value
}
"
)
set_det_model_dir
=
$(
func_set_params
"
${
det_model_key
}
"
"
${
det_save_file_value
}
"
)
infer_model_cmd
=
"
${
python
}
${
inference_py
}
${
set_gpu
}
${
set_img_dir
}
${
set_det_model_dir
}
--use_onnx=True >
${
_save_log_path
}
2>&1 "
infer_model_cmd
=
"
${
python
}
${
inference_py
}
${
set_gpu
}
${
set_img_dir
}
${
set_det_model_dir
}
--use_onnx=True >
${
_save_log_path
}
2>&1 "
elif
[
${
model_name
}
=
"ch_PP-OCRv2_rec"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3_rec"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2.0_rec"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2.0_rec"
]
;
then
elif
[
[
${
model_name
}
=
~
"rec"
]
]
;
then
set_rec_model_dir
=
$(
func_set_params
"
${
rec_model_key
}
"
"
${
rec_save_file_value
}
"
)
set_rec_model_dir
=
$(
func_set_params
"
${
rec_model_key
}
"
"
${
rec_save_file_value
}
"
)
infer_model_cmd
=
"
${
python
}
${
inference_py
}
${
set_gpu
}
${
set_img_dir
}
${
set_rec_model_dir
}
--use_onnx=True >
${
_save_log_path
}
2>&1 "
infer_model_cmd
=
"
${
python
}
${
inference_py
}
${
set_gpu
}
${
set_img_dir
}
${
set_rec_model_dir
}
--use_onnx=True >
${
_save_log_path
}
2>&1 "
fi
fi
...
...
test_tipc/test_serving_infer_python.sh
浏览文件 @
7c1bec94
...
@@ -86,7 +86,7 @@ function func_serving(){
...
@@ -86,7 +86,7 @@ function func_serving(){
python_list
=(
${
python_list
}
)
python_list
=(
${
python_list
}
)
trans_model_cmd
=
"
${
python_list
[0]
}
${
trans_model_py
}
${
set_dirname
}
${
set_model_filename
}
${
set_params_filename
}
${
set_serving_server
}
${
set_serving_client
}
"
trans_model_cmd
=
"
${
python_list
[0]
}
${
trans_model_py
}
${
set_dirname
}
${
set_model_filename
}
${
set_params_filename
}
${
set_serving_server
}
${
set_serving_client
}
"
eval
$trans_model_cmd
eval
$trans_model_cmd
elif
[
${
model_name
}
=
"ch_PP-OCRv2_det"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3_det"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2.0_det"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2.0_det"
]
;
then
elif
[
[
${
model_name
}
=
~
"det"
]
]
;
then
# trans det
# trans det
set_dirname
=
$(
func_set_params
"--dirname"
"
${
det_infer_model_dir_value
}
"
)
set_dirname
=
$(
func_set_params
"--dirname"
"
${
det_infer_model_dir_value
}
"
)
set_serving_server
=
$(
func_set_params
"--serving_server"
"
${
det_serving_server_value
}
"
)
set_serving_server
=
$(
func_set_params
"--serving_server"
"
${
det_serving_server_value
}
"
)
...
@@ -94,7 +94,7 @@ function func_serving(){
...
@@ -94,7 +94,7 @@ function func_serving(){
python_list
=(
${
python_list
}
)
python_list
=(
${
python_list
}
)
trans_model_cmd
=
"
${
python_list
[0]
}
${
trans_model_py
}
${
set_dirname
}
${
set_model_filename
}
${
set_params_filename
}
${
set_serving_server
}
${
set_serving_client
}
"
trans_model_cmd
=
"
${
python_list
[0]
}
${
trans_model_py
}
${
set_dirname
}
${
set_model_filename
}
${
set_params_filename
}
${
set_serving_server
}
${
set_serving_client
}
"
eval
$trans_model_cmd
eval
$trans_model_cmd
elif
[
${
model_name
}
=
"ch_PP-OCRv2_rec"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3_rec"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2.0_rec"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2.0_rec"
]
;
then
elif
[
[
${
model_name
}
=
~
"rec"
]
]
;
then
# trans rec
# trans rec
set_dirname
=
$(
func_set_params
"--dirname"
"
${
rec_infer_model_dir_value
}
"
)
set_dirname
=
$(
func_set_params
"--dirname"
"
${
rec_infer_model_dir_value
}
"
)
set_serving_server
=
$(
func_set_params
"--serving_server"
"
${
rec_serving_server_value
}
"
)
set_serving_server
=
$(
func_set_params
"--serving_server"
"
${
rec_serving_server_value
}
"
)
...
@@ -124,13 +124,13 @@ function func_serving(){
...
@@ -124,13 +124,13 @@ function func_serving(){
eval
$web_service_cmd
eval
$web_service_cmd
last_status
=
${
PIPESTATUS
[0]
}
last_status
=
${
PIPESTATUS
[0]
}
status_check
$last_status
"
${
web_service_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
status_check
$last_status
"
${
web_service_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
elif
[
${
model_name
}
=
"ch_PP-OCRv2_det"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3_det"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2.0_det"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2.0_det"
]
;
then
elif
[
[
${
model_name
}
=
~
"det"
]
]
;
then
set_det_model_config
=
$(
func_set_params
"
${
det_server_key
}
"
"
${
det_server_value
}
"
)
set_det_model_config
=
$(
func_set_params
"
${
det_server_key
}
"
"
${
det_server_value
}
"
)
web_service_cmd
=
"
${
python
}
${
web_service_py
}
${
web_use_gpu_key
}
=""
${
web_use_mkldnn_key
}
=
${
use_mkldnn
}
${
set_cpu_threads
}
${
set_det_model_config
}
&"
web_service_cmd
=
"
${
python
}
${
web_service_py
}
${
web_use_gpu_key
}
=""
${
web_use_mkldnn_key
}
=
${
use_mkldnn
}
${
set_cpu_threads
}
${
set_det_model_config
}
&"
eval
$web_service_cmd
eval
$web_service_cmd
last_status
=
${
PIPESTATUS
[0]
}
last_status
=
${
PIPESTATUS
[0]
}
status_check
$last_status
"
${
web_service_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
status_check
$last_status
"
${
web_service_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
elif
[
${
model_name
}
=
"ch_PP-OCRv2_rec"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3_rec"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2.0_rec"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2.0_rec"
]
;
then
elif
[
[
${
model_name
}
=
~
"rec"
]
]
;
then
set_rec_model_config
=
$(
func_set_params
"
${
rec_server_key
}
"
"
${
rec_server_value
}
"
)
set_rec_model_config
=
$(
func_set_params
"
${
rec_server_key
}
"
"
${
rec_server_value
}
"
)
web_service_cmd
=
"
${
python
}
${
web_service_py
}
${
web_use_gpu_key
}
=""
${
web_use_mkldnn_key
}
=
${
use_mkldnn
}
${
set_cpu_threads
}
${
set_rec_model_config
}
&"
web_service_cmd
=
"
${
python
}
${
web_service_py
}
${
web_use_gpu_key
}
=""
${
web_use_mkldnn_key
}
=
${
use_mkldnn
}
${
set_cpu_threads
}
${
set_rec_model_config
}
&"
eval
$web_service_cmd
eval
$web_service_cmd
...
@@ -174,13 +174,13 @@ function func_serving(){
...
@@ -174,13 +174,13 @@ function func_serving(){
eval
$web_service_cmd
eval
$web_service_cmd
last_status
=
${
PIPESTATUS
[0]
}
last_status
=
${
PIPESTATUS
[0]
}
status_check
$last_status
"
${
web_service_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
status_check
$last_status
"
${
web_service_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
elif
[
${
model_name
}
=
"ch_PP-OCRv2_det"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3_det"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2.0_det"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2.0_det"
]
;
then
elif
[
[
${
model_name
}
=
~
"det"
]
]
;
then
set_det_model_config
=
$(
func_set_params
"
${
det_server_key
}
"
"
${
det_server_value
}
"
)
set_det_model_config
=
$(
func_set_params
"
${
det_server_key
}
"
"
${
det_server_value
}
"
)
web_service_cmd
=
"
${
python
}
${
web_service_py
}
${
set_tensorrt
}
${
set_precision
}
${
set_det_model_config
}
&"
web_service_cmd
=
"
${
python
}
${
web_service_py
}
${
set_tensorrt
}
${
set_precision
}
${
set_det_model_config
}
&"
eval
$web_service_cmd
eval
$web_service_cmd
last_status
=
${
PIPESTATUS
[0]
}
last_status
=
${
PIPESTATUS
[0]
}
status_check
$last_status
"
${
web_service_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
status_check
$last_status
"
${
web_service_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
elif
[
${
model_name
}
=
"ch_PP-OCRv2_rec"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3_rec"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2.0_rec"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2.0_rec"
]
;
then
elif
[
[
${
model_name
}
=
~
"rec"
]
]
;
then
set_rec_model_config
=
$(
func_set_params
"
${
rec_server_key
}
"
"
${
rec_server_value
}
"
)
set_rec_model_config
=
$(
func_set_params
"
${
rec_server_key
}
"
"
${
rec_server_value
}
"
)
web_service_cmd
=
"
${
python
}
${
web_service_py
}
${
set_tensorrt
}
${
set_precision
}
${
set_rec_model_config
}
&"
web_service_cmd
=
"
${
python
}
${
web_service_py
}
${
set_tensorrt
}
${
set_precision
}
${
set_rec_model_config
}
&"
eval
$web_service_cmd
eval
$web_service_cmd
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录