Spaces:
Running
Running
{ | |
"task": "swinir_car_jpeg_40" // JPEG compression artifact reduction for quality factor 10/20/30/40. root/task/images-models-options | |
, "model": "plain" // "plain" | "plain2" if two inputs | |
, "gpu_ids": [0,1,2,3,4,5,6,7] | |
, "dist": true | |
, "is_color": false // color or grayscale | |
, "path": { | |
"root": "dejpeg" // "denoising" | "superresolution" | "dejpeg" | |
, "pretrained_netG": null // path of pretrained model. We fine-tune quality=10/20/30 models from quality=40 model, so that `G_optimizer_lr` and `G_scheduler_milestones` can be halved to save time. | |
, "pretrained_netE": null // path of pretrained model | |
} | |
, "datasets": { | |
"train": { | |
"name": "train_dataset" // just name | |
, "dataset_type": "jpeg" // "dncnn" | "dnpatch" | "fdncnn" | "ffdnet" | "sr" | "srmd" | "dpsr" | "plain" | "plainpatch" | "jpeg" | |
, "dataroot_H": "trainsets/trainH"// path of H training dataset. DIV2K (800 training images) + Flickr2K (2650 images) + BSD500 (400 training&testing images) + WED(4744 images) in SwinIR | |
, "dataroot_L": null // path of L training dataset | |
, "H_size": 126 // patch_size | |
, "quality_factor": 40 // 10 | 20 | 30 | 40. | |
, "quality_factor_test": 40 // | |
, "is_color": false // | |
, "dataloader_shuffle": true | |
, "dataloader_num_workers": 16 | |
, "dataloader_batch_size": 8 // batch size 1 | 16 | 32 | 48 | 64 | 128. Total batch size =1x8=8 in SwinIR | |
} | |
, "test": { | |
"name": "test_dataset" // just name | |
, "dataset_type": "jpeg" // "dncnn" | "dnpatch" | "fdncnn" | "ffdnet" | "sr" | "srmd" | "dpsr" | "plain" | "plainpatch" | "jpeg" | |
, "dataroot_H": "testsets/LIVE1" // path of H testing dataset | |
, "dataroot_L": null // path of L testing dataset | |
, "quality_factor": 40 // 10 | 20 | 30 | 40. | |
, "quality_factor_test": 40 // | |
, "is_color": false // | |
} | |
} | |
, "netG": { | |
"net_type": "swinir" | |
, "upscale": 1 | |
, "in_chans": 1 | |
, "img_size": 126 | |
, "window_size": 7 // 7 works better than 8, maybe because jpeg encoding uses 8x8 patches | |
, "img_range": 255.0 // image_range=255.0 is slightly better | |
, "depths": [6, 6, 6, 6, 6, 6] | |
, "embed_dim": 180 | |
, "num_heads": [6, 6, 6, 6, 6, 6] | |
, "mlp_ratio": 2 | |
, "upsampler": null // "pixelshuffle" | "pixelshuffledirect" | "nearest+conv" | null | |
, "resi_connection": "1conv" // "1conv" | "3conv" | |
, "init_type": "default" | |
} | |
, "train": { | |
"G_lossfn_type": "charbonnier" // "l1" | "l2sum" | "l2" | "ssim" | "charbonnier" preferred | |
, "G_lossfn_weight": 1.0 // default | |
, "G_charbonnier_eps": 1e-9 | |
, "E_decay": 0.999 // Exponential Moving Average for netG: set 0 to disable; default setting 0.999 | |
, "G_optimizer_type": "adam" // fixed, adam is enough | |
, "G_optimizer_lr": 2e-4 // learning rate | |
, "G_optimizer_wd": 0 // weight decay, default 0 | |
, "G_optimizer_clipgrad": null // unused | |
, "G_optimizer_reuse": true // | |
, "G_scheduler_type": "MultiStepLR" // "MultiStepLR" is enough | |
, "G_scheduler_milestones": [800000, 1200000, 1400000, 1500000, 1600000] | |
, "G_scheduler_gamma": 0.5 | |
, "G_regularizer_orthstep": null // unused | |
, "G_regularizer_clipstep": null // unused | |
, "G_param_strict": true | |
, "E_param_strict": true | |
, "checkpoint_test": 5000 // for testing | |
, "checkpoint_save": 5000 // for saving model | |
, "checkpoint_print": 200 // for print | |
} | |
} | |