Home

Awesome

Python 3.5 Python 3.6

<img src='imgs/final.gif' width="800px">

DRIT++: Diverse Image-to-Image Translation via Disentangled Representations

[Project Page][Paper][Conference Paper]

Pytorch implementation for our image-to-image translation method. With the proposed disentangled representation framework, we are able to learn diverse image-to-image translation from unpaired training data.

We have an extension of this work that:

  1. Apply mode-seeking regularization to improve the diversity, please see the training options for details.
  2. Apply DRIT on the multidomain setting, please refer to MDMM if you're interested in it.

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

Paper

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

DRIT++: Diverse Image-to-Image Translation via Disentangled Representations<br> Hsin-Ying Lee*, Hung-Yu Tseng*, Qi Mao*, Jia-Bin Huang, Yu-Ding Lu, Maneesh Kumar Singh, and Ming-Hsuan Yang<br>

@article{DRIT_plus,
  author = {Lee, Hsin-Ying and Tseng, Hung-Yu and Mao, Qi and Huang, Jia-Bin and Lu, Yu-Ding and Singh, Maneesh Kumar and Yang, Ming-Hsuan},
  title = {DRIT++: Diverse Image-to-Image Translation viaDisentangled Representations},
  journal={International Journal of Computer Vision},
  pages={1--16},
  year={2020}
}

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

@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/teaser_new.png' width="1000px"/>

Usage

Prerequisites

Install

git clone https://github.com/HsinYingLee/DRIT.git
cd DRIT/src

Datasets

bash ../datasets/download_dataset.sh dataset_name

Training Examples

python3 train.py --dataroot ../datasets/yosemite --name yosemite
tensorboard --logdir ../logs/yosemite

Results and saved models can be found at ../results/yosemite.

python3 train.py --dataroot ../datasets/portrait --name portrait --concat 0
tensorboard --logdir ../logs/portrait

Results and saved models can be found at ../results/portrait.

Testing Example

bash ../models/download_model.sh
python3 test.py --dataroot ../datasets/yosemite --name yosemite_random --resume ../models/example.pth

Diverse generated winter images can be found at ../outputs/yosemite_random

python3 test_transfer.py --dataroot ../datasets/yosemite --name yosemite_encoded --resume ../models/example.pth

Diverse generated winter images can be found at ../outputs/yosemite_encoded

Training options and tips

Other implementations