Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_41840029
PaddleOCR
提交
faa6bbef
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看板
提交
faa6bbef
编写于
8月 04, 2022
作者:
文幕地方
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename 2.0 to 2_0
上级
225a3fc4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
9 addition
and
9 deletion
+9
-9
test_tipc/configs/ch_ppocr_mobile_v2_0_rec/train_pact_infer_python.txt
...figs/ch_ppocr_mobile_v2_0_rec/train_pact_infer_python.txt
+2
-2
test_tipc/configs/ch_ppocr_mobile_v2_0_rec/train_ptq_infer_python.txt
...nfigs/ch_ppocr_mobile_v2_0_rec/train_ptq_infer_python.txt
+1
-1
test_tipc/test_paddle2onnx.sh
test_tipc/test_paddle2onnx.sh
+3
-3
test_tipc/test_serving_infer_python.sh
test_tipc/test_serving_infer_python.sh
+3
-3
未找到文件。
test_tipc/configs/ch_ppocr_mobile_v2_0_rec/train_pact_infer_python.txt
浏览文件 @
faa6bbef
...
@@ -14,7 +14,7 @@ null:null
...
@@ -14,7 +14,7 @@ null:null
##
##
trainer:pact_train
trainer:pact_train
norm_train:null
norm_train:null
pact_train:deploy/slim/quantization/quant.py -c test_tipc/configs/ch_ppocr_mobile_v2
.
0_rec_PACT/rec_chinese_lite_train_v2.0.yml -o
pact_train:deploy/slim/quantization/quant.py -c test_tipc/configs/ch_ppocr_mobile_v2
_
0_rec_PACT/rec_chinese_lite_train_v2.0.yml -o
fpgm_train:null
fpgm_train:null
distill_train:null
distill_train:null
null:null
null:null
...
@@ -28,7 +28,7 @@ null:null
...
@@ -28,7 +28,7 @@ null:null
Global.save_inference_dir:./output/
Global.save_inference_dir:./output/
Global.checkpoints:
Global.checkpoints:
norm_export:null
norm_export:null
quant_export:deploy/slim/quantization/export_model.py -c test_tipc/configs/ch_ppocr_mobile_v2
.
0_rec_PACT/rec_chinese_lite_train_v2.0.yml -o
quant_export:deploy/slim/quantization/export_model.py -c test_tipc/configs/ch_ppocr_mobile_v2
_
0_rec_PACT/rec_chinese_lite_train_v2.0.yml -o
fpgm_export:null
fpgm_export:null
distill_export:null
distill_export:null
export1:null
export1:null
...
...
test_tipc/configs/ch_ppocr_mobile_v2_0_rec/train_ptq_infer_python.txt
浏览文件 @
faa6bbef
...
@@ -4,7 +4,7 @@ python:python3.7
...
@@ -4,7 +4,7 @@ python:python3.7
Global.pretrained_model:null
Global.pretrained_model:null
Global.save_inference_dir:null
Global.save_inference_dir:null
infer_model:./inference/ch_ppocr_mobile_v2.0_rec_infer/
infer_model:./inference/ch_ppocr_mobile_v2.0_rec_infer/
infer_export:deploy/slim/quantization/quant_kl.py -c test_tipc/configs/ch_ppocr_mobile_v2
.
0_rec_KL/rec_chinese_lite_train_v2.0.yml -o
infer_export:deploy/slim/quantization/quant_kl.py -c test_tipc/configs/ch_ppocr_mobile_v2
_
0_rec_KL/rec_chinese_lite_train_v2.0.yml -o
infer_quant:True
infer_quant:True
inference:tools/infer/predict_rec.py --rec_image_shape="3,32,320"
inference:tools/infer/predict_rec.py --rec_image_shape="3,32,320"
--use_gpu:False|True
--use_gpu:False|True
...
...
test_tipc/test_paddle2onnx.sh
浏览文件 @
faa6bbef
...
@@ -54,7 +54,7 @@ function func_paddle2onnx(){
...
@@ -54,7 +54,7 @@ function func_paddle2onnx(){
_script
=
$1
_script
=
$1
# paddle2onnx
# paddle2onnx
if
[
${
model_name
}
=
"ch_PP-OCRv2"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2
.0"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2.
0"
]
;
then
if
[
${
model_name
}
=
"ch_PP-OCRv2"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2
_0"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2_
0"
]
;
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
}
"
)
...
@@ -113,7 +113,7 @@ function func_paddle2onnx(){
...
@@ -113,7 +113,7 @@ function func_paddle2onnx(){
_save_log_path
=
"
${
LOG_PATH
}
/paddle2onnx_infer_cpu.log"
_save_log_path
=
"
${
LOG_PATH
}
/paddle2onnx_infer_cpu.log"
set_gpu
=
$(
func_set_params
"
${
use_gpu_key
}
"
"
${
use_gpu
}
"
)
set_gpu
=
$(
func_set_params
"
${
use_gpu_key
}
"
"
${
use_gpu
}
"
)
set_img_dir
=
$(
func_set_params
"
${
image_dir_key
}
"
"
${
image_dir_value
}
"
)
set_img_dir
=
$(
func_set_params
"
${
image_dir_key
}
"
"
${
image_dir_value
}
"
)
if
[
${
model_name
}
=
"ch_PP-OCRv2"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2
.0"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2.
0"
]
;
then
if
[
${
model_name
}
=
"ch_PP-OCRv2"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2
_0"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2_
0"
]
;
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
}
"
)
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 "
...
@@ -132,7 +132,7 @@ function func_paddle2onnx(){
...
@@ -132,7 +132,7 @@ function func_paddle2onnx(){
_save_log_path
=
"
${
LOG_PATH
}
/paddle2onnx_infer_gpu.log"
_save_log_path
=
"
${
LOG_PATH
}
/paddle2onnx_infer_gpu.log"
set_gpu
=
$(
func_set_params
"
${
use_gpu_key
}
"
"
${
use_gpu
}
"
)
set_gpu
=
$(
func_set_params
"
${
use_gpu_key
}
"
"
${
use_gpu
}
"
)
set_img_dir
=
$(
func_set_params
"
${
image_dir_key
}
"
"
${
image_dir_value
}
"
)
set_img_dir
=
$(
func_set_params
"
${
image_dir_key
}
"
"
${
image_dir_value
}
"
)
if
[
${
model_name
}
=
"ch_PP-OCRv2"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2
.0"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2.
0"
]
;
then
if
[
${
model_name
}
=
"ch_PP-OCRv2"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2
_0"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2_
0"
]
;
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
}
"
)
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 "
...
...
test_tipc/test_serving_infer_python.sh
浏览文件 @
faa6bbef
...
@@ -71,7 +71,7 @@ function func_serving(){
...
@@ -71,7 +71,7 @@ function func_serving(){
# pdserving
# pdserving
set_model_filename
=
$(
func_set_params
"
${
model_filename_key
}
"
"
${
model_filename_value
}
"
)
set_model_filename
=
$(
func_set_params
"
${
model_filename_key
}
"
"
${
model_filename_value
}
"
)
set_params_filename
=
$(
func_set_params
"
${
params_filename_key
}
"
"
${
params_filename_value
}
"
)
set_params_filename
=
$(
func_set_params
"
${
params_filename_key
}
"
"
${
params_filename_value
}
"
)
if
[
${
model_name
}
=
"ch_PP-OCRv2"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2
.0"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2.
0"
]
;
then
if
[
${
model_name
}
=
"ch_PP-OCRv2"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2
_0"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2_
0"
]
;
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
}
"
)
...
@@ -120,7 +120,7 @@ function func_serving(){
...
@@ -120,7 +120,7 @@ function func_serving(){
for
threads
in
${
web_cpu_threads_list
[*]
}
;
do
for
threads
in
${
web_cpu_threads_list
[*]
}
;
do
set_cpu_threads
=
$(
func_set_params
"
${
web_cpu_threads_key
}
"
"
${
threads
}
"
)
set_cpu_threads
=
$(
func_set_params
"
${
web_cpu_threads_key
}
"
"
${
threads
}
"
)
server_log_path
=
"
${
LOG_PATH
}
/python_server_cpu_usemkldnn_
${
use_mkldnn
}
_threads_
${
threads
}
.log"
server_log_path
=
"
${
LOG_PATH
}
/python_server_cpu_usemkldnn_
${
use_mkldnn
}
_threads_
${
threads
}
.log"
if
[
${
model_name
}
=
"ch_PP-OCRv2"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2
.0"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2.
0"
]
;
then
if
[
${
model_name
}
=
"ch_PP-OCRv2"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2
_0"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2_
0"
]
;
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
}
"
)
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
=
"nohup
${
python
}
${
web_service_py
}
${
web_use_gpu_key
}
=""
${
web_use_mkldnn_key
}
=
${
use_mkldnn
}
${
set_cpu_threads
}
${
set_det_model_config
}
${
set_rec_model_config
}
>
${
server_log_path
}
2>&1 &"
web_service_cmd
=
"nohup
${
python
}
${
web_service_py
}
${
web_use_gpu_key
}
=""
${
web_use_mkldnn_key
}
=
${
use_mkldnn
}
${
set_cpu_threads
}
${
set_det_model_config
}
${
set_rec_model_config
}
>
${
server_log_path
}
2>&1 &"
...
@@ -171,7 +171,7 @@ function func_serving(){
...
@@ -171,7 +171,7 @@ function func_serving(){
device_type
=
2
device_type
=
2
fi
fi
set_precision
=
$(
func_set_params
"
${
web_precision_key
}
"
"
${
precision
}
"
)
set_precision
=
$(
func_set_params
"
${
web_precision_key
}
"
"
${
precision
}
"
)
if
[
${
model_name
}
=
"ch_PP-OCRv2"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2
.0"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2.
0"
]
;
then
if
[
${
model_name
}
=
"ch_PP-OCRv2"
]
||
[
${
model_name
}
=
"ch_PP-OCRv3"
]
||
[
${
model_name
}
=
"ch_ppocr_mobile_v2
_0"
]
||
[
${
model_name
}
=
"ch_ppocr_server_v2_
0"
]
;
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
}
"
)
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
=
"nohup
${
python
}
${
web_service_py
}
${
set_tensorrt
}
${
set_precision
}
${
set_det_model_config
}
${
set_rec_model_config
}
>
${
server_log_path
}
2>&1 &"
web_service_cmd
=
"nohup
${
python
}
${
web_service_py
}
${
set_tensorrt
}
${
set_precision
}
${
set_det_model_config
}
${
set_rec_model_config
}
>
${
server_log_path
}
2>&1 &"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录