All Projects β†’ msracver β†’ Deep Exemplar Based Colorization

msracver / Deep Exemplar Based Colorization

Licence: mit
The source code of "Deep Exemplar-based Colorization".

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Deep Exemplar Based Colorization

colnet
πŸ–ŒοΈ Automatic Image Colorization with Simultaneous Classification – based on "Let there be Color!"
Stars: ✭ 37 (-90.84%)
Mutual labels:  colorization
Awesome-Deep-Colorization
Selected Paper List of Deep Model based Image Colorization
Stars: ✭ 62 (-84.65%)
Mutual labels:  colorization
colorize-video
colorize video using publicly available neural-networks
Stars: ✭ 24 (-94.06%)
Mutual labels:  colorization
go-rainbow
Golang Helper for beautiful CLI Applications
Stars: ✭ 86 (-78.71%)
Mutual labels:  colorization
iconcolor
Automatic icon colorization using deep convolutional neural networks. "Towards Icon Design Using Machine Learning." In Stanford CS229, Fall 2017.
Stars: ✭ 35 (-91.34%)
Mutual labels:  colorization
Deep-Exemplar-based-Video-Colorization
The source code of CVPR 2019 paper "Deep Exemplar-based Video Colorization".
Stars: ✭ 180 (-55.45%)
Mutual labels:  colorization
Colorization
Automatic colorization using deep neural networks. "Colorful Image Colorization." In ECCV, 2016.
Stars: ✭ 2,791 (+590.84%)
Mutual labels:  colorization
Deep Koalarization
Keras/Tensorflow implementation of our paper Grayscale Image Colorization using deep CNN and Inception-ResNet-v2 (https://arxiv.org/abs/1712.03400)
Stars: ✭ 364 (-9.9%)
Mutual labels:  colorization
zsh-ls-colors
A zsh library to use LS_COLORS
Stars: ✭ 23 (-94.31%)
Mutual labels:  colorization
keras-mobile-colorizer
U-Net Model conditioned with MobileNet features for Grayscale -> Color mapping
Stars: ✭ 26 (-93.56%)
Mutual labels:  colorization
video-colorization
Applying the machine learning tool "DeOldify" on videos, frame by frame.
Stars: ✭ 15 (-96.29%)
Mutual labels:  colorization
MetalColor
Automatic Real Time Colorization with CNN on iOS
Stars: ✭ 69 (-82.92%)
Mutual labels:  colorization
PaintsTensorFlow
line drawing colorization using TensorFlow
Stars: ✭ 47 (-88.37%)
Mutual labels:  colorization
external-internal-inpainting
[CVPR 2021] EII: Image Inpainting with External-Internal Learning and Monochromic Bottleneck
Stars: ✭ 95 (-76.49%)
Mutual labels:  colorization
MemoPainter-PyTorch
An unofficial implementation of MemoPainter(Coloring With Limited Data: Few-shot Colorization via Memory Augmented Networks) using PyTorch framework.
Stars: ✭ 63 (-84.41%)
Mutual labels:  colorization
vim-modusline
🌈 Mode-specific statusline colors
Stars: ✭ 39 (-90.35%)
Mutual labels:  colorization
limner
Limner colorizes and transforms CLI outputs.
Stars: ✭ 99 (-75.5%)
Mutual labels:  colorization
Awesome Image Colorization
πŸ“š A collection of Deep Learning based Image Colorization and Video Colorization papers.
Stars: ✭ 370 (-8.42%)
Mutual labels:  colorization
Color2Embed
Color2Embed: Fast Exemplar-Based Image Colorization using Color Embeddings.
Stars: ✭ 24 (-94.06%)
Mutual labels:  colorization
video coloriser
Pytorch Convolutional Neural Net and GAN based video coloriser that converts black and white video to colorised video.
Stars: ✭ 29 (-92.82%)
Mutual labels:  colorization

Deep Exemplar-based Colorization

This is the implementation of paper Deep Exemplar-based Colorization by Mingming He*, Dongdong Chen*, Jing Liao, Pedro V. Sander and Lu Yuan in ACM Transactions on Graphics (SIGGRAPH 2018) (*indicates equal contribution).

Introduction

Deep Exemplar-based Colorization is the first deep learning approach for exemplar-based local colorization. Given a reference color image, our convolutional neural network directly maps a grayscale image to an output colorized image.

image

The proposed network consists of two sub-networks, Similarity Sub-net which computes the semantic similarities between the reference and the target, and Colorization Sub-net which selects, propagates and predicts the chrominances channels of the target.

The input includes a grayscale target image, a color reference image and bidirectional mapping functions. We use Deep Image Analogy as default to generate bidirectional mapping functions. It is applicable to replace with other dense correspondence estimation algorithms.

The code of the part Color Reference Recommendation is now released. Please refere to Gray-Image-Retrieval for more details.

For more results, please refer to our Supplementary.

(Update) If you would to compile on Linux, please try this repository: https://github.com/ncianeo/Deep-Exemplar-based-Colorization/tree/linux-docker-cv-caffe-build, thank ncianeo for solving this issue.

License

Β© Microsoft, 2017. Licensed under a MIT license.

Getting Started

Prerequisites

  • Similarity Sub-net:

    • Windows (64bit)
    • NVIDIA GPU (CUDA 8.0 & CuDNN 5)
    • Visual Studio 2013
  • Colorization Sub-net:

    • Pytorch & the 3rd party Python libraries (OpenCV, scikit-learn and scikit-image)

Build

Similarity Sub-net is implemented in C++ combined with CUDA and requires compiling in Visual Studio as follows:

  • Build Caffe at first. Just follow the tutorial here.
  • Edit similarity_combo.vcxproj under similarity_subnet\windows\similarity_combo\ to make the CUDA version in it match yours.
  • Open solution Caffe and add similarity_combo.vcxproj.
  • Build project similarity_combo.
  • (Optional) If you use Deep Image Analogy, please add deep_image_analogy.vcxproj under similarity_subnet\windows\deep_image_analogy\ and build it.

Download Models

You need to download models before running a demo.

Demo

We prepare an example under the folder demo\ with:

(1) Input data folder example\ including two parts:

  • A folder input\ with the input images (grayscale target images and color reference images) inside.
  • A file pairs.txt to specify a target, a reference and a flag (1 as default) as an example in each line, e.g.,
    in1.jpg ref1.jpg 1
    in2.jpg ref2.jpg 1
    ...
    

(2) Executable script run.bat including three commands:

  • (Optional) A command to generate bidirectional mapping functions using Deep Image Analogy:

    deep_image_analogy.exe [MODEL_DIR] [INPUT_ROOT_DIR] [START_LINE_ID] [END_LINE_ID] [GPU_ID]
    e.g., exe\deep_image_analogy.exe models\deep_image_analogy\ example\ 0 2 0
    

    (Note if you use other algorithms for bidirectional mapping functions, please generate flow files referring to the format of those by Deep Image Analogy and put them to the folder example\flow\.)

  • A command to generate similarity maps for colorization (Similarity Subnet):

    similarity_combo.exe [MODEL_DIR] [INPUT_ROOT_DIR] [START_LINE_ID] [END_LINE_ID] [GPU_ID]
    e.g., exe\similarity_combo.exe models\similarity_subnet\ example\ 0 2 0
    
  • A command to do colorization with our pretrained model (Colorization Subnet):

    python test.py --short_size [SHORT_EDGE_SIZE] --test_model [MODEL_FILE] --data_root [INPUT_ROOT_DIR] --out_dir [OUTPUT_DIR] --gpu_id [GPU_ID]
    e.g., python ..\colorization_subnet\test.py --short_size 256 --test_model models\colorization_subnet\example_net.pth --data_root example\ --out_dir example\res\ --gpu_id 0
    

Run

We provide pre-built executable files in folder demo\exe\, please try them.

Tips

Our test input images are resized to w x h (min(w, h)=256) considering the cost of computing bidirectional mapping functions by Deep Image Analogy. But we also support higher resolution input images.

Citation

If you find Deep Exemplar-based Colorization helpful for your research, please consider citing:

@article{he2018deep,
  title={Deep exemplar-based colorization},
  author={He, Mingming and Chen, Dongdong and Liao, Jing and Sander, Pedro V and Yuan, Lu},
  journal={ACM Transactions on Graphics (TOG)},
  volume={37},
  number={4},
  pages={47},
  year={2018},
  publisher={ACM}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].