Akapulu Labs logo Akapulu Labs Research

SadTalker

SadTalker: Learning Realistic 3D Motion Coefficients for Stylized Audio-Driven Single Image Talking Face Animation

SadTalker — method overview

SadTalker generates realistic talking-head videos from a single image and audio by modeling 3D motion coefficients for facial expression and head pose separately. It distinguishes lip-sync and head movements with 3DMM coefficients, then uses a 3D-aware renderer for natural, identity-preserving video animation.

  • talking-head
  • audio-driven
  • face-animation
  • head-pose
  • 3d-avatar
  • lip-sync
  • portrait-animation

Demos

These demos highlight SadTalker's capability to generate realistic 3D motion coefficients for talking face animation from audio, emphasizing natural head movements, expressive facial expressions, and identity preservation. Key evaluation points include the quality of motion and expression fidelity across languages, singing, and varied speaking styles, as well as demonstrated control over eye blinking. Comparisons with other methods validate its superior video quality and motion realism.

Authors: Wenxuan Zhang, Xiaodong Cun, Xuan Wang, Yong Zhang, Xi Shen, Yu Guo, Ying Shan, Fei Wang

Categories: cs.CV

Comment: Accepted by CVPR 2023, Project page: https://sadtalker.github.io, Code: https://github.com/Winfredy/SadTalker

Published 2022-11-22 · Updated 2023-03-13

Abstract

Generating talking head videos through a face image and a piece of speech audio still contains many challenges. ie, unnatural head movement, distorted expression, and identity modification. We argue that these issues are mainly because of learning from the coupled 2D motion fields. On the other hand, explicitly using 3D information also suffers problems of stiff expression and incoherent video. We present SadTalker, which generates 3D motion coefficients (head pose, expression) of the 3DMM from audio and implicitly modulates a novel 3D-aware face render for talking head generation. To learn the realistic motion coefficients, we explicitly model the connections between audio and different types of motion coefficients individually. Precisely, we present ExpNet to learn the accurate facial expression from audio by distilling both coefficients and 3D-rendered faces. As for the head pose, we design PoseVAE via a conditional VAE to synthesize head motion in different styles. Finally, the generated 3D motion coefficients are mapped to the unsupervised 3D keypoints space of the proposed face render, and synthesize the final video. We conducted extensive experiments to demonstrate the superiority of our method in terms of motion and video quality.


Introduction and Problem Setting

SadTalker addresses audio-driven single-image talking face animation: given one reference portrait and a speech clip, synthesize a realistic talking-head video. The paper argues that many of the failure modes seen in prior work—unnatural head movement, distorted facial expression, identity drift, and blur—stem from learning motions in coupled 2D motion-field or latent warping spaces. In contrast, the authors propose to explicitly represent motion using 3D Morphable Model (3DMM) coefficients, then use those coefficients to drive a 3D-aware face renderer.

The core idea is to separate the motion problem into two parts that have different relationships with audio:

  • Facial expression, especially lip motion, is strongly coupled to speech and should be learned with supervision that emphasizes mouth-related motion.
  • Head pose is only weakly linked to audio and is better modeled as a diverse, style-dependent latent process rather than a deterministic regression target.

The method is built around two learned motion generators—ExpNet for expression and PoseVAE for head pose—and a FaceRender module that maps the predicted 3DMM motion into the implicit motion space used by a face-vid2vid-style renderer.

Main pipeline. Our method uses the coefficients of 3DMM as intermediate motion representation. To this end, we first generate realistic 3D motion coefficients (facial expression, head pose) from audio, then these coefficients are used to implicitly modulate the 3D-aware face render for final video generation.
Main pipeline. Our method uses the coefficients of 3DMM as intermediate motion representation. To this end, we first generate realistic 3D motion coefficients (facial expression, head pose) from audio, then these coefficients are used to implicitly modulate the 3D-aware face render for final video generation.

Method Overview

SadTalker decomposes the problem into motion coefficient generation and video rendering. First, the source image is analyzed by a pretrained 3D face reconstruction model to obtain its initial coefficients. Then, audio drives two separate predictors: ExpNet outputs expression coefficients frame by frame, and PoseVAE synthesizes head-pose trajectories with controllable style diversity. Finally, these 3DMM motion coefficients are mapped into the unsupervised 3D keypoint space of a face animation network to synthesize the final video.

The paper emphasizes two design principles:

  • Disentangle motion types so the network does not have to learn incompatible audio-to-motion mappings jointly.
  • Keep rendering identity-preserving by using a 3D-aware warping-based renderer rather than directly regressing pixels from audio.

3DMM as the intermediate representation

The 3D face shape is written as

$$ \mathbf{S} = \bar{\mathbf{S}} + \mathbf{\alpha} \mathbf{U}_{id} + \mathbf{\beta} \mathbf{U}_{exp}, $$

where $\bar{\mathbf{S}}$ is the mean face, $\mathbf{U}_{id}$ and $\mathbf{U}_{exp}$ are the identity and expression bases, and $\mathbf{\alpha} \in \mathbb{R}^{80}$, $\mathbf{\beta} \in \mathbb{R}^{64}$ are identity and expression coefficients. Head pose is represented by rotation $\mathbf{r} \in SO(3)$ and translation $\mathbf{t} \in \mathbb{R}^3$. In SadTalker, identity coefficients are not generated; only motion-related parameters are modeled: expression $\mathbf{\beta}$ and pose $\rho = [\mathbf{r}, \mathbf{t}]$.

The architectures of the networks in our model. Here, 3×3-s1,1-p1-Conv-32 means a convolutional layer with the kernel size 3×3, the stride size (1,1), padding size (1,1) and the output channel is 32.
The architectures of the networks in our model. Here, 3×3-s1,1-p1-Conv-32 means a convolutional layer with the kernel size $3\times 3$, the stride size $(1,1)$, padding size $(1,1)$ and the output channel is 32.

ExpNet: Audio-to-Expression Generation

ExpNet predicts expression coefficients from a short audio window while conditioning on the source identity’s initial expression. The paper’s motivation is that audio-to-expression is not one-to-one across identities, and raw expression coefficients contain motions irrelevant to speech. To reduce uncertainty, ExpNet uses a reference expression $\beta_0$ from the first frame and targets a lip-motion-only expression signal distilled from Wav2Lip and 3D face reconstruction.

The model takes an audio segment $a_{\{1,\dots,t\}}$ (each frame uses a 0.2 s mel-spectrogram), processes it with a ResNet-style audio encoder $\Phi_A$, and maps it with a linear layer $\Phi_M$ to expression coefficients. The prediction is conditioned on the reference expression and a blink control signal:

$$ \beta_{\{1,\dots,t\}} = \Phi_M\big(\Phi_A(a_{\{1,\dots,t\}}), z_{blink}, \beta_0\big). $$

The blink signal is included because eye blinks are weakly present in the training signal and can otherwise be washed out by the model. The paper uses an explicit landmark-based loss to control eye opening/closing and maintain other facial landmarks close to the lip-only target.

The structure of our ExpNet. We involve a monocular 3D face reconstruction model (Re and Rd) to learn the realistic expression coefficients. Where Re is a pretrained 3DMM coefficients estimator and Rd is a differentiable 3D face render without learnable parameters. We use the reference expression 0 to reduce the uncertainty of identity and the generated frame from pre-trained Wav2Lip and the first frame as target expression coefficients since it only contains the lip-related motions.
The structure of our ExpNet. We involve a monocular 3D face reconstruction model $(R_e$ and $R_d)$ to learn the realistic expression coefficients. Where $R_e$ is a pretrained 3DMM coefficients estimator and $R_d$ is a differentiable 3D face render without learnable parameters. We use the reference expression $\beta_0$ to reduce the uncertainty of identity and the generated frame from pre-trained Wav2Lip and the first frame as target expression coefficients since it only contains the lip-related motions.

ExpNet losses

ExpNet is trained with three losses:

  • Distillation loss $\mathcal{L}_{distill}$: mean-squared error between predicted expression coefficients and lip-only coefficients extracted from Wav2Lip outputs.
  • Landmark loss $\mathcal{L}_{lks}$: constrains eye blinking and keeps the rest of the face close to the lip-only target in 2D landmark space.
  • Lip-reading loss $\mathcal{L}_{read}$: compares character logits predicted from rendered mouth crops using a pretrained lip-reading model.

The paper defines the total expression loss as

$$ \mathcal{L}_{exp} = \lambda_{distill}\mathcal{L}_{distill} + \lambda_{read}\mathcal{L}_{read} + \lambda_{lks}\mathcal{L}_{lks}, $$

with weights $\lambda_{distill}=2$, $\lambda_{read}=0.01$, and $\lambda_{lks}=0.01$.

The appendix gives the distillation loss explicitly as

$$ \mathcal{L}_{distill} = \frac{1}{T}\sum_{t=1}^{T} (\beta_t^g - \beta_t^{lip})^2, $$

where $\beta_t^{lip}$ is the lip-only target coefficient and $\beta_t^g$ is the generated expression coefficient. For blinking, the paper computes the eye width and height from landmark pairs, defines the eye ratio $R_t$, and uses $\mathcal{L}_{eye}=\sum_t \lVert R_t - Z_t^{blink} \rVert_1$ plus a landmark regularizer on non-eye landmarks.

The ablation of ExpNet. We choose four frames from the generated video as comparison. Our method largely reduces the uncertainty of audio to expression generation. The reference 0 is used to provide the identity information while the lip only coefficients generate better lip synchronization. Notice that, the target image is provided as the identity and lip motion reference.
The ablation of ExpNet. We choose four frames from the generated video as comparison. Our method largely reduces the uncertainty of audio to expression generation. The reference $\beta_0$ is used to provide the identity information while the lip-only coefficients generate better lip synchronization. Notice that, the target image is provided as the identity and lip motion reference.

PoseVAE: Audio-Conditioned Stylized Head Motion

Unlike expression, head pose is not tightly determined by speech. The paper therefore uses a conditional VAE to generate a diverse head-motion residual relative to the first-frame pose. PoseVAE learns the residual motion $\Delta \rho_{\{1,\dots,T\}} = \rho_{\{1,\dots,T\}} - \rho_0$, where $\rho_0$ is the reference pose from the first frame. Modeling the residual helps generate longer, smoother, and more stable head-motion sequences during inference.

PoseVAE conditions on three inputs:

  • the initial head pose $\rho_0$ from the reference image,
  • the audio segment $a_{\{1,\dots,t\}}$, and
  • a style identity code $Z_{style}$, implemented as a one-hot identity vector over the training identities.

The encoder and decoder are both two-layer MLPs. The encoder maps the motion residuals and conditions to a Gaussian latent distribution, and the decoder samples from it to reconstruct head-pose trajectories. The paper uses the terms “rhythm awareness” and “identity style” to describe the effect of the audio and style conditions.

The pipeline of the proposed PoseVAE. We learn the residual of the input head pose 0 via a conditional VAE structure. Given the conditions: first frame 0, style identity Z_style and the audio clip a_{1,...,t}, our method learns a distribution of the residual head pose Δρ_{1,...,t} = ρ_{1,...,t} - ρ_0. After training, we can generate the stylized results through the pose decoder and the conditions only.
The pipeline of the proposed PoseVAE. We learn the residual of the input head pose $\rho_0$ via a conditional VAE structure. Given the conditions: first frame $\rho_0$, style identity $Z_{style}$ and the audio clip $a_{\{1,\dots,t\}}$, our method learns a distribution of the residual head pose $\Delta\rho_{\{1,\dots,t\}} = \rho_{\{1,\dots,t\}} - \rho_0$. After training, we can generate the stylized results through the pose decoder and the conditions only.

PoseVAE losses

PoseVAE is trained with three losses:

  • Reconstruction loss $\mathcal{L}_{MSE}$ between predicted and true pose residuals.
  • KL divergence $\mathcal{L}_{KL}$ to match the latent distribution to a Gaussian prior.
  • Adversarial loss $\mathcal{L}_{GAN}$ from a PatchGAN-style discriminator over motion sequences.

The total loss is

$$ \mathcal{L}_{pose} = \lambda_{MSE}\mathcal{L}_{MSE} + \lambda_{KL}\mathcal{L}_{KL} + \lambda_{GAN}\mathcal{L}_{GAN}, $$

with weights $\lambda_{MSE}=1$, $\lambda_{KL}=1$, and $\lambda_{GAN}=0.7$.

We compare our method with a baseline method which learn all the coefficients from a single network without any condition (from Speech2Gesture). Our method shows clear head movements, identity preservation and diverse expressions.
We compare our method with a baseline method which learn all the coefficients from a single network without any condition (from Speech2Gesture). Our method shows clear head movements, identity preservation and diverse expressions.

3D-aware FaceRender

After predicting motion coefficients, SadTalker renders the final image sequence with a face animation module inspired by face-vid2vid. The renderer does not take a real driving video; instead, it takes the predicted 3DMM coefficients and maps them into the unsupervised 3D keypoint space used by face-vid2vid.

The mapping network is a stack of 1D convolution layers. It consumes a temporal window of coefficients, using $t-2$ through $t+2$ frames, and predicts the motion representation of face-vid2vid for frame $t$ (the paper names these parameters as yaw, pitch, roll, translation, and a deformation term). The renderer is trained in two stages: first the base face-vid2vid model is trained self-supervised; then all of its appearance-related components are frozen and the mapping network is trained to align 3DMM coefficients with the unsupervised keypoint domain.

The paper also notes an important design choice: it removes alignment coefficients used by PIRenderer. These translation/scaling coefficients help crop aligned faces for 3D reconstruction, but the authors find that including them in audio-driven synthesis makes the generated head motion look unnaturally aligned and hurts realism.

The proposed FaceRender and comparison with face-vid2vid. Given source image I_s and driving image I_d, face-vid2vid generates the motions in a unsupervised 3D keypoint spaces of X_c, X_s and X_d. Then, the image can be generated via the appearance A_0 and the keypoints. Since we do not have driving image, we use the explicit disentangled 3DMM coefficients as proxy and map it to the unsupervised 3D keypoints space.
The proposed FaceRender and comparison with face-vid2vid. Given source image $I_s$ and driving image $I_d$, face-vid2vid generates the motions in a unsupervised 3D keypoint space of $X_c$, $X_s$ and $X_d$. Then, the image can be generated via the appearance $A_0$ and the keypoints. Since we do not have driving image, we use the explicit disentangled 3DMM coefficients as proxy and map it to the unsupervised 3D keypoints space.

FaceRender loss

Besides the original face-vid2vid losses, the mapping network is trained with an $L_1$ regularization between keypoints predicted from the 3DMM coefficients and the corresponding keypoints produced by face-vid2vid:

$$ \mathcal{L}_{1} = \frac{1}{N} \sum_{n=1}^{N} \lVert K'_n - K_n \rVert_1. $$

The paper sets the weight of this loss to 20. The rest of the rendering losses are kept as in face-vid2vid and are applied to the final image output.

Training Setup, Data, and Evaluation

Training data. The main training dataset is VoxCeleb, used to train FaceRender. The paper reports using over 100k videos from 1,251 subjects, cropping them following prior image-animation methods and resizing frames to $256\times256$. For ExpNet and PoseVAE, the authors select a subset of 1,890 aligned audio-video clips from 46 subjects because not all VoxCeleb samples are audio-video aligned. For evaluation, they use 346 videos from the HDTF dataset, taking the first 8 seconds of each video, for roughly 70k frames total, and resize to $256\times256$.

Audio preprocessing. Audio is downsampled to 16 kHz and converted to mel-spectrograms using the same settings as Wav2Lip: FFT window size 800, hop length 200, and 80 mel filter banks. Each frame receives a 0.2 s mel feature of shape $16\times80$.

Optimization. All modules are trained separately with Adam on 8 A100 GPUs. The learning rates are $2\times10^{-5}$ for ExpNet, $10^{-4}$ for PoseVAE, and $2\times10^{-4}$ for FaceRender. Temporal windows are 5 frames for ExpNet, 32 frames for PoseVAE, and 5 continuous frames for FaceRender. At inference, the method runs end-to-end without manual intervention.

Metrics. The paper evaluates:

  • FID for visual realism.
  • CPBD for sharpness.
  • CSIM using ArcFace for identity preservation.
  • LSE-C and LSE-D from Wav2Lip for lip synchronization.
  • Diversity of head motion using Hopenet embeddings.
  • Beat Align for alignment between audio rhythm and head motion.

Main Quantitative Results

The main comparison is performed on HDTF. The baselines include Wav2Lip, PC-AVS, MakeItTalk, Audio2Head, and Wang et al. The paper notes that Wav2Lip and PC-AVS are evaluated in one-shot settings and that Wav2Lip scores especially well on image quality because it primarily changes the mouth region while leaving the rest of the face intact. PC-AVS uses a fixed reference pose and fails on some samples in the cross-identity setting.

Method LSE-C ↑ LSE-D ↓ Diversity ↑ Beat Align ↑ FID ↓ CPBD ↑ CSIM ↑
Real Video8.2116.9820.2590.2710.0000.4281.000
Wav2Lip*10.2215.535N/AN/A21.7250.3680.849
PC-AVS**9.0536.355N/AN/A69.1270.2060.683
MakeItTalk5.11010.0590.2570.26828.2430.2830.838
Audio2Head7.3577.5350.1810.26724.3920.2810.823
Wang et al.4.93210.0550.2260.26822.4320.2950.811
SadTalker7.2907.7720.2780.29322.0570.3350.843

The reported numbers show a favorable trade-off: SadTalker is not the best on the lip-only metrics that can be artificially inflated by freezing most of the face, but it produces much stronger head-motion diversity and overall visual quality than motion-rich baselines. Its identity similarity is competitive with the strongest baselines and much better than methods that suffer from distortions or identity drift.

We compare our method with several state-of-the-art methods for single image audio-driven talking head generation. Our method produces much higher quality results in terms of lip synchronization, identity preservation, head motion and image quality. We give the target image above for both lip shape and identity reference. Please refer our supplementary video for better comparison.
We compare our method with several state-of-the-art methods for single image audio-driven talking head generation. Our method produces much higher quality results in terms of lip synchronization, identity preservation, head motion and image quality. We give the target image above for both lip shape and identity reference. Please refer our supplementary video for better comparison.

User study

The authors ran a user study on 20 test videos with 20 participants. Each participant judged lip synchronization, motion diversity, video sharpness, and overall naturalness. SadTalker was selected most often across all categories.

Method Lip Sync. Motion Diversity Video Sharpness Overall Naturalness
Wav2Lip15.6%3.1%2.0%2.8%
PC-AVS18.1%9.6%3.4%9.1%
MakeItTalk5.6%5.3%5.7%6.9%
Wang et al.12.5%12.1%16.3%11.6%
Audio2Head9.5%12.1%9.7%14.7%
SadTalker38.7%57.9%62.8%54.8%

Cross-identity evaluation

The appendix also reports cross-identity evaluation on HDTF and VoxCeleb2, where the driving audio comes from a different video. This setting follows common video-reenactment evaluation practice and is more demanding because the audio, identity, and pose statistics no longer come from the same clip.

Method LSE-C ↑ LSE-D ↓ Diversity ↑ Beat Align ↑ FID ↓ CPBD ↑ CSIM ↑
Real Video6.2097.9110.48790.26600.0991.000
Wav2Lip*7.6407.099N/AN/A19.2930.1070.936
PC-AVS**7.1687.443N/AN/A111.0430.0740.494
MakeItTalk3.75610.2220.52300.27523.5010.0630.883
Audio2Head5.2668.7880.20640.27354.6940.0980.602
Wang et al.3.44110.5190.25470.27242.0920.1360.750
SadTalker5.5718.5030.52110.27722.7380.0810.893
Method LSE-C ↑ LSE-D ↓ Diversity ↑ Beat Align ↑ FID ↓ CPBD ↑ CSIM ↑
Real Video8.2116.9820.2590.2710.0000.4281.000
Wav2Lip*9.6416.035N/AN/A21.7270.3680.846
PC-AVS**8.9596.435N/AN/A99.0980.2010.648
MakeItTalk4.93710.2310.25530.27626.8290.3330.834
Audio2Head7.2377.6480.17830.26024.4040.2820.818
Wang et al.4.63410.4570.22600.26522.3020.2940.805
SadTalker7.3437.7090.27590.28420.8860.3340.846

On VoxCeleb2 cross-identity, SadTalker again leads on a balanced combination of lip synchronization, head-motion diversity, and overall quality, while Wav2Lip remains strongest in the narrow sense of image quality because it changes the least of the frame.

Ablation Studies

ExpNet ablation

The paper ablates the factors used by ExpNet to show that each design choice matters. The strongest improvement comes from conditioning on the reference expression $\beta_0$ and adding the lip-reading loss. The authors also show that using the full real coefficients instead of lip-only targets hurts lip synchronization, which supports their claim that speech-related expression should be disentangled from other facial motions.

Method LSE-C ↑ LSE-D ↓
Speech2Gesture0.87813.889
SadTalker full (lip coeffs. + $\beta_0$ + $\mathcal{L}_{read}$)7.2907.772
w/o $\beta_0$ and $\mathcal{L}_{read}$5.2419.532
w/o $\mathcal{L}_{read}$6.9937.841
w/ real coeffs.6.5678.061

The accompanying figure shows that the reference expression stabilizes identity, while the lip-only target improves lip synchronization.

PoseVAE ablation

For PoseVAE, the authors measure head-motion diversity and beat alignment. The full model with a fixed style already outperforms the baseline, and the mixed-style setting gives the best values. Removing the GAN loss, the initial pose, or the audio/style conditions all degrades the results, confirming that each condition helps generate more realistic and controllable head motion.

Method Diversity ↑ Beat Align ↑
Speech2Gesture0.15740.274
SadTalker full (single fixed style)0.27350.287
w/o $\mathcal{L}_{GAN}$0.25000.271
w/o initial pose0.27250.278
w/o audio0.25660.274
w/o all conditions0.26310.279
SadTalker full (mixed style)0.27780.293
Ablation studies of face render. In the first row, we directly compare our method with PIRenderer for face animation and our method shows better expression modeling. The second row is the trace map of the generated facial landmarks from the same motion coefficients. Using additional face alignment coefficients as part of the motion coefficients will generate unrealistic aligned head video.
Ablation studies of face render. In the first row, we directly compare our method with PIRenderer for face animation and our method shows better expression modeling. The second row is the trace map of the generated facial landmarks from the same motion coefficients. Using additional face alignment coefficients as part of the motion coefficients will generate unrealistic aligned head video.

FaceRender ablation

The renderer ablation compares SadTalker’s FaceRender with PIRenderer. On the reported numbers, SadTalker improves FID from 26.521 to 19.646 and CSIM from 0.857 to 0.880, while CPBD drops slightly from 0.363 to 0.334. The visual ablation also shows that the proposed mapping into unsupervised 3D keypoints models expressions more faithfully and avoids the overly aligned motion that results from including face-alignment coefficients.

Method FID ↓ CPBD ↑ CSIM ↑
PIRenderer26.5210.3630.857
SadTalker FaceRender19.6460.3340.880

Limitations

The paper explicitly states two main limitations. First, because 3DMMs do not model eye and teeth variation well, the renderer can produce artifacts around the teeth in some cases. The authors note that a face restoration method such as GFPGAN can help. Second, the current system focuses mainly on lip motion and eye blinking, so it does not explicitly model richer facial dynamics such as emotion or gaze direction. As a result, the generated videos can have a relatively fixed emotional state.

The conclusion also highlights a broader concern: because the system can generate highly realistic talking-head videos from a single image, misuse is possible. The authors say that both visible and invisible watermarks should be inserted for content identification.

Takeaways

  • SadTalker’s central contribution is the use of 3DMM motion coefficients as a better intermediate representation for audio-driven portrait animation.
  • ExpNet focuses on speech-driven expression, especially lip motion, and uses reference expression, blink control, coefficient distillation, landmark supervision, and lip-reading supervision to stabilize prediction.
  • PoseVAE models head pose as a conditional, style-aware residual process to generate more diverse and natural motion.
  • FaceRender maps the predicted motion coefficients into a 3D-aware unsupervised keypoint renderer, improving the final video’s realism and identity preservation.
  • Across HDTF and VoxCeleb2, including cross-identity settings, the method reports strong results on motion diversity, beat alignment, identity similarity, and overall perceptual quality.

Code & Implementation

The repository implements SadTalker, a method for generating realistic 3D motion coefficients to drive talking head animation from a single image and audio.

The main entry point is inference.py, which orchestrates the pipeline: it performs preprocessing to extract 3D Morphable Model (3DMM) coefficients from the source image and optional reference videos using CropAndExtract, then predicts audio-driven 3D motion coefficients with the Audio2Coeff module, followed by rendering the final animated video using AnimateFromCoeff from the face rendering module.

The Audio2Coeff class in src/test_audio2coeff.py integrates two neural networks corresponding to the paper's ExpNet (expression prediction) and PoseVAE (pose generation) models. It loads pretrained checkpoints and synthesizes expression and head pose coefficients from audio inputs, optionally modulated by reference pose.

The face rendering and animation is managed in src/facerender/animate.py, which loads pretrained keypoint detectors, generators, and mapping networks to map the predicted 3DMM coefficients to video frames.

The code's configuration and checkpoints are managed via YAML and model files under checkpoints/ as indicated in the repo and set via command line arguments.

Users run inference.py specifying paths for source image and audio to obtain talking head videos, as described in the README. Optional enhancements such as face enhancers and background enhancers are also supported.