test_realesrgan_model.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. scale: 4
  2. num_gpu: 1
  3. manual_seed: 0
  4. is_train: True
  5. dist: False
  6. # ----------------- options for synthesizing training data ----------------- #
  7. # USM the ground-truth
  8. l1_gt_usm: True
  9. percep_gt_usm: True
  10. gan_gt_usm: False
  11. # the first degradation process
  12. resize_prob: [0.2, 0.7, 0.1] # up, down, keep
  13. resize_range: [0.15, 1.5]
  14. gaussian_noise_prob: 1
  15. noise_range: [1, 30]
  16. poisson_scale_range: [0.05, 3]
  17. gray_noise_prob: 1
  18. jpeg_range: [30, 95]
  19. # the second degradation process
  20. second_blur_prob: 1
  21. resize_prob2: [0.3, 0.4, 0.3] # up, down, keep
  22. resize_range2: [0.3, 1.2]
  23. gaussian_noise_prob2: 1
  24. noise_range2: [1, 25]
  25. poisson_scale_range2: [0.05, 2.5]
  26. gray_noise_prob2: 1
  27. jpeg_range2: [30, 95]
  28. gt_size: 32
  29. queue_size: 1
  30. # network structures
  31. network_g:
  32. type: RRDBNet
  33. num_in_ch: 3
  34. num_out_ch: 3
  35. num_feat: 4
  36. num_block: 1
  37. num_grow_ch: 2
  38. network_d:
  39. type: UNetDiscriminatorSN
  40. num_in_ch: 3
  41. num_feat: 2
  42. skip_connection: True
  43. # path
  44. path:
  45. pretrain_network_g: ~
  46. param_key_g: params_ema
  47. strict_load_g: true
  48. resume_state: ~
  49. # training settings
  50. train:
  51. ema_decay: 0.999
  52. optim_g:
  53. type: Adam
  54. lr: !!float 1e-4
  55. weight_decay: 0
  56. betas: [0.9, 0.99]
  57. optim_d:
  58. type: Adam
  59. lr: !!float 1e-4
  60. weight_decay: 0
  61. betas: [0.9, 0.99]
  62. scheduler:
  63. type: MultiStepLR
  64. milestones: [400000]
  65. gamma: 0.5
  66. total_iter: 400000
  67. warmup_iter: -1 # no warm up
  68. # losses
  69. pixel_opt:
  70. type: L1Loss
  71. loss_weight: 1.0
  72. reduction: mean
  73. # perceptual loss (content and style losses)
  74. perceptual_opt:
  75. type: PerceptualLoss
  76. layer_weights:
  77. # before relu
  78. 'conv1_2': 0.1
  79. 'conv2_2': 0.1
  80. 'conv3_4': 1
  81. 'conv4_4': 1
  82. 'conv5_4': 1
  83. vgg_type: vgg19
  84. use_input_norm: true
  85. perceptual_weight: !!float 1.0
  86. style_weight: 0
  87. range_norm: false
  88. criterion: l1
  89. # gan loss
  90. gan_opt:
  91. type: GANLoss
  92. gan_type: vanilla
  93. real_label_val: 1.0
  94. fake_label_val: 0.0
  95. loss_weight: !!float 1e-1
  96. net_d_iters: 1
  97. net_d_init_iters: 0
  98. # validation settings
  99. val:
  100. val_freq: !!float 5e3
  101. save_img: False