Giter Site home page Giter Site logo

dwsr-pytorch's Introduction

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.

dwsr-pytorch's People

Contributors

z0gsh1u avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

dwsr-pytorch's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.