HAT_tile_example.yml 2.22 KB
Newer Older
Rayyyyy's avatar
Rayyyyy committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
name: HAT_SRx4_ImageNet-pretrain
model_type: HATModel
scale: 4
num_gpu: 1  # set num_gpu: 0 for cpu mode
manual_seed: 0

tile: # use the tile mode for limited GPU memory when testing.
  tile_size: 256 # the higher, the more utilized GPU memory and the less performance change against the full image. must be an integer multiple of the window size.
  tile_pad: 32 # overlapping between adjacency patches.must be an integer multiple of the window size.

datasets:
  test_1:  # the 1st test dataset
    name: Set5
    type: PairedImageDataset
Rayyyyy's avatar
Rayyyyy committed
15
    dataroot_gt: ./datasets/Set5/GTmod12
Rayyyyy's avatar
Rayyyyy committed
16
17
18
19
    dataroot_lq: ./datasets/Set5/LRbicx4
    io_backend:
      type: disk

Rayyyyy's avatar
Rayyyyy committed
20
21
  test_2:  # the 2nd test dataset
    name: Set14
Rayyyyy's avatar
Rayyyyy committed
22
    type: PairedImageDataset
Rayyyyy's avatar
Rayyyyy committed
23
24
    dataroot_gt: ./datasets/Set14/GTmod12
    dataroot_lq: ./datasets/Set14/LRbicx4
Rayyyyy's avatar
Rayyyyy committed
25
26
27
    io_backend:
      type: disk

Rayyyyy's avatar
Rayyyyy committed
28
29
30
31
32
33
34
35
  # test_3:
  #   name: Urban100
  #   type: PairedImageDataset
  #   dataroot_gt: ./datasets/urban100/GTmod12
  #   dataroot_lq: ./datasets/urban100/LRbicx4
  #   io_backend:
  #     type: disk

Rayyyyy's avatar
Rayyyyy committed
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
  # test_4:
  #    name: BSDS100
  #    type: PairedImageDataset
  #    dataroot_gt: ./datasets/BSDS100/GTmod4
  #    dataroot_lq: ./datasets/BSDS100/LRbicx4
  #    io_backend:
  #      type: disk

  # test_5:
  #     name: Manga109
  #     type: PairedImageDataset
  #     dataroot_gt: ./datasets/manga109/GTmod4
  #     dataroot_lq: ./datasets/manga109/LRbicx4
  #     io_backend:
  #       type: disk

# network structures
network_g:
  type: HAT
  upscale: 4
  in_chans: 3
  img_size: 64
  window_size: 16
  compress_ratio: 3
  squeeze_factor: 30
  conv_scale: 0.01
  overlap_ratio: 0.5
  img_range: 1.
  depths: [6, 6, 6, 6, 6, 6]
  embed_dim: 180
  num_heads: [6, 6, 6, 6, 6, 6]
  mlp_ratio: 2
  upsampler: 'pixelshuffle'
  resi_connection: '1conv'


# path
path:
  pretrain_network_g: ./experiments/pretrained_models/HAT_SRx4_ImageNet-pretrain.pth
  strict_load_g: true
  param_key_g: 'params_ema'

# 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: true
    ssim:
      type: calculate_ssim
      crop_border: 4
      test_y_channel: true