Home

Awesome

SRGan in Tensorflow

This is an implementation of the paper Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network using TensorFlow.

Usage

Set up

  1. Download the VGG19 weights provided by TensorFlow-Slim. Place the vgg_19.ckpt file in this directory.
  2. Download a dataset of images. I recommend ImageNet or Places205. Specify the directory containing your dataset using the --train-dir argument when training the model.

Training

SRResNet-MSE

python train.py --name srresnet-mse --content-loss mse --train-dir path/to/dataset

SRResNet-VGG22

python train.py --name srresnet-vgg22 --content-loss vgg22 --train-dir path/to/dataset

SRGAN-MSE

python train.py --name srgan-mse --use-gan --content-loss mse --train-dir path/to/dataset --load results/srresnet-mse/weights-1000000

SRGAN-VGG22

python train.py --name srgan-vgg22 --use-gan --content-loss vgg22 --train-dir path/to/dataset --load results/srresnet-mse/weights-1000000

SRGAN-VGG54

python train.py --name srgan-vgg54 --use-gan --content-loss vgg54 --train-dir path/to/dataset --load results/srresnet-mse/weights-1000000

Results

Set5Ledig SRResNetThis SRResNetLedig SRGANThis SRGAN
PSNR32.0532.1129.4028.21
SSIM0.90190.89330.84720.8200
Set14Ledig SRResNetThis SRResNetLedig SRGANThis SRGAN
PSNR28.4928.6126.0225.74
SSIM0.81840.78090.73970.6909
BSD100Ledig SRResNetThis SRResNetLedig SRGANThis SRGAN
PSNR27.5827.5725.1624.80
SSIM0.76200.73460.66880.6314