basicvsr_reds.yaml 1.8 KB
Newer Older
L
LielinJiang 已提交
1 2 3 4 5 6 7 8 9 10 11 12
total_iters: 300000
output_dir: output_dir
find_unused_parameters: True
checkpoints_dir: checkpoints
use_dataset: True
# tensor range for function tensor2img
min_max:
  (0., 1.)

model:
  name: BasicVSRModel
  fix_iter: 5000
W
wangna11BD 已提交
13
  lr_mult: 0.125
L
LielinJiang 已提交
14 15 16 17 18 19 20 21 22 23 24 25
  generator:
    name: BasicVSRNet
    mid_channels: 64
    num_blocks: 30
  pixel_criterion:
    name: CharbonnierLoss
    reduction: mean

dataset:
  train:
    name: RepeatDataset
    times: 1000
W
wangna11BD 已提交
26 27
    num_workers: 4
    batch_size: 2  #4 GPUs
L
LielinJiang 已提交
28 29 30 31 32 33 34 35 36 37 38 39 40
    dataset:
      name: SRREDSMultipleGTDataset
      mode: train
      lq_folder: data/REDS/train_sharp_bicubic/X4
      gt_folder: data/REDS/train_sharp/X4
      crop_size: 256
      interval_list: [1]
      random_reverse: False
      number_frames: 15
      use_flip: True
      use_rot: True
      scale: 4
      val_partition: REDS4
41
      num_clips: 270
L
LielinJiang 已提交
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

  test:
    name: SRREDSMultipleGTDataset
    mode: test
    lq_folder: data/REDS/REDS4_test_sharp_bicubic/X4
    gt_folder: data/REDS/REDS4_test_sharp/X4
    interval_list: [1]
    random_reverse: False
    number_frames: 100
    use_flip: False
    use_rot: False
    scale: 4
    val_partition: REDS4
    num_workers: 0
    batch_size: 1

lr_scheduler:
  name: CosineAnnealingRestartLR
  learning_rate: !!float 2e-4
  periods: [300000]
  restart_weights: [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:
L
LielinJiang 已提交
75
  interval: 5000
L
LielinJiang 已提交
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
  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:
  interval: 100
  visiual_interval: 500

snapshot_config:
  interval: 5000
94 95 96

export_model:
  - {name: 'generator', inputs_num: 1}