Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
099d1276
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
099d1276
编写于
8月 04, 2021
作者:
C
cnn
提交者:
GitHub
8月 04, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[cherry-pick] update document and config (#3880)
* updata document, test=document_fix
上级
6b54ae80
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
18 addition
and
32 deletion
+18
-32
configs/dota/README.md
configs/dota/README.md
+12
-19
configs/dota/_base_/s2anet_optimizer_1x.yml
configs/dota/_base_/s2anet_optimizer_1x.yml
+1
-1
configs/dota/_base_/s2anet_optimizer_2x.yml
configs/dota/_base_/s2anet_optimizer_2x.yml
+1
-1
configs/dota/s2anet_1x_spine.yml
configs/dota/s2anet_1x_spine.yml
+2
-2
configs/dota/s2anet_conv_2x_dota.yml
configs/dota/s2anet_conv_2x_dota.yml
+2
-9
未找到文件。
configs/dota/README.md
浏览文件 @
099d1276
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
## 简介
## 简介
[
S2ANet
](
https://arxiv.org/pdf/2008.09397.pdf
)
是用于检测旋转框的模型,要求使用PaddlePaddle 2.
0.1(可使用pip安装)及以上版本
[
S2ANet
](
https://arxiv.org/pdf/2008.09397.pdf
)
是用于检测旋转框的模型,要求使用PaddlePaddle 2.
1.1(可使用pip安装) 或适当的
[
develop版本
](
https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/install/Tables.html#whl-release
)
。
## 准备数据
## 准备数据
...
@@ -53,11 +53,11 @@ DOTA数据集中总共有2806张图像,其中1411张图像作为训练集,45
...
@@ -53,11 +53,11 @@ DOTA数据集中总共有2806张图像,其中1411张图像作为训练集,45
-
PaddlePaddle >= 2.1.1
-
PaddlePaddle >= 2.1.1
-
GCC == 8.2
-
GCC == 8.2
推荐使用docker镜像
[
paddle:2.
0.1-gpu-cuda10.1-cudnn7
](
registry.baidubce.com/paddlepaddle/paddle:2.1.1-gpu-cuda10.2
-cudnn7
)
。
推荐使用docker镜像
[
paddle:2.
1.1-gpu-cuda10.1-cudnn7
](
registry.baidubce.com/paddlepaddle/paddle:2.1.1-gpu-cuda10.1
-cudnn7
)
。
执行如下命令下载镜像并启动容器:
执行如下命令下载镜像并启动容器:
```
```
sudo nvidia-docker run -it --name paddle_s2anet -v $PWD:/paddle --network=host registry.baidubce.com/paddlepaddle/paddle:2.1.1-gpu-cuda10.
2
-cudnn7 /bin/bash
sudo nvidia-docker run -it --name paddle_s2anet -v $PWD:/paddle --network=host registry.baidubce.com/paddlepaddle/paddle:2.1.1-gpu-cuda10.
1
-cudnn7 /bin/bash
```
```
镜像中paddle已安装好,进入python3.7,执行如下代码检查paddle安装是否正常:
镜像中paddle已安装好,进入python3.7,执行如下代码检查paddle安装是否正常:
...
@@ -90,15 +90,7 @@ python3.7 test.py
...
@@ -90,15 +90,7 @@ python3.7 test.py
### 2. 训练
### 2. 训练
**注意:**
**注意:**
配置文件中学习率是按照4卡GPU训练设置的,如果使用单卡GPU训练,请将学习率设置为原来的1/4。
配置文件中学习率是按照8卡GPU训练设置的,如果使用单卡GPU训练,请将学习率设置为原来的1/8。
准备数据
```
bash
cd
dataset/spine_coco
wget https://paddledet.bj.bcebos.com/data/spine_coco.tar
tar
-xvf
spine_coco.tar
cd
../../
```
GPU单卡训练
GPU单卡训练
```
bash
```
bash
...
@@ -108,25 +100,26 @@ python3.7 tools/train.py -c configs/dota/s2anet_1x_spine.yml
...
@@ -108,25 +100,26 @@ python3.7 tools/train.py -c configs/dota/s2anet_1x_spine.yml
GPU多卡训练
GPU多卡训练
```
bash
```
bash
export
CUDA_VISIBLE_DEVICES
=
0,1,2,3
export
CUDA_VISIBLE_DEVICES
=
0,1,2,3
,4,5,6,7
python3.7
-m
paddle.distributed.launch
--gpus
0,1,2,3 tools/train.py
-c
configs/dota/s2anet_1x_spine.yml
python3.7
-m
paddle.distributed.launch
--gpus
0,1,2,3
,4,5,6,7
tools/train.py
-c
configs/dota/s2anet_1x_spine.yml
```
```
可以通过
`--eval`
开启边训练边测试。
可以通过
`--eval`
开启边训练边测试。
###
2
. 评估
###
3
. 评估
```
bash
```
bash
python3.7 tools/eval.py
-c
configs/dota/s2anet_1x_spine.yml
-o
weights
=
output/s2anet_1x_spine/model_final.pdparams
python3.7 tools/eval.py
-c
configs/dota/s2anet_1x_spine.yml
-o
weights
=
output/s2anet_1x_spine/model_final.pdparams
```
```
** 注意:**
dota数据集中是train和val数据作为训练集一起训练的,对dota数据集进行评估时需要自定义设置评估数据集配置。
###
3
. 预测
###
4
. 预测
执行如下命令,会将图像预测结果保存到
`output
_dir
`
文件夹下。
执行如下命令,会将图像预测结果保存到
`output`
文件夹下。
```
bash
```
bash
python3.7 tools/infer.py
-c
configs/dota/s2anet_1x_spine.yml
-o
weights
=
output/s2anet_1x_spine/model_final.pdparams
--infer_img
=
demo/39006.jpg
python3.7 tools/infer.py
-c
configs/dota/s2anet_1x_spine.yml
-o
weights
=
output/s2anet_1x_spine/model_final.pdparams
--infer_img
=
demo/39006.jpg
```
```
###
4
. DOTA数据评估
###
5
. DOTA数据评估
执行如下命令,会在
`output
_dir
`
文件夹下将每个图像预测结果保存到同文件夹名的txt文本中。
执行如下命令,会在
`output`
文件夹下将每个图像预测结果保存到同文件夹名的txt文本中。
```
```
python3.7 tools/infer.py -c configs/dota/s2anet_1x_dota.yml -o weights=./weights/s2anet_1x_dota.pdparams --infer_dir=dota_test_images --draw_threshold=0.05 --save_txt=True --output_dir=output
python3.7 tools/infer.py -c configs/dota/s2anet_1x_dota.yml -o weights=./weights/s2anet_1x_dota.pdparams --infer_dir=dota_test_images --draw_threshold=0.05 --save_txt=True --output_dir=output
```
```
...
...
configs/dota/_base_/s2anet_optimizer_1x.yml
浏览文件 @
099d1276
epoch
:
12
epoch
:
12
LearningRate
:
LearningRate
:
base_lr
:
0.0
05
base_lr
:
0.0
1
schedulers
:
schedulers
:
-
!PiecewiseDecay
-
!PiecewiseDecay
gamma
:
0.1
gamma
:
0.1
...
...
configs/dota/_base_/s2anet_optimizer_2x.yml
浏览文件 @
099d1276
epoch
:
24
epoch
:
24
LearningRate
:
LearningRate
:
base_lr
:
0.0
05
base_lr
:
0.0
1
schedulers
:
schedulers
:
-
!PiecewiseDecay
-
!PiecewiseDecay
gamma
:
0.1
gamma
:
0.1
...
...
configs/dota/s2anet_1x_spine.yml
浏览文件 @
099d1276
...
@@ -8,9 +8,9 @@ _BASE_: [
...
@@ -8,9 +8,9 @@ _BASE_: [
weights
:
output/s2anet_1x_spine/model_final
weights
:
output/s2anet_1x_spine/model_final
# for
4
card
# for
8
card
LearningRate
:
LearningRate
:
base_lr
:
0.0
05
base_lr
:
0.0
1
S2ANetHead
:
S2ANetHead
:
anchor_strides
:
[
8
,
16
,
32
,
64
,
128
]
anchor_strides
:
[
8
,
16
,
32
,
64
,
128
]
...
...
configs/dota/s2anet_conv_
1
x_dota.yml
→
configs/dota/s2anet_conv_
2
x_dota.yml
浏览文件 @
099d1276
_BASE_
:
[
_BASE_
:
[
'
../datasets/dota.yml'
,
'
../datasets/dota.yml'
,
'
../runtime.yml'
,
'
../runtime.yml'
,
'
_base_/s2anet_optimizer_
1
x.yml'
,
'
_base_/s2anet_optimizer_
2
x.yml'
,
'
_base_/s2anet.yml'
,
'
_base_/s2anet.yml'
,
'
_base_/s2anet_reader.yml'
,
'
_base_/s2anet_reader.yml'
,
]
]
weights
:
output/s2anet_1x_dota/model_final
weights
:
output/s2anet_conv_1x_dota/model_final
ResNet
:
depth
:
50
variant
:
b
norm_type
:
bn
return_idx
:
[
1
,
2
,
3
]
num_stages
:
4
S2ANetHead
:
S2ANetHead
:
anchor_strides
:
[
8
,
16
,
32
,
64
,
128
]
anchor_strides
:
[
8
,
16
,
32
,
64
,
128
]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录