Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
b5c534c2
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看板
未验证
提交
b5c534c2
编写于
11月 21, 2021
作者:
Z
zhoujun
提交者:
GitHub
11月 21, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add Lightweight backbone of centernet (#4586)
上级
b1c36d9c
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
133 addition
and
13 deletion
+133
-13
configs/centernet/README_cn.md
configs/centernet/README_cn.md
+5
-1
configs/centernet/centernet_ghostnet_1_3x_140e_coco.yml
configs/centernet/centernet_ghostnet_1_3x_140e_coco.yml
+20
-0
configs/centernet/centernet_lcnet_1x_140e_coco.yml
configs/centernet/centernet_lcnet_1x_140e_coco.yml
+18
-0
configs/centernet/centernet_mbv1_1x_140e_coco.yml
configs/centernet/centernet_mbv1_1x_140e_coco.yml
+21
-0
configs/centernet/centernet_mbv3_large_1x_140e_coco.yml
configs/centernet/centernet_mbv3_large_1x_140e_coco.yml
+22
-0
configs/centernet/centernet_shufflenetv2_1x_140e_coco.yml
configs/centernet/centernet_shufflenetv2_1x_140e_coco.yml
+33
-0
deploy/python/keypoint_preprocess.py
deploy/python/keypoint_preprocess.py
+2
-2
ppdet/modeling/backbones/mobilenet_v1.py
ppdet/modeling/backbones/mobilenet_v1.py
+10
-10
ppdet/modeling/necks/centernet_fpn.py
ppdet/modeling/necks/centernet_fpn.py
+2
-0
未找到文件。
configs/centernet/README_cn.md
浏览文件 @
b5c534c2
...
...
@@ -20,7 +20,11 @@
| DLA-34(paper) | 512x512 | 37.4 | - | - | - |
| DLA-34 | 512x512 | 37.6 | - |
[
下载链接
](
https://bj.bcebos.com/v1/paddledet/models/centernet_dla34_140e_coco.pdparams
)
|
[
配置文件
](
https://github.com/PaddlePaddle/PaddleDetection/tree/develop/configs/centernet/centernet_dla34_140e_coco.yml
)
|
| ResNet50 + DLAUp | 512x512 | 38.9 | - |
[
下载链接
](
https://bj.bcebos.com/v1/paddledet/models/centernet_r50_140e_coco.pdparams
)
|
[
配置文件
](
https://github.com/PaddlePaddle/PaddleDetection/tree/develop/configs/centernet/centernet_r50_140e_coco.yml
)
|
| GhostNet_x1_3 + DLAUp | 512x512 | 28.9 | - |
[
下载链接
](
https://paddledet.bj.bcebos.com/models/centernet_ghostnet_1_3x_140e_coco.pdparams
)
|
[
配置文件
](
https://github.com/PaddlePaddle/PaddleDetection/tree/develop/configs/centernet/centernet_ghostnet_1_3x_140e_coco.yml
)
|
| PP-LCNet_x1_0 + DLAUp | 512x512 | 26.9 | - |
[
下载链接
](
https://paddledet.bj.bcebos.com/models/centernet_lcnet_1x_140e_coco.pdparams
)
|
[
配置文件
](
https://github.com/PaddlePaddle/PaddleDetection/tree/develop/configs/centernet/centernet_lcnet_1x_140e_coco.yml
)
|
| MobileNetV1_1x + DLAUp | 512x512 | 28.2 | - |
[
下载链接
](
https://paddledet.bj.bcebos.com/models/centernet_mbv1_1x_140e_coco.pdparams
)
|
[
配置文件
](
https://github.com/PaddlePaddle/PaddleDetection/tree/develop/configs/centernet/centernet_mbv1_1x_140e_coco.yml
)
|
| MobileNetV3_large_x1_0 + DLAUp | 512x512 | 27.1 | - |
[
下载链接
](
https://paddledet.bj.bcebos.com/models/centernet_mbv3_large_1x_140e_coco.pdparams
)
|
[
配置文件
](
https://github.com/PaddlePaddle/PaddleDetection/tree/develop/configs/centernet/centernet_mbv3_large_1x_140e_coco.yml
)
|
| ShuffleNetV2_x1_0 + DLAUp | 512x512 | 23.8 | - |
[
下载链接
](
https://paddledet.bj.bcebos.com/models/centernet_shufflenetv2_1x_140e_coco.pdparams
)
|
[
配置文件
](
https://github.com/PaddlePaddle/PaddleDetection/tree/develop/configs/centernet/centernet_shufflenetv2_1x_140e_coco.yml
)
|
## 引用
```
...
...
configs/centernet/centernet_ghostnet_1_3x_140e_coco.yml
0 → 100644
浏览文件 @
b5c534c2
_BASE_
:
[
'
centernet_r50_140e_coco.yml'
]
pretrain_weights
:
https://paddledet.bj.bcebos.com/models/pretrained/GhostNet_x1_3_ssld_pretrained.pdparams
weights
:
output/centernet_ghostnet_1_3x_140e_coco/model_final
CenterNet
:
backbone
:
GhostNet
neck
:
CenterNetDLAFPN
head
:
CenterNetHead
post_process
:
CenterNetPostProcess
GhostNet
:
scale
:
1.3
conv_decay
:
0.00004
feature_maps
:
[
4
,
6
,
12
,
17
]
TrainReader
:
batch_size
:
32
\ No newline at end of file
configs/centernet/centernet_lcnet_1x_140e_coco.yml
0 → 100644
浏览文件 @
b5c534c2
_BASE_
:
[
'
centernet_r50_140e_coco.yml'
]
pretrain_weights
:
https://paddledet.bj.bcebos.com/models/pretrained/LCNet_x1_0_pretrained.pdparams
weights
:
output/centernet_lcnet_1x_140e_coco/model_final
CenterNet
:
backbone
:
LCNet
neck
:
CenterNetDLAFPN
head
:
CenterNetHead
post_process
:
CenterNetPostProcess
LCNet
:
scale
:
1.0
feature_maps
:
[
2
,
3
,
4
,
5
]
TrainReader
:
batch_size
:
32
\ No newline at end of file
configs/centernet/centernet_mbv1_1x_140e_coco.yml
0 → 100644
浏览文件 @
b5c534c2
_BASE_
:
[
'
centernet_r50_140e_coco.yml'
]
pretrain_weights
:
https://paddledet.bj.bcebos.com/models/pretrained/MobileNetV1_pretrained.pdparams
weights
:
output/centernet_mbv1_1x_140e_coco/model_final
CenterNet
:
backbone
:
MobileNet
neck
:
CenterNetDLAFPN
head
:
CenterNetHead
post_process
:
CenterNetPostProcess
MobileNet
:
scale
:
1.
with_extra_blocks
:
false
extra_block_filters
:
[]
feature_maps
:
[
3
,
5
,
11
,
13
]
TrainReader
:
batch_size
:
32
\ No newline at end of file
configs/centernet/centernet_mbv3_large_1x_140e_coco.yml
0 → 100644
浏览文件 @
b5c534c2
_BASE_
:
[
'
centernet_r50_140e_coco.yml'
]
pretrain_weights
:
https://paddledet.bj.bcebos.com/models/pretrained/MobileNetV3_large_x1_0_ssld_pretrained.pdparams
weights
:
output/centernet_mbv3_large_1x_140e_coco/model_final
CenterNet
:
backbone
:
MobileNetV3
neck
:
CenterNetDLAFPN
head
:
CenterNetHead
post_process
:
CenterNetPostProcess
MobileNetV3
:
model_name
:
large
scale
:
1.
with_extra_blocks
:
false
extra_block_filters
:
[]
feature_maps
:
[
4
,
7
,
13
,
16
]
TrainReader
:
batch_size
:
32
\ No newline at end of file
configs/centernet/centernet_shufflenetv2_1x_140e_coco.yml
0 → 100644
浏览文件 @
b5c534c2
_BASE_
:
[
'
centernet_r50_140e_coco.yml'
]
pretrain_weights
:
https://paddledet.bj.bcebos.com/models/pretrained/ShuffleNetV2_x1_0_pretrained.pdparams
weights
:
output/centernet_shufflenetv2_1x_140e_coco/model_final
CenterNet
:
backbone
:
ShuffleNetV2
neck
:
CenterNetDLAFPN
head
:
CenterNetHead
post_process
:
CenterNetPostProcess
ShuffleNetV2
:
scale
:
1.0
feature_maps
:
[
5
,
13
,
17
]
act
:
leaky_relu
CenterNetDLAFPN
:
first_level
:
0
last_level
:
3
down_ratio
:
8
dcn_v2
:
False
TrainReader
:
batch_size
:
32
TestReader
:
sample_transforms
:
-
Decode
:
{}
-
WarpAffine
:
{
keep_res
:
False
,
input_h
:
512
,
input_w
:
512
}
-
NormalizeImage
:
{
mean
:
[
0.40789655
,
0.44719303
,
0.47026116
],
std
:
[
0.2886383
,
0.27408165
,
0.27809834
]}
-
Permute
:
{}
\ No newline at end of file
deploy/python/keypoint_preprocess.py
浏览文件 @
b5c534c2
...
...
@@ -77,10 +77,10 @@ def get_affine_transform(center,
np.ndarray: The transform matrix.
"""
assert
len
(
center
)
==
2
assert
len
(
input_size
)
==
2
assert
len
(
output_size
)
==
2
assert
len
(
shift
)
==
2
if
not
isinstance
(
input_size
,
(
np
.
ndarray
,
list
)):
input_size
=
np
.
array
([
input_size
,
input_size
],
dtype
=
np
.
float32
)
scale_tmp
=
input_size
shift
=
np
.
array
(
shift
)
...
...
ppdet/modeling/backbones/mobilenet_v1.py
浏览文件 @
b5c534c2
...
...
@@ -226,7 +226,7 @@ class MobileNet(nn.Layer):
norm_type
=
norm_type
,
name
=
"conv2_1"
))
self
.
dwsl
.
append
(
dws21
)
self
.
_update_out_channels
(
64
,
len
(
self
.
dwsl
),
feature_maps
)
self
.
_update_out_channels
(
int
(
64
*
scale
)
,
len
(
self
.
dwsl
),
feature_maps
)
dws22
=
self
.
add_sublayer
(
"conv2_2"
,
sublayer
=
DepthwiseSeparable
(
...
...
@@ -242,7 +242,7 @@ class MobileNet(nn.Layer):
norm_type
=
norm_type
,
name
=
"conv2_2"
))
self
.
dwsl
.
append
(
dws22
)
self
.
_update_out_channels
(
128
,
len
(
self
.
dwsl
),
feature_maps
)
self
.
_update_out_channels
(
int
(
128
*
scale
)
,
len
(
self
.
dwsl
),
feature_maps
)
# 1/4
dws31
=
self
.
add_sublayer
(
"conv3_1"
,
...
...
@@ -259,7 +259,7 @@ class MobileNet(nn.Layer):
norm_type
=
norm_type
,
name
=
"conv3_1"
))
self
.
dwsl
.
append
(
dws31
)
self
.
_update_out_channels
(
128
,
len
(
self
.
dwsl
),
feature_maps
)
self
.
_update_out_channels
(
int
(
128
*
scale
)
,
len
(
self
.
dwsl
),
feature_maps
)
dws32
=
self
.
add_sublayer
(
"conv3_2"
,
sublayer
=
DepthwiseSeparable
(
...
...
@@ -275,7 +275,7 @@ class MobileNet(nn.Layer):
norm_type
=
norm_type
,
name
=
"conv3_2"
))
self
.
dwsl
.
append
(
dws32
)
self
.
_update_out_channels
(
256
,
len
(
self
.
dwsl
),
feature_maps
)
self
.
_update_out_channels
(
int
(
256
*
scale
)
,
len
(
self
.
dwsl
),
feature_maps
)
# 1/8
dws41
=
self
.
add_sublayer
(
"conv4_1"
,
...
...
@@ -292,7 +292,7 @@ class MobileNet(nn.Layer):
norm_type
=
norm_type
,
name
=
"conv4_1"
))
self
.
dwsl
.
append
(
dws41
)
self
.
_update_out_channels
(
256
,
len
(
self
.
dwsl
),
feature_maps
)
self
.
_update_out_channels
(
int
(
256
*
scale
)
,
len
(
self
.
dwsl
),
feature_maps
)
dws42
=
self
.
add_sublayer
(
"conv4_2"
,
sublayer
=
DepthwiseSeparable
(
...
...
@@ -308,13 +308,13 @@ class MobileNet(nn.Layer):
norm_type
=
norm_type
,
name
=
"conv4_2"
))
self
.
dwsl
.
append
(
dws42
)
self
.
_update_out_channels
(
512
,
len
(
self
.
dwsl
),
feature_maps
)
self
.
_update_out_channels
(
int
(
512
*
scale
)
,
len
(
self
.
dwsl
),
feature_maps
)
# 1/16
for
i
in
range
(
5
):
tmp
=
self
.
add_sublayer
(
"conv5_"
+
str
(
i
+
1
),
sublayer
=
DepthwiseSeparable
(
in_channels
=
512
,
in_channels
=
int
(
512
*
scale
)
,
out_channels1
=
512
,
out_channels2
=
512
,
num_groups
=
512
,
...
...
@@ -326,7 +326,7 @@ class MobileNet(nn.Layer):
norm_type
=
norm_type
,
name
=
"conv5_"
+
str
(
i
+
1
)))
self
.
dwsl
.
append
(
tmp
)
self
.
_update_out_channels
(
512
,
len
(
self
.
dwsl
),
feature_maps
)
self
.
_update_out_channels
(
int
(
512
*
scale
)
,
len
(
self
.
dwsl
),
feature_maps
)
dws56
=
self
.
add_sublayer
(
"conv5_6"
,
sublayer
=
DepthwiseSeparable
(
...
...
@@ -342,7 +342,7 @@ class MobileNet(nn.Layer):
norm_type
=
norm_type
,
name
=
"conv5_6"
))
self
.
dwsl
.
append
(
dws56
)
self
.
_update_out_channels
(
1024
,
len
(
self
.
dwsl
),
feature_maps
)
self
.
_update_out_channels
(
int
(
1024
*
scale
)
,
len
(
self
.
dwsl
),
feature_maps
)
# 1/32
dws6
=
self
.
add_sublayer
(
"conv6"
,
...
...
@@ -359,7 +359,7 @@ class MobileNet(nn.Layer):
norm_type
=
norm_type
,
name
=
"conv6"
))
self
.
dwsl
.
append
(
dws6
)
self
.
_update_out_channels
(
1024
,
len
(
self
.
dwsl
),
feature_maps
)
self
.
_update_out_channels
(
int
(
1024
*
scale
)
,
len
(
self
.
dwsl
),
feature_maps
)
if
self
.
with_extra_blocks
:
self
.
extra_blocks
=
[]
...
...
ppdet/modeling/necks/centernet_fpn.py
浏览文件 @
b5c534c2
...
...
@@ -270,6 +270,8 @@ class CenterNetDLAFPN(nn.Layer):
feat
=
ida_up_feats
[
-
1
]
if
self
.
with_sge
:
feat
=
self
.
sge_attention
(
feat
)
if
self
.
down_ratio
!=
4
:
feat
=
F
.
interpolate
(
feat
,
scale_factor
=
self
.
down_ratio
//
4
,
mode
=
"bilinear"
,
align_corners
=
True
)
return
feat
@
property
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录