Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
dad15b6e
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
dad15b6e
编写于
6月 19, 2018
作者:
Y
Yu Yang
提交者:
GitHub
6月 19, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #11563 from panyx0718/doc
Refine detection_map doc.
上级
4ec9ecae
efcbe272
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
49 addition
and
8 deletion
+49
-8
paddle/fluid/operators/detection_map_op.cc
paddle/fluid/operators/detection_map_op.cc
+6
-6
python/paddle/fluid/layers/detection.py
python/paddle/fluid/layers/detection.py
+43
-2
未找到文件。
paddle/fluid/operators/detection_map_op.cc
浏览文件 @
dad15b6e
...
@@ -175,12 +175,12 @@ class DetectionMAPOpMaker : public framework::OpProtoAndCheckerMaker {
...
@@ -175,12 +175,12 @@ class DetectionMAPOpMaker : public framework::OpProtoAndCheckerMaker {
AddComment
(
R"DOC(
AddComment
(
R"DOC(
Detection mAP evaluate operator.
Detection mAP evaluate operator.
The general steps are as follows. First, calculate the true positive and
The general steps are as follows. First, calculate the true positive and
false positive according to the input of detection and labels, then
false positive according to the input of detection and labels, then
calculate the mAP evaluate value.
calculate the mAP evaluate value.
Supporting '11 point' and 'integral' mAP algorithm. Please get more information
Supporting '11 point' and 'integral' mAP algorithm. Please get more information
from the following articles:
from the following articles:
https://sanchom.wordpress.com/tag/average-precision/
https://sanchom.wordpress.com/tag/average-precision/
https://arxiv.org/abs/1512.02325
https://arxiv.org/abs/1512.02325
)DOC"
);
)DOC"
);
}
}
...
...
python/paddle/fluid/layers/detection.py
浏览文件 @
dad15b6e
...
@@ -16,7 +16,7 @@ All layers just related to the detection neural network.
...
@@ -16,7 +16,7 @@ All layers just related to the detection neural network.
"""
"""
from
layer_function_generator
import
generate_layer_fn
from
layer_function_generator
import
generate_layer_fn
from
layer_function_generator
import
autodoc
from
layer_function_generator
import
autodoc
,
templatedoc
from
..layer_helper
import
LayerHelper
from
..layer_helper
import
LayerHelper
import
tensor
import
tensor
import
nn
import
nn
...
@@ -155,7 +155,7 @@ def detection_output(loc,
...
@@ -155,7 +155,7 @@ def detection_output(loc,
return
nmsed_outs
return
nmsed_outs
@
auto
doc
()
@
template
doc
()
def
detection_map
(
detect_res
,
def
detection_map
(
detect_res
,
label
,
label
,
class_num
,
class_num
,
...
@@ -166,6 +166,47 @@ def detection_map(detect_res,
...
@@ -166,6 +166,47 @@ def detection_map(detect_res,
input_states
=
None
,
input_states
=
None
,
out_states
=
None
,
out_states
=
None
,
ap_version
=
'integral'
):
ap_version
=
'integral'
):
"""
${comment}
Args:
detect_res: ${detect_res_comment}
label: ${label_comment}
class_num: ${class_num_comment}
background_label: ${background_label_comment}
overlap_threshold: ${overlap_threshold_comment}
evaluate_difficult: ${evaluate_difficult_comment}
has_state: ${has_state_comment}
input_states: If not None, It contains 3 elements:
1. pos_count ${pos_count_comment}.
2. true_pos ${true_pos_comment}.
3. false_pos ${false_pos_comment}.
out_states: If not None, it contains 3 elements.
1. accum_pos_count ${accum_pos_count_comment}.
2. accum_true_pos ${accum_true_pos_comment}.
3. accum_false_pos ${accum_false_pos_comment}.
ap_version: ${ap_type_comment}
Returns:
${map_comment}
Examples:
.. code-block:: python
detect_res = fluid.layers.data(
name='detect_res',
shape=[10, 6],
append_batch_size=False,
dtype='float32')
label = fluid.layers.data(
name='label',
shape=[10, 6],
append_batch_size=False,
dtype='float32')
map_out = fluid.layers.detection_map(detect_res, label, 21)
"""
helper
=
LayerHelper
(
"detection_map"
,
**
locals
())
helper
=
LayerHelper
(
"detection_map"
,
**
locals
())
def
__create_var
(
type
):
def
__create_var
(
type
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录