Digital Face Makeup by Example

Digital Face Makeup by Example

paper motivation

这篇论文用传统的图像处理技术进行人脸妆容的迁移。在这篇论文之前对人脸妆容迁移的方法比较少。相关的一篇论文需要提供参考美妆图像的卸妆图像,这一步在实用中比较麻烦。
Digital Face Makeup by Example

主要贡献

主要是对比之前的方法不需要提供参 a pair of “before” and “after” makeup images as examples.也就是只需要提供一张参考的妆容照就可以了。

主要思想

论文方法输入两张图片,一张目标图片II,一张参考的样例化妆图片ε\varepsilon。主要分为四步。第一步:进行人脸对齐。因为我们迁移的信息是对像素点进行迁移,所以对人脸的对齐是很有必要的。第二步:对图像的分解。对目标图像和参考化妆图像分解成三层:脸部结构层;皮肤细节层;颜色层。第三步 :将分解后的图像通过不同的处理;皮肤细节层通过相加,颜色层使用一个 alpha blending,对人脸结构中的高光和阴影部分使用梯度进行迁移。第四步:将得到的三部分组合到一起。
Digital Face Makeup by Example
人脸对齐
对于人脸对齐采用了Thin Plate Spline (TPS) 薄板样条函数(TPS)是一种很常见的插值方法。因为它一般都是基于2D插值,所以经常用在在图像配准中。在两张图像中找出N个匹配点,应用TPS可以将这N个点形变到对应位置,同时给出了整个空间的形变(插值)。
TPS常用来对形状进行 non-rigid 变形,比如给定原始形状的有限点集A,变形后的对应目标点集B,设C=B-A,对(Ax,Ay, Cx)拟合出一个TPS,就可以得到x方向的内插函数;对(Ax,Ay, Cy)拟合出来的TPS则可以得到y方向的内插函数。这样一以来对于不在点集中的点,我们就可以插值得到目标点。从而完成整个面的变形。
Digital Face Makeup by Example
这里可能需要用户去细化控制点的位置,因为控制点已经比较确定了,通常不需要一分钟就可以细化,在代码中需要标明额头部分,标出十个控制点。
这些控制点控制了脸部的不同部分。C1代表皮肤区域,C2代表嘴唇,C3代表眼睛和口腔。
Digital Face Makeup by Example
层分解
将图片转换到CIELAB颜色空间,L层被认为是 lightness layer ,a*,b*认为是颜色层。然后将lightness layer分解成large-scale and detail layers.The large-scale layer is considered as the face structure layer and the detail layer as skin detail layer.主要思想是,先将lightness layer执行一个 edge-preserving smoothing得到large-scale layer,然后将lightness layer减去large-scale layer得到detail layer。
迁移
Skin detail transfe
Skin detail transfer is straightforward. The resultant skin detail layer Rd\mathcal { R } _ { d } is a weighted sum of Id\mathcal { I } _ { d } and Ed,i.e.\mathcal { E } _ { d } , i . e .
Rd=δIId+δEEd\mathcal { R } _ { d } = \delta _ { \mathcal { I } } \mathcal { I } _ { d } + \delta _ { \mathcal { E } } \mathcal { E } _ { d }
where 0δI,δE1.0 \leq \delta _ { \mathcal { I } } , \delta _ { \mathcal { E } } \leq 1 . The values of δI\delta _ { \mathcal { I } } and δE\delta _ { \mathcal { E } } control the contribution of each component.

Color transfe
The resultant color layer Rc\mathcal { R } _ { c } is an alpha-blending of color layers of I\mathcal { I } and E,\mathcal { E } , i.e.
Rc(p)={(1γ)Ic(p)+γEc(p)pC3Ic(p) otherwise \mathcal { R } _ { c } ( p ) = \left\{ \begin{array} { l l } { ( 1 - \gamma ) \mathcal { I } _ { c } ( p ) + \gamma \mathcal { E } _ { c } ( p ) } & { p \in \mathcal { C } _ { 3 } } \\ { \mathcal { I } _ { c } ( p ) } & { \text { otherwise } } \end{array} \right.
The value of γ\gamma is to control blending effect of two color layers.

Highlight and shading transfe
we adapt a gradient-based editing method.The idea is to add only large changes of Es\mathcal { E } _ { s } to Is.\mathcal { I } _ { s . } Doing this, we assume that these changes are due to makeup.
Rs(p)={Es(p) if β(p)Es(p)>Is(p)Is(p) otherwise \nabla \mathcal { R } _ { s } ( p ) = \left\{ \begin{array} { l l } { \nabla \mathcal { E } _ { s } ( p ) } & { \text { if } \beta ( p ) \left\| \nabla \mathcal { E } _ { s } ( p ) \right\| > \left\| \nabla \mathcal { I } _ { s } ( p ) \right\| } \\ { \nabla \mathcal { I } _ { s } ( p ) } & { \text { otherwise } } \end{array} \right.

Lip makeup
因为嘴唇化妆和脸部是很不一样的。在物理化妆中,嘴唇上的化妆品(如口红)通常会保留或突出嘴唇的质感,而不是像在面部皮肤上那样隐藏。因此,嘴唇区域的化妆需要用不同的方法来处理。
The main idea is to fill each pixel of R\mathcal { R } with pixel value from E\mathcal { E } guided by I.\mathcal { I } . Then the makeup effect is similar to E\mathcal { E }and the texture is similar to I.\mathcal { I } . Specifically, for each pixel pp

缺点

需要进行用户交互,不是很方便。