Giter Site home page Giter Site logo

dr-gan's Introduction

* Still under Development and haven't check the result of this implimentation (2017/9/25)

Requirements

  • python 3.6
  • pytorch 0.2.0
  • numpy 1.13.1
  • scipy 0.18.1
  • matplotlib 2.0.0

How to use

Single-Image DR-GAN

  1. modify DataLoader function at main.py to define dataloader which is applicable to your data

    • data needs to have ID and pose lables corresponds to each image
    • if you don't have, "-random" option allow you to see how the code works with meanless random data.

    python main.py -random

  2. Run main.py to train models

    • trained models and Loss_log will be saved at "DR_GAN/snapshot/Single" by default

    python main.py -random

  3. Generate Image with arbitrary pose

    • use "-generate" option
    • specify leaned model by "-snapshot" option
    • generated images will be saved at specified sanpshot directory

    python main.py -random -generate -snapshot=snapshot/Single/2017-09-22_20-31-08/epoch1

Multi-Image DR-GAN

  1. modify DataLoader function at main.py to define dataloader which is applicable to your data

    • data needs to have ID and pose lables corresponds to each image
    • if you don't have, "-random" option allow you to see how the code works with meanless random data.

    python main.py -multi-DRGAN -images-perID=4 -random

  2. Run main.py with "-multi-DRGAN" and "-images-perID" option

    • Multi-Image DR-GAN assumes input data to have N images per person and in my code, they should be sequentially aligned. So change N depends on your data.
    • input data size have to be divisible by batch size
    • batch size have to be divisible by images_perID
    • trained modles and Loss_log will be saved at "DR_GAN/snapshot/Multi" by default

    python main.py -multi-DRGAN -images-perID=4 -random

  3. Generate Image with arbitrary pose

    • use "-generate" option
    • specify leaned model by "-snapshot" option
    • generated images will be saved at specified sanpshot directory

    python main.py -random -multi-DRGAN -generate -images-perID=4 -snapshot=snapshot/Multi/2017-09-22_23-03-50/epoch5

dr-gan's People

Watchers

 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.