Home

Awesome

EDSR Tensorflow Implementation

An implementation of Enhanced Deep Residual Networks for Single Image Super-Resolution written in tensorflow.

Requirements

Installation

pip install -r requirements.txt

Training

In order to train, you'll have to do a few things...

Training Details

As I've mentioned before, I'm currently faced with some computational limitations, so this caused me to do a few things differently than what is mentioned in the paper. One of the more important changes I've made was using the General-100 dataset, because it's much smaller. I've also trained a network with less layers than the original baseline model as was described in the paper. This, however, can still be done using my code by adjusting some training parameters. I've trained by taking the center 100x100 pixels of each image in General-100, and shrinking them down to 50x50. I then trained an EDSR to resize the 50x50 pixel images back to 100x100. Currently, I use 80% of the dataset as a training set and 20% as a testing set. I trained the EDSR over 1000 iterations using Adam optimizer

Using Trained Network

In order to use trained weights you just have to run this command python test.py. By default, this will take a random sample of five images from your dataset, compute their output, and save it in the out directory. If you'd like to just run superresolution on one image, you can run python test.py --image your_picture where your_picture is the image file you'd like to run superresolution on.

Results

These results were computed on a network using 3 layers, and a feature size of 16. The network was trained to scale 50x50px images to 100x100px for 1000 iterations. <br /> <br /> Updates coming soon....... <br />

Original imageShrunk imageEDSR Output
alt-textalt-textalt-text
alt-textalt-textalt-text
alt-textalt-textalt-text
alt-textalt-textalt-text
alt-textalt-textalt-text

Future Work

Pre-trained model

There is a pre-trained model that I have made for the baseline model (default params) using my machine. If you'd like to use it, download the files here. In order to run, create a directory called saved_models and place the files in there. Then you can use test.py to resize images.