We run this script under TensorFlow 1.2 and the self-contained TensorLayer. If you got error, you may need to update TensorLayer.
TensorFlow Implementation of "Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network"
![](img/model.jpeg)
![](img/SRGAN_Result2.png)
-
- You need to download the pretrained VGG19 model in here as tutorial_vgg19.py show.
-
- You need to have the high resolution images for training.
- In this experiment, I used images from DIV2K - bicubic downscaling x4 competition, so the hyper-paremeters in
config.py
(like number of epochs) are seleted basic on that dataset, if you change a larger dataset you can reduce the number of epochs. - If you dont want to use DIV2K dataset, you can also use Yahoo MirFlickr25k, just simply download it using
train_hr_imgs = tl.files.load_flickr25k_dataset(tag=None)
inmain.py
. - If you want to use your own images, you can set the path to your image folder via
config.TRAIN.hr_img_path
inconfig.py
.
- Set your image folder in
config.py
, if you download DIV2K - bicubic downscaling x4 competition dataset, you dont need to change it.
config.TRAIN.img_path = "your_image_folder/"
- Start training.
python main.py
- Start evaluation.
python main.py --mode=evaluate