This is a PyTorch implementation of my paper A Unified Feature Disentangler for Multi-Domain Image Translation and Manipulation (UFDN) accepted by NIPS 2018. Please feel free to use/modify them, any bug report or improvement suggestion will be appreciated.
For more detailed information, please refer to the paper.
-
Image-to-Image translation / Cross-domain image generation
With domain invariant representation, domain vector and unified decoder, UFDN is able to perform (a) continuous image translation across different domains and/or attributes at interest (b) image generation across different domains. Pre-trained model & dataset are available, see next section.
-
Unsupervised domain adaption (UDA)
UDA can be addressed via the domain invariant representation learned by UFDN. As reported in the paper, UFDN's UDA performance on digit dataset is the current state-of-the-art. The figure visualizes the domain invariant representation learned by our UFDN, colored w.r.t. (a) dataset (b) digit.
Model trained on MNIST and tested on SVHN is available here, it's logger is also available here. This model was trained with the example config identical to the paper, recording accuracy 0.9579 on SVHN testing setting.
- Python 3
- CUDA & GPU available device
- PyTorch (0.4.0 or later version)
- torchvision
- scikit-image
- matplotlib
- h5py
- tensorboardX
- urllib
- wget
- gzip
Dataset is available here. To run the code, please download and place it under
Human face dataset is currently unavailible due to CelebA's prohibition of futher publication, we will make it availible if we get the premission in the future.
Pretrained model is also available here, you can download it if you'd like to try.data/
.
To train UFDN, make sure all requirements are satisfied and run
python3 train_face.py <path/to/config>
See example config for more options avialible. Please refer to the paper's supplementary for config used in the main paper.
To see learning curve and some translation/generation result, use tensorboard to access training log (location specified in config). E.g. tensorboard --logdir=log/
- face_hd is the config for demo (image-to-image translation) only.
- For UDA reproducibility, please refer to the supplemental of main paper and also issue #6 for more experiment config/settings.
Please cite the article:
"A Unified Feature Disentangler for Multi-Domain Image Translation and Manipulation" Alexander H. Liu, Yen-Cheng Liu, Yu-Ying Yeh, Yu-Chiang Frank Wang, NIPS'18
Please also cite the article if you find the face dataset helpful:
"Detach and Adapt: Learning Cross-Domain Disentangled Deep Representation" Yen-Cheng Liu, Yu-Ying Yeh, Tzu-Chien Fu, Sheng-De Wang, Wei-Chen Chiu, Yu-Chiang Frank Wang, CVPR'18 (spotlight)