Skip to content

(Fork of BasicSR) Open Source Image and Video Restoration Toolbox for Super-resolution, Denoise, Deblurring, etc. Currently, it includes EDSR, RCAN, SRResNet, SRGAN, ESRGAN, EDVR, BasicVSR, SwinIR, ECBSR, OmniSR, HAT, GRL, etc. Also support StyleGAN2, DFDNet.

License

Notifications You must be signed in to change notification settings

ook3D/traiNNer-redux-FJ

 
 

Repository files navigation

(Fork of BasicSR joeyballentine/traiNNer-redux) Open Source Image and Video Restoration Toolbox for Super-resolution, Denoise, Deblurring, etc. Currently, it includes EDSR, RCAN, SRResNet, SRGAN, ESRGAN, EDVR, BasicVSR, SwinIR, ECBSR, OmniSR, HAT, GRL, A-ESRGAN, etc. Also support StyleGAN2, DFDNet.


NEW ADD ARCH SUPPORT

  • [ESRGAN 8X]
  • Omnisr
    • The arch implementation of Omnisr is from Omnisr. The LICENSE of Omnisr is [Apache License 2.0]. The LICENSE is included as LICENSE_Omnisr.
  • HAT
    • The arch implementation of HAT is from HAT. The LICENSE of HAT is [MIT License]. The LICENSE is included as LICENSE_HAT.
  • GRL
    • The arch implementation of GRL is from GRL. The LICENSE of GRL is [MIT License].
  • ESWT
    • The arch implementation of ESWT is from ESWT. The LICENSE of ESWT is [MIT License].
  • SRFormer
    • The arch implementation of SRFormer is from SRFormer. The LICENSE of SRFormer is [Apache License 2.0].
  • A-ESRGAN
    • The arch implementation of A-ESRGAN is from A-ESRGAN. The LICENSE of A-ESRGAN is [BSD 3-Clause "New" or "Revised" License].

NEW FEATURE SUPPORT

  • ContextualLoss weight
  • amp support
    try_autoamp_g: True # enable amp Automatic mixed precision for network_g. if loss inf or nan or error just set to False
    try_autoamp_d: True # enable amp Automatic mixed precision for network_d. if loss inf or nan or error just set to False
    

TIPS

  • PairedImageDataset set high_order_degradation : False
  • RealESRGANDataset set high_order_degradation : True
  • To use Automatic mixed precision, edit the yml files in options\train\ESWT\
  • e.g. if you want use omnisr-gan with amp, just edit the 4x_trainESWTGAN_SR_scratch-DIV2K.yml 's following part
name: train_ESWTGANModel_SRx4_scratch_P48W8_DIV2K_500k_B4G8
try_autoamp_g: True # enable amp Automatic mixed precision for network_g. if loss inf or nan or error just set to False
try_autoamp_d: True # enable amp Automatic mixed precision for network_d. if loss inf or nan or error just set to False
network_g:
  type: OmniSRNet
  num_in_ch: 3
  num_out_ch: 3
  num_feat: 64
  upsampling: 4
  res_num: 5
  block_num: 1
  bias: True
  block_script_name: OSA
  block_class_name: OSA_Block
  window_size: 8
  pe: True
  ffn_bias: True
  • If you want to use aesrgan's network_d for other network_d. you should edit the 4x_train_multiaesrgan_plus.yml
  • e.g. if you want use omnisr as network_g and multiscale as network_d, just edit the 4x_train_multiaesrgan_plus.yml 's following part
# network structures
# network_g:
#   type: RRDBNet
#   num_in_ch: 3
#   num_out_ch: 3
#   num_feat: 64
#   num_block: 23
#   num_grow_ch: 32

network_g:
  type: OmniSRNet
  num_in_ch: 3
  num_out_ch: 3
  num_feat: 64
  upsampling: 4
  res_num: 5
  block_num: 1
  bias: True
  block_script_name: OSA
  block_class_name: OSA_Block
  window_size: 8
  pe: True
  ffn_bias: True

#network_d:
#  type: UNetDiscriminatorAesrgan
#  num_in_ch: 3
#  num_feat: 64
#  skip_connection: True

network_d:
  type: multiscale
  num_in_ch: 3
  num_feat: 64
  num_D: 2

About

(Fork of BasicSR) Open Source Image and Video Restoration Toolbox for Super-resolution, Denoise, Deblurring, etc. Currently, it includes EDSR, RCAN, SRResNet, SRGAN, ESRGAN, EDVR, BasicVSR, SwinIR, ECBSR, OmniSR, HAT, GRL, etc. Also support StyleGAN2, DFDNet.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 92.6%
  • Cuda 4.1%
  • C++ 2.8%
  • Other 0.5%