Skip to content

Easy model running super resolution based on SRCNN using Keras.

License

Notifications You must be signed in to change notification settings

kcct-fujimotolab/keras-super-resolution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Super_resolution

Easy model running super resolution based on SRCNN using Keras.

Description

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.

Requirements

  • Python 3.0 or more
  • Keras 2.0 or more (Tensorflow backend)
  • Pillow
  • numpy
  • tqdm
  • h5py

Get started

  1. Clone this repository:
git clone https://github.com/kcct-fujimotolab/Super_resolution.git
cd Super_resolution/
  1. Make a directory for data sets:
mkdir images
  1. Collect images (more than thousands better):
ls images/
data0000.jpg   data0001.jpg   ...   data9999.jpg
  1. Start training with specifying image size, number of epochs, data set directory, etc.:
python train.py --input images/ --size 64 64 --epoch 1000
  1. Do super resolution with running sr2x.py:
python sr2x.py
Using TensorFlow backend.
Enter the file name (*.jpg)
>> test/data.jpg

Options

--help -h: show information

train.py

--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 3000)
--batch -b: batch size (default -b 64)
--test -t: test data path (default None, example -t images_test/)

sr2x.py

--file -f: image path (default None, example -f test/image.jpg)
--dir -d: images directory path (default None, example -d test/)
--output -o: number of epochs (default None, example -o output/)

Results

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.

A
B
C

Author

Fujimoto Lab in Kobe City College of Technology
Undergraduate Student of Electronics Department
@yoidea

About

Easy model running super resolution based on SRCNN using Keras.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages