Giter Club home page Giter Club logo

talking-face-landmarks-from-speech's Introduction

Generating Talking Face Landmarks

The code for the paper "Generating Talking Face Landmarks from Speech."

You can find the project page here.

An improved version of this project can be found here.

Installation

The project depends on the following Python packages:

  • Keras --- 2.2.4
  • Tensorflow --- 1.9.0
  • Librosa --- 0.6.0
  • opencv-python --- 3.3.0.10
  • dlib --- 19.7.0
  • tqdm
  • subprocess

It also depends on the following packages:

  • ffmpeg --- 3.4.1
  • OpenCV --- 3.3.0

The code has been tested on Ubuntu 16.04 and OS X Sierra and High Sierra.

Code Example

The generation code has the following arguments:

  • -i --- Input speech file
    • See this link for supported audio formats.
  • -m --- Input talking face landmarks model
  • -d --- Delay in terms of frames, where one frame is 40 ms
  • -c --- Number of context frames
  • -o --- Output path

You can run the following code to test the system:

python generate.py -i test_samples/test1.flac -m models/D40_C3.h5 -d 1 -c 3 -o results/D40_C3_test1

Feature Extraction

You can run featureExtractor.py to extract features from videos directly. The arguments are as follows:

  • -vp --- Input folder containing video files (if your video file types are different from .mpg or .mp4, please modify the script accordingly)
  • -sp --- Path to shape_predictor_68_face_landmarks.dat. You can download this file here.
  • -o --- Output file name

Usage:

python featureExtractor.py -vp path-to-video-files/ -sp path-to-shape-predictor-68-face-landmarks-dat -o output-file-name.hdf5

Training

The training code has the following arguments:

  • -i --- Input hdf5 file containing training data
  • -u --- Number of hidden units
  • -d --- Delay in terms of frames, where one frame is 40 ms
  • -c --- Number of context frames
  • -o --- Output folder path to save the model

Usage:

python train.py -i path-to-hdf5-train-file/ -u number-of-hidden-units -d number-of-delay-frames -c number-of-context-frames -o output-folder-to-save-model-file

Citation

@inproceedings{eskimez2018generating,
  title={Generating talking face landmarks from speech},
  author={Eskimez, Sefik Emre and Maddox, Ross K and Xu, Chenliang and Duan, Zhiyao},
  booktitle={International Conference on Latent Variable Analysis and Signal Separation},
  pages={372--381},
  year={2018},
  organization={Springer}
}

talking-face-landmarks-from-speech's People

Contributors

eeskimez 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.