论文地址:https://www.microsoft.com/en-us/research/project/vasa-1/
整个文章包括两个核心阶段:
阶段一、解偶的人脸表征
阶段二、扩散模型训练
阶段一:人脸表征模型 MegaPortraits
原始论文:https://arxiv.org/pdf/2207.07621
VASA-1中采用的MegaPortraits是解偶人脸表征中重要的模型:随机从一个视频中抽取两帧,分别表示为源图像( X s X_s Xs)和驱动图像( X d X_d Xd),模型将驱动图像的动作( head pose, facial expression)置于源图像的外表上,生成一个新的图像( X ^ s → d \hat{X}_{s\to d} X^s→d)。
具体地,如下图所示,MegaPortraits的核心流程包括如下步骤:
- 首先通过一个Appearance Encoder E a p p E_{app} Eapp,提取源图像 X s X_s Xs的体特征(Volumetric Features, v s v_s vs)和全局描述符(Global Descriptor, e s e_s es)。同时,通过一个Motion Encoder E m n t E_{mnt} Emnt,预测源图像 X s X_s Xs和驱动图像 X d X_d Xd的运动特征表征。运动表征包括三个部分,分别表征图像中显式的人脸旋转( R R R)、平移( t t t)和隐空间表征( z z z)。对于源图像,分别用 R s R_s Rs、 t s t_s ts和 z s z_s zs表示旋转、平移和隐空间表征;对于驱动图像,分别用 R d R_d Rd、 t d t_d td和 z d z_d zd表示旋转、平移和隐空间表征。
- 将步骤一中得到的源图像特征表达( R s R_s Rs, t s t_s ts, z s z_s zs, e s e_s es)输入3D视图变换生成器(3D Warper Generator, W s → W_{s\to} Ws→),得到 w s → w_{s\to} ws→;将驱动图像的运动特征和原图像的全局描述符 ( R d R_d Rd, t d t_d td, z d z_d zd, e s e_s es) 输入3D视图变换生成器(3D Warper Generator, W → d W_{\to d} W→d),得到 w → d w_{\to d} w→d。其中,生成器 W s → W_{s\to} Ws→用于去除源图像中的运动和表情信息,生成器 W → d W_{\to d} W→d用于将驱动图像中的运动和表情信息置于源图像中。这里 W s → W_{s \to} Ws→和 W → d W_{\to d} W→d的设计初衷是,首先将源图像3D体特征旋转到正面视角,删除从源图像 z s z_s zs中解码的任何面部表情运动,通过3D卷积网络对其进行处理,最后再施加驱动图像中的头部旋转和运动。
- 将源图像特征表达 v s v_s vs和 w s → w_{s\to} ws→进行视图变换操作(3D warpping operation), 然后输入3D 卷积网络( G 3 D G_{3D} G3D);网络输出结果和 w → d w_{\to d} w→d进行视图变换操作,得到 v s → d v_{s\to d} vs→d。
- 最后,将3D驱动体特征
v
s
→
d
v_{s\to d}
vs→d正交投影至2D,并输入2D卷积网络(
G
2
D
G_{2D}
G2D),最终生成预测图像
X
^
s
→
d
\hat{X}_{s\to d}
X^s→d。
阶段二、扩散模型的训练:DiT约束条件
引入了5个约束条件,包括主要注视方向、头部到摄像头的距离、情绪偏移量、为了增加帧间平滑性,还增加了前K帧的语音特征和生成的运动特征,具体如下:
condition signals:
- main gaze direcction g = ( θ , ϕ ) g=(\theta, \phi) g=(θ,ϕ) [70], focused direction of the generated talking face.
- head-to-camera distance d d d [16]: normalized scaler controling the distance between the face and camera, affecting the face scale in the
generated video.- emotion offset e e e [41]: modulates the depicted emotion on the talking face.
- last K K K frames of the audio feature, A p r e A^{pre} Apre
- last K K K frames of the generated motions, X p r e X^{pre} Xpre
相关代码
本文总结了截止发文时刻的一些和论文复现相关的代码:
描述 | 代码 |
---|---|
VASA-1-hack | https://github.com/johndpope/VASA-1-hack |
数据集相关 | https://github.com/johndpope/VASA-1-hack/issues/5 |
MegaPortarit相关,非官方 | https://github.com/johndpope/MegaPortrait/ |
Emote-hack | https://github.com/johndpope/Emote-hack |
Real3DPortrait | https://github.com/yerfor/Real3DPortrait/ |