input_mask_80_90.json 3.93 KB
Newer Older
chenych's avatar
chenych committed
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
{
  "task": "80_90"     // real-world image sr. root/task/images-models-options
  , "model": "plain" // "plain" | "plain2" if two inputs
  // , "gpu_ids": [0,1,2,3]
  , "gpu_ids": [0]
  , "dist": false

  , "scale": 1       // broadcast to "datasets"
  , "n_channels": 3  // broadcast to "datasets", 1 for grayscale, 3 for color

  , "path": {
    "root": "masked_denoising"            // "denoising" | "superresolution" | "dejpeg"
    , "pretrained_netG": null      // path of pretrained model
    , "pretrained_netE": null      // path of pretrained model
},
"datasets": {
    "train": {
      "name": "train_dataset"                    // just name
      , "dataset_type": "masked_denoising"       // "dncnn" | "dnpatch" | "fdncnn" | "ffdnet" | "sr" | "srmd" | "dpsr" | "plain" | "plainpatch" | "jpeg" | "masked_denoising"
      , "dataroot_H": "trainsets/trainH"  // path of H training dataset. DIV2K (800 training images) + Flickr2K (2650 images) + + OST (10324 images)
      , "dataroot_L": null            // path of L training dataset

      , "H_size": 64                   // patch_size 256 | 288 | 320   (256)
      , "lq_patchsize": 64              //  (64)

      , "dataloader_shuffle": true
      , "dataloader_num_workers": 16
      , "dataloader_batch_size": 64      // batch size 1 | 16 | 32 | 48 | 64 | 128. Total batch size =4x8=32 in SwinIR  (32)
      , "noise_level": 15
      , "if_mask": true
      , "mask1": 80
      , "mask2": 90


    }
    , "test": {
      "name": "test_dataset"            // just name
      , "dataset_type": "plain"         // "dncnn" | "dnpatch" | "fdncnn" | "ffdnet" | "sr" | "srmd" | "dpsr" | "plain" | "plainpatch" | "jpeg"
      , "dataroot_H": "testset/McM/HR"  // path of H testing dataset
      , "dataroot_L": "testset/McM/McM_poisson_20"    // path of L testing dataset
    }
  },
  "netG": {
    "net_type": "swinir"
    , "upscale": 1
    , "in_chans": 3
    , "img_size": 64
    , "window_size": 8    //    8     !!!!!!!!!!!!!!!
    , "img_range": 1.0
    , "depths": [6, 6, 6, 6]
    , "embed_dim": 60
    , "num_heads": [6, 6, 6, 6]
    , "mlp_ratio": 2
    , "upsampler": null        // "pixelshuffle" | "pixelshuffledirect" | "nearest+conv" | null
    , "resi_connection": "3conv"        // "1conv" | "3conv"

    , "init_type": "default"

    , "talking_heads": false
    , "attn_fn": "softmax"       // null | "softmax" | "entmax15" |
    , "head_scale": false
    , "on_attn": false

    , "use_mask": true         // if use attention mask
    , "mask_ratio1": 75        // attention mask ratio,
    , "mask_ratio2": 75        // randomly sampling from [mask_ratio1, mask_ratio2]
    , "mask_is_diff": false

    , "type": "stand"


  },
  "train": {
      "manual_seed": 1

    , "G_lossfn_type": "l1"               // "l1" preferred | "l2sum" | "l2" | "ssim" | "charbonnier"
    , "G_lossfn_weight": 1.0            // default

    , "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": 1e-4    // 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": [150000, 200000, 300000, 350000, 400000]   // [250000, 400000, 450000, 475000, 500000]
    , "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  (5000)
    , "checkpoint_save": 5000           // for saving model
    , "checkpoint_print": 100           // for print

    , "save_image": ["img_043_x1", "img_021_x1", "img_024_x1", "img_031_x1", "img_041_x1", "img_032_x1"]   // [250000, 400000, 450000, 475000, 500000]
  }
}