Skip to content

This code uses power of residual connections to train a 54 layer recursive network for image superesolution task

Notifications You must be signed in to change notification settings

Megh-Bhatt/Image_Superesolution_Using_DRRN

Repository files navigation

Image_Superesolution_Using_DRRN

This code is implemented from the CVPR 2017 paper Image Super-Resolution via Deep Recursive Residual Network https://ieeexplore.ieee.org/document/8099781, this network applies residual connection to a 54 layer recursive neural network. There are total 9 recursive blocks used and in each recursive block there are three residual blocks you can refer to this image for more clearity.

image

This architecture helps learning complex features and also keeps initial input alive which removes problem of vanishing gradient. Also gradient clipping is added to control exploding gradient. this model is trained on a 640 images kaggle dataset by extrating patches of size 31*31. making total of 103455 trainable patches with stride = 21. now the model was kept training for 50 epochs with a early stopping criteria and model early stopped on 27 epochs.

Dataset link

https://www.kaggle.com/datasets/adityachandrasekhar/image-super-resolution

Results

Model achieved validation loss of just: 0.0014 and val_accuracy of 0.8542.

image

Here are some superesolved images

image

image

image

How to implement in your local pc

Case 1: Using pretrained model

To use pretrained model download the drrn_super_resolution(1).h5, Model_loader_tester.py and requirements.txt

Then place them unto same directory give path to pretrained model and image you want superesolute.

Now type pip install -r requirements.txt in terminal and run

Now you are set to run model_loader and see the results.

Case 2: Training the model

Download the whole repository unzip it then download the dataset and extract it in the same directory.

Now set the paths right to dataset and configure your gpu if u have.

Now you can chnage any training parameters if you want or start training.

About

This code uses power of residual connections to train a 54 layer recursive network for image superesolution task

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages