Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_41840029
PaddleOCR
提交
ed36f16a
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看板
未验证
提交
ed36f16a
编写于
7月 06, 2021
作者:
D
Double_V
提交者:
GitHub
7月 06, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3269 from littletomatodonkey/dyg/fix_infer_bug
fix bug of inference
上级
b94c88a9
51193f88
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
6 addition
and
8 deletion
+6
-8
deploy/hubserving/readme.md
deploy/hubserving/readme.md
+1
-1
deploy/hubserving/readme_en.md
deploy/hubserving/readme_en.md
+1
-1
tools/infer/predict_det.py
tools/infer/predict_det.py
+4
-4
tools/infer/predict_system.py
tools/infer/predict_system.py
+0
-2
未找到文件。
deploy/hubserving/readme.md
浏览文件 @
ed36f16a
...
@@ -29,7 +29,7 @@ deploy/hubserving/ocr_system/
...
@@ -29,7 +29,7 @@ deploy/hubserving/ocr_system/
### 1. 准备环境
### 1. 准备环境
```
shell
```
shell
# 安装paddlehub
# 安装paddlehub
pip3
install
paddlehub
==
1.8.3
--upgrade
-i
https://pypi.tuna.tsinghua.edu.cn/simple
pip3
install
paddlehub
==
2.1.0
--upgrade
-i
https://pypi.tuna.tsinghua.edu.cn/simple
```
```
### 2. 下载推理模型
### 2. 下载推理模型
...
...
deploy/hubserving/readme_en.md
浏览文件 @
ed36f16a
...
@@ -30,7 +30,7 @@ The following steps take the 2-stage series service as an example. If only the d
...
@@ -30,7 +30,7 @@ The following steps take the 2-stage series service as an example. If only the d
### 1. Prepare the environment
### 1. Prepare the environment
```
shell
```
shell
# Install paddlehub
# Install paddlehub
pip3
install
paddlehub
==
1.8.3
--upgrade
-i
https://pypi.tuna.tsinghua.edu.cn/simple
pip3
install
paddlehub
==
2.1.0
--upgrade
-i
https://pypi.tuna.tsinghua.edu.cn/simple
```
```
### 2. Download inference model
### 2. Download inference model
...
...
tools/infer/predict_det.py
浏览文件 @
ed36f16a
...
@@ -175,7 +175,7 @@ class TextDetector(object):
...
@@ -175,7 +175,7 @@ class TextDetector(object):
st
=
time
.
time
()
st
=
time
.
time
()
if
args
.
benchmark
:
if
self
.
args
.
benchmark
:
self
.
autolog
.
times
.
start
()
self
.
autolog
.
times
.
start
()
data
=
transform
(
data
,
self
.
preprocess_op
)
data
=
transform
(
data
,
self
.
preprocess_op
)
...
@@ -186,7 +186,7 @@ class TextDetector(object):
...
@@ -186,7 +186,7 @@ class TextDetector(object):
shape_list
=
np
.
expand_dims
(
shape_list
,
axis
=
0
)
shape_list
=
np
.
expand_dims
(
shape_list
,
axis
=
0
)
img
=
img
.
copy
()
img
=
img
.
copy
()
if
args
.
benchmark
:
if
self
.
args
.
benchmark
:
self
.
autolog
.
times
.
stamp
()
self
.
autolog
.
times
.
stamp
()
self
.
input_tensor
.
copy_from_cpu
(
img
)
self
.
input_tensor
.
copy_from_cpu
(
img
)
...
@@ -195,7 +195,7 @@ class TextDetector(object):
...
@@ -195,7 +195,7 @@ class TextDetector(object):
for
output_tensor
in
self
.
output_tensors
:
for
output_tensor
in
self
.
output_tensors
:
output
=
output_tensor
.
copy_to_cpu
()
output
=
output_tensor
.
copy_to_cpu
()
outputs
.
append
(
output
)
outputs
.
append
(
output
)
if
args
.
benchmark
:
if
self
.
args
.
benchmark
:
self
.
autolog
.
times
.
stamp
()
self
.
autolog
.
times
.
stamp
()
preds
=
{}
preds
=
{}
...
@@ -220,7 +220,7 @@ class TextDetector(object):
...
@@ -220,7 +220,7 @@ class TextDetector(object):
else
:
else
:
dt_boxes
=
self
.
filter_tag_det_res
(
dt_boxes
,
ori_im
.
shape
)
dt_boxes
=
self
.
filter_tag_det_res
(
dt_boxes
,
ori_im
.
shape
)
if
args
.
benchmark
:
if
self
.
args
.
benchmark
:
self
.
autolog
.
times
.
end
(
stamp
=
True
)
self
.
autolog
.
times
.
end
(
stamp
=
True
)
et
=
time
.
time
()
et
=
time
.
time
()
return
dt_boxes
,
et
-
st
return
dt_boxes
,
et
-
st
...
...
tools/infer/predict_system.py
浏览文件 @
ed36f16a
...
@@ -174,8 +174,6 @@ def main(args):
...
@@ -174,8 +174,6 @@ def main(args):
logger
.
info
(
"The predict total time is {}"
.
format
(
time
.
time
()
-
_st
))
logger
.
info
(
"The predict total time is {}"
.
format
(
time
.
time
()
-
_st
))
logger
.
info
(
"
\n
The predict total time is {}"
.
format
(
total_time
))
logger
.
info
(
"
\n
The predict total time is {}"
.
format
(
total_time
))
img_num
=
text_sys
.
text_detector
.
det_times
.
img_num
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
args
=
utility
.
parse_args
()
args
=
utility
.
parse_args
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录