This is a tensorflow version implementation for Residual Encoder Network based on Automatic Colorization.
Used 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 function related to image manipulationread_input.py
: input related functionsresidual_encoder.py
: the residual encoder modelbatchnorm.py
: batch normalization based on herecommon.py
: the common part for train and test, mainly is the work flow for this modeltrain.py
: train the residual encoder model using tensorflow build-in GradientDescentOptimizertest.py
: test your own image and save the output image
-
First please download pre-trained VGG16 model vgg16.npy to vgg folder
-
Use pre-trained residual encoder model
- Model can be downloaded here
-
Train yourself
- Change the
learning rate
,batch size
andtraining_iters
according to your goal - 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.