Official PyTorch implementation (only inference part) for the paper I. Anokhin, P. Solovev, D. Korzhenkov, A. Kharlamov, T. Khakhulin, A. Silvestrov, S. Nikolenko, V. Lempitsky, and G. Sterkin. "High-Resolution Daytime Translation Without Domain Labels." In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).
Make sure that you use python >= 3.7. We have tested it with conda package manager. If you are new to conda, proceed to https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html
conda create -n hidt python=3.7
conda activate hidt
git clone https://github.com/advimman/HiDT.git
cd HiDT
pip install -r requirements.txt
Daytime translation, upsampling with Genh
CUDA_VISIBLE_DEVICES=0 PYTHONPATH=$(pwd):${PYTHONPATH} \
python ./bin/infer_on_folders.py \
--content-dir ./images/daytime/content/ \
--style-dir ./images/daytime/styles/ \
--cfg-path ./configs/daytime.yaml \
--chk-path ./trained_models/generator/daytime.pt \
--enh-path ./trained_models/enhancer/enhancer.pth \
--enhancement generator
Daytime translation, generator in fully convolutional mode, no postprocessing
CUDA_VISIBLE_DEVICES=0 PYTHONPATH=$(pwd):${PYTHONPATH} \
python ./bin/infer_on_folders.py \
--content-dir ./images/daytime/content/ \
--style-dir ./images/daytime/styles/ \
--cfg-path ./configs/daytime.yaml \
--chk-path ./trained_models/generator/daytime.pt \
--enhancement fullconv
Model, trained on wikiart, upsampling with Genh
CUDA_VISIBLE_DEVICES=0 PYTHONPATH=$(pwd):${PYTHONPATH} \
python ./bin/infer_on_folders.py \
--content-dir ./images/wikiart/content/ \
--style-dir ./images/wikiart/styles/ \
--cfg-path ./configs/wikiart.yaml \
--chk-path ./trained_models/generator/wikiart.pt \
--enh-path ./trained_models/enhancer/enhancer.pth \
--enhancement generator
Model, trained on wikiart, generator in fully convolutional mode, no postprocessing
CUDA_VISIBLE_DEVICES=0 PYTHONPATH=$(pwd):${PYTHONPATH} \
python ./bin/infer_on_folders.py \
--content-dir ./images/wikiart/content/ \
--style-dir ./images/wikiart/styles/ \
--cfg-path ./configs/wikiart.yaml \
--chk-path ./trained_models/generator/wikiart.pt \
--enhancement fullconv
If you found our work useful, please don't forget to cite
@inproceedings{Anokhin_2020_CVPR,
author = {Anokhin, Ivan and
Solovev, Pavel and
Korzhenkov, Denis and
Kharlamov, Alexey and
Khakhulin, Taras and
Silvestrov, Alexey and
Nikolenko, Sergey and
Lempitsky, Victor and
Sterkin, Gleb
},
title = {High-Resolution Daytime Translation Without Domain Labels},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2020},
}