This repository contains the implementation of the following paper:
Live Speech Portraits: Real-Time Photorealistic Talking-Head Animation
Yuanxun Lu, Jinxiang Chai, Xun Cao (SIGGRAPH Asia 2021)
Abstract: To the best of our knowledge, we first present a live system that generates personalized photorealistic talking-head animation only driven by audio signals at over 30 fps. Our system contains three stages. The first stage is a deep neural network that extracts deep audio features along with a manifold projection to project the features to the target person's speech space. In the second stage, we learn facial dynamics and motions from the projected audio features. The predicted motions include head poses and upper body motions, where the former is generated by an autoregressive probabilistic model which models the head pose distribution of the target person. Upper body motions are deduced from head poses. In the final stage, we generate conditional feature maps from previous predictions and send them with a candidate image set to an image-to-image translation network to synthesize photorealistic renderings. Our method generalizes well to wild audio and successfully synthesizes high-fidelity personalized facial details, e.g., wrinkles, teeth. Our method also allows explicit control of head poses. Extensive qualitative and quantitative evaluations, along with user studies, demonstrate the superiority of our method over state-of-the-art techniques.
Figure 1. Given an arbitrary input audio stream, our system generates personalized and photorealistic talking-head animation in real-time. Right: May and Obama are driven by the same utterance but present different speaking characteristics.
- This project is successfully trained and tested on Windows10 with PyTorch 1.7 (Python 3.6). Linux and lower version PyTorch should also work (not tested). We recommend creating a new environment:
conda create -n LSP python=3.6
conda activate LSP
- Clone the repository:
git clone https://github.com/YuanxunLu/LiveSpeechPortraits.git
cd LiveSpeechPortraits
- FFmpeg is required to combine the audio and the silent generated videos. Please check FFmpeg for installation. For Linux users, you can also:
sudo apt-get install ffmpeg
- Install the dependences:
pip install -r requirements.txt
-
Download the pre-trained models and data from Google Drive to the
data
folder. Five subjects data are released (May, Obama1, Obama2, Nadella and McStay). -
Run the demo:
python demo.py --id May --driving_audio ./data/Input/00083.wav
Results can be found under the
results
folder.
If you find this project useful for your research, please consider citing:
@inproceedings{lu2021live,
author = {Lu, Yuanxun and Chai, Jinxiang and Cao, Xun},
title = {{Live Speech Portraits}: Real-Time Photorealistic Talking-Head Animation},
journal = {ACM Transactions on Graphics},
numpages = {17},
volume={40},
number={6},
month = December,
year = {2021},
doi={10.1145/3478513.3480484}
}
- This repo was built based on the framework of pix2pix-pytorch.
- Thanks the authors of MakeItTalk, ATVG, RhythmicHead, Speech-Driven Animation for making their excellent work and codes publicly available.