greatlog / DAN

This is an official implementation of Unfolding the Alternating Optimization for Blind Super Resolution
231 stars 41 forks source link

Hi, how to set the test_setting.yml when testing the DANx2 (scale=2) model? #19

Closed Jian-danai closed 3 years ago

Jian-danai commented 3 years ago

I suppose the params of the network structures need to be modified? Could you pls provide an x2 version yml file? Thanks! What I have changed is: _name: DANx2 suffix: _x2
scale: 2 pca_matrix_path: ../../../pca_aniso_matrix_x2.pth upscale: 2 kernel_size: 11 pca_matrix_path: ../../../pca_aniso_matrix_x2.pth path: pretrain_modelG: ../../../checkpoints/DANx2.pth


name: DANx2
suffix: _x2  # add suffix to saved images
model: blind
distortion: sr
scale: 2
crop_border: ~  # crop border when evaluation. If None(~), crop the scale pixels
gpu_ids: [0]
pca_matrix_path: ../../../pca_aniso_matrix_x2.pth # ../../../pca_aniso_matrix_2.pth when scale=2

datasets:
  test0:
    name: DIV2KRK
    mode: LQGT
    dataroot_GT: /data/DIV2KRK_public/HRblur.lmdb
    dataroot_LQ: /data/DIV2KRK_public/x4LRblur.lmdb

#### network structures
network_G:
  which_model_G: DAN
  setting:
    nf: 64
    nb: 40
    input_para: 10
    loop: 4
    upscale: 2
    kernel_size: 11
    pca_matrix_path: ../../../pca_aniso_matrix_x2.pth 

#### path
path:
  pretrain_model_G: ../../../checkpoints/DANx2.pth
greatlog commented 3 years ago

You also need to change the path of the test dataset, i.e. dataroot_LQ, to your own path of x2 LR images.