Giter VIP home page Giter VIP logo

color2embed-tps-tf's Introduction

Color2Embedding and Thin Plate Spline

Color2Embedding is a framework to colorize black and white images. It's training using a pair of reference and target images, from reference images we obtain the color information to inject such information into the target image.

We use the TPS augmentation to transform the reference image. You can read more about TPS and the Color2Embedding framework in this blog post.

The TPS augmentation implementation is inside data_generator/data_utils.py.

This network is implemented using TensorFlow, the original code uses PyTorch and you can find it here.

The project is based on the Color2Embed: Fast Exemplar-Based Image Colorization using Color Embeddings paper.

Training

First you need to install tensorflow_addons:

pip install tfa-nightly

To train the model you need to download:

https://s3-us-west-2.amazonaws.com/imagenetv2public/imagenetv2-matched-frequency.tar.gz

and extract the images inside the data folder.

You can train the model using:

python train.py --epochs=300

There is a bug where the loss could lead to nan. If this happens you can stop the training, delete the recent checkpoints and continue from an older checkpoint.

Weight modulation/demodulation

Weight modulation and demodulation is implemented using the code from https://github.com/manicman1999/StyleGAN2-Tensorflow-2.0/blob/master/conv_mod.py.

LAB images

The code to translate images from and to LAB format is from https://github.com/xahidbuffon/TF_RGB_LAB/blob/master/rgb_lab_formulation.py.

color2embed-tps-tf's People

Contributors

vincent1bt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.