This is a Tensorflow implementation of the Residual Encoder Network based on Automatic Colorization and the pre-trained VGG16 model from https://github.com/machrisaa/tensorflow-vgg
config.py
: config variables like learning rate, batch size and so onimage_helper.py
: all functions related to image manipulationread_input.py
: input related functionsresidual_encoder.py
: the residual encoder modelbatchnorm.py
: batch normalization based on thiscommon.py
: the common part for training and testing, mainly the work flow for this modeltrain.py
: train the residual encoder model using Tensorflow built-in GradientDescentOptimizertest.py
: test your own images and save the output images
-
First please download pre-trained VGG16 model vgg16.npy to vgg folder
-
Use pre-trained residual encoder model
- Model can be downloaded here
- Unzip all files to
model_path
(you can change this path inconfig.py
)
-
Train your own model
- Change the
learning rate
,batch size
andtraining_iters
accordingly - Change
train_dir
to your directory that contains all your training jpg images - Run
python train.py
- Change the
-
Test
- Change
test_dir
to your directory that contains all your testing jpg images - Run
python test.py
- Change
GNU GPL 3.0 for personal or research use. COMMERCIAL USE PROHIBITED.