xinntao / EDVR

Winning Solution in NTIRE19 Challenges on Video Restoration and Enhancement (CVPR19 Workshops) - Video Restoration with Enhanced Deformable Convolutional Networks. EDVR has been merged into BasicSR and this repo is a mirror of BasicSR.
https://github.com/xinntao/BasicSR
1.48k stars 320 forks source link

How should I configure if I want to train a denoising model? #124

Open carryyu opened 4 years ago

carryyu commented 4 years ago

As the title, I have try to train a denoising model by change the HR_in to True. But there are something wrong when I test.The result is poor.Can u help me? I have modified the code to use images instead of lmdb when training and it performs well in SR. My configuration file is as follows:

#### general settings
name: EDVR_train_all_denoising
use_tb_logger: true
model: video_base
distortion: sr
scale: 1
gpu_ids: [6,7,8,9]
#### datasets
datasets:
  train:
    name: unlmdb
    mode: unlmdb
    interval_list: [1]
    random_reverse: false
    border_mode: false
    dataroot_GT: /home/lzy/Downloads/EDVR-master/datasets/all_data/gt_resize
    dataroot_LQ: /home/lzy/Downloads/EDVR-master/datasets/all_data/input
    cache_keys: ~

    N_frames: 5
    random_crop: True
    use_shuffle: true
    n_workers: 4  # per GPU
    batch_size: 20
    GT_size: 512
    LQ_size: 512
    use_flip: false
    use_rot: false
    color: RGB

#### network structures
network_G:
  which_model_G: EDVR
  nf: 64
  nframes: 5
  groups: 8
  front_RBs: 5
  back_RBs: 10
  predeblur: true
  HR_in: true
  w_TSA: true

#### path
path:
  pretrain_model_G: ~
  strict_load: false
  resume_state: ~

#### training settings: learning rate scheme, loss
train:
  lr_G: !!float 4e-4
  lr_scheme: CosineAnnealingLR_Restart
  beta1: 0.9
  beta2: 0.99
  niter: 600000
  ft_tsa_only: 50000
  warmup_iter: -1  # -1: no warm up
  T_period: [50000, 100000, 150000, 150000, 150000]
  restarts: [50000, 150000, 300000, 450000]
  restart_weights: [1, 1, 1, 1]
  eta_min: !!float 1e-7

  pixel_criterion: psnr_ssim
  pixel_weight: 1.0
#  val_freq: !!float 1e4

  manual_seed: 0

#### logger
logger:
  print_freq: 100
  save_checkpoint_freq: !!float 5e3