Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
162c9537
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看板
未验证
提交
162c9537
编写于
11月 22, 2021
作者:
W
wangxinxin08
提交者:
GitHub
11月 22, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
polish and fix some code (#4644)
上级
46c7a1dc
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
7 addition
and
9 deletion
+7
-9
configs/dota/s2anet_1x_spine.yml
configs/dota/s2anet_1x_spine.yml
+0
-1
configs/dota/s2anet_conv_2x_dota.yml
configs/dota/s2anet_conv_2x_dota.yml
+1
-0
ppdet/ext_op/rbox_iou_op.cc
ppdet/ext_op/rbox_iou_op.cc
+1
-2
ppdet/ext_op/rbox_iou_op.cu
ppdet/ext_op/rbox_iou_op.cu
+1
-2
ppdet/modeling/bbox_utils.py
ppdet/modeling/bbox_utils.py
+4
-4
未找到文件。
configs/dota/s2anet_1x_spine.yml
浏览文件 @
162c9537
...
...
@@ -27,4 +27,3 @@ S2ANetHead:
reg_loss_weight
:
[
1.0
,
1.0
,
1.0
,
1.0
,
1.05
]
cls_loss_weight
:
[
1.05
,
1.0
]
reg_loss_type
:
'
l1'
is_training
:
True
configs/dota/s2anet_conv_2x_dota.yml
浏览文件 @
162c9537
...
...
@@ -6,6 +6,7 @@ _BASE_: [
'
_base_/s2anet_reader.yml'
,
]
weights
:
output/s2anet_conv_1x_dota/model_final
pretrain_weights
:
https://paddledet.bj.bcebos.com/models/pretrained/ResNet50_cos_pretrained.pdparams
ResNet
:
depth
:
50
...
...
ppdet/ext_op/rbox_iou_op.cc
浏览文件 @
162c9537
...
...
@@ -45,8 +45,7 @@ std::vector<paddle::Tensor> RboxIouCPUForward(const paddle::Tensor& rbox1, const
auto
rbox1_num
=
rbox1
.
shape
()[
0
];
auto
rbox2_num
=
rbox2
.
shape
()[
0
];
auto
output
=
paddle
::
Tensor
(
paddle
::
PlaceType
::
kCPU
);
output
.
reshape
({
rbox1_num
,
rbox2_num
});
auto
output
=
paddle
::
Tensor
(
paddle
::
PlaceType
::
kCPU
,
{
rbox1_num
,
rbox2_num
});
PD_DISPATCH_FLOATING_TYPES
(
rbox1
.
type
(),
...
...
ppdet/ext_op/rbox_iou_op.cu
浏览文件 @
162c9537
...
...
@@ -94,8 +94,7 @@ std::vector<paddle::Tensor> RboxIouCUDAForward(const paddle::Tensor& rbox1, cons
auto
rbox1_num
=
rbox1
.
shape
()[
0
];
auto
rbox2_num
=
rbox2
.
shape
()[
0
];
auto
output
=
paddle
::
Tensor
(
paddle
::
PlaceType
::
kGPU
);
output
.
reshape
({
rbox1_num
,
rbox2_num
});
auto
output
=
paddle
::
Tensor
(
paddle
::
PlaceType
::
kGPU
,
{
rbox1_num
,
rbox2_num
});
const
int
blocks_x
=
CeilDiv
(
rbox1_num
,
BLOCK_DIM_X
);
const
int
blocks_y
=
CeilDiv
(
rbox2_num
,
BLOCK_DIM_Y
);
...
...
ppdet/modeling/bbox_utils.py
浏览文件 @
162c9537
...
...
@@ -529,18 +529,18 @@ def poly2rbox(polys):
rbox_angle
=
0
if
edge1
>
edge2
:
rbox_angle
=
np
.
arctan2
(
np
.
float
(
pt2
[
1
]
-
pt1
[
1
]),
np
.
float
(
pt2
[
0
]
-
pt1
[
0
]))
float
(
pt2
[
1
]
-
pt1
[
1
]),
float
(
pt2
[
0
]
-
pt1
[
0
]))
elif
edge2
>=
edge1
:
rbox_angle
=
np
.
arctan2
(
np
.
float
(
pt4
[
1
]
-
pt1
[
1
]),
np
.
float
(
pt4
[
0
]
-
pt1
[
0
]))
float
(
pt4
[
1
]
-
pt1
[
1
]),
float
(
pt4
[
0
]
-
pt1
[
0
]))
def
norm_angle
(
angle
,
range
=
[
-
np
.
pi
/
4
,
np
.
pi
]):
return
(
angle
-
range
[
0
])
%
range
[
1
]
+
range
[
0
]
rbox_angle
=
norm_angle
(
rbox_angle
)
x_ctr
=
np
.
float
(
pt1
[
0
]
+
pt3
[
0
])
/
2
y_ctr
=
np
.
float
(
pt1
[
1
]
+
pt3
[
1
])
/
2
x_ctr
=
float
(
pt1
[
0
]
+
pt3
[
0
])
/
2
y_ctr
=
float
(
pt1
[
1
]
+
pt3
[
1
])
/
2
rotated_box
=
np
.
array
([
x_ctr
,
y_ctr
,
width
,
height
,
rbox_angle
])
rotated_boxes
.
append
(
rotated_box
)
ret_rotated_boxes
=
np
.
array
(
rotated_boxes
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录