Skip to content

Commit edceb5d

Browse files
Merge pull request #4 from dnth/custom-config-files
Custom config files
2 parents e3f76c2 + d2b4910 commit edceb5d

33 files changed

Lines changed: 2032 additions & 0 deletions
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# dataset settings
2+
dataset_type = 'CityscapesDataset'
3+
data_root = 'data/cityscapes/'
4+
img_norm_cfg = dict(
5+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
6+
train_pipeline = [
7+
dict(type='LoadImageFromFile'),
8+
dict(type='LoadAnnotations', with_bbox=True),
9+
dict(
10+
type='Resize', img_scale=[(2048, 800), (2048, 1024)], keep_ratio=True),
11+
dict(type='RandomFlip', flip_ratio=0.5),
12+
dict(type='Normalize', **img_norm_cfg),
13+
dict(type='Pad', size_divisor=32),
14+
dict(type='DefaultFormatBundle'),
15+
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']),
16+
]
17+
test_pipeline = [
18+
dict(type='LoadImageFromFile'),
19+
dict(
20+
type='MultiScaleFlipAug',
21+
img_scale=(2048, 1024),
22+
flip=False,
23+
transforms=[
24+
dict(type='Resize', keep_ratio=True),
25+
dict(type='RandomFlip'),
26+
dict(type='Normalize', **img_norm_cfg),
27+
dict(type='Pad', size_divisor=32),
28+
dict(type='ImageToTensor', keys=['img']),
29+
dict(type='Collect', keys=['img']),
30+
])
31+
]
32+
data = dict(
33+
samples_per_gpu=1,
34+
workers_per_gpu=2,
35+
train=dict(
36+
type='RepeatDataset',
37+
times=8,
38+
dataset=dict(
39+
type=dataset_type,
40+
ann_file=data_root +
41+
'annotations/instancesonly_filtered_gtFine_train.json',
42+
img_prefix=data_root + 'leftImg8bit/train/',
43+
pipeline=train_pipeline)),
44+
val=dict(
45+
type=dataset_type,
46+
ann_file=data_root +
47+
'annotations/instancesonly_filtered_gtFine_val.json',
48+
img_prefix=data_root + 'leftImg8bit/val/',
49+
pipeline=test_pipeline),
50+
test=dict(
51+
type=dataset_type,
52+
ann_file=data_root +
53+
'annotations/instancesonly_filtered_gtFine_test.json',
54+
img_prefix=data_root + 'leftImg8bit/test/',
55+
pipeline=test_pipeline))
56+
evaluation = dict(interval=1, metric='bbox')
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# dataset settings
2+
dataset_type = 'CityscapesDataset'
3+
data_root = 'data/cityscapes/'
4+
img_norm_cfg = dict(
5+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
6+
train_pipeline = [
7+
dict(type='LoadImageFromFile'),
8+
dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
9+
dict(
10+
type='Resize', img_scale=[(2048, 800), (2048, 1024)], keep_ratio=True),
11+
dict(type='RandomFlip', flip_ratio=0.5),
12+
dict(type='Normalize', **img_norm_cfg),
13+
dict(type='Pad', size_divisor=32),
14+
dict(type='DefaultFormatBundle'),
15+
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks']),
16+
]
17+
test_pipeline = [
18+
dict(type='LoadImageFromFile'),
19+
dict(
20+
type='MultiScaleFlipAug',
21+
img_scale=(2048, 1024),
22+
flip=False,
23+
transforms=[
24+
dict(type='Resize', keep_ratio=True),
25+
dict(type='RandomFlip'),
26+
dict(type='Normalize', **img_norm_cfg),
27+
dict(type='Pad', size_divisor=32),
28+
dict(type='ImageToTensor', keys=['img']),
29+
dict(type='Collect', keys=['img']),
30+
])
31+
]
32+
data = dict(
33+
samples_per_gpu=1,
34+
workers_per_gpu=2,
35+
train=dict(
36+
type='RepeatDataset',
37+
times=8,
38+
dataset=dict(
39+
type=dataset_type,
40+
ann_file=data_root +
41+
'annotations/instancesonly_filtered_gtFine_train.json',
42+
img_prefix=data_root + 'leftImg8bit/train/',
43+
pipeline=train_pipeline)),
44+
val=dict(
45+
type=dataset_type,
46+
ann_file=data_root +
47+
'annotations/instancesonly_filtered_gtFine_val.json',
48+
img_prefix=data_root + 'leftImg8bit/val/',
49+
pipeline=test_pipeline),
50+
test=dict(
51+
type=dataset_type,
52+
ann_file=data_root +
53+
'annotations/instancesonly_filtered_gtFine_test.json',
54+
img_prefix=data_root + 'leftImg8bit/test/',
55+
pipeline=test_pipeline))
56+
evaluation = dict(metric=['bbox', 'segm'])
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# dataset settings
2+
dataset_type = 'CocoDataset'
3+
data_root = 'data/coco/'
4+
img_norm_cfg = dict(
5+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
6+
train_pipeline = [
7+
dict(type='LoadImageFromFile'),
8+
dict(type='LoadAnnotations', with_bbox=True),
9+
dict(type='Resize', img_scale=(1333, 800), keep_ratio=True),
10+
dict(type='RandomFlip', flip_ratio=0.5),
11+
dict(type='Normalize', **img_norm_cfg),
12+
dict(type='Pad', size_divisor=32),
13+
dict(type='DefaultFormatBundle'),
14+
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']),
15+
]
16+
test_pipeline = [
17+
dict(type='LoadImageFromFile'),
18+
dict(
19+
type='MultiScaleFlipAug',
20+
img_scale=(1333, 800),
21+
flip=False,
22+
transforms=[
23+
dict(type='Resize', keep_ratio=True),
24+
dict(type='RandomFlip'),
25+
dict(type='Normalize', **img_norm_cfg),
26+
dict(type='Pad', size_divisor=32),
27+
dict(type='ImageToTensor', keys=['img']),
28+
dict(type='Collect', keys=['img']),
29+
])
30+
]
31+
data = dict(
32+
samples_per_gpu=2,
33+
workers_per_gpu=2,
34+
train=dict(
35+
type=dataset_type,
36+
ann_file=data_root + 'annotations/instances_train2017.json',
37+
img_prefix=data_root + 'train2017/',
38+
pipeline=train_pipeline),
39+
val=dict(
40+
type=dataset_type,
41+
ann_file=data_root + 'annotations/instances_val2017.json',
42+
img_prefix=data_root + 'val2017/',
43+
pipeline=test_pipeline),
44+
test=dict(
45+
type=dataset_type,
46+
ann_file=data_root + 'annotations/instances_val2017.json',
47+
img_prefix=data_root + 'val2017/',
48+
pipeline=test_pipeline))
49+
evaluation = dict(interval=1, metric='bbox')
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# dataset settings
2+
dataset_type = 'CocoDataset'
3+
data_root = 'data/coco/'
4+
img_norm_cfg = dict(
5+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
6+
train_pipeline = [
7+
dict(type='LoadImageFromFile'),
8+
dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
9+
dict(type='Resize', img_scale=(1333, 800), keep_ratio=True),
10+
dict(type='RandomFlip', flip_ratio=0.5),
11+
dict(type='Normalize', **img_norm_cfg),
12+
dict(type='Pad', size_divisor=32),
13+
dict(type='DefaultFormatBundle'),
14+
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks']),
15+
]
16+
test_pipeline = [
17+
dict(type='LoadImageFromFile'),
18+
dict(
19+
type='MultiScaleFlipAug',
20+
img_scale=(1333, 800),
21+
flip=False,
22+
transforms=[
23+
dict(type='Resize', keep_ratio=True),
24+
dict(type='RandomFlip'),
25+
dict(type='Normalize', **img_norm_cfg),
26+
dict(type='Pad', size_divisor=32),
27+
dict(type='ImageToTensor', keys=['img']),
28+
dict(type='Collect', keys=['img']),
29+
])
30+
]
31+
data = dict(
32+
samples_per_gpu=2,
33+
workers_per_gpu=2,
34+
train=dict(
35+
type=dataset_type,
36+
ann_file=data_root + 'annotations/instances_train2017.json',
37+
img_prefix=data_root + 'train2017/',
38+
pipeline=train_pipeline),
39+
val=dict(
40+
type=dataset_type,
41+
ann_file=data_root + 'annotations/instances_val2017.json',
42+
img_prefix=data_root + 'val2017/',
43+
pipeline=test_pipeline),
44+
test=dict(
45+
type=dataset_type,
46+
ann_file=data_root + 'annotations/instances_val2017.json',
47+
img_prefix=data_root + 'val2017/',
48+
pipeline=test_pipeline))
49+
evaluation = dict(metric=['bbox', 'segm'])
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# dataset settings
2+
dataset_type = 'CocoDataset'
3+
data_root = 'data/coco/'
4+
img_norm_cfg = dict(
5+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
6+
train_pipeline = [
7+
dict(type='LoadImageFromFile'),
8+
dict(
9+
type='LoadAnnotations', with_bbox=True, with_mask=True, with_seg=True),
10+
dict(type='Resize', img_scale=(1333, 800), keep_ratio=True),
11+
dict(type='RandomFlip', flip_ratio=0.5),
12+
dict(type='Normalize', **img_norm_cfg),
13+
dict(type='Pad', size_divisor=32),
14+
dict(type='SegRescale', scale_factor=1 / 8),
15+
dict(type='DefaultFormatBundle'),
16+
dict(
17+
type='Collect',
18+
keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks', 'gt_semantic_seg']),
19+
]
20+
test_pipeline = [
21+
dict(type='LoadImageFromFile'),
22+
dict(
23+
type='MultiScaleFlipAug',
24+
img_scale=(1333, 800),
25+
flip=False,
26+
transforms=[
27+
dict(type='Resize', keep_ratio=True),
28+
dict(type='RandomFlip', flip_ratio=0.5),
29+
dict(type='Normalize', **img_norm_cfg),
30+
dict(type='Pad', size_divisor=32),
31+
dict(type='ImageToTensor', keys=['img']),
32+
dict(type='Collect', keys=['img']),
33+
])
34+
]
35+
data = dict(
36+
samples_per_gpu=2,
37+
workers_per_gpu=2,
38+
train=dict(
39+
type=dataset_type,
40+
ann_file=data_root + 'annotations/instances_train2017.json',
41+
img_prefix=data_root + 'train2017/',
42+
seg_prefix=data_root + 'stuffthingmaps/train2017/',
43+
pipeline=train_pipeline),
44+
val=dict(
45+
type=dataset_type,
46+
ann_file=data_root + 'annotations/instances_val2017.json',
47+
img_prefix=data_root + 'val2017/',
48+
pipeline=test_pipeline),
49+
test=dict(
50+
type=dataset_type,
51+
ann_file=data_root + 'annotations/instances_val2017.json',
52+
img_prefix=data_root + 'val2017/',
53+
pipeline=test_pipeline))
54+
evaluation = dict(metric=['bbox', 'segm'])
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# dataset settings
2+
dataset_type = 'CocoPanopticDataset'
3+
data_root = 'data/coco/'
4+
img_norm_cfg = dict(
5+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
6+
train_pipeline = [
7+
dict(type='LoadImageFromFile'),
8+
dict(
9+
type='LoadPanopticAnnotations',
10+
with_bbox=True,
11+
with_mask=True,
12+
with_seg=True),
13+
dict(type='Resize', img_scale=(1333, 800), keep_ratio=True),
14+
dict(type='RandomFlip', flip_ratio=0.5),
15+
dict(type='Normalize', **img_norm_cfg),
16+
dict(type='Pad', size_divisor=32),
17+
dict(type='SegRescale', scale_factor=1 / 4),
18+
dict(type='DefaultFormatBundle'),
19+
dict(
20+
type='Collect',
21+
keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks', 'gt_semantic_seg']),
22+
]
23+
test_pipeline = [
24+
dict(type='LoadImageFromFile'),
25+
dict(
26+
type='MultiScaleFlipAug',
27+
img_scale=(1333, 800),
28+
flip=False,
29+
transforms=[
30+
dict(type='Resize', keep_ratio=True),
31+
dict(type='RandomFlip'),
32+
dict(type='Normalize', **img_norm_cfg),
33+
dict(type='Pad', size_divisor=32),
34+
dict(type='ImageToTensor', keys=['img']),
35+
dict(type='Collect', keys=['img']),
36+
])
37+
]
38+
data = dict(
39+
samples_per_gpu=2,
40+
workers_per_gpu=2,
41+
train=dict(
42+
type=dataset_type,
43+
ann_file=data_root + 'annotations/panoptic_train2017.json',
44+
img_prefix=data_root + 'train2017/',
45+
seg_prefix=data_root + 'annotations/panoptic_train2017/',
46+
pipeline=train_pipeline),
47+
val=dict(
48+
type=dataset_type,
49+
ann_file=data_root + 'annotations/panoptic_val2017.json',
50+
img_prefix=data_root + 'val2017/',
51+
seg_prefix=data_root + 'annotations/panoptic_val2017/',
52+
pipeline=test_pipeline),
53+
test=dict(
54+
type=dataset_type,
55+
ann_file=data_root + 'annotations/panoptic_val2017.json',
56+
img_prefix=data_root + 'val2017/',
57+
seg_prefix=data_root + 'annotations/panoptic_val2017/',
58+
pipeline=test_pipeline))
59+
evaluation = dict(interval=1, metric=['PQ'])
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# dataset settings
2+
dataset_type = 'DeepFashionDataset'
3+
data_root = 'data/DeepFashion/In-shop/'
4+
img_norm_cfg = dict(
5+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
6+
train_pipeline = [
7+
dict(type='LoadImageFromFile'),
8+
dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
9+
dict(type='Resize', img_scale=(750, 1101), keep_ratio=True),
10+
dict(type='RandomFlip', flip_ratio=0.5),
11+
dict(type='Normalize', **img_norm_cfg),
12+
dict(type='Pad', size_divisor=32),
13+
dict(type='DefaultFormatBundle'),
14+
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks']),
15+
]
16+
test_pipeline = [
17+
dict(type='LoadImageFromFile'),
18+
dict(
19+
type='MultiScaleFlipAug',
20+
img_scale=(750, 1101),
21+
flip=False,
22+
transforms=[
23+
dict(type='Resize', keep_ratio=True),
24+
dict(type='RandomFlip'),
25+
dict(type='Normalize', **img_norm_cfg),
26+
dict(type='Pad', size_divisor=32),
27+
dict(type='ImageToTensor', keys=['img']),
28+
dict(type='Collect', keys=['img']),
29+
])
30+
]
31+
data = dict(
32+
imgs_per_gpu=2,
33+
workers_per_gpu=1,
34+
train=dict(
35+
type=dataset_type,
36+
ann_file=data_root + 'annotations/DeepFashion_segmentation_query.json',
37+
img_prefix=data_root + 'Img/',
38+
pipeline=train_pipeline,
39+
data_root=data_root),
40+
val=dict(
41+
type=dataset_type,
42+
ann_file=data_root + 'annotations/DeepFashion_segmentation_query.json',
43+
img_prefix=data_root + 'Img/',
44+
pipeline=test_pipeline,
45+
data_root=data_root),
46+
test=dict(
47+
type=dataset_type,
48+
ann_file=data_root +
49+
'annotations/DeepFashion_segmentation_gallery.json',
50+
img_prefix=data_root + 'Img/',
51+
pipeline=test_pipeline,
52+
data_root=data_root))
53+
evaluation = dict(interval=5, metric=['bbox', 'segm'])

0 commit comments

Comments
 (0)