Easy model running super resolution based on SRCNN using Keras.
Implementation of SRCNN with RGB using Keras. These programs can load images from the specified directory, resize these images and train the Keras model. Also, trained models can be loaded and can perform upsampling.
- Python 3.0 or more
- Keras 2.0 or more (Tensorflow backend)
- Pillow
- numpy
- tqdm
- h5py
- Clone this repository:
git clone https://github.com/kcct-fujimotolab/Super_resolution.git
cd Super_resolution/
- Make a directory for data sets:
mkdir images
- Collect images (more than thousands better):
ls images/
data0000.jpg data0001.jpg ... data9999.jpg
- Start training with specifying image size, number of epochs, data set directory, etc.:
python train.py --input images/ --size 64 64 --epoch 1000
- Do super resolution with running
sr2x
.py:
python sr2x.py
Using TensorFlow backend.
Enter the file name (*.jpg)
>> test/data.jpg
--help
-h
: show information
--input
-i
: data sets path (default -i images/
)
--size
-z
: image size, 2 values required, must be multiples of 2 (default -z 128 128
)
--epoch
-e
: number of epochs (default -e 500
)
--batch
-b
: batch size (default -b 64
)
We extracted 4096 images from the face data provided by Labeled Faces in the Wild, and trained 1000 epochs.
A part of the results are shown below.
Fujimoto Lab in Kobe City College of Technology
Undergraduate Student of Electronics Department
@yoidea