forked from open-mmlab/mmagic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gca_r34_4xb10-dimaug-200k_comp1k.py
49 lines (42 loc) · 1.36 KB
/
gca_r34_4xb10-dimaug-200k_comp1k.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
_base_ = ['./gca_r34_4xb10-200k_comp1k.py']
experiment_name = 'gca_r34_4xb10-dimaug-200k_comp1k'
work_dir = f'./work_dirs/{experiment_name}'
save_dir = './work_dirs/'
# model settings
model = dict(backbone=dict(encoder=dict(in_channels=4)))
# dataset settings
train_pipeline = [
dict(type='LoadImageFromFile', key='alpha', color_type='grayscale'),
dict(type='LoadImageFromFile', key='merged'),
dict(
type='CropAroundUnknown',
keys=['alpha', 'merged'],
crop_sizes=[320, 480, 640]),
dict(type='Flip', keys=['alpha', 'merged']),
dict(
type='Resize',
keys=['alpha', 'merged'],
scale=(320, 320),
keep_ratio=False),
dict(type='GenerateTrimap', kernel_size=(1, 30)),
dict(type='FormatTrimap', to_onehot=False),
dict(type='PackInputs'),
]
test_pipeline = [
dict(
type='LoadImageFromFile',
key='alpha',
color_type='grayscale',
save_original_img=True),
dict(
type='LoadImageFromFile',
key='trimap',
color_type='grayscale',
save_original_img=True),
dict(type='LoadImageFromFile', key='merged'),
dict(type='FormatTrimap', to_onehot=False),
dict(type='PackInputs'),
]
train_dataloader = dict(dataset=dict(pipeline=train_pipeline))
val_dataloader = dict(dataset=dict(pipeline=test_pipeline))
test_dataloader = val_dataloader