Skip to content
/ HiDT Public
forked from advimman/HiDT

Official repository for the paper High-Resolution Daytime Translation Without Domain Labels (CVPR2020, Oral)

License

Notifications You must be signed in to change notification settings

psi1104/HiDT

 
 

Repository files navigation

High-Resolution Daytime Translation Without Domain Labels

Run on Ainize

Open HiDT in Colab

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

Installation

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

Clone the repo

git clone https://github.com/saic-mdal/HiDT.git

Install requirenments

cd HiDT
pip install -r requirements.txt

Inference

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

Citation

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},
}

About

Official repository for the paper High-Resolution Daytime Translation Without Domain Labels (CVPR2020, Oral)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 97.5%
  • Python 1.5%
  • Other 1.0%