Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
2348dcde
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
695
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看板
未验证
提交
2348dcde
编写于
11月 02, 2021
作者:
W
Wenyu
提交者:
GitHub
11月 02, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update sniper docs (#4411)
上级
ca8646b4
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
62 addition
and
110 deletion
+62
-110
configs/sniper/README.md
configs/sniper/README.md
+7
-7
configs/sniper/README_cn.md
configs/sniper/README_cn.md
+7
-7
configs/sniper/faster_rcnn_r50_fpn_1x_sniper_visdrone.yml
configs/sniper/faster_rcnn_r50_fpn_1x_sniper_visdrone.yml
+21
-1
configs/sniper/faster_rcnn_r50_fpn_1x_visdrone.yml
configs/sniper/faster_rcnn_r50_fpn_1x_visdrone.yml
+1
-1
configs/sniper/faster_rcnn_r50_fpn_2x_sniper_coco.yml
configs/sniper/faster_rcnn_r50_fpn_2x_sniper_coco.yml
+0
-15
configs/sniper/faster_rcnn_r50_vd_1x_coco_sniper.yml
configs/sniper/faster_rcnn_r50_vd_1x_coco_sniper.yml
+0
-19
configs/sniper/faster_rcnn_r50_vd_fpn_2x_sniper_coco.yml
configs/sniper/faster_rcnn_r50_vd_fpn_2x_sniper_coco.yml
+0
-25
configs/sniper/ppyolo_r50vd_dcn_1x_sniper.yml
configs/sniper/ppyolo_r50vd_dcn_1x_sniper.yml
+0
-32
configs/sniper/ppyolo_r50vd_dcn_1x_sniper_visdrone.yml
configs/sniper/ppyolo_r50vd_dcn_1x_sniper_visdrone.yml
+24
-1
configs/sniper/ppyolo_r50vd_dcn_1x_visdrone.yml
configs/sniper/ppyolo_r50vd_dcn_1x_visdrone.yml
+2
-2
未找到文件。
configs/sniper/README.md
浏览文件 @
2348dcde
...
...
@@ -6,8 +6,8 @@ English | [简体中文](README_cn.md)
| Sniper | GPU number | images/GPU | Model | Dataset | Schedulers | Box AP | Download | Config |
| :---------------- | :-------------------: | :------------------: | :-----: | :-----: | :------------: | :-----: | :-----------------------------------------------------: | :-----: |
| w/o | 4 | 1 | ResNet-r50-FPN |
[
VisDrone
](
https://github.com/VisDrone/VisDrone-Dataset
)
| 1x | 23.3 |
[
Download Link
](
https://bj.bcebos.com/v1/paddledet/models/faster_rcnn_r50_fpn_1x_visdrone.pdparams
)
|
[
Config
](
https://github.com/PaddlePaddle/PaddleDetection/tree/develop/configs/sniper/faster_rcnn_r50_fpn_1x_sniper_coco
.yml
)
|
| w/ | 4 | 1 | ResNet-r50-FPN |
[
VisDrone
](
https://github.com/VisDrone/VisDrone-Dataset
)
| 1x | 29.7 |
[
Download Link
](
https://bj.bcebos.com/v1/paddledet/models/faster_rcnn_r50_fpn_1x_sniper_visdrone.pdparams
)
|
[
Config
](
https://github.com/PaddlePaddle/PaddleDetection/tree/develop/configs/sniper/faster_rcnn_r50_fpn_2x_sniper_coco
.yml
)
|
| w/o | 4 | 1 | ResNet-r50-FPN |
[
VisDrone
](
https://github.com/VisDrone/VisDrone-Dataset
)
| 1x | 23.3 |
[
Download Link
](
https://bj.bcebos.com/v1/paddledet/models/faster_rcnn_r50_fpn_1x_visdrone.pdparams
)
|
[
config
](
./faster_rcnn_r50_fpn_1x_visdrone
.yml
)
|
| w/ | 4 | 1 | ResNet-r50-FPN |
[
VisDrone
](
https://github.com/VisDrone/VisDrone-Dataset
)
| 1x | 29.7 |
[
Download Link
](
https://bj.bcebos.com/v1/paddledet/models/faster_rcnn_r50_fpn_1x_sniper_visdrone.pdparams
)
|
[
config
](
./faster_rcnn_r50_fpn_1x_sniper_visdrone
.yml
)
|
### Note
> Here, we use VisDrone dataset, and to detect 9 objects including `person, bicycles, car, van, truck, tricyle, awning-tricyle, bus, motor`.
...
...
@@ -21,18 +21,18 @@ python tools/sniper_params_stats.py FasterRCNN annotations/instances_train2017.j
```
b. optional: trian detector to get negative proposals.
```
bash
python
-m
paddle.distributed.launch
--log_dir
=
./sniper/
--gpus
0,1,2,3,4,5,6,7 tools/train.py
-c
configs/sniper/faster_rcnn_r50_fpn_
2x_sniper_coco
.yml
--save_proposals
--proposals_path
=
./proposals.json &>sniper.log 2>&1 &
python
-m
paddle.distributed.launch
--log_dir
=
./sniper/
--gpus
0,1,2,3,4,5,6,7 tools/train.py
-c
configs/sniper/faster_rcnn_r50_fpn_
1x_sniper_visdrone
.yml
--save_proposals
--proposals_path
=
./proposals.json &>sniper.log 2>&1 &
```
c. train models
```
bash
python
-m
paddle.distributed.launch
--log_dir
=
./sniper/
--gpus
0,1,2,3,4,5,6,7 tools/train.py
-c
configs/sniper/faster_rcnn_r50_fpn_
2x_sniper_coco
.yml
--eval
&>sniper.log 2>&1 &
python
-m
paddle.distributed.launch
--log_dir
=
./sniper/
--gpus
0,1,2,3,4,5,6,7 tools/train.py
-c
configs/sniper/faster_rcnn_r50_fpn_
1x_sniper_visdrone
.yml
--eval
&>sniper.log 2>&1 &
```
### 2. Evaluation
Evaluating SNIPER on custom dataset in single GPU with following commands:
```
bash
# use saved checkpoint in training
CUDA_VISIBLE_DEVICES
=
0 python tools/eval.py
-c
configs/sniper/faster_rcnn_r50_fpn_
2x_sniper_coco.yml
-o
weights
=
output/faster_rcnn_r50_fpn_2x_sniper_coco
/model_final
CUDA_VISIBLE_DEVICES
=
0 python tools/eval.py
-c
configs/sniper/faster_rcnn_r50_fpn_
1x_sniper_visdrone.yml
-o
weights
=
output/faster_rcnn_r50_fpn_1x_sniper_visdrone
/model_final
```
### 3. Inference
...
...
@@ -40,10 +40,10 @@ Inference images in single GPU with following commands, use `--infer_img` to inf
```
bash
# inference single image
CUDA_VISIBLE_DEVICES
=
0 python tools/infer.py
-c
configs/sniper/faster_rcnn_r50_fpn_
2x_sniper_coco.yml
-o
weights
=
output/faster_rcnn_r50_fpn_2x_sniper_coco
/model_final
--infer_img
=
demo/P0861__1.0__1154___824.png
CUDA_VISIBLE_DEVICES
=
0 python tools/infer.py
-c
configs/sniper/faster_rcnn_r50_fpn_
1x_sniper_visdrone.yml
-o
weights
=
output/faster_rcnn_r50_fpn_1x_sniper_visdrone
/model_final
--infer_img
=
demo/P0861__1.0__1154___824.png
# inference all images in the directory
CUDA_VISIBLE_DEVICES
=
0 python tools/infer.py
-c
configs/sniper/faster_rcnn_r50_fpn_
2x_sniper_coco.yml
-o
weights
=
output/faster_rcnn_r50_fpn_2x_sniper_coco
/model_final
--infer_dir
=
demo
CUDA_VISIBLE_DEVICES
=
0 python tools/infer.py
-c
configs/sniper/faster_rcnn_r50_fpn_
1x_sniper_visdrone.yml
-o
weights
=
output/faster_rcnn_r50_fpn_1x_sniper_visdrone
/model_final
--infer_dir
=
demo
```
## Citations
...
...
configs/sniper/README_cn.md
浏览文件 @
2348dcde
...
...
@@ -5,8 +5,8 @@
## 模型库
| 有无sniper | GPU个数 | 每张GPU图片个数 | 骨架网络 | 数据集 | 学习率策略 | Box AP | 模型下载 | 配置文件 |
| :---------------- | :-------------------: | :------------------: | :-----: | :-----: | :------------: | :-----: | :-----------------------------------------------------: | :-----: |
| w/o sniper | 4 | 1 | ResNet-r50-FPN |
[
VisDrone
](
https://github.com/VisDrone/VisDrone-Dataset
)
| 1x | 23.3 |
[
下载链接
](
https://bj.bcebos.com/v1/paddledet/models/faster_rcnn_r50_fpn_1x_visdrone.pdparams
)
|
[
配置文件
](
https://github.com/PaddlePaddle/PaddleDetection/tree/develop/configs/sniper/faster_rcnn_r50_fpn_1x_sniper_coco
.yml
)
|
| w sniper | 4 | 1 | ResNet-r50-FPN |
[
VisDrone
](
https://github.com/VisDrone/VisDrone-Dataset
)
| 1x | 29.7 |
[
下载链接
](
https://bj.bcebos.com/v1/paddledet/models/faster_rcnn_r50_fpn_1x_sniper_visdrone.pdparams
)
|
[
配置文件
](
https://github.com/PaddlePaddle/PaddleDetection/tree/develop/configs/sniper/faster_rcnn_r50_fpn_2x_sniper_coco
.yml
)
|
| w/o sniper | 4 | 1 | ResNet-r50-FPN |
[
VisDrone
](
https://github.com/VisDrone/VisDrone-Dataset
)
| 1x | 23.3 |
[
下载链接
](
https://bj.bcebos.com/v1/paddledet/models/faster_rcnn_r50_fpn_1x_visdrone.pdparams
)
|
[
配置文件
](
./faster_rcnn_r50_fpn_1x_visdrone
.yml
)
|
| w sniper | 4 | 1 | ResNet-r50-FPN |
[
VisDrone
](
https://github.com/VisDrone/VisDrone-Dataset
)
| 1x | 29.7 |
[
下载链接
](
https://bj.bcebos.com/v1/paddledet/models/faster_rcnn_r50_fpn_1x_sniper_visdrone.pdparams
)
|
[
配置文件
](
./faster_rcnn_r50_fpn_1x_sniper_visdrone
.yml
)
|
### 注意
...
...
@@ -21,18 +21,18 @@ python tools/sniper_params_stats.py FasterRCNN annotations/instances_train2017.j
```
b. 可选:训练检测器,生成负样本
```
bash
python
-m
paddle.distributed.launch
--log_dir
=
./sniper/
--gpus
0,1,2,3,4,5,6,7 tools/train.py
-c
configs/sniper/faster_rcnn_r50_fpn_
2x_sniper_coco
.yml
--save_proposals
--proposals_path
=
./proposals.json &>sniper.log 2>&1 &
python
-m
paddle.distributed.launch
--log_dir
=
./sniper/
--gpus
0,1,2,3,4,5,6,7 tools/train.py
-c
configs/sniper/faster_rcnn_r50_fpn_
1x_sniper_visdrone
.yml
--save_proposals
--proposals_path
=
./proposals.json &>sniper.log 2>&1 &
```
c. 训练模型
```
bash
python
-m
paddle.distributed.launch
--log_dir
=
./sniper/
--gpus
0,1,2,3,4,5,6,7 tools/train.py
-c
configs/sniper/faster_rcnn_r50_fpn_
2x_sniper_coco
.yml
--eval
&>sniper.log 2>&1 &
python
-m
paddle.distributed.launch
--log_dir
=
./sniper/
--gpus
0,1,2,3,4,5,6,7 tools/train.py
-c
configs/sniper/faster_rcnn_r50_fpn_
1x_sniper_visdrone
.yml
--eval
&>sniper.log 2>&1 &
```
### 2. 评估
使用单GPU通过如下命令一键式评估模型在COCO val2017数据集效果
```
bash
# 使用训练保存的checkpoint
CUDA_VISIBLE_DEVICES
=
0 python tools/eval.py
-c
configs/sniper/faster_rcnn_r50_fpn_
2x_sniper_coco.yml
-o
weights
=
output/faster_rcnn_r50_fpn_2x_sniper_coco
/model_final
CUDA_VISIBLE_DEVICES
=
0 python tools/eval.py
-c
configs/sniper/faster_rcnn_r50_fpn_
1x_sniper_visdrone.yml
-o
weights
=
output/faster_rcnn_r50_fpn_1x_sniper_visdrone
/model_final
```
### 3. 推理
...
...
@@ -40,10 +40,10 @@ CUDA_VISIBLE_DEVICES=0 python tools/eval.py -c configs/sniper/faster_rcnn_r50_fp
```
bash
# 推理单张图像
CUDA_VISIBLE_DEVICES
=
0 python tools/infer.py
-c
configs/sniper/faster_rcnn_r50_fpn_
2x_sniper_coco.yml
-o
weights
=
output/faster_rcnn_r50_fpn_2x_sniper_coco
/model_final
--infer_img
=
demo/P0861__1.0__1154___824.png
CUDA_VISIBLE_DEVICES
=
0 python tools/infer.py
-c
configs/sniper/faster_rcnn_r50_fpn_
1x_sniper_visdrone.yml
-o
weights
=
output/faster_rcnn_r50_fpn_1x_sniper_visdrone
/model_final
--infer_img
=
demo/P0861__1.0__1154___824.png
# 推理目录下所有图像
CUDA_VISIBLE_DEVICES
=
0 python tools/infer.py
-c
configs/sniper/faster_rcnn_r50_fpn_
2x_sniper_coco.yml
-o
weights
=
output/faster_rcnn_r50_fpn_2x_sniper_coco
/model_final
--infer_dir
=
demo
CUDA_VISIBLE_DEVICES
=
0 python tools/infer.py
-c
configs/sniper/faster_rcnn_r50_fpn_
1x_sniper_visdrone.yml
-o
weights
=
output/faster_rcnn_r50_fpn_1x_sniper_visdrone
/model_final
--infer_dir
=
demo
```
## Citations
...
...
configs/sniper/faster_rcnn_r50_fpn_1x_sniper_visdrone.yml
浏览文件 @
2348dcde
...
...
@@ -5,7 +5,27 @@ _BASE_: [
'
../faster_rcnn/_base_/optimizer_1x.yml'
,
'
_base_/faster_fpn_reader.yml'
,
]
weights
:
output/faster_rcnn_r50_
1x_visdrone_coco
/model_final
weights
:
output/faster_rcnn_r50_
fpn_1x_sniper_visdrone
/model_final
find_unused_parameters
:
true
metric
:
COCO
num_classes
:
9
TrainDataset
:
!COCODataSet
image_dir
:
train
anno_path
:
annotations/train.json
dataset_dir
:
dataset/VisDrone2019_coco
data_fields
:
[
'
image'
,
'
gt_bbox'
,
'
gt_class'
,
'
is_crowd'
]
EvalDataset
:
!COCODataSet
image_dir
:
val
anno_path
:
annotations/val.json
dataset_dir
:
dataset/VisDrone2019_coco
TestDataset
:
!ImageFolder
anno_path
:
annotations/val.json
configs/
faster_rcnn
/faster_rcnn_r50_fpn_1x_visdrone.yml
→
configs/
sniper
/faster_rcnn_r50_fpn_1x_visdrone.yml
浏览文件 @
2348dcde
...
...
@@ -5,7 +5,7 @@ _BASE_: [
'
_base_/faster_rcnn_r50_fpn.yml'
,
'
_base_/faster_fpn_reader.yml'
,
]
weights
:
output/faster_rcnn_r50_fpn_1x_
coco_
visdrone/model_final
weights
:
output/faster_rcnn_r50_fpn_1x_visdrone/model_final
metric
:
COCO
...
...
configs/sniper/faster_rcnn_r50_fpn_2x_sniper_coco.yml
已删除
100644 → 0
浏览文件 @
ca8646b4
_BASE_
:
[
'
faster_rcnn_r50_fpn_1x_sniper_coco.yml'
,
]
weights
:
output/faster_rcnn_r50_fpn_2x_sniper_coco/model_final
epoch
:
24
LearningRate
:
base_lr
:
0.01
schedulers
:
-
!PiecewiseDecay
gamma
:
0.1
milestones
:
[
16
,
22
]
-
!LinearWarmup
start_factor
:
0.1
steps
:
1000
configs/sniper/faster_rcnn_r50_vd_1x_coco_sniper.yml
已删除
100644 → 0
浏览文件 @
ca8646b4
_BASE_
:
[
'
../datasets/sniper_coco_detection.yml'
,
'
../runtime.yml'
,
'
../faster_rcnn/_base_/optimizer_1x.yml'
,
'
../faster_rcnn/_base_/faster_rcnn_r50.yml'
,
'
_base_/faster_reader.yml'
,
]
pretrain_weights
:
https://paddledet.bj.bcebos.com/models/faster_rcnn_r50_vd_1x_coco.pdparams
weights
:
output/faster_rcnn_r50_vd_1x_coco/model_final
ResNet
:
# index 0 stands for res2
depth
:
50
variant
:
d
norm_type
:
bn
freeze_at
:
0
return_idx
:
[
2
]
num_stages
:
3
configs/sniper/faster_rcnn_r50_vd_fpn_2x_sniper_coco.yml
已删除
100644 → 0
浏览文件 @
ca8646b4
_BASE_
:
[
'
faster_rcnn_r50_fpn_1x_sniper_coco.yml'
,
]
pretrain_weights
:
https://paddledet.bj.bcebos.com/models/pretrained/ResNet50_vd_pretrained.pdparams
weights
:
output/faster_rcnn_r50_vd_fpn_2x_sniper_coco/model_final
ResNet
:
# index 0 stands for res2
depth
:
50
variant
:
d
norm_type
:
bn
freeze_at
:
0
return_idx
:
[
0
,
1
,
2
,
3
]
num_stages
:
4
epoch
:
24
LearningRate
:
base_lr
:
0.01
schedulers
:
-
!PiecewiseDecay
gamma
:
0.1
milestones
:
[
16
,
22
]
-
!LinearWarmup
start_factor
:
0.1
steps
:
1000
configs/sniper/ppyolo_r50vd_dcn_1x_sniper.yml
已删除
100644 → 0
浏览文件 @
ca8646b4
_BASE_
:
[
'
../datasets/sniper_coco_detection.yml'
,
'
../runtime.yml'
,
'
../ppyolo/_base_/ppyolo_r50vd_dcn.yml'
,
'
../ppyolo/_base_/optimizer_1x.yml'
,
'
./_base_/ppyolo_reader.yml'
,
]
snapshot_epoch
:
8
use_ema
:
true
weights
:
output/ppyolo_r50vd_dcn_1x_minicoco/model_final
LearningRate
:
base_lr
:
0.005
schedulers
:
-
!PiecewiseDecay
gamma
:
0.1
milestones
:
-
153
-
173
-
!LinearWarmup
start_factor
:
0.
steps
:
4000
OptimizerBuilder
:
optimizer
:
momentum
:
0.9
type
:
Momentum
regularizer
:
factor
:
0.0005
type
:
L2
configs/sniper/ppyolo_r50vd_dcn_1x_sniper_visdrone.yml
浏览文件 @
2348dcde
...
...
@@ -8,7 +8,7 @@ _BASE_: [
snapshot_epoch
:
8
use_ema
:
true
weights
:
output/ppyolo_r50vd_dcn_1x_visdrone/model_final
weights
:
output/ppyolo_r50vd_dcn_1x_
sniper_
visdrone/model_final
...
...
@@ -31,3 +31,26 @@ OptimizerBuilder:
regularizer
:
factor
:
0.0005
type
:
L2
metric
:
COCO
num_classes
:
9
TrainDataset
:
!COCODataSet
image_dir
:
train
anno_path
:
annotations/train.json
dataset_dir
:
dataset/VisDrone2019_coco
data_fields
:
[
'
image'
,
'
gt_bbox'
,
'
gt_class'
,
'
is_crowd'
]
EvalDataset
:
!COCODataSet
image_dir
:
val
anno_path
:
annotations/val.json
dataset_dir
:
dataset/VisDrone2019_coco
TestDataset
:
!ImageFolder
anno_path
:
annotations/val.json
configs/
ppyolo
/ppyolo_r50vd_dcn_1x_visdrone.yml
→
configs/
sniper
/ppyolo_r50vd_dcn_1x_visdrone.yml
浏览文件 @
2348dcde
...
...
@@ -8,7 +8,7 @@ _BASE_: [
snapshot_epoch
:
8
use_ema
:
true
weights
:
output/ppyolo_r50vd_dcn_1x_visdrone
_coco
/model_final
weights
:
output/ppyolo_r50vd_dcn_1x_visdrone/model_final
epoch
:
192
...
...
@@ -51,4 +51,4 @@ EvalDataset:
TestDataset
:
!ImageFolder
anno_path
:
annotations/val.json
\ No newline at end of file
anno_path
:
annotations/val.json
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录