Skip to content

[CGI 2020] Official PyTorch Implementation for "Deep Color Transfer using Histogram Analogy"

License

Notifications You must be signed in to change notification settings

codeslake/Color_Transfer_Histogram_Analogy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deep Color Transfer using Histogram Analogy
Official PyTorch Implementation of the CGI 2020 Paper
Project | Paper | Supp | Slide

This repo contains the evaluation code for the following paper:

Deep Color Transfer using Histogram Analogy
Junyong Lee1, Hyeongseok Son1, Gunhee Lee2, Jonghyeop Lee1, Sunghyun Cho1, and Seungyong Lee1
1POSTECH, 2NCSOFT
The Visual Computer (special issue on CGI 2020) 2020

Figure: 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.

Getting Started

Prerequisites

Tested environment

Ubuntu Python PyTorch CUDA

  1. Install requirements
    • pip install -r requirements.txt
  2. Pre-trained models
    • Download and unzip pretrained weights (OneDrive | Dropbox) under [CHECKPOINT_ROOT]:

      ├── [CHECKPOINT_ROOT]
      │   ├── *.pth
      

      NOTE:

      [CHECKPOINT_ROOT] can be specified with the option --checkpoints_dir.

Testing the network

  • To test the network:

    python test.py --dataroot [test folder path] --checkpoints_dir [CHECKPOINT_ROOT]
    # e.g., python test.py --dataroot test --checkpoints_dir checkpoints

    Note:

    • Input images and their segment maps should be placed under ./test/input and ./test/seg_in, respectively.
    • Target images and their segment maps should be placed under ./test/target and ./test/seg_tar, respectively.
    • The test results will be saved under ./results/.
  • To turn on semantic replacement, add --is_SR:

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

Contact

Open an issue for any inquiries. You may also have contact with junyonglee@postech.ac.kr

Resources

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

License

License CC BY-NC
This software is being made available under the terms in the LICENSE file. Any exemptions to these terms require a license from the Pohang University of Science and Technology.

Citation

If you find this code useful, please consider citing:

@Article{Lee2020CTHA,
    author  = {Junyong Lee and Hyeongseok Son and Gunhee Lee and Jonghyeop Lee and Sunghyun Cho and Seungyong Lee},
    title   = {Deep Color Transfer using Histogram Analogy},
    journal = {The Visual Computer},
    volume  = {36},
    number  = {10},
    pages   = {2129--2143},
    year    = {2020},
}

About

[CGI 2020] Official PyTorch Implementation for "Deep Color Transfer using Histogram Analogy"

Topics

Resources

License

Stars

Watchers

Forks

Languages