Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
8c2af365
P
PaddleDetection
项目概览
s920243400
/
PaddleDetection
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleDetection
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
8c2af365
编写于
12月 02, 2022
作者:
H
huangjun12
提交者:
GitHub
12月 02, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
only compute vlr region when distill (#7437)
上级
52645f8d
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
5 deletion
+16
-5
configs/slim/distill/gfl_ld_distill.yml
configs/slim/distill/gfl_ld_distill.yml
+8
-0
ppdet/data/transform/batch_operators.py
ppdet/data/transform/batch_operators.py
+8
-5
未找到文件。
configs/slim/distill/gfl_ld_distill.yml
浏览文件 @
8c2af365
...
@@ -15,3 +15,11 @@ ResNet:
...
@@ -15,3 +15,11 @@ ResNet:
freeze_at
:
0
freeze_at
:
0
return_idx
:
[
1
,
2
,
3
]
return_idx
:
[
1
,
2
,
3
]
num_stages
:
4
num_stages
:
4
TrainReader
:
batch_transforms
:
-
PadBatch
:
{
pad_to_stride
:
32
}
-
Gt2GFLTarget
:
downsample_ratios
:
[
8
,
16
,
32
,
64
,
128
]
grid_cell_scale
:
8
compute_vlr_region
:
True
\ No newline at end of file
ppdet/data/transform/batch_operators.py
浏览文件 @
8c2af365
...
@@ -500,12 +500,14 @@ class Gt2GFLTarget(BaseOperator):
...
@@ -500,12 +500,14 @@ class Gt2GFLTarget(BaseOperator):
num_classes
=
80
,
num_classes
=
80
,
downsample_ratios
=
[
8
,
16
,
32
,
64
,
128
],
downsample_ratios
=
[
8
,
16
,
32
,
64
,
128
],
grid_cell_scale
=
4
,
grid_cell_scale
=
4
,
cell_offset
=
0
):
cell_offset
=
0
,
compute_vlr_region
=
False
):
super
(
Gt2GFLTarget
,
self
).
__init__
()
super
(
Gt2GFLTarget
,
self
).
__init__
()
self
.
num_classes
=
num_classes
self
.
num_classes
=
num_classes
self
.
downsample_ratios
=
downsample_ratios
self
.
downsample_ratios
=
downsample_ratios
self
.
grid_cell_scale
=
grid_cell_scale
self
.
grid_cell_scale
=
grid_cell_scale
self
.
cell_offset
=
cell_offset
self
.
cell_offset
=
cell_offset
self
.
compute_vlr_region
=
compute_vlr_region
self
.
assigner
=
ATSSAssigner
()
self
.
assigner
=
ATSSAssigner
()
...
@@ -585,9 +587,11 @@ class Gt2GFLTarget(BaseOperator):
...
@@ -585,9 +587,11 @@ class Gt2GFLTarget(BaseOperator):
gt_bboxes
,
gt_bboxes_ignore
,
gt_bboxes
,
gt_bboxes_ignore
,
gt_labels
)
gt_labels
)
vlr_region
=
self
.
assigner
.
get_vlr_region
(
if
self
.
compute_vlr_region
:
grid_cells
,
num_level_cells
,
gt_bboxes
,
gt_bboxes_ignore
,
vlr_region
=
self
.
assigner
.
get_vlr_region
(
gt_labels
)
grid_cells
,
num_level_cells
,
gt_bboxes
,
gt_bboxes_ignore
,
gt_labels
)
sample
[
'vlr_regions'
]
=
vlr_region
pos_inds
,
neg_inds
,
pos_gt_bboxes
,
pos_assigned_gt_inds
=
self
.
get_sample
(
pos_inds
,
neg_inds
,
pos_gt_bboxes
,
pos_assigned_gt_inds
=
self
.
get_sample
(
assign_gt_inds
,
gt_bboxes
)
assign_gt_inds
,
gt_bboxes
)
...
@@ -615,7 +619,6 @@ class Gt2GFLTarget(BaseOperator):
...
@@ -615,7 +619,6 @@ class Gt2GFLTarget(BaseOperator):
sample
[
'label_weights'
]
=
label_weights
sample
[
'label_weights'
]
=
label_weights
sample
[
'bbox_targets'
]
=
bbox_targets
sample
[
'bbox_targets'
]
=
bbox_targets
sample
[
'pos_num'
]
=
max
(
pos_inds
.
size
,
1
)
sample
[
'pos_num'
]
=
max
(
pos_inds
.
size
,
1
)
sample
[
'vlr_regions'
]
=
vlr_region
sample
.
pop
(
'is_crowd'
,
None
)
sample
.
pop
(
'is_crowd'
,
None
)
sample
.
pop
(
'difficult'
,
None
)
sample
.
pop
(
'difficult'
,
None
)
sample
.
pop
(
'gt_class'
,
None
)
sample
.
pop
(
'gt_class'
,
None
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录