Skip to content

UNOFFICIAL PyTorch implementation for DWSR x4 (Deep Wavelet Prediction for Image Super-resolution)

Notifications You must be signed in to change notification settings

z0gSh1u/dwsr-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dwsr-pytorch

This is an UNOFFICIAL PyTorch implementation for DWSR - Deep Wavelet Prediction for Image Super-resolution . Only 4x upsampling is provided.

image-20201209162704163.png

Requirements

  • PyTorch >= 1.0
  • torchvision
  • TensorBoard
  • LPIPS (pip install lpips)
  • tqdm
  • NVIDIA GPU with CUDA
  • Not for Windows

Start Training

  • Modify option.py

    • Set train_dir to the path to your HR images of training set. LR images aren't needed since they are generated on-the-fly.
    • Set val_dir to the path to your HR images of validation set. LR images aren't needed either.
    • Change other settings if you want:
      • crop_size: How big the dataset will be cropped into. Must be multiple of 4.
      • n_conv: How many conv layers between Conv1 and ConvN.
      • lr: Initial learning rate. Default 1e-2 and decays by x0.75 every 20 epochs.
      • ...
  • Initialize output directory

    $ cd script
    $ chmod 755 *
    $ ./init_out.sh
  • Trigger training

    Modify train.sh if you want to change which GPU to run on. Then run:

    $ ./train.sh

    DWSR is so lightweight that there is no need to train on multiple cards.

After Training

As you can see, PSNR and LPIPS (Perceptual Loss using VGG) are calculated, while SSIM isn't.

  • Checkpoint files are stored at /out/ckp

  • Metric record file are stored at /out/metric.txt

  • TensorBoard log files are stored at /out/tb. Run this command under /out folder to see the curves of PSNR and LPIPS:

    $ tensorboard --logdir=./tb --bind_all

Start Testing

  • Modify option.py

    • Set test_dir to the path to your LR images of test set.
    • Change test_ckp if you want to use another checkpoint.
  • Trigger testing

    Modify test.sh if you want to change which GPU to run on. Then run:

    $ cd script
    $ ./test.sh

    Testing results are output to /out/test_result.

About

UNOFFICIAL PyTorch implementation for DWSR x4 (Deep Wavelet Prediction for Image Super-resolution)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published