-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add new config sample and check scripts (#2216)
* add new config sample and check scripts * context managere to prevent import * refactor backbone, add caffe * add fast rcnn * all basci config done * rm coco_proposal * add scratch, wider_face, voc * add reppoints * delete device id, auto resume * add libra_rcnn, ms_rcnn, nas_fpn * add hrnet, fcos * add free_anchor, gn, grid_rcnn, guided_anchoring, gcnet, ghm, gn+ws * finished all, but some need refactor and unified logic * fixed albu * update ReseNet101 * reduce ResNet101, add norm_cfg, 4conv1fc * refactor caffe backbone * merge act_cfg, dcn from master * rename 2fc head, add 4conv1fc head * delete 4con1fc model * rename components -> _base_ * flatten _base_ * refactor _base_ structure * refactor config structure * reduce _base/models * rename all config * add _coco inside configs * fixed _coco in files * fixed albu in test * migrate to new sys * fixed test * fixed test * rm cascade, fast_rcnn * rm cascade, fast_rcnn from _base_ * fixed fcos_center * rename from rule * collopse third party model * fixed test * fixed some minor bug * rename gn-neck_head -> gn-neck+head
- Loading branch information
Showing
314 changed files
with
3,882 additions
and
25,294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
dataset_type = 'CityscapesDataset' | ||
data_root = 'data/cityscapes/' | ||
img_norm_cfg = dict( | ||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) | ||
train_pipeline = [ | ||
dict(type='LoadImageFromFile'), | ||
dict(type='LoadAnnotations', with_bbox=True), | ||
dict( | ||
type='Resize', img_scale=[(2048, 800), (2048, 1024)], keep_ratio=True), | ||
dict(type='RandomFlip', flip_ratio=0.5), | ||
dict(type='Normalize', **img_norm_cfg), | ||
dict(type='Pad', size_divisor=32), | ||
dict(type='DefaultFormatBundle'), | ||
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']), | ||
] | ||
test_pipeline = [ | ||
dict(type='LoadImageFromFile'), | ||
dict( | ||
type='MultiScaleFlipAug', | ||
img_scale=(2048, 1024), | ||
flip=False, | ||
transforms=[ | ||
dict(type='Resize', keep_ratio=True), | ||
dict(type='RandomFlip'), | ||
dict(type='Normalize', **img_norm_cfg), | ||
dict(type='Pad', size_divisor=32), | ||
dict(type='ImageToTensor', keys=['img']), | ||
dict(type='Collect', keys=['img']), | ||
]) | ||
] | ||
data = dict( | ||
imgs_per_gpu=1, | ||
workers_per_gpu=2, | ||
train=dict( | ||
type='RepeatDataset', | ||
times=8, | ||
dataset=dict( | ||
type=dataset_type, | ||
ann_file=data_root + | ||
'annotations/instancesonly_filtered_gtFine_train.json', | ||
img_prefix=data_root + 'leftImg8bit/train/', | ||
pipeline=train_pipeline)), | ||
val=dict( | ||
type=dataset_type, | ||
ann_file=data_root + | ||
'annotations/instancesonly_filtered_gtFine_val.json', | ||
img_prefix=data_root + 'leftImg8bit/val/', | ||
pipeline=test_pipeline), | ||
test=dict( | ||
type=dataset_type, | ||
ann_file=data_root + | ||
'annotations/instancesonly_filtered_gtFine_test.json', | ||
img_prefix=data_root + 'leftImg8bit/test/', | ||
pipeline=test_pipeline)) | ||
evaluation = dict(interval=1, metric='bbox') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
_base_ = './cityscapes_detection.py' | ||
img_norm_cfg = dict( | ||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) | ||
train_pipeline = [ | ||
dict(type='LoadImageFromFile'), | ||
dict(type='LoadAnnotations', with_bbox=True, with_mask=True), | ||
dict( | ||
type='Resize', img_scale=[(2048, 800), (2048, 1024)], keep_ratio=True), | ||
dict(type='RandomFlip', flip_ratio=0.5), | ||
dict(type='Normalize', **img_norm_cfg), | ||
dict(type='Pad', size_divisor=32), | ||
dict(type='DefaultFormatBundle'), | ||
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks']), | ||
] | ||
data = dict(train=dict(dataset=dict(pipeline=train_pipeline))) | ||
evaluation = dict(metric=['bbox', 'segm']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
dataset_type = 'CocoDataset' | ||
data_root = 'data/coco/' | ||
img_norm_cfg = dict( | ||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) | ||
train_pipeline = [ | ||
dict(type='LoadImageFromFile'), | ||
dict(type='LoadAnnotations', with_bbox=True), | ||
dict(type='Resize', img_scale=(1333, 800), keep_ratio=True), | ||
dict(type='RandomFlip', flip_ratio=0.5), | ||
dict(type='Normalize', **img_norm_cfg), | ||
dict(type='Pad', size_divisor=32), | ||
dict(type='DefaultFormatBundle'), | ||
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']), | ||
] | ||
test_pipeline = [ | ||
dict(type='LoadImageFromFile'), | ||
dict( | ||
type='MultiScaleFlipAug', | ||
img_scale=(1333, 800), | ||
flip=False, | ||
transforms=[ | ||
dict(type='Resize', keep_ratio=True), | ||
dict(type='RandomFlip'), | ||
dict(type='Normalize', **img_norm_cfg), | ||
dict(type='Pad', size_divisor=32), | ||
dict(type='ImageToTensor', keys=['img']), | ||
dict(type='Collect', keys=['img']), | ||
]) | ||
] | ||
data = dict( | ||
imgs_per_gpu=2, | ||
workers_per_gpu=2, | ||
train=dict( | ||
type=dataset_type, | ||
ann_file=data_root + 'annotations/instances_train2017.json', | ||
img_prefix=data_root + 'train2017/', | ||
pipeline=train_pipeline), | ||
val=dict( | ||
type=dataset_type, | ||
ann_file=data_root + 'annotations/instances_val2017.json', | ||
img_prefix=data_root + 'val2017/', | ||
pipeline=test_pipeline), | ||
test=dict( | ||
type=dataset_type, | ||
ann_file=data_root + 'annotations/instances_val2017.json', | ||
img_prefix=data_root + 'val2017/', | ||
pipeline=test_pipeline)) | ||
evaluation = dict(interval=1, metric='bbox') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
_base_ = 'coco_detection.py' | ||
img_norm_cfg = dict( | ||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) | ||
train_pipeline = [ | ||
dict(type='LoadImageFromFile'), | ||
dict(type='LoadAnnotations', with_bbox=True, with_mask=True), | ||
dict(type='Resize', img_scale=(1333, 800), keep_ratio=True), | ||
dict(type='RandomFlip', flip_ratio=0.5), | ||
dict(type='Normalize', **img_norm_cfg), | ||
dict(type='Pad', size_divisor=32), | ||
dict(type='DefaultFormatBundle'), | ||
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks']), | ||
] | ||
data = dict(train=dict(pipeline=train_pipeline)) | ||
evaluation = dict(metric=['bbox', 'segm']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
_base_ = 'coco_detection.py' | ||
data_root = 'data/coco/' | ||
img_norm_cfg = dict( | ||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) | ||
train_pipeline = [ | ||
dict(type='LoadImageFromFile'), | ||
dict( | ||
type='LoadAnnotations', with_bbox=True, with_mask=True, with_seg=True), | ||
dict(type='Resize', img_scale=(1333, 800), keep_ratio=True), | ||
dict(type='RandomFlip', flip_ratio=0.5), | ||
dict(type='Normalize', **img_norm_cfg), | ||
dict(type='Pad', size_divisor=32), | ||
dict(type='SegRescale', scale_factor=1 / 8), | ||
dict(type='DefaultFormatBundle'), | ||
dict( | ||
type='Collect', | ||
keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks', 'gt_semantic_seg']), | ||
] | ||
test_pipeline = [ | ||
dict(type='LoadImageFromFile'), | ||
dict( | ||
type='MultiScaleFlipAug', | ||
img_scale=(1333, 800), | ||
flip=False, | ||
transforms=[ | ||
dict(type='Resize', keep_ratio=True), | ||
dict(type='RandomFlip', flip_ratio=0.5), | ||
dict(type='Normalize', **img_norm_cfg), | ||
dict(type='Pad', size_divisor=32), | ||
dict(type='ImageToTensor', keys=['img']), | ||
dict(type='Collect', keys=['img']), | ||
]) | ||
] | ||
data = dict( | ||
train=dict( | ||
seg_prefix=data_root + 'stuffthingmaps/train2017/', | ||
pipeline=train_pipeline), | ||
val=dict(pipeline=test_pipeline), | ||
test=dict(pipeline=test_pipeline)) | ||
evaluation = dict(metric=['bbox', 'segm']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# dataset settings | ||
dataset_type = 'VOCDataset' | ||
data_root = 'data/VOCdevkit/' | ||
img_norm_cfg = dict( | ||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) | ||
train_pipeline = [ | ||
dict(type='LoadImageFromFile'), | ||
dict(type='LoadAnnotations', with_bbox=True), | ||
dict(type='Resize', img_scale=(1000, 600), keep_ratio=True), | ||
dict(type='RandomFlip', flip_ratio=0.5), | ||
dict(type='Normalize', **img_norm_cfg), | ||
dict(type='Pad', size_divisor=32), | ||
dict(type='DefaultFormatBundle'), | ||
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']), | ||
] | ||
test_pipeline = [ | ||
dict(type='LoadImageFromFile'), | ||
dict( | ||
type='MultiScaleFlipAug', | ||
img_scale=(1000, 600), | ||
flip=False, | ||
transforms=[ | ||
dict(type='Resize', keep_ratio=True), | ||
dict(type='RandomFlip'), | ||
dict(type='Normalize', **img_norm_cfg), | ||
dict(type='Pad', size_divisor=32), | ||
dict(type='ImageToTensor', keys=['img']), | ||
dict(type='Collect', keys=['img']), | ||
]) | ||
] | ||
data = dict( | ||
imgs_per_gpu=2, | ||
workers_per_gpu=2, | ||
train=dict( | ||
type='RepeatDataset', | ||
times=3, | ||
dataset=dict( | ||
type=dataset_type, | ||
ann_file=[ | ||
data_root + 'VOC2007/ImageSets/Main/trainval.txt', | ||
data_root + 'VOC2012/ImageSets/Main/trainval.txt' | ||
], | ||
img_prefix=[data_root + 'VOC2007/', data_root + 'VOC2012/'], | ||
pipeline=train_pipeline)), | ||
val=dict( | ||
type=dataset_type, | ||
ann_file=data_root + 'VOC2007/ImageSets/Main/test.txt', | ||
img_prefix=data_root + 'VOC2007/', | ||
pipeline=test_pipeline), | ||
test=dict( | ||
type=dataset_type, | ||
ann_file=data_root + 'VOC2007/ImageSets/Main/test.txt', | ||
img_prefix=data_root + 'VOC2007/', | ||
pipeline=test_pipeline)) | ||
evaluation = dict(interval=1, metric='mAP') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# dataset settings | ||
dataset_type = 'WIDERFaceDataset' | ||
data_root = 'data/WIDERFace/' | ||
img_norm_cfg = dict(mean=[123.675, 116.28, 103.53], std=[1, 1, 1], to_rgb=True) | ||
train_pipeline = [ | ||
dict(type='LoadImageFromFile', to_float32=True), | ||
dict(type='LoadAnnotations', with_bbox=True), | ||
dict( | ||
type='PhotoMetricDistortion', | ||
brightness_delta=32, | ||
contrast_range=(0.5, 1.5), | ||
saturation_range=(0.5, 1.5), | ||
hue_delta=18), | ||
dict( | ||
type='Expand', | ||
mean=img_norm_cfg['mean'], | ||
to_rgb=img_norm_cfg['to_rgb'], | ||
ratio_range=(1, 4)), | ||
dict( | ||
type='MinIoURandomCrop', | ||
min_ious=(0.1, 0.3, 0.5, 0.7, 0.9), | ||
min_crop_size=0.3), | ||
dict(type='Resize', img_scale=(300, 300), keep_ratio=False), | ||
dict(type='Normalize', **img_norm_cfg), | ||
dict(type='RandomFlip', flip_ratio=0.5), | ||
dict(type='DefaultFormatBundle'), | ||
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']), | ||
] | ||
test_pipeline = [ | ||
dict(type='LoadImageFromFile'), | ||
dict( | ||
type='MultiScaleFlipAug', | ||
img_scale=(300, 300), | ||
flip=False, | ||
transforms=[ | ||
dict(type='Resize', keep_ratio=False), | ||
dict(type='Normalize', **img_norm_cfg), | ||
dict(type='ImageToTensor', keys=['img']), | ||
dict(type='Collect', keys=['img']), | ||
]) | ||
] | ||
data = dict( | ||
imgs_per_gpu=60, | ||
workers_per_gpu=2, | ||
train=dict( | ||
type='RepeatDataset', | ||
times=2, | ||
dataset=dict( | ||
type=dataset_type, | ||
ann_file=data_root + 'train.txt', | ||
img_prefix=data_root + 'WIDER_train/', | ||
min_size=17, | ||
pipeline=train_pipeline)), | ||
val=dict( | ||
type=dataset_type, | ||
ann_file=data_root + 'val.txt', | ||
img_prefix=data_root + 'WIDER_val/', | ||
pipeline=test_pipeline), | ||
test=dict( | ||
type=dataset_type, | ||
ann_file=data_root + 'val.txt', | ||
img_prefix=data_root + 'WIDER_val/', | ||
pipeline=test_pipeline)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
checkpoint_config = dict(interval=1) | ||
# yapf:disable | ||
log_config = dict( | ||
interval=50, | ||
hooks=[ | ||
dict(type='TextLoggerHook'), | ||
# dict(type='TensorboardLoggerHook') | ||
]) | ||
# yapf:enable | ||
dist_params = dict(backend='nccl') | ||
log_level = 'INFO' | ||
load_from = None | ||
resume_from = None | ||
workflow = [('train', 1)] |
Oops, something went wrong.