Giter Site home page Giter Site logo

mohendra / discogan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sktbrain/discogan

0.0 2.0 0.0 11 MB

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

Python 96.37% Shell 3.63%

discogan's Introduction

DiscoGAN

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

Prerequisites

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

Training DiscoGAN

CelebA

Download CelebA dataset using

$ python ./datasets/download.py celebA 

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

To train gender conversion,

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

To train hair color conversion

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

Handbags / Shoes

Download Edges2Handbags dataset using

$ python ./datasets/download.py edges2handbags

Download Edges2Shoes dataset using

$ python ./datasets/download.py edges2shoes

To train Edges2Handbags,

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

To train Edges2Shoes,

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

To train Handbags2Shoes,

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

Facescrub

Download Facescrub dataset using

$ python ./datasets/download.py facescrub

To train gender conversion,

$ python ./discogan/image_translation.py --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/angle_pairing.py --task_name='car2car' 

To train Car2Face translation,

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

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

Results

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

discogan's People

Contributors

jazzsaxmafia avatar tengdahan avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.