- This is a deep learning project based on the Image Super-Resolution Using Deep Convolutional Networks - SRCNN paper using the PyTorch deep learning library.
- The project is built on PyTorch 1.4.
- You will need MATLAB to execute the
.m
files.
-
The following is the directory structure to arrange everything for the project.
├───input │ ├───bicubic_2x │ ├───bicubic_4x │ ├───bicubic_rgb_2x │ ├───bicubic_rgb_4x │ ├───General100 │ ├───Set14 │ ├───Set5 │ ├───T91 │ ├───T91_G100 | train_mscale.h5 ├───outputs └───src
-
input
: contains the datasets that are used for training and testing. Thetrain_mscale.h5
is the training datasets that gets generated after running thegenerate_train.m
file.- Currently the model has been trained on both
T91
andGeneral100
image datasets. Both of these datasets are merged intoT91_G100
folder. The same corresponds to in thegenerate_train.m
file. - The
bicubic_x
folders contain the blurred images that we use for testing. Generate those images using thebicubic.py
file inside thesrc
folder.
- Currently the model has been trained on both
-
The
outputs
folder will contain all the output files along with the trained model. -
src
contains the python and MATLAB files.
Note: I have take the MATLAB codes from the SRCNN-Keras repository. The original generate_train.m
file generate greyscale sub-images. I have formatted the code so as to generate colored (RGB) sub-images. As such, in this project, you will be able to train a neural network model that can carry out super-resolution on RGB images. Please go through the code for more details.
- You will find the datasets used in this project and more super-resolution datasets here.
generate_train.m
: To generate thetrain_mscale.h5
sub-images.- Execute the python scripts while being within the
src
folder in the terminal.python bicubic.py --path ../input/Set14 --scale-factor 2x
: To create low-resolution bicubic images for the Set14 data by a scaling factor of 2x.python train.py
: For training the SRCNN model.python test.py --input ../input/bicubic_rgb_2x
: To generate high resolution images of the 2x scaled low-resolution images.
- The following are from testing on the 2x scaled low-resolution images.
-
Image Super-Resolution Using Deep Convolutional Networks - SRCNN.
-
SRCNN-Keras: For the
generate_train.m
file to create thetrain_mscale.h5
training data. -
SRCNN-Tensorflow: For the test images.