Face Aging with Contextual Generative Adversarial Nets

Face Aging with Contextual Generative Adversarial Nets

网络结构如图2所示,首先按照68个人脸特征点对输入图像进行对齐,之后,采用Deeplab v2算法将输入图像分割为

人脸区域,和非人脸区域,并将非人脸区域标记为灰色.

生成网络-Transformer network

将处理后的图像,与年龄lable y输入到条件变换网络(G,Transformer),得到合成图像G(x,y)(fake image).

生成网络结构如下,

Face Aging with Contextual Generative Adversarial Nets

输入图像,输出图像大小都为128×128×3,像素值范围为[-1,1].条件向量即为年龄向量,为一个7维的one hot向量,将该项了reshape为与输入图像相同的空间维度的7通道的变量,并将其值也变换到[-1,1]范围-1对应于0.将输入图像与年龄向量串联,输入生成网络,得到目标年龄的生成图像.前三个residual blocks将feature maps大小降低到输入的一半,之后的为反卷积层,将feature maps大小上采样到与输入同样大小.

判别网络

存在两个判别网络,分别为年龄判别网络,即Age Discriminative Network,另一个为Transition Pattern Discriminative Network,分别用于判别生成图像是否为目标年龄,以及生成图像是否符合真实目标图像分别.

Age Discriminative Network

Age Discriminative Network输入为fake image与年龄lable y的特征向量串联(判别为real),以及real image与年龄label y的特征向量串联(判别为fake).也就是是说,Age Discriminative Network用于判别生成图像是否为输入图像的指定年龄的生成图像.

年龄判别网络结构为,

Face Aging with Contextual Generative Adversarial Nets

与生成网络一样,将年龄label resized为一个变量,输入到一个卷积层,得到年龄特征向量,将输入图像输入卷积层,得到feature maps,并将两者串联,输入到之后的5个卷积层,判别网络损失函数为,

Face Aging with Contextual Generative Adversarial Nets

Transition Pattern Discriminative Network

为了得到更好的年龄生成图像,加入了一个年龄转换判别网络,用于判别不同年龄段的图像的transition pattern(转移模式),即判别不同年龄段的人脸是否变换正确.为了简化,在本文中,只考虑相邻的年龄组的transition pattern.

Face Aging with Contextual Generative Adversarial Nets

如图5所示,随着头骨的成长,年龄从10到20岁的脸的形状会发生变化,然而,对于50到60岁的脸,主要的变化是在脸上的皱纹增多了.也就是不同年龄段的脸有不同的特征,但是他们都是同一个人.

Transition Pattern Discriminative Network输入为年龄y,对应的人脸图像xy,以及临近年龄y+1,对应的图像xy+1的串联值,损失函数如下,

Face Aging with Contextual Generative Adversarial Nets

整体的损失函数

Face Aging with Contextual Generative Adversarial Nets

为了是生成图像尽量平滑,引入了TV损失函数(total variation).

不同年龄段图片生成效果

Face Aging with Contextual Generative Adversarial Nets