首先进行一些科普
3D Face Fitting
V = [ v 1 , v 2 , ⋯ , v n ] ∈ R 3 × n \mathbf{V}=\left [ v_1, v_2, \cdots, v_n \right ]\in\mathbb{R}^{3\times n} V=[v1,v2,⋯,vn]∈R3×n表示一个含有 n n n个顶点的3D mesh
将3D mesh按照
P
=
{
f
,
R
,
h
2d
}
\mathbf{P}=\left \{ f, \mathbf{R}, \mathbf{h}_\text{2d} \right \}
P={f,R,h2d}所表达的face pose信息,投影到2维平面上
Π
(
V
,
P
)
=
f
∗
p
r
∗
R
∗
V
+
h
2d
(
1
)
\Pi(\mathbf{V}, \mathbf{P})=f\ast \mathbf{p_r}\ast \mathbf{R}\ast \mathbf{V}+\mathbf{h}_\text{2d} \qquad(1)
Π(V,P)=f∗pr∗R∗V+h2d(1)
Π : R 3 × n → R 2 × n \Pi: \mathbb{R}^{3\times n}\rightarrow\mathbb{R}^{2\times n} Π:R3×n→R2×n称为the projection function(给定3维坐标 ( x , y , z ) (x, y, z) (x,y,z),求2维坐标 ( x , y ) (x, y) (x,y)), p r ∈ R 2 × 3 \mathbf{p_r}\in\mathbb{R}^{2\times3} pr∈R2×3是the orthographic projection matrix(是不是就是简单地去掉z轴坐标就行了?)
P = { f , R , h 2d } \mathbf{P}=\left \{ f, \mathbf{R}, \mathbf{h}_\text{2d} \right \} P={f,R,h2d}中 f ∈ R , R ∈ R 3 × 3 , h 2d ∈ R 2 f\in\mathbb{R}, \mathbf{R}\in\mathbb{R}^{3\times3}, \mathbf{h}_\text{2d}\in\mathbb{R}^2 f∈R,R∈R3×3,h2d∈R2,意思是要将3D mesh与2D图像中的人脸对齐,需要进行缩放、旋转、以及2D平面上的平移
注:对一幅图像使用3DDFA,可以得到parameter
Acquiring Textures
3D mesh的每一个vertex
v
i
v_i
vi都绑定了一个RGB texture
t
i
t_i
ti,绑定方式为the simplest vertical projection,公式化表达如下
t
i
=
I
(
Π
(
v
i
,
P
)
)
(
2
)
t_i=\mathbf{I}\left ( \Pi\left ( v_i, \mathbf{P} \right ) \right ) \qquad(2)
ti=I(Π(vi,P))(2)
其中
I
(
⋅
,
⋅
)
\mathbf{I}(\cdot, \cdot)
I(⋅,⋅),表示在图像
I
\mathbf{I}
I上取像素值
将
n
n
n个vertices绑定texture的过程总结为公式(3)
T
=
GetTex
(
I
,
{
V
,
P
}
)
(
3
)
\mathbf{T}=\text{GetTex}\left ( \mathbf{I}, \left \{ \mathbf{V}, \mathbf{P} \right \} \right ) \qquad(3)
T=GetTex(I,{V,P})(3)
对于正脸,the simplest vertical projection基本能够保证纹理绑定的唯一性;但是对于侧脸,自遮挡区域的那些顶点,在做垂直投影时,绑定的纹理其实是错的,绑定到了能看到那一面的纹理,这些出错的纹理,交给后续的GAN来解决
Rendering
Rendering可以理解为Acquiring Textures的逆,公式化表达如下
Rd
=
Render
(
{
R
,
P
,
T
}
)
(
4
)
\text{Rd}=\text{Render}\left ( \left \{ \mathbf{R}, \mathbf{P}, \mathbf{T} \right \} \right ) \qquad(4)
Rd=Render({R,P,T})(4)
3.2. Rotate-and-Render Training Strategy
Rotate-and-Render(R&R)其实是一种构造训练数据的策略