本文的效果其实也一般,去网站demo跑一下就知道了,一个明显的瑕疵是眼睛容易被预测成尖的;尽管如此,还是可以从源代码中学习到很多东西(因为支持透视投影)
同时,可以对比一下DECA,因为DECA也是使用了displacement map
本文的方法对于嘟嘴,也无法重建出来,一是因为嘟嘴被投影成图像后,信息丢失太多了,难度很大;二是数据集中本身嘟嘴的图像就不多
3. Method
本文的方法不仅局限于人脸,只要是同一个类别的object就行
As we have only raw images to learn from, the learning objective is reconstructive: namely, the model is trained so that the combination of the four factors gives back the input image.
在只有图像的情况下,只能考虑优化重构损失,即自监督
we use the fact that many object categories are bilaterally symmetric. However, the
appearance of object instances is never perfectly symmetric.
本文的假设:物体大致是对称性,大致对称意味着总体上是对称的,但是图像中细节的地方是不对称的
Asymmetries arise from shape deformation, asymmetric albedo and asymmetric illumination. We take two measures to account for these asymmetries. First, we explicitly model asymmetric illumination. Second, our model also estimates, for each pixel in the input image, a confidence score that explains the probability of the pixel having a symmetric counterpart in the image.
解决方法有2点:explicitly model asymmetric illumination,以及predict a confidence score for each pixel
3.1. Photo-geometric autoencoding
一幅图像 I \mathbf{I} I 其实可以定义成一个函数 Ω → R 3 , Ω = { 0 , ⋯ , W − 1 } × { 0 , ⋯ , H − 1 } \Omega\rightarrow \mathbb{R}^3, \Omega=\left \{ 0,\cdots,W-1 \right \}\times\left \{ 0,\cdots,H-1 \right \} Ω→R3,Ω={0,⋯,W−1}×{0,⋯,H−1},即将图像网格的每一个位置(像素),映射为RGB三个值
预测的目标是
depth map
d
d
d:
Ω
→
R
+
\Omega\rightarrow \mathbb{R}^+
Ω→R+,为每一个像素预测一个深度值
albedo image
a
a
a:
Ω
→
R
3
\Omega\rightarrow \mathbb{R}^3
Ω→R3,为每一个像素值预测一个RGB的albedo纹理
global light direction
l
∈
S
2
l\in\mathbb{S}^2
l∈S2,为整幅图像预测全局的光照
viewpose
w
∈
R
6
w\in\mathbb{R}^6
w∈R6,其实就是Rotation/Translation
预测之后基于图形学对图像进行重建
I
^
=
Π
(
Λ
(
a
,
d
,
l
)
,
d
,
w
)
(
1
)
\hat{\mathbf{I}}=\Pi\left ( \Lambda(a, d, l), d, w \right ) \qquad(1)
I^=Π(Λ(a,d,l),d,w)(1)
首先是
Λ
(
a
,
d
,
l
)
\Lambda(a, d, l)
Λ(a,d,l),称为lighting function,光线
l
l
l打在几何形状
d
d
d上形成shading效果,最终加到albedo
a
a
a上 ,结果
Λ
(
a
,
d
,
l
)
\Lambda(a, d, l)
Λ(a,d,l)被称为shaded canonical image
然后是 Π ( img , d , w ) \Pi\left ( \text{img}, d, w \right ) Π(img,d,w),称为reprojection,渲染成了一幅图像
最终的优化目标肯定是 I ^ = I \hat{\mathbf{I}}=\mathbf{I} I^=I
shading provides an additional cue on the underlying 3D shape [24, 3]
图像的几何形状,在light的作用下产生了图像中的shading效果,所以说shading是shape的一种cue
3.2. Probably symmetric objects
An important beneficial side effect of this choice is that it helps the model discover a ‘canonical view’ for the object, which is important for reconstruction [44].
作者希望学出来的depth map和albedo是左右对称的
一个事实是:depth map和albedo不对称(歪了),其实也可以完美重构出原始图像,但这显然是不合适的
对 a a a进行水平翻转操作,记为 [ flip a ] c , u , v = a c , W − 1 − u , v [\text{flip}\ a]_{c,u,v}=a_{c,W-1-u,v} [flip a]c,u,v=ac,W−1−u,v
于是可以做一个约束,令 d ≈ flip d ′ , a ≈ flip a ′ d\approx \text{flip}\ d', a\approx \text{flip}\ a' d≈flip d′,a≈flip a′,这是一个比较强的约束,作者没有使用
也可以进行“移花接木”,将
a
,
d
a, d
a,d替换为水平翻转的版本
a
′
,
d
′
a', d'
a′,d′,然后生成图像
I
^
′
\hat{\mathbf{I}}'
I^′,新增约束
I
=
I
^
′
\mathbf{I}=\hat{\mathbf{I}}'
I=I^′
I
^
′
=
Π
(
Λ
(
a
′
,
d
′
,
l
)
,
d
′
,
w
)
,
a
′
=
flip
a
,
d
′
=
flip
d
(
2
)
\hat{\mathbf{I}}'=\Pi\left ( \Lambda(a', d', l), d^{\prime}, w \right ), \qquad a'= \text{flip}\ a, \ d'=\text{flip}\ d\qquad(2)
I^′=Π(Λ(a′,d′,l),d′,w),a′=flip a, d′=flip d(2)
在设计loss衡量 I = I ^ \mathbf{I}=\hat{\mathbf{I}} I=I^时,作者使用了一种高级的方法,这种方法来自文献[32] NeurIPS17