Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_41840029
PaddleOCR
提交
9af6ab8f
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看板
未验证
提交
9af6ab8f
编写于
7月 27, 2020
作者:
S
shaohua.zhang
提交者:
GitHub
7月 27, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #6 from PaddlePaddle/develop
update-2020-7-27
上级
b5f1f89a
10880fc1
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
78 addition
and
33 deletion
+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
未找到文件。
deploy/lite/readme_en.md
浏览文件 @
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.
paddle-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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
))
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录