Counting 3,463 Big Data & Machine Learning Frameworks, Toolsets, and Examples...
Suggestion? Feedback? Tweet @stkim1

Last Commit
Jan. 23, 2019
Mar. 18, 2017


Official PyTorch implementation of Learning to Discover Cross-Domain Relations with Generative Adversarial Networks.


  • Python 2.7
  • PyTorch
  • Numpy/Scipy/Pandas
  • Progressbar
  • OpenCV

Training DiscoGAN


Download CelebA dataset using

$ python ./datasets/ celebA 

(Currently, the link for downloading CelebA dataset is not available).

To train gender conversion,

$ python ./discogan/ --task_name='celebA' --style_A='Male'

To train hair color conversion

$ python ./discogan/ --task_name='celebA' --style_A='Blond_Hair' --style_B='Black_Hair' --constraint='Male'

Handbags / Shoes

Download Edges2Handbags dataset using

$ python ./datasets/ edges2handbags

Download Edges2Shoes dataset using

$ python ./datasets/ edges2shoes

To train Edges2Handbags,

$ python ./discogan/ --task_name='edges2handbags'

To train Edges2Shoes,

$ python ./discogan/ --task_name='edges2shoes' 

To train Handbags2Shoes,

$ python ./discogan/ --task_name='Handbags2Shoes' --starting_rate=0.5


Download Facescrub dataset using

$ python ./datasets/ facescrub

To train gender conversion,

$ python ./discogan/ --task_name='facescrub'

Car, Face

Download 3D car dataset used in Deep Visual Analogy-Making, and 3D face dataset into ./datasets folder and extract them.

To train Car2Car translation,

$ python ./discogan/ --task_name='car2car' 

To train Car2Face translation,

$ python ./discogan/ --task_name='car2face'

Run in order to train a model using other datasaet, after uncommenting corresponding line.


All example results show x_A, x_AB, x_ABA and x_B, x_BA, x_BAB

Example results of hair color conversion

Example results of gender conversion (CelebA)

Example results of Edges2Handbags

Example results of Handbags2Shoes

Example results of gender conversion (Facescrub)

Example results of Car2Face