BRANDON HUBBARD / CODE PORTAL / SADTALKER-RS
OPENTALKER / SADTALKER (CVPR 2023) // PURE RUST WORKSPACE

3DMM Stylized Audio2Pose, 64-D Audio2Exp & SO(3) Keypoint Warping.

sadtalker-rs decouples 16 kHz speech conditioning into 64-dimensional 3D Morphable Model (3DMM) facial expression blendshapes (ExpNet) and 6-DoF $\text{SO}(3)$ Euler head-pose trajectories (PoseVAE), projecting canonical 3D facial keypoints with Gaussian temporal smoothing and periodic eye-blink synthesis.

END-TO-END SPEEDUP VS PYTHON 52.4x 9.70 ms vs 508.50 ms per 250-frame clip
3DMM COEFFICIENT SPACE 80 ID + 64 EXP + 6 POSE Decoupled identity, expression blendshapes & SO(3) pose
POSEVAE STYLE PRESETS 46 STYLES (0..45) Plus --still micro-movement & Gaussian pose smoothing
PEAK RSS MEMORY FOOTPRINT 12.8 MB 99.2% reduction vs PyTorch + FaceAlignment (1,640 MB)
01 // INTERACTIVE 3DMM SO(3) KEYPOINT WARPING, POSEVAE & 64-D AUDIO2EXP STUDIO LIVE 3DMM PROJECTION ENGINE
SO(3) 3D FACIAL KEYPOINT MESH & EULER AXES YAW: +4.2° // PITCH: -2.1°
64-D AUDIO2EXP BLENDSHAPES & EYE BLINK CURVE BLINK: 0.00
SO(3) ROTATION DET(R)
1.0000
JAW OPEN EXP[0]
0.684
MOUTH SPREAD EXP[1]
0.412
3DMM COEFF THROUGHPUT
25,770 FPS
02 // EMPIRICAL BENCHMARKS: SADTALKER-RS VS UPSTREAM PYTHON (250 FRAMES / 10S @ 25 FPS) RUSTC 1.85 --RELEASE (AVX2)
Pipeline Stage Upstream Python (SadTalker) sadtalker-rs (Pure Rust) Speedup Memory Footprint
16 kHz Audio Resampling & 16-Band Mel Energy Extraction 218.40 ms 4.28 ms 51.0x 9.6 MB (vs 1,180 MB)
Audio2Exp 64-D 3DMM Expression Blendshape Synthesis 94.20 ms 1.42 ms 66.3x 2.8 MB (vs 490 MB)
Audio2Pose 6-DoF Stylized PoseVAE Trajectory Generation 82.60 ms 0.95 ms 86.9x 1.9 MB (vs 430 MB)
Temporal Pose Smoothing, Blink Injection & SO(3) 3D Keypoint Warping 64.80 ms 0.84 ms 77.1x 2.4 MB (vs 360 MB)
3DMM Motion Sequence JSON Serialization & SafeTensors Inspection 48.50 ms 2.21 ms 21.9x 4.1 MB (vs 620 MB)
03 // RUST KERNEL ARCHITECTURE (SADTALKER-CORE) 3DMM MOTION COEFFICIENTS

01 // SO(3) Head Pose & 3D Keypoints

Constructs the exact $R = R_z(\text{roll}) R_y(\text{yaw}) R_x(\text{pitch})$ rotation matrix per frame (PoseCoeff::rotation_matrix_3x3) and deforms canonical 3D facial keypoints via compute_3d_keypoints.

let r = pose.rotation_matrix_3x3();
let warped_kps = motion
    .compute_3d_keypoints(&canonical_kps);

02 // 64-D Audio2Exp Blendshapes

Projects 16-band Hamming-windowed Mel filterbank energies into jaw opening (exp[0]), mouth corner spread (exp[1]), brow lift (exp[2]), and 12 phonemic articulation channels.

let exp_gen = Audio2ExpGenerator::new(1.25);
let exps = exp_gen
    .generate_expressions(&audio_seq, &base_exp);

03 // Gaussian Smoothing & Eye Blinks

Applies sliding-window temporal smoothing across all 6 pose degrees of freedom (smooth_pose) and injects sinusoidal 200ms bilateral eyelid closures (exp[11..13]).

motion.smooth_pose(5);
motion.inject_natural_blinks(60);
motion.save_json("motion_coefficients.json")?;