Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
a1ef7df8
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
695
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a1ef7df8
编写于
3月 05, 2019
作者:
J
jerrywgz
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refine code, test=develop
上级
e64921c7
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
23 addition
and
17 deletion
+23
-17
paddle/fluid/API.spec
paddle/fluid/API.spec
+1
-1
paddle/fluid/operators/detection/box_decoder_and_assign_op.cc
...le/fluid/operators/detection/box_decoder_and_assign_op.cc
+12
-7
python/paddle/fluid/layers/detection.py
python/paddle/fluid/layers/detection.py
+10
-9
未找到文件。
paddle/fluid/API.spec
浏览文件 @
a1ef7df8
...
@@ -328,7 +328,7 @@ paddle.fluid.layers.polygon_box_transform (ArgSpec(args=['input', 'name'], varar
...
@@ -328,7 +328,7 @@ paddle.fluid.layers.polygon_box_transform (ArgSpec(args=['input', 'name'], varar
paddle.fluid.layers.yolov3_loss (ArgSpec(args=['x', 'gtbox', 'gtlabel', 'anchors', 'anchor_mask', 'class_num', 'ignore_thresh', 'downsample_ratio', 'name'], varargs=None, keywords=None, defaults=(None,)), ('document', '991e934c3e09abf0edec7c9c978b4691'))
paddle.fluid.layers.yolov3_loss (ArgSpec(args=['x', 'gtbox', 'gtlabel', 'anchors', 'anchor_mask', 'class_num', 'ignore_thresh', 'downsample_ratio', 'name'], varargs=None, keywords=None, defaults=(None,)), ('document', '991e934c3e09abf0edec7c9c978b4691'))
paddle.fluid.layers.box_clip (ArgSpec(args=['input', 'im_info', 'name'], varargs=None, keywords=None, defaults=(None,)), ('document', '397e9e02b451d99c56e20f268fa03f2e'))
paddle.fluid.layers.box_clip (ArgSpec(args=['input', 'im_info', 'name'], varargs=None, keywords=None, defaults=(None,)), ('document', '397e9e02b451d99c56e20f268fa03f2e'))
paddle.fluid.layers.multiclass_nms (ArgSpec(args=['bboxes', 'scores', 'score_threshold', 'nms_top_k', 'keep_top_k', 'nms_threshold', 'normalized', 'nms_eta', 'background_label', 'name'], varargs=None, keywords=None, defaults=(0.3, True, 1.0, 0, None)), ('document', 'ca7d1107b6c5d2d6d8221039a220fde0'))
paddle.fluid.layers.multiclass_nms (ArgSpec(args=['bboxes', 'scores', 'score_threshold', 'nms_top_k', 'keep_top_k', 'nms_threshold', 'normalized', 'nms_eta', 'background_label', 'name'], varargs=None, keywords=None, defaults=(0.3, True, 1.0, 0, None)), ('document', 'ca7d1107b6c5d2d6d8221039a220fde0'))
paddle.fluid.layers.box_decoder_and_assign (ArgSpec(args=['prior_box', 'prior_box_var', 'target_box', 'box_score', 'box_clip'], varargs=None, keywords=None, defaults=None), ('document', '
74cd80dc1bc4e0d92021babd7852d0e5
'))
paddle.fluid.layers.box_decoder_and_assign (ArgSpec(args=['prior_box', 'prior_box_var', 'target_box', 'box_score', 'box_clip'], varargs=None, keywords=None, defaults=None), ('document', '
e6daa972b52c6050d95bfaaee7b5289e
'))
paddle.fluid.layers.accuracy (ArgSpec(args=['input', 'label', 'k', 'correct', 'total'], varargs=None, keywords=None, defaults=(1, None, None)), ('document', '9808534c12c5e739a10f73ebb0b4eafd'))
paddle.fluid.layers.accuracy (ArgSpec(args=['input', 'label', 'k', 'correct', 'total'], varargs=None, keywords=None, defaults=(1, None, None)), ('document', '9808534c12c5e739a10f73ebb0b4eafd'))
paddle.fluid.layers.auc (ArgSpec(args=['input', 'label', 'curve', 'num_thresholds', 'topk', 'slide_steps'], varargs=None, keywords=None, defaults=('ROC', 4095, 1, 1)), ('document', 'e0e95334fce92d16c2d9db6e7caffc47'))
paddle.fluid.layers.auc (ArgSpec(args=['input', 'label', 'curve', 'num_thresholds', 'topk', 'slide_steps'], varargs=None, keywords=None, defaults=('ROC', 4095, 1, 1)), ('document', 'e0e95334fce92d16c2d9db6e7caffc47'))
paddle.fluid.layers.exponential_decay (ArgSpec(args=['learning_rate', 'decay_steps', 'decay_rate', 'staircase'], varargs=None, keywords=None, defaults=(False,)), ('document', '98a5050bee8522fcea81aa795adaba51'))
paddle.fluid.layers.exponential_decay (ArgSpec(args=['learning_rate', 'decay_steps', 'decay_rate', 'staircase'], varargs=None, keywords=None, defaults=(False,)), ('document', '98a5050bee8522fcea81aa795adaba51'))
...
...
paddle/fluid/operators/detection/box_decoder_and_assign_op.cc
浏览文件 @
a1ef7df8
...
@@ -134,13 +134,18 @@ Decode the target bounding box with the priorbox information.
...
@@ -134,13 +134,18 @@ Decode the target bounding box with the priorbox information.
The Decoding schema described below:
The Decoding schema described below:
ox = (pw * pxv * tx * + px) - tw / 2
$$
oy = (ph \\times pyv \\times ty + py) - \\frac{th}{2}
oy = (ph * pyv * ty * + py) - th / 2
$$
$$
ow = exp(pwv * tw) * pw + tw / 2
oy = (ph \\times pyv \\times ty + py) - \\frac{th}{2}
$$
oh = exp(phv * th) * ph + th / 2
$$
ow = \\exp (pwv \\times tw) \\times pw + \\frac{tw}{2}
$$
$$
oh = \\exp (phv \\times th) \\times ph + \\frac{th}{2}
$$
where `tx`, `ty`, `tw`, `th` denote the target box's center coordinates, width
where `tx`, `ty`, `tw`, `th` denote the target box's center coordinates, width
and height respectively. Similarly, `px`, `py`, `pw`, `ph` denote the
and height respectively. Similarly, `px`, `py`, `pw`, `ph` denote the
...
...
python/paddle/fluid/layers/detection.py
浏览文件 @
a1ef7df8
...
@@ -2240,15 +2240,16 @@ def box_decoder_and_assign(prior_box, prior_box_var, target_box, box_score,
...
@@ -2240,15 +2240,16 @@ def box_decoder_and_assign(prior_box, prior_box_var, target_box, box_score,
Examples:
Examples:
.. code-block:: python
.. code-block:: python
pb = fluid.layers.data(name='prior_box', shape=[20, 4],
pb = fluid.layers.data(
dtype='float32')
name='prior_box', shape=[20, 4], dtype='float32')
pbv = fluid.layers.data(name='prior_box_var', shape=[1, 4],
pbv = fluid.layers.data(
dtype='float32')
name='prior_box_var', shape=[1, 4], dtype='float32')
loc = fluid.layers.data(name='target_box', shape=[20, 4*81],
loc = fluid.layers.data(
dtype='float32')
name='target_box', shape=[20, 4*81], dtype='float32')
scores = fluid.layers.data(name='scores', shape=[20, 81],
scores = fluid.layers.data(
dtype='float32')
name='scores', shape=[20, 81], dtype='float32')
output_box, output_assign_box = fluid.layers.box_decoder_and_assign(pb, pbv, loc, scores, 4.135)
output_box, assign_box = fluid.layers.box_decoder_and_assign(
pb, pbv, loc, scores, 4.135)
"""
"""
helper
=
LayerHelper
(
"box_decoder_and_assign"
,
**
locals
())
helper
=
LayerHelper
(
"box_decoder_and_assign"
,
**
locals
())
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录