Giter Site home page Giter Site logo

vunet's Introduction

A Variational U-Net for Conditional Appearance and Shape Generation

This repository contains training code for the CVPR 2018 spotlight

A Variational U-Net for Conditional Appearance and Shape Generation

The model learns to infer appearance from a single image and can synthesize images with that appearance in different poses.

teaser

Project page with more results

Requirements

The code was developed with Python 3. Dependencies can be installed with

pip install -r requirements.txt

Please note that the code does not work with tensorflow >= 1.3.0.

Training

Download and unpack the desired dataset. This results in a folder containing an index.p file. Either add a symbolic link named data pointing to the download directory or adjust the path to the index.p file in the <dataset>.yaml config file. To train the model, run

python main.py --config <dataset>.yaml

By default, images and checkpoints are saved to log/<current date>. To change the log directory and other options, see

python main.py -h

and the corresponding configuration file. To obtain images of optimal quality it is recommended to train for a second round with a loss based on Gram matrices. To do so run

python main.py --config <dataset>_retrain.yaml --retrain --checkpoint <path to checkpoint of first round>

Other Datasets

To be able to train the model on your own dataset you must provide a pickled dictionary with the following keys:

  • joint_order: list indicating the order of joints.
  • imgs: list of paths to images (relative to pickle file).
  • train: list of booleans indicating if this image belongs to training split
  • joints: list of [0,1] normalized xy joint coordinates of shape (len(joint_jorder), 2). Use negative values for occluded joints.

joint_order should contain

'rankle', 'rknee', 'rhip', 'rshoulder', 'relbow', 'rwrist', 'reye', 'lankle', 'lknee', 'lhip', 'lshoulder', 'lelbow', 'lwrist', 'leye', 'cnose'

and images without valid values for rhip, rshoulder, lhip, lshoulder are ignored.

vunet's People

Contributors

pesser avatar

Watchers

James Cloos 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.