Spaces:
Running
Running
{ | |
"task": "msrresnet_gan" // | |
, "model": "gan" // "gan" | |
, "gpu_ids": [0] | |
, "scale": 4 // broadcast to "netG" if SISR | |
, "n_channels": 3 // broadcast to "datasets", 1 for grayscale, 3 for color | |
, "sigma": [0, 50] // 15, 25, 50 for DnCNN | [0, 75] for FDnCNN and FFDNet | |
, "sigma_test": 0 // 15, 25, 50 for DnCNN, FDnCNN and FFDNet, 0 for SR | |
, "merge_bn": false // if no BN exists, set false | |
, "merge_bn_startpoint": 400000 // merge BN after N iterations | |
, "path": { | |
"root": "superresolution" // "denoising" | "superresolution" | |
, "pretrained_netG": null // path of pretrained model | |
, "pretrained_netD": null // path of pretrained model | |
, "pretrained_netE": null // path of pretrained model | |
} | |
, "datasets": { | |
"train": { | |
"name": "train_dataset" // just name | |
, "dataset_type": "sr" // "dncnn" | "dnpatch" | "fdncnn" | "ffdnet" | "sr" | "srmd" | "dpsr" | "plain" | "plainpatch" | |
, "dataroot_H": "trainsets/trainH"// path of H training dataset | |
, "dataroot_L": null // path of L training dataset | |
, "H_size": 96 // patch size 40 | 64 | 96 | 128 | 192 | |
, "dataloader_shuffle": true | |
, "dataloader_num_workers": 8 | |
, "dataloader_batch_size": 32 // batch size 1 | 16 | 32 | 48 | 64 | 128 | |
} | |
, "test": { | |
"name": "test_dataset" // just name | |
, "dataset_type": "sr" // "dncnn" | "dnpatch" | "fdncnn" | "ffdnet" | "sr" | "srmd" | "dpsr" | "plain" | "plainpatch" | |
, "dataroot_H": "testsets/set5" // path of H testing dataset | |
, "dataroot_L": null // path of L testing dataset | |
} | |
} | |
, "netG": { | |
"net_type": "msrresnet0" // "dncnn" | "fdncnn" | "ffdnet" | "srmd" | "dpsr" | "msrresnet0" | "msrresnet1" | "rrdb" | |
, "in_nc": 3 // input channel number | |
, "out_nc": 3 // ouput channel number | |
, "nc": 64 // 96 for DPSR, 128 for SRMD, 64 for DnCNN and MSRResNet | |
, "nb": 16 // 12 for "srmd", 15 for "ffdnet", 20 for "dncnn", 16 for "srresnet" and "dpsr" | |
, "gc": 32 // unused | |
, "ng": 2 // unused | |
, "reduction" : 16 // unused | |
, "act_mode": "R" // "BR" for BN+ReLU | "R" for ReLU | |
, "upsample_mode": "upconv" // "pixelshuffle" | "convtranspose" | "upconv" | |
, "downsample_mode": "strideconv" // "strideconv" | "avgpool" | "maxpool" | |
, "init_type": "orthogonal" // "orthogonal" | "normal" | "uniform" | "xavier_normal" | "xavier_uniform" | "kaiming_normal" | "kaiming_uniform" | |
, "init_bn_type": "uniform" // "uniform" | "constant" | |
, "init_gain": 0.2 | |
} | |
, "netD": { | |
"net_type": "discriminator_vgg_96" // "discriminator_patchgan" | "discriminator_unet" | "discriminator_vgg_192" | "discriminator_vgg_128" | "discriminator_vgg_96" | |
, "in_nc": 3 | |
, "base_nc": 64 | |
, "act_mode": "BL" // "BL" means BN+LeakyReLU | |
, "n_layers": 3 // only for "net_type":"discriminator_patchgan" | |
, "norm_type": 3 // only for "net_type":"discriminator_patchgan" | 'batch', 'instance', 'spectral', 'batchspectral', instancespectral' | |
, "init_type": "orthogonal" // "orthogonal" | "normal" | "uniform" | "xavier_normal" | "xavier_uniform" | "kaiming_normal" | "kaiming_uniform" | |
, "init_bn_type": "uniform" // "uniform" | "constant" | |
, "init_gain": 0.2 | |
} | |
, "train": { | |
"G_lossfn_type": "l1" // "l1" | "l2" | "l2sum" | "l1c" | "ssim" | |
, "G_lossfn_weight": 1e-2 | |
, "F_lossfn_type": "l1" // "l1" | "l2" | |
, "F_lossfn_weight": 1 | |
, "F_feature_layer": 34 // 25 | [2,7,16,25,34] | |
, "F_weights": 1.0 // 1.0 | [0.1,0.1,1.0,1.0,1.0] | |
, "F_use_input_norm": true | |
, "F_use_range_norm": false | |
, "gan_type": "ragan" // "gan" | "ragan" | "lsgan" | "wgan" | "softplusgan" | |
, "D_lossfn_weight": 5e-3 | |
, "E_decay": 0.999 // Exponential Moving Average for netG: set 0 to disable; default setting 0.999 | |
, "D_init_iters": 0 | |
, "G_optimizer_type": "adam" | |
, "G_optimizer_lr": 1e-5 | |
, "G_optimizer_wd": 0 | |
, "D_optimizer_type": "adam" | |
, "D_optimizer_lr": 1e-5 | |
, "D_optimizer_wd": 0 | |
, "G_scheduler_type": "MultiStepLR" | |
, "G_scheduler_milestones": [200000, 800000, 1200000, 2000000] | |
, "G_scheduler_gamma": 0.5 | |
, "G_optimizer_reuse": false | |
, "D_scheduler_type": "MultiStepLR" | |
, "D_scheduler_milestones": [200000, 800000, 1200000, 2000000] | |
, "D_scheduler_gamma": 0.5 | |
, "D_optimizer_reuse": false | |
, "G_param_strict": true | |
, "D_param_strict": true | |
, "E_param_strict": true | |
, "checkpoint_test": 5000 | |
, "checkpoint_save": 5000 | |
, "checkpoint_print": 200 | |
} | |
} | |