Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleHub
提交
77443f64
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看板
提交
77443f64
编写于
4月 28, 2020
作者:
W
wuzewu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update task input
上级
a2575523
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
9 addition
and
24 deletion
+9
-24
demo/object_detection/predict_faster_rcnn.py
demo/object_detection/predict_faster_rcnn.py
+0
-15
paddlehub/finetune/task/detection_task.py
paddlehub/finetune/task/detection_task.py
+1
-1
paddlehub/finetune/task/faster_rcnn_task.py
paddlehub/finetune/task/faster_rcnn_task.py
+4
-4
paddlehub/finetune/task/ssd_task.py
paddlehub/finetune/task/ssd_task.py
+2
-2
paddlehub/finetune/task/yolo_task.py
paddlehub/finetune/task/yolo_task.py
+2
-2
未找到文件。
demo/object_detection/predict_faster_rcnn.py
浏览文件 @
77443f64
...
@@ -27,27 +27,14 @@ def predict(args):
...
@@ -27,27 +27,14 @@ def predict(args):
# define batch reader
# define batch reader
data_reader
=
ObjectDetectionReader
(
dataset
=
dataset
,
model_type
=
'rcnn'
)
data_reader
=
ObjectDetectionReader
(
dataset
=
dataset
,
model_type
=
'rcnn'
)
input_dict
,
output_dict
,
program
=
module
.
context
(
trainable
=
True
)
pred_input_dict
,
pred_output_dict
,
pred_program
=
module
.
context
(
pred_input_dict
,
pred_output_dict
,
pred_program
=
module
.
context
(
trainable
=
False
,
phase
=
'predict'
)
trainable
=
False
,
phase
=
'predict'
)
feed_list
=
[
input_dict
[
"image"
].
name
,
input_dict
[
"im_info"
].
name
,
input_dict
[
'gt_bbox'
].
name
,
input_dict
[
'gt_class'
].
name
,
input_dict
[
'is_crowd'
].
name
]
pred_feed_list
=
[
pred_feed_list
=
[
pred_input_dict
[
'image'
].
name
,
pred_input_dict
[
'im_info'
].
name
,
pred_input_dict
[
'image'
].
name
,
pred_input_dict
[
'im_info'
].
name
,
pred_input_dict
[
'im_shape'
].
name
pred_input_dict
[
'im_shape'
].
name
]
]
feature
=
[
output_dict
[
'head_feat'
],
output_dict
[
'rpn_cls_loss'
],
output_dict
[
'rpn_reg_loss'
],
output_dict
[
'generate_proposal_labels'
]
]
pred_feature
=
[
pred_output_dict
[
'head_feat'
],
pred_output_dict
[
'rois'
]]
pred_feature
=
[
pred_output_dict
[
'head_feat'
],
pred_output_dict
[
'rois'
]]
config
=
hub
.
RunConfig
(
config
=
hub
.
RunConfig
(
...
@@ -62,8 +49,6 @@ def predict(args):
...
@@ -62,8 +49,6 @@ def predict(args):
task
=
hub
.
FasterRCNNTask
(
task
=
hub
.
FasterRCNNTask
(
data_reader
=
data_reader
,
data_reader
=
data_reader
,
num_classes
=
dataset
.
num_labels
,
num_classes
=
dataset
.
num_labels
,
feed_list
=
feed_list
,
feature
=
feature
,
predict_feed_list
=
pred_feed_list
,
predict_feed_list
=
pred_feed_list
,
predict_feature
=
pred_feature
,
predict_feature
=
pred_feature
,
config
=
config
)
config
=
config
)
...
...
paddlehub/finetune/task/detection_task.py
浏览文件 @
77443f64
...
@@ -116,7 +116,7 @@ class DetectionTask(BaseTask):
...
@@ -116,7 +116,7 @@ class DetectionTask(BaseTask):
if
metrics_choices
==
"default"
:
if
metrics_choices
==
"default"
:
metrics_choices
=
[
"ap"
]
metrics_choices
=
[
"ap"
]
main_program
=
feature
[
0
].
block
.
program
main_program
=
feature
[
0
].
block
.
program
if
feature
else
None
super
(
DetectionTask
,
self
).
__init__
(
super
(
DetectionTask
,
self
).
__init__
(
data_reader
=
data_reader
,
data_reader
=
data_reader
,
main_program
=
main_program
,
main_program
=
main_program
,
...
...
paddlehub/finetune/task/faster_rcnn_task.py
浏览文件 @
77443f64
...
@@ -28,12 +28,12 @@ from paddlehub.finetune.task.detection_task import DetectionTask
...
@@ -28,12 +28,12 @@ from paddlehub.finetune.task.detection_task import DetectionTask
class
FasterRCNNTask
(
DetectionTask
):
class
FasterRCNNTask
(
DetectionTask
):
def
__init__
(
self
,
def
__init__
(
self
,
data_reader
,
num_classes
,
num_classes
,
feed_list
,
data_reader
,
feature
,
feature
=
None
,
predict_
feed_list
=
None
,
feed_list
=
None
,
predict_feature
=
None
,
predict_feature
=
None
,
predict_feed_list
=
None
,
startup_program
=
None
,
startup_program
=
None
,
config
=
None
,
config
=
None
,
metrics_choices
=
"default"
):
metrics_choices
=
"default"
):
...
...
paddlehub/finetune/task/ssd_task.py
浏览文件 @
77443f64
...
@@ -24,10 +24,10 @@ from paddlehub.finetune.task.detection_task import DetectionTask
...
@@ -24,10 +24,10 @@ from paddlehub.finetune.task.detection_task import DetectionTask
class
SSDTask
(
DetectionTask
):
class
SSDTask
(
DetectionTask
):
def
__init__
(
self
,
def
__init__
(
self
,
data_reader
,
feature
,
num_classes
,
num_classes
,
feed_list
,
feed_list
,
feature
,
data_reader
,
multi_box_head_config
,
multi_box_head_config
,
startup_program
=
None
,
startup_program
=
None
,
config
=
None
,
config
=
None
,
...
...
paddlehub/finetune/task/yolo_task.py
浏览文件 @
77443f64
...
@@ -26,10 +26,10 @@ from paddlehub.finetune.task.detection_task import DetectionTask
...
@@ -26,10 +26,10 @@ from paddlehub.finetune.task.detection_task import DetectionTask
class
YOLOTask
(
DetectionTask
):
class
YOLOTask
(
DetectionTask
):
def
__init__
(
self
,
def
__init__
(
self
,
data_reader
,
feature
,
num_classes
,
num_classes
,
feed_list
,
feed_list
,
feature
,
data_reader
,
startup_program
=
None
,
startup_program
=
None
,
config
=
None
,
config
=
None
,
metrics_choices
=
"default"
):
metrics_choices
=
"default"
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录