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".
Python
Branch: master
Clone or download
Latest commit 87bad6e Dec 16, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cp Add baseline modal Dec 9, 2018
dev_tools Upload preprocessing code Dec 9, 2018
pytorch_ssim
results Upload new results Dec 15, 2018
.gitignore
README.md Update README.md Dec 15, 2018
eval-compare.py Update results and the code to generate them Dec 15, 2018
eval.py Change headers Dec 12, 2018
model.py Move file Dec 9, 2018
sr.py Add code to generate images to compare SRGAN and SRWGAN-GP Dec 13, 2018
train-wgangp.py Tweaks Dec 12, 2018
train.py Tweaks Dec 12, 2018
utils.py Update WGAN-gp implementation Dec 9, 2018

README.md

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

You can’t perform that action at this time.