forked from open-mmlab/mmagic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gl_8xb12_places-256x256.py
70 lines (60 loc) · 1.46 KB
/
gl_8xb12_places-256x256.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
_base_ = [
'../_base_/models/base_gl.py', '../_base_/inpaint_default_runtime.py',
'../_base_/datasets/places.py'
]
experiment_name = 'gl_8xb12_places-256x256'
work_dir = f'./work_dirs/{experiment_name}'
save_dir = './work_dirs/'
model = dict(
train_cfg=dict(
disc_step=1,
iter_tc=90000,
iter_td=100000,
start_iter=350000,
local_size=(128, 128)), )
input_shape = (256, 256)
train_pipeline = [
dict(type='LoadImageFromFile', key='gt'),
dict(
type='LoadMask',
mask_mode='bbox',
mask_config=dict(
max_bbox_shape=(128, 128),
max_bbox_delta=40,
min_margin=20,
img_shape=input_shape)),
dict(
type='Crop',
keys=['gt'],
crop_size=(384, 384),
random_crop=True,
),
dict(
type='Resize',
keys=['gt'],
scale=input_shape,
keep_ratio=False,
),
dict(type='GetMaskedImage'),
dict(type='PackInputs'),
]
test_pipeline = train_pipeline
train_dataloader = dict(
batch_size=12,
sampler=dict(shuffle=False),
dataset=dict(pipeline=train_pipeline),
)
val_dataloader = dict(
batch_size=1,
dataset=dict(pipeline=test_pipeline),
)
test_dataloader = val_dataloader
train_cfg = dict(
type='IterBasedTrainLoop',
max_iters=500002,
val_interval=50000,
)
val_cfg = dict(type='MultiValLoop')
test_cfg = dict(type='MultiTestLoop')
# runtime settings
# inheritate from _base_