Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleHub
提交
5700aaad
P
PaddleHub
项目概览
PaddlePaddle
/
PaddleHub
大约 1 年 前同步成功
通知
282
Star
12117
Fork
2091
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
200
列表
看板
标记
里程碑
合并请求
4
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleHub
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
200
Issue
200
列表
看板
标记
里程碑
合并请求
4
合并请求
4
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5700aaad
编写于
11月 04, 2019
作者:
Z
zhangxuefei
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' of
https://github.com/PaddlePaddle/PaddleHub
into develop
上级
3ed9bd13
8419f9d5
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
4 addition
and
1 deletion
+4
-1
paddlehub/serving/app_single.py
paddlehub/serving/app_single.py
+4
-1
未找到文件。
paddlehub/serving/app_single.py
浏览文件 @
5700aaad
...
@@ -225,6 +225,7 @@ def predict_semantic_segmentation(module, input_img, id, batch_size):
...
@@ -225,6 +225,7 @@ def predict_semantic_segmentation(module, input_img, id, batch_size):
for
index
in
range
(
len
(
input_img
)):
for
index
in
range
(
len
(
input_img
)):
# special
# special
item
=
input_img
[
index
]
item
=
input_img
[
index
]
output_file_path
=
""
with
open
(
results
[
index
][
"processed"
],
"rb"
)
as
fp
:
with
open
(
results
[
index
][
"processed"
],
"rb"
)
as
fp
:
# special
# special
b_head
=
"data:image/png;base64"
b_head
=
"data:image/png;base64"
...
@@ -232,6 +233,7 @@ def predict_semantic_segmentation(module, input_img, id, batch_size):
...
@@ -232,6 +233,7 @@ def predict_semantic_segmentation(module, input_img, id, batch_size):
b_body
=
str
(
b_body
).
replace
(
"b'"
,
""
).
replace
(
"'"
,
""
)
b_body
=
str
(
b_body
).
replace
(
"b'"
,
""
).
replace
(
"'"
,
""
)
b_img
=
b_head
+
","
+
b_body
b_img
=
b_head
+
","
+
b_body
base64_list
.
append
(
b_img
)
base64_list
.
append
(
b_img
)
output_file_path
=
results
[
index
][
"processed"
]
results
[
index
][
"origin"
]
=
results
[
index
][
"origin"
].
replace
(
results
[
index
][
"origin"
]
=
results
[
index
][
"origin"
].
replace
(
id
+
"_"
,
""
)
id
+
"_"
,
""
)
results
[
index
][
"processed"
]
=
results
[
index
][
"processed"
].
replace
(
results
[
index
][
"processed"
]
=
results
[
index
][
"processed"
].
replace
(
...
@@ -239,7 +241,8 @@ def predict_semantic_segmentation(module, input_img, id, batch_size):
...
@@ -239,7 +241,8 @@ def predict_semantic_segmentation(module, input_img, id, batch_size):
results
[
index
].
update
({
"base64"
:
b_img
})
results
[
index
].
update
({
"base64"
:
b_img
})
results_pack
.
append
(
results
[
index
])
results_pack
.
append
(
results
[
index
])
os
.
remove
(
item
)
os
.
remove
(
item
)
os
.
remove
(
results
[
index
][
"processed"
])
if
output_file_path
!=
""
:
os
.
remove
(
output_file_path
)
return
results_pack
return
results_pack
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录