Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
paddle_dbnet
Commits
9af6ab8f
Unverified
Commit
9af6ab8f
authored
Jul 27, 2020
by
shaohua.zhang
Committed by
GitHub
Jul 27, 2020
Browse files
Merge pull request #6 from PaddlePaddle/develop
update-2020-7-27
parents
b5f1f89a
10880fc1
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
78 additions
and
33 deletions
+78
-33
deploy/lite/readme_en.md
deploy/lite/readme_en.md
+1
-1
deploy/pdserving/readme.md
deploy/pdserving/readme.md
+12
-0
doc/doc_ch/serving.md
doc/doc_ch/serving.md
+31
-15
doc/doc_en/serving_en.md
doc/doc_en/serving_en.md
+29
-16
tools/infer/predict_det.py
tools/infer/predict_det.py
+5
-1
No files found.
deploy/lite/readme_en.md
View file @
9af6ab8f
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
This tutorial will introduce how to use paddle-lite to deploy paddleOCR ultra-lightweight Chinese and English detection models on mobile phones.
This tutorial will introduce how to use paddle-lite to deploy paddleOCR ultra-lightweight Chinese and English detection models on mobile phones.
addle
L
ite is a lightweight inference engine for PaddlePaddle.
p
addle
-l
ite is a lightweight inference engine for PaddlePaddle.
It provides efficient inference capabilities for mobile phones and IOTs,
It provides efficient inference capabilities for mobile phones and IOTs,
and extensively integrates cross-platform hardware to provide lightweight
and extensively integrates cross-platform hardware to provide lightweight
deployment solutions for end-side deployment issues.
deployment solutions for end-side deployment issues.
...
...
deploy/pdserving/readme.md
View file @
9af6ab8f
...
@@ -9,9 +9,21 @@
...
@@ -9,9 +9,21 @@
我们推荐用户使用GPU来做Paddle Serving的OCR服务部署
我们推荐用户使用GPU来做Paddle Serving的OCR服务部署
**CUDA版本:9.0**
**CUDA版本:9.0**
**CUDNN版本:7.0**
**CUDNN版本:7.0**
**操作系统版本:CentOS 6以上**
**操作系统版本:CentOS 6以上**
**Python3操作指南:**
```
#以下提供beta版本的paddle serving whl包,欢迎试用,正式版会在7月底正式上线
wget --no-check-certificate https://paddle-serving.bj.bcebos.com/others/paddle_serving_server_gpu-0.3.2-py3-none-any.whl
wget --no-check-certificate https://paddle-serving.bj.bcebos.com/others/paddle_serving_client-0.3.2-cp36-none-any.whl
wget --no-check-certificate https://paddle-serving.bj.bcebos.com/others/paddle_serving_app-0.1.2-py3-none-any.whl
python -m pip install paddle_serving_app-0.1.2-py3-none-any.whl paddle_serving_server_gpu-0.3.2-py3-none-any.whl paddle_serving_client-0.3.2-cp36-none-any.whl
```
**Python2操作指南:**
```
```
#以下提供beta版本的paddle serving whl包,欢迎试用,正式版会在7月底正式上线
#以下提供beta版本的paddle serving whl包,欢迎试用,正式版会在7月底正式上线
wget --no-check-certificate https://paddle-serving.bj.bcebos.com/others/paddle_serving_server_gpu-0.3.2-py2-none-any.whl
wget --no-check-certificate https://paddle-serving.bj.bcebos.com/others/paddle_serving_server_gpu-0.3.2-py2-none-any.whl
...
...
doc/doc_ch/serving.md
View file @
9af6ab8f
...
@@ -28,21 +28,38 @@ deploy/hubserving/ocr_system/
...
@@ -28,21 +28,38 @@ deploy/hubserving/ocr_system/
# 安装paddlehub
# 安装paddlehub
pip3
install
paddlehub
--upgrade
-i
https://pypi.tuna.tsinghua.edu.cn/simple
pip3
install
paddlehub
--upgrade
-i
https://pypi.tuna.tsinghua.edu.cn/simple
# 设置环境变量
#
在Linux下
设置环境变量
export
PYTHONPATH
=
.
export
PYTHONPATH
=
.
# 在Windows下设置环境变量
SET
PYTHONPATH
=
.
```
```
### 2. 安装服务模块
### 2. 安装服务模块
PaddleOCR提供3种服务模块,根据需要安装所需模块。
如:
PaddleOCR提供3种服务模块,根据需要安装所需模块。
安装检测服务模块:
*
在Linux环境下,安装示例如下:
```
hub install deploy/hubserving/ocr_det/```
```
shell
# 安装检测服务模块:
hub
install
deploy/hubserving/ocr_det/
或,安装识别服务模块:
#
或,安装识别服务模块:
```
hub install deploy/hubserving/ocr_rec/
```
hub
install
deploy/hubserving/ocr_rec/
或,安装检测+识别串联服务模块:
# 或,安装检测+识别串联服务模块:
```
hub install deploy/hubserving/ocr_system/
```
hub
install
deploy/hubserving/ocr_system/
```
*
在Windows环境下(文件夹的分隔符为
`\`),安装示例如下:
`
``
shell
# 安装检测服务模块:
hub install deploy
\h
ubserving
\o
cr_det
\
# 或,安装识别服务模块:
hub install deploy
\h
ubserving
\o
cr_rec
\
# 或,安装检测+识别串联服务模块:
hub install deploy
\h
ubserving
\o
cr_system
\
```
### 3. 启动服务
### 3. 启动服务
#### 方式1. 命令行命令启动(仅支持CPU)
#### 方式1. 命令行命令启动(仅支持CPU)
...
@@ -157,4 +174,3 @@ hub serving start -c deploy/hubserving/ocr_system/config.json
...
@@ -157,4 +174,3 @@ hub serving start -c deploy/hubserving/ocr_system/config.json
- 5、重新启动服务
- 5、重新启动服务
```
hub serving start -m ocr_system
```
```
hub serving start -m ocr_system
```
doc/doc_en/serving_en.md
View file @
9af6ab8f
...
@@ -29,24 +29,37 @@ The following steps take the 2-stage series service as an example. If only the d
...
@@ -29,24 +29,37 @@ The following steps take the 2-stage series service as an example. If only the d
# Install paddlehub
# Install paddlehub
pip3
install
paddlehub
--upgrade
-i
https://pypi.tuna.tsinghua.edu.cn/simple
pip3
install
paddlehub
--upgrade
-i
https://pypi.tuna.tsinghua.edu.cn/simple
# Set environment variables
# Set environment variables
on Linux
export
PYTHONPATH
=
.
export
PYTHONPATH
=
.
# Set environment variables on Windows
SET
PYTHONPATH
=
.
```
```
### 2. Install Service Module
### 2. Install Service Module
PaddleOCR provides 3 kinds of service modules, install the required modules according to your needs.
Such as:
PaddleOCR provides 3 kinds of service modules, install the required modules according to your needs.
Install the detection service module:
*
On Linux platform, the examples are as follows.
```
shell
```
shell
# Install the detection service module:
hub
install
deploy/hubserving/ocr_det/
hub
install
deploy/hubserving/ocr_det/
```
Or, install the recognition service module:
# Or, install the recognition service module:
```
shell
hub
install
deploy/hubserving/ocr_rec/
hub
install
deploy/hubserving/ocr_rec/
# Or, install the 2-stage series service module:
hub
install
deploy/hubserving/ocr_system/
```
```
Or, install the 2-stage series service module:
*
On Windows platform, the examples are as follows.
```
shell
```
shell
hub
install
deploy/hubserving/ocr_system/
# Install the detection service module:
hub
install
deploy
\h
ubserving
\o
cr_det
\
# Or, install the recognition service module:
hub
install
deploy
\h
ubserving
\o
cr_rec
\
# Or, install the 2-stage series service module:
hub
install
deploy
\h
ubserving
\o
cr_system
\
```
```
### 3. Start service
### 3. Start service
...
...
tools/infer/predict_det.py
View file @
9af6ab8f
...
@@ -135,6 +135,9 @@ if __name__ == "__main__":
...
@@ -135,6 +135,9 @@ if __name__ == "__main__":
text_detector
=
TextDetector
(
args
)
text_detector
=
TextDetector
(
args
)
count
=
0
count
=
0
total_time
=
0
total_time
=
0
draw_img_save
=
"./inference_results"
if
not
os
.
path
.
exists
(
draw_img_save
):
os
.
makedirs
(
draw_img_save
)
for
image_file
in
image_file_list
:
for
image_file
in
image_file_list
:
img
=
cv2
.
imread
(
image_file
)
img
=
cv2
.
imread
(
image_file
)
if
img
is
None
:
if
img
is
None
:
...
@@ -147,6 +150,7 @@ if __name__ == "__main__":
...
@@ -147,6 +150,7 @@ if __name__ == "__main__":
print
(
"Predict time of %s:"
%
image_file
,
elapse
)
print
(
"Predict time of %s:"
%
image_file
,
elapse
)
src_im
=
utility
.
draw_text_det_res
(
dt_boxes
,
image_file
)
src_im
=
utility
.
draw_text_det_res
(
dt_boxes
,
image_file
)
img_name_pure
=
image_file
.
split
(
"/"
)[
-
1
]
img_name_pure
=
image_file
.
split
(
"/"
)[
-
1
]
cv2
.
imwrite
(
"./inference_results/det_res_%s"
%
img_name_pure
,
src_im
)
cv2
.
imwrite
(
os
.
path
.
join
(
draw_img_save
,
"det_res_%s"
%
img_name_pure
),
src_im
)
if
count
>
1
:
if
count
>
1
:
print
(
"Avg Time:"
,
total_time
/
(
count
-
1
))
print
(
"Avg Time:"
,
total_time
/
(
count
-
1
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment