Image super-resolution through deep learning. This project uses deep learning to upscale 16x16 images by a 4x factor.
- Python v3.6.+ (64bits)
- NumPy v1.14.+
- Pillow v5.+
- OpenCV v3.14.+ (for cv2)
- MatPlotLib v2.1.+
- MoviePy (0.2.x)
- TensorFlow v1.+
Note: For install libraries use CMD terminal.
- Download Python 3.6.+ (last version of 64bits), and install it. Guide Video
- Installing numpy library (if not included)
py -m pip install numpy
- Installing OpenCV library
py -m pip install opencv-python
- Installing Pillow library
py -m pip install Pillow
- Installing MatPlotLib
py -m pip install matplotlib
- Installing TensorFlow (CPU or GPU) library
#*CPU version*
py -m pip install --upgrade tensorflow
or
#*GPU version*
py -m pip install --upgrade tensorflow-gpu
- Install Imageio library
py
import imageio
imageio.pluggins.ffmpeg.download()
For GPU Nvidia, must install CUDA v9.0 and cuDNN v9.0 (for cuDNN follow this steps)
Create a folder name srez
and copy the following py files and folders:
checkpoint\
(learning process)dataset\
(200K celebrity faces)train\
(output of learning process, empty)srez_demo.py
(Create Video animation of outputs)srez_input.py
(dependicy of main.py)srez_main.py
(main code)srez_model.py
(dependicy of main.py)srez_train.py
(For train the model with celeb faces)
Usage is as follows:
-
Download the Large-scale CelebFaces 1.34GB dataset file 'img_align_celeba.zip'. Unziped on dataset folder. This step may take a while as it will extract 200K images.
-
Training with default settings:
py srez_main.py --run train
. The script will periodically output an example batch in PNG format onto the srez/train folder, and checkpoint data will be stored in the srez/checkpoint folder. -
After the network has trained you can also produce an animation showing the evolution of the output by running:
py srez_main.py --run demo
Note: In srez_main.py file, line 64, specify the training time (default: 1200 minutes). or any other values you want to change
Reproduce: David GPU