Upload train_realesrnet_x4plus.yml
Browse files
options/train_realesrnet_x4plus.yml
ADDED
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# general settings
|
2 |
+
name: train_RealESRNetx4plus_1000k_B12G4
|
3 |
+
model_type: RealESRNetModel
|
4 |
+
scale: 4
|
5 |
+
num_gpu: auto # auto: can infer from your visible devices automatically. official: 4 GPUs
|
6 |
+
manual_seed: 0
|
7 |
+
|
8 |
+
# ----------------- options for synthesizing training data in RealESRNetModel ----------------- #
|
9 |
+
gt_usm: True # USM the ground-truth
|
10 |
+
|
11 |
+
# the first degradation process
|
12 |
+
resize_prob: [0.2, 0.7, 0.1] # up, down, keep
|
13 |
+
resize_range: [0.15, 1.5]
|
14 |
+
gaussian_noise_prob: 0.5
|
15 |
+
noise_range: [1, 30]
|
16 |
+
poisson_scale_range: [0.05, 3]
|
17 |
+
gray_noise_prob: 0.4
|
18 |
+
jpeg_range: [30, 95]
|
19 |
+
|
20 |
+
# the second degradation process
|
21 |
+
second_blur_prob: 0.8
|
22 |
+
resize_prob2: [0.3, 0.4, 0.3] # up, down, keep
|
23 |
+
resize_range2: [0.3, 1.2]
|
24 |
+
gaussian_noise_prob2: 0.5
|
25 |
+
noise_range2: [1, 25]
|
26 |
+
poisson_scale_range2: [0.05, 2.5]
|
27 |
+
gray_noise_prob2: 0.4
|
28 |
+
jpeg_range2: [30, 95]
|
29 |
+
|
30 |
+
gt_size: 256
|
31 |
+
queue_size: 180
|
32 |
+
|
33 |
+
# dataset and data loader settings
|
34 |
+
datasets:
|
35 |
+
train:
|
36 |
+
name: DF2K+OST
|
37 |
+
type: RealESRGANDataset
|
38 |
+
dataroot_gt: datasets/DF2K
|
39 |
+
meta_info: datasets/DF2K/meta_info/meta_info_DF2Kmultiscale+OST_sub.txt
|
40 |
+
io_backend:
|
41 |
+
type: disk
|
42 |
+
|
43 |
+
blur_kernel_size: 21
|
44 |
+
kernel_list: ['iso', 'aniso', 'generalized_iso', 'generalized_aniso', 'plateau_iso', 'plateau_aniso']
|
45 |
+
kernel_prob: [0.45, 0.25, 0.12, 0.03, 0.12, 0.03]
|
46 |
+
sinc_prob: 0.1
|
47 |
+
blur_sigma: [0.2, 3]
|
48 |
+
betag_range: [0.5, 4]
|
49 |
+
betap_range: [1, 2]
|
50 |
+
|
51 |
+
blur_kernel_size2: 21
|
52 |
+
kernel_list2: ['iso', 'aniso', 'generalized_iso', 'generalized_aniso', 'plateau_iso', 'plateau_aniso']
|
53 |
+
kernel_prob2: [0.45, 0.25, 0.12, 0.03, 0.12, 0.03]
|
54 |
+
sinc_prob2: 0.1
|
55 |
+
blur_sigma2: [0.2, 1.5]
|
56 |
+
betag_range2: [0.5, 4]
|
57 |
+
betap_range2: [1, 2]
|
58 |
+
|
59 |
+
final_sinc_prob: 0.8
|
60 |
+
|
61 |
+
gt_size: 256
|
62 |
+
use_hflip: True
|
63 |
+
use_rot: False
|
64 |
+
|
65 |
+
# data loader
|
66 |
+
use_shuffle: true
|
67 |
+
num_worker_per_gpu: 5
|
68 |
+
batch_size_per_gpu: 12
|
69 |
+
dataset_enlarge_ratio: 1
|
70 |
+
prefetch_mode: ~
|
71 |
+
|
72 |
+
# Uncomment these for validation
|
73 |
+
# val:
|
74 |
+
# name: validation
|
75 |
+
# type: PairedImageDataset
|
76 |
+
# dataroot_gt: path_to_gt
|
77 |
+
# dataroot_lq: path_to_lq
|
78 |
+
# io_backend:
|
79 |
+
# type: disk
|
80 |
+
|
81 |
+
# network structures
|
82 |
+
network_g:
|
83 |
+
type: RRDBNet
|
84 |
+
num_in_ch: 3
|
85 |
+
num_out_ch: 3
|
86 |
+
num_feat: 64
|
87 |
+
num_block: 23
|
88 |
+
num_grow_ch: 32
|
89 |
+
|
90 |
+
# path
|
91 |
+
path:
|
92 |
+
pretrain_network_g: experiments/pretrained_models/ESRGAN_SRx4_DF2KOST_official-ff704c30.pth
|
93 |
+
param_key_g: params_ema
|
94 |
+
strict_load_g: true
|
95 |
+
resume_state: ~
|
96 |
+
|
97 |
+
# training settings
|
98 |
+
train:
|
99 |
+
ema_decay: 0.999
|
100 |
+
optim_g:
|
101 |
+
type: Adam
|
102 |
+
lr: !!float 2e-4
|
103 |
+
weight_decay: 0
|
104 |
+
betas: [0.9, 0.99]
|
105 |
+
|
106 |
+
scheduler:
|
107 |
+
type: MultiStepLR
|
108 |
+
milestones: [1000000]
|
109 |
+
gamma: 0.5
|
110 |
+
|
111 |
+
total_iter: 1000000
|
112 |
+
warmup_iter: -1 # no warm up
|
113 |
+
|
114 |
+
# losses
|
115 |
+
pixel_opt:
|
116 |
+
type: L1Loss
|
117 |
+
loss_weight: 1.0
|
118 |
+
reduction: mean
|
119 |
+
|
120 |
+
# Uncomment these for validation
|
121 |
+
# validation settings
|
122 |
+
# val:
|
123 |
+
# val_freq: !!float 5e3
|
124 |
+
# save_img: True
|
125 |
+
|
126 |
+
# metrics:
|
127 |
+
# psnr: # metric name
|
128 |
+
# type: calculate_psnr
|
129 |
+
# crop_border: 4
|
130 |
+
# test_y_channel: false
|
131 |
+
|
132 |
+
# logging settings
|
133 |
+
logger:
|
134 |
+
print_freq: 100
|
135 |
+
save_checkpoint_freq: !!float 5e3
|
136 |
+
use_tb_logger: true
|
137 |
+
wandb:
|
138 |
+
project: ~
|
139 |
+
resume_id: ~
|
140 |
+
|
141 |
+
# dist training settings
|
142 |
+
dist_params:
|
143 |
+
backend: nccl
|
144 |
+
port: 29500
|