The source code of "single-reference color transfer" in "Progressive Color Transfer with Dense Semantic Correspondences".
This is the implementation of single-reference color transfer proposed in the paper Progressive Color Transfer with Dense Semantic Correspondences by Mingming He, Jing Liao, Dongdong Chen, Lu Yuan and Pedro V. Sander in ACM Transactions on Graphics (2019).
Neural Color Transfer is a progressive color transfer framework, which jointly optimizes dense semantic correspondencesin the deep feature domain and the local color transfer inthe image domain.
Given two input images (one color source image S and one color reference image) which share semantically-related content, but may vary dramatically in appearance or structure, the proposed framework first estimates dense correspondence between them using deep features (extracted from VGG19 at level L) and then applies local color transfer to the source image S based on the correspondence. The process repeats from high level (L=5) to low level (L=1).
For more results, please refer to our Supplementary.
This is a C++ combined with CUDA implementation. It is worth noticing that:
The codes requires compiling in Visual Studio as follows:
Caffe
under code\windows\
and add neural_color_transfer.vcxproj
under code\Windows\neural_color_transfer\
.<MKL_DIR>..\..\..\NugetPackages\mkl\compilers_and_libraries_2018.1.156\windows</MKL_DIR>
.<OPENCV_DIR>..\..\..\NugetPackages\OpenCV.2.4.10\build\native</OPENCV_DIR>
.neural_color_transfer.vcxproj
.You need to download models before running a demo.
demo\model\vgg19\
folder and download model.We prepare an example under the folder demo\
with:
(1) Input data folder example\
including two parts:
input\
with the input images (color source images and color reference images) inside.pairs.txt
to specify a source, a reference and a BDS weight (2.0 as default) as an example in each line, e.g.,
in/in0.png in/tar0.png 2.0
in/in1.png in/tar1.png 2.0
...
(2) Executable script run.bat
including one command:
neural_color_transfer.exe -m [MODEL_DIR] -i [INPUT_ROOT_DIR] -o [OUTPUT_DIR] -g [GPU_ID]
e.g., exe\neural_color_transfer.exe -m model\ -i example\ -o example\res\ -g 0
We provide pre-built executable files exe. Please download and unzip in folder demo\
, and try them.
If you find Neural Color Transfer helpful for your research, please consider citing:
@article{he2019progressive,
title={Progressive color transfer with dense semantic correspondences},
author={He, Mingming and Liao, Jing and Chen, Dongdong and Yuan, Lu and Sander, Pedro V},
journal={ACM Transactions on Graphics (TOG)},
volume={38},
number={2},
pages={13},
year={2019},
publisher={ACM}
}