Skip to content
🎨 Automatic Image Colorization using TensorFlow based on Residual Encoder Network
Python
Branch: master
Clone or download
Latest commit df1b7fe Mar 22, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Docs(github): update github related docs Aug 13, 2018
images
sample_output_images Docs: add examples to README.md Jul 3, 2018
vgg
.editorconfig Doc: update README.md, add COC, CONTRIBUTING and ISSUE_TEMPLATE Jul 1, 2018
.gitattributes Style: update python header Jul 12, 2018
.gitignore Style: update python header Jul 12, 2018
LICENSE Initial commit Dec 8, 2016
README.md Update README.md Mar 22, 2019
__init__.py updated to support tensorflow 1.8 Jun 20, 2018
common.py Style: update python header Jul 12, 2018
config.py Style: update python header Jul 12, 2018
image_helper.py Style: update python header Jul 12, 2018
read_input.py Style: update python header Jul 12, 2018
residual_encoder.py Style: update python header Jul 12, 2018
test.py Fix(batch_size): fix for loop index error on batch_size Nov 28, 2018
train.py Style: update python header Jul 12, 2018

README.md

Automatic Image Colorization

PRs Welcome License: GPL v3 Template from jarvis

Overview

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

For latest TensorFlow with estimator support, please check tf-1.12 branch. (still under development, the training code is working now)

Structure

  • config.py: config variables like batch size, training_iters and so on
  • image_helper.py: all functions related to image manipulation
  • read_input.py: all functions related to input
  • residual_encoder.py: the residual encoder model
  • common.py: the common part for training and testing, which is mainly the workflow for this model
  • train.py: train the residual encoder model using TensorFlow built-in AdamOptimizer
  • test.py: test your own images and save the output images

TensorFlow graph

residual_encoder

How to use

  • First please download pre-trained VGG16 model vgg16.npy to vgg folder

  • Option 1: Use pre-trained residual encoder model

    • Download model here
    • Unzip all files to summary_path (you can change this path in config.py)
  • Option 2: Train your own model!

    1. Change the batch_size and training_iters if you want.
    2. Change training_dir to your directory that has all your training jpg images
    3. Run python train.py
  • Test

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

Examples

References

Contributing

See CONTRIBUTING.md

License

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

You can’t perform that action at this time.