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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: UltraSharp
|
| 2 |
+
use_tb_logger: true
|
| 3 |
+
model: sr
|
| 4 |
+
scale: 4
|
| 5 |
+
gpu_ids: [0]
|
| 6 |
+
use_amp: true
|
| 7 |
+
use_swa: false
|
| 8 |
+
use_cem: false
|
| 9 |
+
|
| 10 |
+
# Dataset options:
|
| 11 |
+
datasets:
|
| 12 |
+
train:
|
| 13 |
+
name: UltraSharp
|
| 14 |
+
mode: aligned
|
| 15 |
+
dataroot_HR: [
|
| 16 |
+
'!!!! CHANGE THIS OR COMMENT OUT',
|
| 17 |
+
dataroot_LR: [
|
| 18 |
+
'!!!! CHANGE THIS OR COMMENT OUT'
|
| 19 |
+
] # low resolution images
|
| 20 |
+
subset_file: null
|
| 21 |
+
use_shuffle: true
|
| 22 |
+
znorm: false
|
| 23 |
+
n_workers: 4
|
| 24 |
+
batch_size: 4
|
| 25 |
+
virtual_batch_size: 8
|
| 26 |
+
preprocess: crop
|
| 27 |
+
crop_size: 128
|
| 28 |
+
image_channels: 3
|
| 29 |
+
|
| 30 |
+
# Color space conversion
|
| 31 |
+
# color: 'y'
|
| 32 |
+
# color_LR: 'y'
|
| 33 |
+
# color_HR: 'y'
|
| 34 |
+
|
| 35 |
+
# LR and HR modifiers.
|
| 36 |
+
# aug_downscale: 0.2
|
| 37 |
+
# shape_change: reshape_lr
|
| 38 |
+
|
| 39 |
+
# Enable random downscaling of HR images (will fix LR pair to correct size)
|
| 40 |
+
# hr_downscale: true
|
| 41 |
+
# hr_downscale_amt: [2, 1.75, 1.5, 1]
|
| 42 |
+
# #pre_crop: true
|
| 43 |
+
|
| 44 |
+
# Presets and on the fly (OTF) augmentations
|
| 45 |
+
#augs_strategy: combo
|
| 46 |
+
add_blur_preset: custom_blur
|
| 47 |
+
add_resize_preset: custom_resize
|
| 48 |
+
add_noise_preset: custom_noise
|
| 49 |
+
aug_downscale: 0.2
|
| 50 |
+
resize_strat: pre
|
| 51 |
+
|
| 52 |
+
# On the fly generation of LR:
|
| 53 |
+
dataroot_kernels: 'KERNEL PATH !!!! CHANGE THIS OR COMMENT OUT'
|
| 54 |
+
lr_downscale: true
|
| 55 |
+
lr_downscale_types: ["linear", "bicubic", "nearest_aligned"]
|
| 56 |
+
|
| 57 |
+
# Rotations augmentations:
|
| 58 |
+
use_flip: true
|
| 59 |
+
use_rot: true
|
| 60 |
+
use_hrrot: false
|
| 61 |
+
|
| 62 |
+
# Noise and blur augmentations:
|
| 63 |
+
lr_blur: false
|
| 64 |
+
lr_blur_types: {sinc: 0.2, iso: 0.2, ansio2: 0.4, sinc2: 0.2, clean: 3}
|
| 65 |
+
noise_data: 'NOISE PATH !!!! CHANGE THIS OR COMMENT OUT'
|
| 66 |
+
lr_noise: false
|
| 67 |
+
lr_noise_types: {camera: 0.1, jpeg: 0.8, clean: 3}
|
| 68 |
+
lr_noise2: false
|
| 69 |
+
lr_noise_types2: {jpeg: 1, webp: 0, clean: 2, camera: 2}
|
| 70 |
+
hr_noise: false
|
| 71 |
+
hr_noise_types: {gaussian: 1, clean: 4}
|
| 72 |
+
|
| 73 |
+
# Color augmentations
|
| 74 |
+
# lr_fringes: false
|
| 75 |
+
# lr_fringes_chance: 0.4
|
| 76 |
+
# auto_levels: HR
|
| 77 |
+
# rand_auto_levels: 0.7
|
| 78 |
+
#lr_unsharp_mask: true
|
| 79 |
+
#lr_rand_unsharp: 0.7
|
| 80 |
+
# hr_unsharp_mask: true
|
| 81 |
+
# hr_rand_unsharp: 1
|
| 82 |
+
|
| 83 |
+
# Augmentations for classification or (maybe) inpainting networks:
|
| 84 |
+
# lr_cutout: false
|
| 85 |
+
# lr_erasing: false
|
| 86 |
+
|
| 87 |
+
#val:
|
| 88 |
+
#name: val_set14_part
|
| 89 |
+
#mode: aligned
|
| 90 |
+
#dataroot_B: '../datasets/val/hr'
|
| 91 |
+
#dataroot_A: '../datasets/val/lr'
|
| 92 |
+
|
| 93 |
+
#znorm: false
|
| 94 |
+
|
| 95 |
+
# Color space conversion:
|
| 96 |
+
# color: 'y'
|
| 97 |
+
# color_LR: 'y'
|
| 98 |
+
# color_HR: 'y'
|
| 99 |
+
|
| 100 |
+
lr_downscale: true
|
| 101 |
+
lr_downscale_types: ["linear", "bicubic", "nearest_aligned"]
|
| 102 |
+
|
| 103 |
+
path:
|
| 104 |
+
root: '../'
|
| 105 |
+
pretrain_model_G: 'UniScale-Balanced was used originally !!!! CHANGE THIS OR COMMENT OUT'
|
| 106 |
+
#pretrain_model_G: '../experiments/pretrained_models//.pth'
|
| 107 |
+
# pretrain_model_D: '../experiments/pretrained_models/patchgan.pth'
|
| 108 |
+
#resume_state: '!!!! CHANGE THIS OR COMMENT OUT'
|
| 109 |
+
|
| 110 |
+
# Generator options:
|
| 111 |
+
network_G: # configurations for the Generator network
|
| 112 |
+
which_model_G: RRDB_net # check:
|
| 113 |
+
|
| 114 |
+
# Discriminator options:
|
| 115 |
+
network_D: unet
|
| 116 |
+
|
| 117 |
+
train:
|
| 118 |
+
# Optimizer options:
|
| 119 |
+
optim_G: AdamP
|
| 120 |
+
optim_D: AdamP
|
| 121 |
+
|
| 122 |
+
# Schedulers options:
|
| 123 |
+
lr_scheme: MultiStepLR
|
| 124 |
+
lr_steps_rel: [0.1, 0.2, 0.4, 0.6]
|
| 125 |
+
lr_gamma: 0.4
|
| 126 |
+
|
| 127 |
+
# For SWA scheduler
|
| 128 |
+
swa_start_iter_rel: 0.05
|
| 129 |
+
swa_lr: 1e-4
|
| 130 |
+
swa_anneal_epochs: 10
|
| 131 |
+
swa_anneal_strategy: "cos"
|
| 132 |
+
|
| 133 |
+
# Losses:
|
| 134 |
+
pixel_criterion: clipl1 # pixel (content) loss
|
| 135 |
+
pixel_weight: 0.12
|
| 136 |
+
feature_criterion: l1 # feature loss (VGG feature network)
|
| 137 |
+
feature_weight: 0.3
|
| 138 |
+
cx_type: contextual # contextual loss
|
| 139 |
+
cx_weight: 0.25
|
| 140 |
+
cx_vgg_layers: {conv_3_2: 1, conv_4_2: 1}
|
| 141 |
+
#hfen_criterion: l1 # hfen
|
| 142 |
+
#hfen_weight: 1e-6
|
| 143 |
+
#grad_type: grad-4d-l1 # image gradient loss
|
| 144 |
+
#grad_weight: 4e-1
|
| 145 |
+
# tv_type: normal # total variation
|
| 146 |
+
# tv_weight: 1e-5
|
| 147 |
+
# tv_norm: 1
|
| 148 |
+
ssim_type: ssim # structural similarity
|
| 149 |
+
ssim_weight: 0.05
|
| 150 |
+
lpips_weight: 0.25 # [.25] perceptual loss
|
| 151 |
+
lpips_type: net-lin
|
| 152 |
+
lpips_net: squeeze
|
| 153 |
+
|
| 154 |
+
# Experimental losses
|
| 155 |
+
# spl_type: spl # spatial profile loss
|
| 156 |
+
# spl_weight: 0.1
|
| 157 |
+
#of_type: overflow # overflow loss
|
| 158 |
+
#of_weight: 0.1
|
| 159 |
+
# range_weight: 1 # range loss
|
| 160 |
+
fft_type: fft # FFT loss
|
| 161 |
+
fft_weight: 0.3 #[.2]
|
| 162 |
+
# color_criterion: color-l1cosinesim # color consistency loss
|
| 163 |
+
# color_weight: 1
|
| 164 |
+
# avg_criterion: avg-l1 # averaging downscale loss
|
| 165 |
+
# avg_weight: 5
|
| 166 |
+
# ms_criterion: multiscale-l1 # multi-scale pixel loss
|
| 167 |
+
# ms_weight: 1e-2
|
| 168 |
+
#fdpl_type: fdpl # frequency domain-based perceptual loss
|
| 169 |
+
#fdpl_weight: 1e-3
|
| 170 |
+
|
| 171 |
+
# Adversarial loss:
|
| 172 |
+
gan_type: vanilla
|
| 173 |
+
gan_weight: 4e-3
|
| 174 |
+
# freeze_loc: 4
|
| 175 |
+
# For wgan-gp:
|
| 176 |
+
# D_update_ratio: 1
|
| 177 |
+
# D_init_iters: 0
|
| 178 |
+
# gp_weigth: 10
|
| 179 |
+
# Feature matching (if using the discriminator_vgg_128_fea or discriminator_vgg_fea):
|
| 180 |
+
# gan_featmaps: true
|
| 181 |
+
# dis_feature_criterion: cb # discriminator feature loss
|
| 182 |
+
# dis_feature_weight: 0.01
|
| 183 |
+
|
| 184 |
+
# For PPON:
|
| 185 |
+
# p1_losses: [pix]
|
| 186 |
+
# p2_losses: [pix-multiscale, ms-ssim]
|
| 187 |
+
# p3_losses: [fea]
|
| 188 |
+
# ppon_stages: [1000, 2000]
|
| 189 |
+
|
| 190 |
+
# Differentiable Augmentation for Data-Efficient GAN Training
|
| 191 |
+
# diffaug: true
|
| 192 |
+
# dapolicy: 'color,transl_zoom,flip,rotate,cutout'
|
| 193 |
+
|
| 194 |
+
# Batch (Mixup) augmentations
|
| 195 |
+
mixup: true
|
| 196 |
+
mixopts: [blend, rgb, mixup, cutmix, cutmixup] # , "cutout", "cutblur"]
|
| 197 |
+
mixprob: [1, 1, 1.0, 1.0, 1.0] #, 1.0, 1.0]
|
| 198 |
+
#mixalpha: [0.6, 1.0, 1.2, 0.7, 0.7] #, 0.001, 0.7]
|
| 199 |
+
aux_mixprob: 1.0
|
| 200 |
+
#aux_mixalpha: 1.2
|
| 201 |
+
mix_p: 1.2
|
| 202 |
+
|
| 203 |
+
# Frequency Separator
|
| 204 |
+
# fs: true
|
| 205 |
+
# lpf_type: average
|
| 206 |
+
# hpf_type: average
|
| 207 |
+
|
| 208 |
+
# Other training options:
|
| 209 |
+
manual_seed: 0
|
| 210 |
+
niter: 5e5
|
| 211 |
+
# warmup_iter: -1
|
| 212 |
+
#val_freq: 5e3
|
| 213 |
+
# overwrite_val_imgs: true
|
| 214 |
+
# val_comparison: true
|
| 215 |
+
metrics: 'psnr,ssim,lpips'
|
| 216 |
+
grad_clip: norm
|
| 217 |
+
grad_clip_value: 0.1 # "auto"
|
| 218 |
+
|
| 219 |
+
logger:
|
| 220 |
+
print_freq: 100
|
| 221 |
+
save_checkpoint_freq: 800
|
| 222 |
+
overwrite_chkp: false
|