Git Product home page Git Product logo

ganimation's Introduction

GANimation: Anatomically-aware Facial Animation from a Single Image

[Project] [Paper]

Official implementation of GANimation. In this work we introduce a novel GAN conditioning scheme based on Action Units (AU) annotations, which describe in a continuous manifold the anatomical facial movements defining a human expression. Our approach permits controlling the magnitude of activation of each AU and combine several of them. For more information please refer to the paper.

This code was made public to share our research for the benefit of the scientific community. Do NOT use it for immoral purposes.

GANimation

Prerequisites

  • Install PyTorch, Torch Vision and dependencies from http://pytorch.org
  • Install requirements.txt (pip install -r requirements.txt)

Data Preparation

The code requires a directory containing the following files:

  • imgs/: folder with all image
  • aus_openpose.pkl: dictionary containing the images action units.
  • train_ids.csv: file containing the images names to be used to train.
  • test_ids.csv: file containing the images names to be used to test.

An example of this directory is shown in sample_dataset/.

To generate the aus_openface.pkl extract each image Action Units with OpenFace and store each output in a csv file the same name as the image. Then run:

python data/prepare_au_annotations.py

Run

To train:

bash launch/run_train.sh

To test:

python test --input_path path/to/img

Citation

If you use this code or ideas from the paper for your research, please cite our paper:

@inproceedings{pumarola2018ganimation,
    title={GANimation: Anatomically-aware Facial Animation from a Single Image},
    author={A. Pumarola and A. Agudo and A.M. Martinez and A. Sanfeliu and F. Moreno-Noguer},
    booktitle={Proceedings of the European Conference on Computer Vision (ECCV)},
    year={2018}
}

ganimation's People

Contributors

albertpumarola avatar

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.