Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
60296806
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
1 年多 前同步成功
通知
697
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看板
未验证
提交
60296806
编写于
11月 02, 2021
作者:
G
Guanghua Yu
提交者:
GitHub
11月 02, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix PicoDet export and simOTA (#4431)
上级
599c0d0c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
18 deletion
+6
-18
ppdet/modeling/architectures/picodet.py
ppdet/modeling/architectures/picodet.py
+1
-1
ppdet/modeling/assigners/simota_assigner.py
ppdet/modeling/assigners/simota_assigner.py
+5
-12
ppdet/modeling/heads/simota_head.py
ppdet/modeling/heads/simota_head.py
+0
-5
未找到文件。
ppdet/modeling/architectures/picodet.py
浏览文件 @
60296806
...
...
@@ -64,7 +64,7 @@ class PicoDet(BaseArch):
fpn_feats
=
self
.
neck
(
body_feats
)
head_outs
=
self
.
head
(
fpn_feats
,
self
.
deploy
)
if
self
.
training
or
self
.
deploy
:
return
head_outs
return
head_outs
,
None
else
:
im_shape
=
self
.
inputs
[
'im_shape'
]
scale_factor
=
self
.
inputs
[
'scale_factor'
]
...
...
ppdet/modeling/assigners/simota_assigner.py
浏览文件 @
60296806
...
...
@@ -172,16 +172,11 @@ class SimOTAAssigner(object):
(
num_bboxes
,
),
0
,
dtype
=
paddle
.
int64
).
numpy
()
if
num_gt
==
0
or
num_bboxes
==
0
:
# No ground truth or boxes, return empty assignment
max_overlaps
=
decoded_bboxes
.
new_zeros
((
num_bboxes
,
))
if
num_gt
==
0
:
# No truth, assign everything to background
assigned_gt_inds
[:]
=
0
if
gt_labels
is
None
:
assigned_labels
=
None
else
:
assigned_labels
=
paddle
.
full
(
(
num_bboxes
,
),
-
1
,
dtype
=
paddle
.
int64
)
return
priors
=
priors
.
numpy
()
labels
=
np
.
ones
([
num_bboxes
],
dtype
=
np
.
int64
)
*
self
.
num_classes
label_weights
=
np
.
ones
([
num_bboxes
],
dtype
=
np
.
float32
)
bbox_targets
=
np
.
zeros_like
(
priors
)
return
priors
,
labels
,
label_weights
,
bbox_targets
,
0
valid_mask
,
is_in_boxes_and_center
=
self
.
get_in_gt_and_in_center_info
(
priors
,
gt_bboxes
)
...
...
@@ -238,8 +233,6 @@ class SimOTAAssigner(object):
gt_bboxes
=
gt_bboxes
.
numpy
()
assigned_gt_inds
[
valid_mask
]
=
matched_gt_inds
+
1
assigned_labels
=
np
.
full
((
num_bboxes
,
),
self
.
num_classes
)
assigned_labels
[
valid_mask
]
=
gt_labels
.
squeeze
(
-
1
)[
matched_gt_inds
]
pos_inds
,
neg_inds
,
pos_gt_bboxes
,
pos_assigned_gt_inds
\
=
self
.
get_sample
(
assigned_gt_inds
,
gt_bboxes
)
...
...
ppdet/modeling/heads/simota_head.py
浏览文件 @
60296806
...
...
@@ -127,11 +127,6 @@ class OTAHead(GFLHead):
gt_labels
):
"""Compute targets for priors in a single image.
"""
num_gts
=
gt_labels
.
shape
[
0
]
# No target
if
num_gts
==
0
:
pass
centors
,
labels
,
label_weights
,
bbox_targets
,
pos_num
=
self
.
assigner
(
F
.
sigmoid
(
cls_preds
),
centors
,
decoded_bboxes
,
gt_bboxes
,
gt_labels
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录