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.
This repository contains the official PyTorch implementation of the following paper:
Deep Color Transfer using Histogram Analogy
Junyong Lee, Hyeongseok Son, Gunhee Lee, Jonghyeop Lee, Sunghyun Cho and Seungyong Lee, CGI 2020
Tested environment
-
Install requirements
pip install -r requirements.txt
-
Pre-trained models
-
Download and unzip pretrained weights under
[CHECKPOINT_ROOT]
:├── [CHECKPOINT_ROOT] │ ├── *.pth
NOTE:
[CHECKPOINT_ROOT]
can be specified with the option--checkpoints_dir
.
-
-
Place input images and their segment maps should be placed under
./test/input
and./test/seg_in
, respectively. Place target images and their segment maps under./test/target
and./test/seg_tar
, respectively. -
Test the network:
python test.py --dataroot [test folder path] --checkpoints_dir [CHECKPOINT_ROOT]
# e.g., python test.py --dataroot test --checkpoints_dir checkpoints
* The test results will be saved under `./results/`.
* To turn on *semantic replacement*, add `--is_SR`.
```bash
python test.py --dataroot [test folder path] --checkpoints_dir [ckpt path] --is_SR
```
If you find this code useful, please consider citing:
@article{Lee_2020_CTHA,
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},
journal = {The Visual Computer},
volume = {36},
number = {10},
pages = {2129--2143},
year = 2020,
}
Open an issue for any inquiries. You may also have contact with junyonglee@postech.ac.kr
All material related to our paper is available via the following links:
Link |
---|
Paper PDF |
Supplementary Files |
Checkpoint Files |
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.
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 them. In addition, personalization technology through user reference analysis is under study.
Please checkout other Coupe repositories in our Posgraph github organization.