Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_41840029
PaddleOCR
提交
0aa84521
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看板
提交
0aa84521
编写于
6月 08, 2022
作者:
A
andyjpaddle
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dygraph' of
https://github.com/PaddlePaddle/PaddleOCR
into dygraph
上级
8d257f24
f10c4580
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
8 addition
and
11 deletion
+8
-11
deploy/pdserving/README.md
deploy/pdserving/README.md
+1
-1
deploy/pdserving/README_CN.md
deploy/pdserving/README_CN.md
+1
-1
deploy/pdserving/web_service.py
deploy/pdserving/web_service.py
+4
-3
test_tipc/test_serving_infer_cpp.sh
test_tipc/test_serving_infer_cpp.sh
+0
-2
test_tipc/test_serving_infer_python.sh
test_tipc/test_serving_infer_python.sh
+2
-4
未找到文件。
deploy/pdserving/README.md
浏览文件 @
0aa84521
...
...
@@ -136,7 +136,7 @@ The recognition model is the same.
2.
Run the following command to start the service.
```
# Start the service and save the running log in log.txt
python3 web_service.py &>log.txt &
python3 web_service.py
--config=config.yml
&>log.txt &
```
After the service is successfully started, a log similar to the following will be printed in log.txt
!
[](
./imgs/start_server.png
)
...
...
deploy/pdserving/README_CN.md
浏览文件 @
0aa84521
...
...
@@ -135,7 +135,7 @@ python3 -m paddle_serving_client.convert --dirname ./ch_PP-OCRv3_rec_infer/ \
2.
启动服务可运行如下命令:
```
# 启动服务,运行日志保存在log.txt
python3 web_service.py &>log.txt &
python3 web_service.py
--config=config.yml
&>log.txt &
```
成功启动服务后,log.txt中会打印类似如下日志
!
[](
./imgs/start_server.png
)
...
...
deploy/pdserving/web_service.py
浏览文件 @
0aa84521
...
...
@@ -19,7 +19,7 @@ import copy
import
cv2
import
base64
# from paddle_serving_app.reader import OCRReader
from
ocr_reader
import
OCRReader
,
DetResizeForTest
from
ocr_reader
import
OCRReader
,
DetResizeForTest
,
ArgsParser
from
paddle_serving_app.reader
import
Sequential
,
ResizeByFactor
from
paddle_serving_app.reader
import
Div
,
Normalize
,
Transpose
from
paddle_serving_app.reader
import
DBPostProcess
,
FilterBoxes
,
GetRotateCropImage
,
SortedBoxes
...
...
@@ -85,7 +85,7 @@ class RecOp(Op):
dt_boxes
=
copy
.
deepcopy
(
self
.
dt_list
)
feed_list
=
[]
img_list
=
[]
max_wh_ratio
=
320
/
48.
max_wh_ratio
=
320
/
48.
## Many mini-batchs, the type of feed_data is list.
max_batch_size
=
6
# len(dt_boxes)
...
...
@@ -163,5 +163,6 @@ class OcrService(WebService):
uci_service
=
OcrService
(
name
=
"ocr"
)
uci_service
.
prepare_pipeline_config
(
"config.yml"
)
FLAGS
=
ArgsParser
().
parse_args
()
uci_service
.
prepare_pipeline_config
(
yml_dict
=
FLAGS
.
conf_dict
)
uci_service
.
run_service
()
test_tipc/test_serving_infer_cpp.sh
浏览文件 @
0aa84521
...
...
@@ -86,8 +86,6 @@ function func_serving(){
python_list
=(
${
python_list
}
)
cd
${
serving_dir_value
}
# cpp serving
unset
https_proxy
unset
http_proxy
for
gpu_id
in
${
gpu_value
[*]
}
;
do
if
[
${
gpu_id
}
=
"null"
]
;
then
web_service_cpp_cmd
=
"
${
python_list
[0]
}
${
web_service_py
}
--model
${
det_server_value
}
${
rec_server_value
}
${
op_key
}
${
op_value
}
${
port_key
}
${
port_value
}
> serving_log_cpu.log &"
...
...
test_tipc/test_serving_infer_python.sh
浏览文件 @
0aa84521
...
...
@@ -107,8 +107,6 @@ function func_serving(){
python_list
=(
${
python_list
}
)
cd
${
serving_dir_value
}
unset
https_proxy
unset
http_proxy
python
=
${
python_list
[0]
}
# python serving
...
...
@@ -147,7 +145,7 @@ function func_serving(){
status_check
$last_status
"
${
pipeline_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
sleep
2s
done
ps ux |
grep
-E
'web_service
|pipeline
'
|
awk
'{print $2}'
| xargs
kill
-s
9
ps ux |
grep
-E
'web_service'
|
awk
'{print $2}'
| xargs
kill
-s
9
done
done
elif
[
${
use_gpu
}
=
"gpu"
]
;
then
...
...
@@ -197,7 +195,7 @@ function func_serving(){
status_check
$last_status
"
${
pipeline_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
sleep
2s
done
ps ux |
grep
-E
'web_service
|pipeline
'
|
awk
'{print $2}'
| xargs
kill
-s
9
ps ux |
grep
-E
'web_service'
|
awk
'{print $2}'
| xargs
kill
-s
9
done
done
else
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录