Giter Club home page Giter Club logo

ranksrgan's Introduction

RankSRGAN

RankSRGAN: Generative Adversarial Networks with Ranker for Image Super-Resolution

By Wenlong Zhang, Yihao Liu, Chao Dong, Yu Qiao


Dependencies

Codes

This version is under testing. We will provide more details of RankSRGAN in near future.

How to Test

  1. Clone this github repo.
git clone https://github.com/WenlongZhang0724/RankSRGAN.git
cd RankSRGAN
  1. Place your own low-resolution images in ./LR folder.
  2. Download pretrained models from Google Drive or Baidu Drive. Place the models in ./experiments/pretrained_models/. We provide three Ranker models and three RankSRGAN models (see model list).
  3. Run test. We provide RankSRGAN (NIQE, Ma, PI) model and you can config in the test.py.
python test.py -opt options/test/test_ranksrgan.json
  1. The results are in ./results folder.

How to Train

Train Ranker

  1. Download DIV2K and Flickr2K from Google Drive or Baidu Drive
  2. Generate rank dataset ./datascripts/generate_rankdataset/
  3. Run command:
python train.py -opt options/train/Ranker.json

Train RankSRGAN

We use a PSNR-oriented pretrained SR model to initialize the parameters for better quality.

  1. Prepare datasets, usually the DIV2K dataset.
  2. Prerapre the PSNR-oriented pretrained model. You can use the SRResNet_bicx4_in3nf64nb16.pth as the pretrained model that can be downloaded from Google Drive or Baidu Drive.
  3. Modify the configuration file options/train/RankSRGAN_NIQE.json
  4. Run command:
python train.py -opt options/train/RankSRGAN_NIQE.json

or

python train_PI.py -opt options/train/RankSRGAN_NIQE.json

Using the train.py can output the convergence curves with NIQE and PSNR; Using the train_PI.py can output the convergence curves with NIQE, Ma, PI and PSNR.

Acknowledgement

ranksrgan's People

Contributors

wenlongzhang0724 avatar

Watchers

James Cloos avatar paper2code - bot avatar

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.