Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
内鬼850
PaddleDetection
提交
14c5f645
P
PaddleDetection
项目概览
内鬼850
/
PaddleDetection
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleDetection
通知
2
Star
1
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,发现更多精彩内容 >>
提交
14c5f645
编写于
8月 29, 2019
作者:
W
wangguanzhong
提交者:
GitHub
8月 29, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add group norm doc (#3221)
* add gn doc
上级
3a877a6f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
46 addition
and
22 deletion
+46
-22
docs/DATA.md
docs/DATA.md
+2
-2
docs/DATA_cn.md
docs/DATA_cn.md
+2
-2
docs/MODEL_ZOO.md
docs/MODEL_ZOO.md
+10
-0
docs/MODEL_ZOO_cn.md
docs/MODEL_ZOO_cn.md
+10
-0
ppdet/utils/download.py
ppdet/utils/download.py
+22
-18
未找到文件。
docs/DATA.md
浏览文件 @
14c5f645
...
@@ -100,7 +100,7 @@ like dataset, run this command:
...
@@ -100,7 +100,7 @@ like dataset, run this command:
# --annotation: the path of file, which contains the name of annotation files
# --annotation: the path of file, which contains the name of annotation files
# --save-dir: the save path
# --save-dir: the save path
# --samples: the number of samples (default is -1, which mean all datas in dataset)
# --samples: the number of samples (default is -1, which mean all datas in dataset)
python ./tools/generate_data_for_training.py
python ./
ppdet/data/
tools/generate_data_for_training.py
--type
=
json
\
--type
=
json
\
--annotation
=
./annotations/instances_val2017.json
\
--annotation
=
./annotations/instances_val2017.json
\
--save-dir
=
./roidb
\
--save-dir
=
./roidb
\
...
@@ -181,7 +181,7 @@ whole data pipeline is fully customizable through the yaml configuration files.
...
@@ -181,7 +181,7 @@ whole data pipeline is fully customizable through the yaml configuration files.
```
sh
```
sh
# a small utility (`tools/labelme2coco.py`) is provided to convert
# a small utility (`tools/labelme2coco.py`) is provided to convert
# Labelme-annotated dataset to COCO format.
# Labelme-annotated dataset to COCO format.
python ./tools/labelme2coco.py
--json_input_dir
./labelme_annos/
python ./
ppdet/data/
tools/labelme2coco.py
--json_input_dir
./labelme_annos/
--image_input_dir
./labelme_imgs/
--image_input_dir
./labelme_imgs/
--output_dir
./cocome/
--output_dir
./cocome/
--train_proportion
0.8
--train_proportion
0.8
...
...
docs/DATA_cn.md
浏览文件 @
14c5f645
...
@@ -90,7 +90,7 @@
...
@@ -90,7 +90,7 @@
# --annotation: 一个包含所需标注文件名的文件的路径
# --annotation: 一个包含所需标注文件名的文件的路径
# --save-dir: 保存路径
# --save-dir: 保存路径
# --samples: sample的个数(默认是-1,代表使用所有sample)
# --samples: sample的个数(默认是-1,代表使用所有sample)
python ./tools/generate_data_for_training.py
python ./
ppdet/data/
tools/generate_data_for_training.py
--type=json \
--type=json \
--annotation=./annotations/instances_val2017.json \
--annotation=./annotations/instances_val2017.json \
--save-dir=./roidb \
--save-dir=./roidb \
...
@@ -168,7 +168,7 @@ coco = Reader(ccfg.DATA, ccfg.TRANSFORM, maxiter=-1)
...
@@ -168,7 +168,7 @@ coco = Reader(ccfg.DATA, ccfg.TRANSFORM, maxiter=-1)
-
选择1:将数据集转换为VOC格式或者COCO格式。
-
选择1:将数据集转换为VOC格式或者COCO格式。
```
```
# 在./tools/中提供了labelme2coco.py用于将labelme标注的数据集转换为COCO数据集
# 在./tools/中提供了labelme2coco.py用于将labelme标注的数据集转换为COCO数据集
python ./tools/labelme2coco.py --json_input_dir ./labelme_annos/
python ./
ppdet/data/
tools/labelme2coco.py --json_input_dir ./labelme_annos/
--image_input_dir ./labelme_imgs/
--image_input_dir ./labelme_imgs/
--output_dir ./cocome/
--output_dir ./cocome/
--train_proportion 0.8
--train_proportion 0.8
...
...
docs/MODEL_ZOO.md
浏览文件 @
14c5f645
...
@@ -80,6 +80,16 @@ The backbone models pretrained on ImageNet are available. All backbone models ar
...
@@ -80,6 +80,16 @@ The backbone models pretrained on ImageNet are available. All backbone models ar
-
`c3-c5`
means adding
`dcn`
in resnet stage 3 to 5.
-
`c3-c5`
means adding
`dcn`
in resnet stage 3 to 5.
-
Detailed configuration file in
[
configs/dcn
](
https://github.com/PaddlePaddle/models/tree/develop/PaddleCV/PaddleDetection/configs/dcn
)
-
Detailed configuration file in
[
configs/dcn
](
https://github.com/PaddlePaddle/models/tree/develop/PaddleCV/PaddleDetection/configs/dcn
)
### Group Normalization
| Backbone | Type | Image/gpu | Lr schd | Box AP | Mask AP | Download |
| :------------------- | :------------- | :-----: | :-----: | :----: | :-----: | :----------------------------------------------------------: |
| ResNet50-FPN | Faster | 2 | 2x | 39.7 | - |
[
model
](
https://paddlemodels.bj.bcebos.com/object_detection/faster_rcnn_r50_fpn_gn_2x.tar
)
|
| ResNet50-FPN | Mask | 1 | 2x | 40.1 | 35.8 |
[
model
](
https://paddlemodels.bj.bcebos.com/object_detection/mask_rcnn_r50_fpn_gn_2x.tar
)
|
#### Notes:
-
Group Normalization reference from
[
Group Normalization
](
https://arxiv.org/abs/1803.08494
)
.
-
Detailed configuration file in
[
configs/gn
](
https://github.com/PaddlePaddle/models/tree/develop/PaddleCV/PaddleDetection/configs/gn
)
### Yolo v3
### Yolo v3
| Backbone | Size | Image/gpu | Lr schd | Box AP | Download |
| Backbone | Size | Image/gpu | Lr schd | Box AP | Download |
...
...
docs/MODEL_ZOO_cn.md
浏览文件 @
14c5f645
...
@@ -80,6 +80,16 @@ Paddle提供基于ImageNet的骨架网络预训练模型。所有预训练模型
...
@@ -80,6 +80,16 @@ Paddle提供基于ImageNet的骨架网络预训练模型。所有预训练模型
-
`c3-c5`
意思是在resnet模块的3到5阶段增加
`dcn`
.
-
`c3-c5`
意思是在resnet模块的3到5阶段增加
`dcn`
.
-
详细的配置文件在
[
configs/dcn
](
https://github.com/PaddlePaddle/models/tree/develop/PaddleCV/PaddleDetection/configs/dcn
)
-
详细的配置文件在
[
configs/dcn
](
https://github.com/PaddlePaddle/models/tree/develop/PaddleCV/PaddleDetection/configs/dcn
)
### Group Normalization
| 骨架网络 | 网络类型 | 每张GPU图片个数 | 学习率策略 | Box AP | Mask AP | 下载 |
| :------------------- | :------------- |:--------: | :-----: | :----: | :-----: | :----------------------------------------------------------: |
| ResNet50-FPN | Faster | 2 | 2x | 39.7 | - |
[
下载链接
](
https://paddlemodels.bj.bcebos.com/object_detection/faster_rcnn_r50_fpn_gn_2x.tar
)
|
| ResNet50-FPN | Mask | 1 | 2x | 40.1 | 35.8 |
[
下载链接
](
https://paddlemodels.bj.bcebos.com/object_detection/mask_rcnn_r50_fpn_gn_2x.tar
)
|
#### 注意事项:
-
Group Normalization参考论文
[
Group Normalization
](
https://arxiv.org/abs/1803.08494
)
.
-
详细的配置文件在
[
configs/gn
](
https://github.com/PaddlePaddle/models/tree/develop/PaddleCV/PaddleDetection/configs/gn
)
### Yolo v3
### Yolo v3
| 骨架网络 | 输入尺寸 | 每张GPU图片个数 | 学习率策略 | Box AP | 下载 |
| 骨架网络 | 输入尺寸 | 每张GPU图片个数 | 学习率策略 | Box AP | 下载 |
...
...
ppdet/utils/download.py
浏览文件 @
14c5f645
...
@@ -16,7 +16,6 @@ from __future__ import absolute_import
...
@@ -16,7 +16,6 @@ from __future__ import absolute_import
from
__future__
import
division
from
__future__
import
division
from
__future__
import
print_function
from
__future__
import
print_function
import
os
import
os
import
os.path
as
osp
import
os.path
as
osp
import
shutil
import
shutil
...
@@ -40,20 +39,26 @@ DATASET_HOME = osp.expanduser("~/.cache/paddle/dataset")
...
@@ -40,20 +39,26 @@ DATASET_HOME = osp.expanduser("~/.cache/paddle/dataset")
# download info: (url, md5sum)
# download info: (url, md5sum)
DATASETS
=
{
DATASETS
=
{
'coco'
:
([
'coco'
:
([
(
'http://images.cocodataset.org/zips/train2017.zip'
,
(
'cced6f7f71b7629ddf16f17bbcfab6b2'
,
),
'http://images.cocodataset.org/zips/train2017.zip'
,
(
'http://images.cocodataset.org/zips/val2017.zip'
,
'cced6f7f71b7629ddf16f17bbcfab6b2'
,
),
'442b8da7639aecaf257c1dceb8ba8c80'
,
),
(
(
'http://images.cocodataset.org/annotations/annotations_trainval2017.zip'
,
'http://images.cocodataset.org/zips/val2017.zip'
,
'f4bbac642086de4f52a3fdda2de5fa2c'
,
),
'442b8da7639aecaf257c1dceb8ba8c80'
,
),
(
'http://images.cocodataset.org/annotations/annotations_trainval2017.zip'
,
'f4bbac642086de4f52a3fdda2de5fa2c'
,
),
],
[
"annotations"
,
"train2017"
,
"val2017"
]),
],
[
"annotations"
,
"train2017"
,
"val2017"
]),
'voc'
:
([
'voc'
:
([
(
'http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar'
,
(
'6cd6e144f989b92b3379bac3b3de84fd'
,
),
'http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar'
,
(
'http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtrainval_06-Nov-2007.tar'
,
'6cd6e144f989b92b3379bac3b3de84fd'
,
),
'c52e279531787c972589f7e41ab4ae64'
,
),
(
(
'http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtest_06-Nov-2007.tar'
,
'http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtrainval_06-Nov-2007.tar'
,
'b6e924de25625d8de591ea690078ad9f'
,
),
'c52e279531787c972589f7e41ab4ae64'
,
),
(
'http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtest_06-Nov-2007.tar'
,
'b6e924de25625d8de591ea690078ad9f'
,
),
],
[
"VOCdevkit/VOC_all"
]),
],
[
"VOCdevkit/VOC_all"
]),
}
}
...
@@ -112,8 +117,7 @@ def get_dataset_path(path, annotation, image_dir):
...
@@ -112,8 +117,7 @@ def get_dataset_path(path, annotation, image_dir):
# dataset, VOC default label list should be used,
# dataset, VOC default label list should be used,
# do not generate label_list.txt here. For default
# do not generate label_list.txt here. For default
# label, see ../data/source/voc_loader.py
# label, see ../data/source/voc_loader.py
merge_and_create_list
(
devkit_dir
,
years
,
merge_and_create_list
(
devkit_dir
,
years
,
output_tmp_dir
)
output_tmp_dir
)
shutil
.
move
(
output_tmp_dir
,
output_dir
)
shutil
.
move
(
output_tmp_dir
,
output_dir
)
# remove source directory VOC2007 and VOC2012
# remove source directory VOC2007 and VOC2012
shutil
.
rmtree
(
osp
.
join
(
devkit_dir
,
"VOC2007"
))
shutil
.
rmtree
(
osp
.
join
(
devkit_dir
,
"VOC2007"
))
...
@@ -121,7 +125,7 @@ def get_dataset_path(path, annotation, image_dir):
...
@@ -121,7 +125,7 @@ def get_dataset_path(path, annotation, image_dir):
return
data_dir
return
data_dir
# not match any dataset in DATASETS
# not match any dataset in DATASETS
raise
ValueError
(
"{} not exists
and
unknow dataset type"
.
format
(
path
))
raise
ValueError
(
"{} not exists
or
unknow dataset type"
.
format
(
path
))
def
get_path
(
url
,
root_dir
,
md5sum
=
None
):
def
get_path
(
url
,
root_dir
,
md5sum
=
None
):
...
@@ -174,13 +178,13 @@ def _dataset_exists(path, annotation, image_dir):
...
@@ -174,13 +178,13 @@ def _dataset_exists(path, annotation, image_dir):
annotation_path
=
osp
.
join
(
path
,
annotation
)
annotation_path
=
osp
.
join
(
path
,
annotation
)
if
not
osp
.
isfile
(
annotation_path
):
if
not
osp
.
isfile
(
annotation_path
):
logger
.
info
(
"Config annotation {} is not a "
logger
.
info
(
"Config annotation {} is not a "
"file"
.
format
(
annotation_path
))
"file"
.
format
(
annotation_path
))
return
False
return
False
if
image_dir
:
if
image_dir
:
image_path
=
osp
.
join
(
path
,
image_dir
)
image_path
=
osp
.
join
(
path
,
image_dir
)
if
not
osp
.
isdir
(
image_path
):
if
not
osp
.
isdir
(
image_path
):
logger
.
info
(
"Config image_dir {} is not a "
logger
.
info
(
"Config image_dir {} is not a "
"directory"
.
format
(
image_path
))
"directory"
.
format
(
image_path
))
return
False
return
False
return
True
return
True
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录