-
Notifications
You must be signed in to change notification settings - Fork 57
/
DefocusDeblur_DualPixel_16bit_MIRNet_v2.yml
133 lines (114 loc) · 3.05 KB
/
DefocusDeblur_DualPixel_16bit_MIRNet_v2.yml
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# general settings
name: DefocusDeblur_DualPixel_16bit_MIRNet_v2
model_type: ImageCleanModel
scale: 1
num_gpu: 8 # set num_gpu: 0 for cpu mode
manual_seed: 100
# dataset and data loader settings
datasets:
train:
name: TrainSet
type: Dataset_DefocusDeblur_DualPixel_16bit
dataroot_gt: ./Defocus_Deblurring/Datasets/train/DPDD/target_crops
dataroot_lqL: ./Defocus_Deblurring/Datasets/train/DPDD/inputL_crops
dataroot_lqR: ./Defocus_Deblurring/Datasets/train/DPDD/inputR_crops
geometric_augs: true
filename_tmpl: '{}'
io_backend:
type: disk
# data loader
use_shuffle: true
num_worker_per_gpu: 8
batch_size_per_gpu: 8
### -------------Progressive training--------------------------
mini_batch_sizes: [8,5,4,2,1,1] # Batch size per gpu
iters: [92000,64000,48000,36000,36000,24000]
gt_size: 384 # Max patch size for progressive training
gt_sizes: [128,160,192,256,320,384] # Patch sizes for progressive training.
### ------------------------------------------------------------
### ------- Training on single fixed-patch size 128x128---------
# mini_batch_sizes: [8]
# iters: [300000]
# gt_size: 128
# gt_sizes: [128]
### ------------------------------------------------------------
dataset_enlarge_ratio: 1
prefetch_mode: ~
val:
name: ValSet
type: Dataset_DefocusDeblur_DualPixel_16bit
dataroot_gt: ./Defocus_Deblurring/Datasets/val/DPDD/target_crops
dataroot_lqL: ./Defocus_Deblurring/Datasets/val/DPDD/inputL_crops
dataroot_lqR: ./Defocus_Deblurring/Datasets/val/DPDD/inputR_crops
io_backend:
type: disk
# network structures
network_g:
type: MIRNet_v2
inp_channels: 6
out_channels: 3
n_feat: 80
chan_factor: 1.5
n_RRG: 4
n_MRB: 2
height: 3
width: 2
scale: 1
task: 'defocus_deblurring'
# path
path:
pretrain_network_g: ~
strict_load_g: true
resume_state: ~
# training settings
train:
total_iter: 300000
warmup_iter: -1 # no warm up
use_grad_clip: true
# Split 300k iterations into two cycles.
# 1st cycle: fixed 3e-4 LR for 92k iters.
# 2nd cycle: cosine annealing (3e-4 to 1e-6) for 208k iters.
scheduler:
type: CosineAnnealingRestartCyclicLR
periods: [92000, 208000]
restart_weights: [1,1]
eta_mins: [0.0003,0.000001]
mixing_augs:
mixup: false
mixup_beta: 1.2
use_identity: true
optim_g:
type: Adam
lr: !!float 2e-4
# weight_decay: !!float 1e-4
betas: [0.9, 0.999]
# losses
pixel_opt:
type: L1Loss
loss_weight: 1
reduction: mean
# validation settings
val:
window_size: 4
val_freq: !!float 4e3
save_img: false
rgb2bgr: true
use_image: false
max_minibatch: 8
metrics:
psnr: # metric name, can be arbitrary
type: calculate_psnr
crop_border: 0
test_y_channel: false
# logging settings
logger:
print_freq: 1000
save_checkpoint_freq: !!float 4e3
use_tb_logger: true
wandb:
project: ~
resume_id: ~
# dist training settings
dist_params:
backend: nccl
port: 29500