test_hifacegan.yml 1.91 KB
Newer Older
mashun1's avatar
anytext  
mashun1 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
name: HiFaceGAN_SR4x_test
model_type: HiFaceGANModel
scale: 1    # HiFaceGAN does not resize lq input
num_gpu: 1  # set num_gpu: 0 for cpu mode
manual_seed: 0

datasets:
  test_gt:  # the 2nd test dataset
    name: FFHQ_sr4x_val
    type: PairedImageDataset
    dataroot_gt: datasets/FFHQ_512_gt_val
    dataroot_lq: datasets/FFHQ_512_lq_val_sr4x
    io_backend:
      type: disk

# network structures
network_g:
  type: HiFaceGAN
  num_in_ch: 3
  num_feat: 48
  use_vae: false
  z_dim: 256  # dummy var
  crop_size: 512
  #norm_g: 'spectralspadesyncbatch3x3'
  #norm_g: 'spectralspadeinstance3x3'
  norm_g: 'spectralspadebatch3x3'  # 20210519: Use batchnorm for now.
  is_train: false                  # HifaceGAN supports progressive training
                                   # so network architecture depends on it

# path
path:
  pretrain_network_g: experiments/HiFaceGAN_SR4x_train_full/models/net_g_latest.pth
  strict_load_g: true

# validation settings
val:
  save_img: true
  suffix: ~  # add suffix to saved images, if None, use exp name

  metrics:
    psnr: # metric name, can be arbitrary
      type: calculate_psnr
      crop_border: 4
      test_y_channel: false
    ssim:
      type: calculate_ssim
      crop_border: 4
      test_y_channel: false

    # More metrics will be supported in the next update
    #
    # msssim:
    #   type: calculate_msssim
    #   crop_border: 4
    #   test_y_channel: false
    # lpips:
    #   type: calculate_lpips
    #   crop_border: 4
    #   test_y_channel: false
    # niqe:
    #   type: calculate_niqe
    #   crop_border: 4
    #   num_thread: 8
    # fid:
    #   type: calculate_fid
    #   crop_border: 0
    #   test_y_channel: false
    #   use_bgr_order: true
    # face_embedding_distance:
    #   type: calculate_fed
    #   crop_border: 0
    #   test_y_channel: false
    # face_landmark_distance:
    #   type: calculate_lle
    #   crop_border: 0
    #   test_y_channel: false