Home

Awesome

Diverse Image-to-Image Translation via Disentangled Representations (High resolution)

Pytorch implementation for multi-modality I2I on translation tasks with high resolution images. We adopt a multi-scale generator and discriminator architecture to stable the training and enhance the quality of generated images. The project is an extension to the "Diverse Image-to-Image Translation via Disentangled Representations(https://arxiv.org/abs/1808.00948)", ECCV 2018.

Contact: Hsin-Ying Lee (hlee246@ucmerced.edu) and Hung-Yu Tseng (htseng6@ucmerced.edu)

Paper

Diverse Image-to-Image Translation via Disentangled Representations<br> Hsin-Ying Lee*, Hung-Yu Tseng*, Jia-Bin Huang, Maneesh Kumar Singh, and Ming-Hsuan Yang<br> European Conference on Computer Vision (ECCV), 2018 (oral) (* equal contribution)

Please cite our paper if you find the code or dataset useful for your research.

@inproceedings{DRIT,
  author = {Lee, Hsin-Ying and Tseng, Hung-Yu and Huang, Jia-Bin and Singh, Maneesh Kumar and Yang, Ming-Hsuan},
  booktitle = {European Conference on Computer Vision},
  title = {Diverse Image-to-Image Translation via Disentangled Representations},
  year = {2018}
}

Example Results

<img src='imgs/hd_result.png' width="1000px"/>

Usage

Prerequisites

Install

git https://github.com/hytseng0509/DRIT_hr.git
cd DRIT_hr

Datasets

cd datasets/gta2cityscapes
mkdir trainA trainB

Usage

python3 train.py --dataroot ../datasets/gta2cityscapes -name NAME --display_dir DISPLAY_DIR --result_dir RESULT_DIR
tensorboard --logdir DISPLAY_DIR/NAME

Results and saved models can be found at RESULT_DIR/NAME.

python3 test.py --dataroot ../datasets/gta2cityscapes -name NAME --output_dir OUTPUT_DIR --resume MODEL_FILE --num NUM_PER_IMG
python3 test_transfer.py --dataroot ../datasets/gta2cityscapes -name NAME --output_dir OUTPUT_DIR --resume MODEL_FILE

Note