edvr_m_wo_tsa.yaml 3.0 KB
Newer Older
W
wangna11BD 已提交
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
total_iters: 600000
output_dir: output_dir
checkpoints_dir: checkpoints
# tensor range for function tensor2img
min_max:
  (0., 1.)

model:
  name: EDVRModel
  tsa_iter: 0
  generator:
    name: EDVRNet
    in_nf: 3
    out_nf: 3
    scale_factor: 4
    nf: 64
    nframes: 5
    groups: 8
    front_RBs: 5
    back_RBs: 10
    center: 2
    predeblur: False
    HR_in: False
    w_TSA: False
  pixel_criterion:
    name: CharbonnierLoss

B
Birdylx 已提交
28 29 30
export_model:
  - {name: 'generator', inputs_num: 1}

W
wangna11BD 已提交
31 32
dataset:
  train:
W
wangna11BD 已提交
33 34
    name: RepeatDataset
    times: 1000
W
wangna11BD 已提交
35
    num_workers: 3
W
wangna11BD 已提交
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
    batch_size: 4  #8 gpus
    dataset:
      name: VSRREDSDataset
      lq_folder: data/REDS/train_sharp_bicubic/X4
      gt_folder: data/REDS/train_sharp/X4
      ann_file: data/REDS/meta_info_REDS_GT.txt
      num_frames: 5
      val_partition: REDS4
      test_mode: False
      preprocess:
        - name: GetFrameIdx
          interval_list: [1]
          frames_per_clip: 99
        - name: ReadImageSequence
          key: lq
        - name: ReadImageSequence
          key: gt
        - name: Transforms
          input_keys: [lq, gt]
          pipeline:
            - name: SRPairedRandomCrop
              gt_patch_size: 256
              scale: 4
              keys: [image, image]
            - name: PairedRandomHorizontalFlip
              keys: [image, image]
            - name: PairedRandomVerticalFlip
              keys: [image, image]
            - name: PairedRandomTransposeHW
              keys: [image, image]
            - name: TransposeSequence
              keys: [image, image]
            - name: NormalizeSequence
              mean: [0., 0., 0.]
              std: [255., 255., 255.]
              keys: [image, image]
W
wangna11BD 已提交
72 73 74


  test:
W
wangna11BD 已提交
75
    name: VSRREDSDataset
W
wangna11BD 已提交
76
    lq_folder: data/REDS/REDS4_test_sharp_bicubic/X4
W
wangna11BD 已提交
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
    gt_folder: data/REDS/REDS4_test_sharp/X4
    ann_file: data/REDS/meta_info_REDS_GT.txt
    num_frames: 5
    val_partition: REDS4
    test_mode: True
    preprocess:
        - name: GetFrameIdxwithPadding
          padding: reflection_circle
        - name: ReadImageSequence
          key: lq
        - name: ReadImageSequence
          key: gt
        - name: Transforms
          input_keys: [lq, gt]
          pipeline:
            - name: TransposeSequence
              keys: [image, image]
            - name: NormalizeSequence
              mean: [0., 0., 0.]
              std: [255., 255., 255.]
              keys: [image, image]
W
wangna11BD 已提交
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129

lr_scheduler:
  name: CosineAnnealingRestartLR
  learning_rate: !!float 4e-4
  periods: [150000, 150000, 150000, 150000]
  restart_weights: [1, 1, 1, 1]
  eta_min: !!float 1e-7

optimizer:
  name: Adam
  # add parameters of net_name to optim
  # name should in self.nets
  net_names:
    - generator
  beta1: 0.9
  beta2: 0.99

validate:
  interval: 5000
  save_img: false

  metrics:
    psnr: # metric name, can be arbitrary
      name: PSNR
      crop_border: 0
      test_y_channel: False
    ssim:
      name: SSIM
      crop_border: 0
      test_y_channel: False

log_config:
130 131
  interval: 100
  visiual_interval: 5000
W
wangna11BD 已提交
132 133 134

snapshot_config:
  interval: 5000