Skip to content

A PyTorch implementation of SRGAN specific for Anime Super Resolution based on "Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network". And another PyTorch WGAN-gp implementation of SRGAN referring to "Improved Training of Wasserstein GANs".

goldhuang/SRGAN-PyTorch

Repository files navigation

SRGAN for Anime

A PyTorch implementation of SRGAN based on Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network (https://arxiv.org/abs/1609.04802). And another PyTorch WGAN-gp implementation of SRGAN referring to Improved Training of Wasserstein GANs (https://arxiv.org/pdf/1704.00028.pdf).

The repo was developed and tested on a Nvidia RTX 2070. Input images are supposed to only have 3 channels.

Requirements

  • Python 3
  • PyTorch
  • torchvision
  • tensorboard_logger
  • tqdm
  • CUDA* - Not tested on CPU

Datasets

11328 images from kaggle dataset (https://www.kaggle.com/mylesoneill/tagged-anime-illustrations/home). Train/Dev/Test set sizes are 10816/256/256.

Training

Original SRGAN

python train.py --train_set=data/train

See more parameters in train.py.

WGAN with gradient penalty

python train-wgangp.py --train_set=data/train

See more parameters in train-wgangp.py.

Testing

python eval.py --val_set=data/val --start=1 --end=100 --interval=1

The sample command is to test with all the checkpoints from 1st to 100th epoch and print the results like the ones at the bottom of the page. See more parameters in eval.py.

Single Image Super Resulution

python sr.py --lr=lr.png

See more parameters in sr.py.

Results

python eval-compare.py --val_set=results/Original

Bicubic / SRResNet / SRGAN / SRWGAN-GP / Original

About

A PyTorch implementation of SRGAN specific for Anime Super Resolution based on "Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network". And another PyTorch WGAN-gp implementation of SRGAN referring to "Improved Training of Wasserstein GANs".

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages