Code Monkey home page Code Monkey logo

color_transfer_histogram_analogy's Introduction

Deep Color Transfer using Histogram Analogy — Official PyTorch Implementation

Python 2.7.12 PyTorch 0.4.0 CUDA 8.0.61 License CC BY-NC

Teaser image Picture: Color transfer results on various source and reference image pairs. For visualization, the reference image is cropped to make a same size with other images.

This repository contains the official PyTorch implementation of the following paper:

Deep Color Transfer using Historgram Analogy
Junyong Lee (POSTECH), Hyeongseok Son (POSTECH), Gunhee Lee (NCSoft), Jonghyeop Lee (POSTECH), Sunghyun Cho (POSTECH) Seungyong Lee (POSTECH)

http://cg.postech.ac.kr/papers/2020_CGI_JY.pdf

Abstract: We propose a novel approach to transferring the color of a reference image to a given source image. Although there can be diverse pairs of source and reference images in terms of content and composition similarity,previous methods are not capable of covering the whole diversity. To resolve this limitation, we propose a deep neural network that leverages color histogram analogy for color transfer. A histogram contains essential color information of an image, and our network utilizes the analogy between the source and reference histograms to modulate the color of the source image with abstract color features of the reference image. In our approach, histogram analogy is exploited basically among the whole images, but it can also be applied to semantically corresponding regions in the case that the source and reference images have similar contents with different compositions. Experimental results show that our approach effectively transfers the reference colors to the source images in a variety of settings. We also demonstrate a few applications of our approach, such asalette-based recolorization, color enhancement, and color editing.

For any inquiries, please contact [email protected]

Resources

All material related to our paper is available via the following links:

Link
Paper PDF
Supplementary Files
Checkpoint Files

Testing the network

  1. Download pretrained weights for IRN and HEN from here. Then, place checkpoints under ./checkpoints (one may change the offset in ./options/base_options.py).

  2. Place your images under ./test. Input images and their segment map should be placed under ./test/input and ./test/seg_in, respectively. Place target images and their segment map under ./test/target and ./test/seg_tar.

  3. To test the network, type

python test.py --dataroot [test folder path] --checkpoints_dir [ckpt path]

Using pre-trained networks

BIBTEX

If you find this code useful, please consider citing:

@InProceedings{Lee_2020_VC,
author = {Lee, Junyong and Son, Hyeongseok and Lee, Gunhee and Lee, Jonghyeop and Cho, Sunghyun and Lee, Seungyong},
title = {Deep Color Transfer using Histogram Analogy},
booktitle = {The Visual Computer},
month = {Aug},
year = {2020}
}

License

This software is being made available under the terms in the LICENSE file.

Any exemptions to these terms requires a license from the Pohang University of Science and Technology.

About Coupe Project

Project ‘COUPE’ aims to develop software that evaluates and improves the quality of images and videos based on big visual data. To achieve the goal, we extract sharpness, color, composition features from images and develop technologies for restoring and improving by using it. In addition,ersonalization technology through userreference analysis is under study.

Please checkout out other Coupe repositories in our Posgraph github organization.

Useful Links

color_transfer_histogram_analogy's People

Contributors

codeslake 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.