Skip to content

🎨 Automatic Image Colorization using TensorFlow based on Residual Encoder Network

License

Notifications You must be signed in to change notification settings

Armour/Automatic-Image-Colorization

Repository files navigation

Residual Encoder Network for Colorization

Overview

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

Structure

  • config.py: config variables like learning rate, batch size and so on
  • image_helper.py: all function related to image manipulation
  • read_input.py: input related functions
  • residual_encoder.py: the residual encoder model
  • batchnorm.py: batch normalization based on here
  • common.py: the common part for train and test, mainly is the work flow for this model
  • train.py: train the residual encoder model using tensorflow build-in GradientDescentOptimizer
  • test.py: test your own image and save the output image

Tensorflow graph

How to use

  • 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

    1. Change the learning rate, batch size and training_iters according to your goal
    2. Change train_dir to your directory that contains all your training jpg images
    3. Run python train.py
  • Test

    1. Change test_dir to your directory that contains all your testing jpg images
    2. Run python test.py

Reference

License

GNU GPL 3.0 for personal or research use. COMMERCIAL USE PROHIBITED.