SRGAN with WGAN loss function in TensorFlow
This code mainly address the problem of super resolution, Super Resolution Generative Adversarial Networks
- The loss function, we use WGAN loss, instead of standard GAN loss.
- The network architecture, Because of our poor device, in generator, we just use 5 residual block (paper: 16), and in discriminator, we use the standard DCGAN's discriminator.
- The training set, device problem again,:cry: we just use a part of ImageNet (ImageNet Val) which just contains 50,000 images.
- The max iteration, we just train the model about 100,000 iterations, instead of the paper 600,000.
- Download the dataset ImageNet Val
- unzip dataset and put it into the folder 'ImageNet'
├── test
├── save_para
├── results
├── vgg_para
├── ImageNet
├── ILSVRC2012_val_00000001.JPEG
├── ILSVRC2012_val_00000002.JPEG
├── ILSVRC2012_val_00000003.JPEG
├── ILSVRC2012_val_00000004.JPEG
├── ILSVRC2012_val_00000005.JPEG
├── ILSVRC2012_val_00000006.JPEG
...
- execute the file main.py
- python3.5
- tensorflow1.4.0
- pillow
- numpy
- scipy
- skimage
Down sampled | Bicubic (x4) | SRGAN (x4) |
---|---|---|
[1] Ledig C, Theis L, Huszár F, et al. Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network[C]//CVPR. 2017, 2(3): 4.