Print

发布时间: 2019-04-24
摘要点击次数:
全文下载次数:
DOI: 10.11834/jig.180272
2019 | Volume 24 | Number 4




    图像理解和计算机视觉    




  <<上一篇 




  下一篇>> 





人脸老化/去龄化的高质量图像生成模型
expand article info 宋昊泽, 吴小俊
江南大学物联网工程学院, 无锡 214122

摘要

目的 近年来关于人脸老化/去龄化的研究在深度学习的推动下取得了飞速发展,2017年提出的条件对抗自编码器(CAAE)人脸老化/去龄化模型生成的人脸不仅可信度高,而且更贴近目标年龄。然而在人脸老化/去龄化过程中仍存在生成图像分辨率低、人工鬼影噪声严重(生成人脸器官扭曲)等问题。为此,在CAAE的基础上,提出一个人脸老化/去龄化的高质量图像生成模型(HQGM)。方法 用边界平衡对抗生成网络(BEGAN)替换CAAE中的对抗生成网络(GAN)。BEGAN在人脸图像生成上不仅分辨率更高而且具有更好的视觉效果。在此基础上,添加两个提高生成图像质量的损失函数:图像梯度差损失函数和人脸特征损失函数。图像梯度差损失函数通过缩小生成图像和真实图像的图像梯度,使生成图像具有更多轮廓等高频信息;人脸特征损失函数将生成图像和真实图像分别输入到配置预训练参数的VGG-FACE网络模型中,输出各自的特征图。通过缩小两幅特征图的对应点差值,使生成图像具有更多真实图像的人脸特征信息。结果 实验使用UTKface、FGnet和Morph数据集,经过训练,每幅测试图像分别生成10幅不同年龄的图像。与CAAE相比,HQGM可以有效去除人工鬼影噪声,峰值信噪比高3.2 dB,结构相似性高0.06,提升显著。结论 HQGM可以生成具有丰富纹理信息和人脸特征信息的人脸老化/去龄化图像。

关键词

人脸老化/去龄化; 深度学习; 边界平衡对抗生成网络; 人脸特征; 纹理; VGG-FACE网络

High-quality image generation model for face aging/processing
expand article info Song Haoze, Wu Xiaojun
School of Internet of Things Engineering, Jiangnan University, Wuxi 214122, China
Supported by: National Natural Science Foundation of China (61672265, 61373055)

Abstract

Objective Face aging/processing aims to render face information with or without the age information but still preserve personalized features of the face. It has considerable influence to a wide range of applications, such as face prediction of wanted/missing person, age-invariant verification, and entertainment. Our background modeling is based on the conditional adversarial autoencoder (CAAE) model proposed by Zhang et al. In the CAAE network, the face is initially mapped to a latent vector through a convolutional encoder, and the vector is then projected to the face manifold condition on age through a deconvolutional generator. The latent vector preserves personalized face features, and the age condition controls aging/processing. The generated images from CAAE networks is more believable than the those from traditional face aging/processing approaches, and the CAAE model reduces the demand of data for training. However, face aging/processing still has many challenges, such as low resolution and artificial ghost. Therefore, we proposed a high-quality image generation model (HQGM) for face aging/processing to enrich the texture and face feature information. Method HQGM is based on CAAE model, where two generative adversarial networks (GANs) are imposed on the encoder and generator. HQGM only adds a GAN on the generator and replaces the GAN with the boundary equilibrium GAN (BEGAN). BEGAN is one of the best face generation models, and its discriminator is an autoencoder. Two loss functions are imposed on the encoder and generator, that is, the image gradient loss function and the face feature loss function using the VGG-FACE model. The VGG-FACE model is used as a face feature extractor. The image gradient loss function aims to reduce the image gradient difference between the input and generated images. The face feature loss function aims to reduce the difference between the face feature information of the input images and that of the generated images. We place the input and generated images into the VGG-FACE model to obtain the face feature information. HQGM has one encoder, one decoder (generator), and one discriminator. An encoder E maps the input face to a vector z. Concatenating the label l (age) to z, the new latent vector[z, l] is fed to a generator G. The encoder and generator are updated based on the L2, image gradient, face feature, and BEGAN losses. The discriminator forces the output face to become photorealistic and plausible for a given age label. The generator and discriminator are trained alternatingly until the loss imposed on the generator has good convergence. In practice, only the encoder and generator are used to generate the target age face. Result UTKface, FGnet, and Morph datasets are used in the experiment. Approximately 21 000 faces and corresponding labels are used to train the network. During testing, four groups of contrast experiments include image gradient loss/no image gradient loss, face feature loss/no face feature loss, BEGAN loss/no BEGAN loss, and HQGM/CAAE model. The comparison tests use two methods; one is to contrast the effect of the generated images by observing with the naked eye, and the other is to contrast the quality of the generated images by the assessment criteria. PSNR and SSIM are adopted as the assessment criteria. The comparative result shows that the BEGAN, image gradient, and face feature losses can generate higher-quality images. Moreover, the generated images show that using the face feature loss function can reduce the noise, which causes twisted organs. When comparing the HQGM network with the CAAE network, the numerical value of the PSNR computed by the generated images of HQGM is greater than that computed by the generated images of the CAAE network at approximately 3.2; the numerical value of SSIM computed by the generated images of HQGM is greater than that computed by the generated image of the CAAE network at approximately 0.06; and the generated images from HQGM that removed the artificial ghost become more believable than that from the CAAE network. Experimental results demonstrate the appealing performance and flexibility of the proposed framework by comparing with some state-of-the-art works. Conclusion In comparison with GAN, the generated images from BEGAN have more texture information and better visual effect. The generated images have more high-frequency information, such as profile information using the image gradient loss function. The generated images have more texture information and more face feature information using the face feature loss function. More face feature information can reduce the artificial ghost of the generated images. In summary, the generated images from our HQGM have more texture information and more face feature information. In the future work, the proposed method will be improved and optimized by using the new structure of network or some new loss functions.

Key words

face aging/processing; deep learning; boundary equilibrium generative adversarial network; face feature; texture; VGG-FACE network

0 引言

预测某人过去和未来人脸图像的方法称为人脸老化/去龄化, 在现实生活中应用广泛。例如寻找失踪人口、人脸跨年龄识别等。近年来这一领域的研究一直面临巨大挑战,很多研究工作使用的数据是同一个人在不同年龄段的多幅人脸图像,由于数据稀缺,导致训练难以达到最优效果。传统的人脸老化/去龄化方法[1-2]是将人脸图像按照年龄标签分成离散的组,计算不同年龄分组之间人脸特征的关系。因为缺少足够的数据,合成的人脸图像带有严重的人工鬼影噪声。基于物理模型的人脸老化方法[3-5]是用公式表示人脸皮肤、五官、脸型等在老龄化过程中的变化,但是同样由于数据不足以及参数的复杂度较高,人脸老化的图像同样存在鬼影噪声,且老化后的图像缺失原人脸身份信息。为保留人脸身份信息,Mirza等人[6]提出了字典学习的人脸老化方法,将各个年龄分组的人脸图像用字典进行表示,并将一幅人脸图像拆成人脸老化和人脸个性信息两部分进行处理。通过字典表示的人脸保留着大量的人脸个性信息,但这种方法老化后的图像依然存在大量的人工鬼影噪声。

最近,基于深度学习的方法在很大程度上解决了上述数据不足的问题。文献[7-8]使用将自编码器[9]与条件对抗生成网络[10]结合的网络模型进行人脸老化/去龄化,通过训练一个网络模型达到人脸老化/去龄化的目的。经训练后, 该网络模型可以进行以年龄为条件的人脸图像域变换。输入人脸图像和目标年龄即可得到目标年龄的输入人脸的图像。训练时需要的数据仅为带有年龄标签的人脸图像,在很大程度上解决了人脸老化/去龄化方法中存在的数据缺失问题。充足的数据使模型参数得到了足够的优化。Zhang等人[8]提出的对抗自编码网络(CAAE)方法是目前人脸老化/去龄化效果最好的模型之一,生成的人脸不仅可信度高,而且进行大年龄跨度的老化/去龄化时,仍能保持较好的效果。

近些年,尽管人脸老化/去龄化的水平得到了显著提升,但是如果将其应用到实际中,效果仍需进一步提升。在实际应用中,图像的清晰度问题已经越来越重要[11],CAAE虽然可以生成年龄准确的人脸图像,但是生成的图像存在分辨率较低、人工鬼影噪声严重等问题。针对上述问题,做出以下改进:

1) 将CAAE中的对抗生成网络(GAN)[12]替换成边界平衡对抗生成网络(BEGAN)[13],BEGAN在人脸领域生成的图像不仅有很好的视觉效果,而且有更高的分辨率;

2) 添加了Mathieu等人[14]提出的图像梯度差损失函数,使生成图像具有更多真实图像的边缘轮廓等高频信息;

3) 为去除人工鬼影噪声,增加人脸特征信息和纹理信息,添加了基于VGG-FACE[15]网络模型的人脸特征损失函数。

结合以上改进,本文在CAAE图像域变换的工作原理上,提出一种人脸老化/去龄化的高质量图像生成模型(HQGM)。直接观察实验结果可以发现,HQGM生成的图像可以有效减少人工鬼影噪声的影响。在图像质量方面,CAAE模型的测试图像峰值信噪比为23.4,结构相似性值为0.71,而HQGM的测试图像峰值信噪比为26.6,结构相似性值为0.77。可以看出,HQGM生成的图像质量明显优于CAAE。

1 相关工作

1.1 图像变换原理

CAAE使用自编码器与条件对抗网络相结合的网络结构,仅通过改变输入图像中人脸的年龄信息,即可对人脸图像进行以年龄为条件的图像域变换。HQGM使用的图像域变换原理与CAAE相同。图像位于高维空间,进行人脸老化/去龄化的过程复杂。降维后可以获得具有人脸身份信息的低维特征,对低维特征进行处理,操作难度大幅度降低。CAAE对低维特征处理就是添加年龄标签,在解码阶段将条件对抗生成网络嵌入到解码器中进行图像的条件生成。原理为图像编码—低维处理—解码,进行以年龄为条件的人脸图像域变换,图像变换原理如图 1所示。

图 1 图像变换原理
Fig. 1 The theory of image transformation

深度学习的方法是一个训练模型再测试的过程(详见第2节),训练出满足图 1要求的编码器和解码器。编码器学习到将输入图像编码成含有人脸身份等信息的特征向量${\mathit{\boldsymbol{z}}} $,解码器学习到根据不同的年龄标签$ {\mathit{\boldsymbol{l}}} $和特征向量${\mathit{\boldsymbol{z}}} $生成特定年龄和特定身份的人脸图像。根据上述原理和训练,测试时即可完成目标年龄标签的人脸图像域变换,即目标年龄标签的人脸老化/去龄化。

1.2 VGG-FACE网络模型

目前深度学习人脸识别方法分为两步,第1步提取特征,第2步对特征进行处理。HQGM使用配置预训练参数的VGG-FACE模型提取人脸特征信息。VGG-FACE是一个复杂度高的多层网络模型,主要用于人脸识别。2016年牛津大学的VGG小组提出并公开了预训练参数,由200万幅人脸图像训练人脸识别所得,通过超大规模数据集的识别训练,在特征提取方面性能优异[16-17]。该小组提出了目前学术界广泛使用的VGG-19和VGG-16深度模型,主要用于物体识别分类。但是可以使用上述两个模型进行分类的物体种类跨度很大,如果将其预训练参数仅用于提取人脸的特征信息,结果并不理想。所以,HQGM最终使用配置预训练参数的VGG-FACE模型对输入图像和真实图像进行特征提取。

1.3 边界平衡对抗生成网络

BEGAN是GAN的一个重要拓展,是目前最好的高清人脸生成模型之一,生成的图像不仅分辨率较高,而且具有较强的视觉效果。其生成器损失函数$L_\rm{G}$

$ \mathit{\boldsymbol{\bar x}} = G\left( \mathit{\boldsymbol{x}} \right) $ (1)

$ {L_{\rm{G}}}\left( \mathit{\boldsymbol{x}} \right) = {\left\| {\mathit{\boldsymbol{\bar x}} - D\left( {\mathit{\boldsymbol{\bar x}}} \right)} \right\|_1} $ (2)

式中,${\mathit{\boldsymbol{x}}} $为输入图像,${\mathit{\boldsymbol{\bar x}}} $为生成器生成图像,$G$为生成器,$D$为判别器,BEGAN的判别器$D$是一个自编码器。

由于生成器倾向于生成更容易被判别器重建的图像,所以生成器的成功条件为生成的图像易被判别器重建。

判别器的主要工作是降低生成图像在判别器中的自编码能力,同时提高真实图像在判别器中的自编码能力。对应这两部分工作的损失函数分别为

$ {L_{\rm{D}}}\left( {\mathit{\boldsymbol{\bar x}}} \right) = - {L_{\rm{G}}}\left( \mathit{\boldsymbol{x}} \right) $ (3)

$ L\left( {D\left( \mathit{\boldsymbol{x}} \right)} \right) = {\left\| {\mathit{\boldsymbol{x}} - D\left( \mathit{\boldsymbol{x}} \right)} \right\|_1} $ (4)

为平衡判别器的这两部分工作,引入了比例控制理论中的平衡变量$k_{t}$,则

$ {L_{\rm{D}}}\left( \mathit{\boldsymbol{x}} \right) = L\left( {D\left( \mathit{\boldsymbol{x}} \right)} \right) + {k_1} \times {L_{\rm{D}}}\left( {\mathit{\boldsymbol{\bar x}}} \right) $ (5)

$ {k_{t + 1}} = {k_t} + {\lambda _k}\left( {\gamma L\left( {D\left( \mathit{\boldsymbol{x}} \right)} \right) - L\left( {\mathit{\boldsymbol{\bar x}}} \right)} \right) $ (6)

由此可知,判别器训练的成功条件是:1)能够很好地将真实图像自编码;2)使生成图像在判别器网络中的自编码能力变差。式(6)中引入的变量$k_{t}$所依据的原理为比例控制理论。

以上即为BEGAN的生成器和判别器的损失函数。与GAN相比,BEGAN可以生成纹理更好的人脸图像且具有更好的视觉效果[13]。但是由于判别器变成自编码器,网络结构更复杂,训练时间变长。

2 网络结构及训练

HQGM包括两个自编码器,具体结构如图 2所示。图 2上部分的自编码器由编码器和解码器(图像生成器)两部分组成,图 2下部分的自编码器为判别器。本文源码使用tensorflow框架,图中Conv_为卷积层,Deconv_为反卷积层,FC_为全连接层,每个卷积层的卷积核为5×5,步长为2,中间的卷积层均使用ReLU激活函数,生成器和判别器的最后一层使用tanh激活函数。具体参数如图 2所示。

图 2 网络结构图
Fig. 2 The structure of the network

生成器的训练过程如图 3所示。训练编码器和生成器时,输入128×128×3的图像${\mathit{\boldsymbol{x}}} _{ij}$,表示输入图像人脸的身份为$i$,年龄为$j$${\mathit{\boldsymbol{x}}} _{ij}$输入到编码器中得到特征向量${\mathit{\boldsymbol{z}}} _{i}$,将人脸特征${\mathit{\boldsymbol{z}}} _{i}$与年龄标签${\mathit{\boldsymbol{l}}} _{g}$合并为(${\mathit{\boldsymbol{z}}} _{i}, {\mathit{\boldsymbol{l}}}_{g}$),输入到解码器中,生成人物为$i$、年龄为$g$、尺寸为$128×128×3$的人脸图像$\mathit{\boldsymbol{\bar x}} _{ig}$,并将$\mathit{\boldsymbol{\bar x}} _{ig}$输入到判别器中,预期其被判定为真实样本,由此训练编码器和生成器的参数。训练判别器时,固定生成器的参数,将目标图像${\mathit{\boldsymbol{x}}} _{ig}$(身份为$i$、年龄为$g$的真实人脸图像)和$生成图像\mathit{\boldsymbol{\bar x}} _{ig}$输入到判别器中进行分类,由此训练判别器参数。两个训练过程交替进行,使$\bar {\mathit{\boldsymbol{x}}}_{ig}$接近${\mathit{\boldsymbol{x}}} _{ig}$

图 3 生成器训练过程
Fig. 3 The training process of the generator

但实验中很难找到同一身份人脸的两个不同年龄的图像,即上述过程中的${\mathit{\boldsymbol{x}}} _{ig}$数据匮乏,难以达到训练要求。为解决此问题,将上述生成器输入的年龄标签${\mathit{\boldsymbol{l}}} _{g}$替换成${\mathit{\boldsymbol{l}}} _{j}$,目的是使生成图像$\mathit{\boldsymbol{\bar x}} _{ij}$接近输入图像${\mathit{\boldsymbol{x}}} _{ij}$

测试过程(人脸老化/去龄化过程)如图 4所示。测试中只有编码器和生成器工作,图 4模型中编码器输入的人脸图像为26岁,编码后与10个不同的年龄标签合并输入到解码器中,生成对应年龄的人脸图像。观察可知,HQGM模型生成的人脸图像不仅图像可信度高,而且年龄跨度非常大。

图 4 人脸老化/去龄化过程
Fig. 4 The process of face aging/processing

3 损失函数

3.1 条件边界平衡对抗生成网络

本文提出的人脸老化/去龄化方法是通过对年龄标签的控制进行人脸图像的变换。这需要对使用的BEGAN网络进行条件约束。

添加年龄标签约束后,生成器的损失函数$L_{G}$

$ \mathit{\boldsymbol{\bar x}} = G\left( {\mathit{\boldsymbol{x}},\mathit{\boldsymbol{l}}} \right) $ (7)

$ {L_{\rm{G}}}\left( {\mathit{\boldsymbol{x}},\mathit{\boldsymbol{l}}} \right) = {\left\| {\mathit{\boldsymbol{\bar x}} - D\left( {\mathit{\boldsymbol{\bar x}}} \right)} \right\|_1} $ (8)

添加年龄标签约束后,判别器的损失函数为

$ {L_{\rm{D}}}\left( {\mathit{\boldsymbol{\bar x}}} \right) = - {L_{\rm{G}}}\left( {\mathit{\boldsymbol{\bar x}}} \right) $ (9)

$ L\left( {D\left( {\mathit{\boldsymbol{x}},\mathit{\boldsymbol{l}}} \right)} \right) = {\left\| {\mathit{\boldsymbol{x}} - D\left( {\mathit{\boldsymbol{x}},\mathit{\boldsymbol{l}}} \right)} \right\|_1} $ (10)

$ {L_{\rm{D}}}\left( \mathit{\boldsymbol{x}} \right) = L\left( {D\left( {\mathit{\boldsymbol{x}},\mathit{\boldsymbol{l}}} \right)} \right) + {k_t} \cdot {L_{\rm{D}}}\left( {\mathit{\boldsymbol{\bar x}}} \right) $ (11)

式中,${\mathit{\boldsymbol{x}}} $为输入图像,${\mathit{\boldsymbol{l}}} $为年龄标签,$ \mathit{\boldsymbol{\bar x}}$为生成器生成图像,$G$代表生成器,$D$代表判别器。

BEGAN和GAN网络人脸老化/去龄化的实验对比如图 5所示。图 5中,人脸图像年龄从上到下依次为0 5岁,6 10岁,11 15岁,16 20岁,21 30岁,31 40岁,41 50岁,51 60岁,61 70岁,71岁及以上。放大10倍后,发现BEGAN生成的图像纹理效果更好。

图 5 BEGAN和GAN网络人脸老化/去龄化对比
Fig. 5 Comparison of face aging/processing between BEGAN and GAN networks

3.2 人脸特征提取损失函数

本文使用配置了预训练参数的VGG-FACE模型对输入图像和生成图像进行特征提取,输出如图 6所示。希望使生成图像与真实图像在高维和低维的特征相等。

图 6 人脸特征损失函数
Fig. 6 The face feature loss function

Shi等人[18]在提出的SRGAN中指出,输出的高维特征图包含大量图像的高频信息,输出的低维特征包含图像中人脸的特征信息,损失函数$L_\rm{f}$

$ {L_{\rm{f}}} = \frac{1}{{{W_{i,j}}{H_{i,j}}}}\sum\limits_{a = 1}^{{W_{i,j}}} {\sum\limits_{b = 1}^{{H_{i,j}}} {{{\left( {\oint_{i,j} {{{\left( \mathit{\boldsymbol{x}} \right)}_{a,b}}} - \oint_{i,j} {{{\left( {\mathit{\boldsymbol{\bar x}}} \right)}_{a,b}}} } \right)}^2}} } $ (12)

式中,$W_{i, j}$$H_{i, j}$表示所取特征图的维数。${\mathit{\boldsymbol{x}}} $为输入图像,$\mathit{\boldsymbol{\bar x}} $为输出图像,$∮_{i, j}$表示VGG-FACE模型第$i$个卷积块、第$j$个卷积层的ReLU激活函数输出的特征图,$i$$j$的取值如图 6所示。将此损失函数施加在自编码器上,使生成的图像具有更多真实图像的人脸特征信息,实验效果如图 7所示。

图 7 人脸特征提取损失函数实验效果对比图
Fig. 7 Comparisons with the$L_{feature}$

图 7是原网络与添加$L_\rm{f}$损失函数后的实验结果对比。图 7的最上方为输入图像,输出1为不添加$L_\rm{f}$的实验结果,输出2为同等条件下添加$L_\rm{f}$的实验结果。观察可知,原始生成器生成的部分图像出现了器官扭曲等现象。而添加人脸特征损失函数抑制了此现象发生,并生成纹理信息更加丰富的人脸图像。

3.3 图像梯度差损失函数

设输入图像为${\mathit{\boldsymbol{x}}} $,生成图像为$\mathit{\boldsymbol{\bar x}} $,则损失函数为

$ \begin{array}{*{20}{c}} {{L_{{\rm{gdl}}}}\left( {\mathit{\boldsymbol{x}},\mathit{\boldsymbol{\bar x}}} \right) = \sum\limits_{i,j} {\left| {\left| {{\mathit{\boldsymbol{x}}_{i,j}} - {\mathit{\boldsymbol{x}}_{i - 1,j}}} \right| - \left| {{{\mathit{\boldsymbol{\bar x}}}_{i,j}} - {{\mathit{\boldsymbol{\bar x}}}_{i - 1,j}}} \right|} \right|} + }\\ {\left| {\left| {{\mathit{\boldsymbol{x}}_{i,j - 1}} - {\mathit{\boldsymbol{x}}_{i,j}}} \right| - \left| {{{\mathit{\boldsymbol{\bar x}}}_{i,j - 1}} - {{\mathit{\boldsymbol{\bar x}}}_{i,j}}} \right|} \right|} \end{array} $ (13)

式中,${\mathit{\boldsymbol{x}}} _{i, j}$代表输入图像在$(i, j)$像素点的像素值。式(13)以像素点为基本单位,取行列两个方向计算真实图像和生成图像的图像梯度差值,并减少它们的差值。该损失函数使生成图像含有更多输入图像的边缘轮廓等高频信息。

3.4 模型训练算法

综上所述,本文提出的生成器损失函数为

$ {L_{\rm{g}}} = {\lambda _2}{L_2} + {\lambda _{\rm{f}}}{L_{\rm{f}}} + {\lambda _{{\rm{gdl}}}}{L_{{\rm{gdl}}}} + {\lambda _{\rm{G}}}{L_{\rm{G}}} $

式中,$λ_{2}$$λ_{f}$$λ_{gdl}$$λ_{G}$为各个损失函数对应的权重参数。$L_{2}$损失函数通过缩小输入和输出图像每个像素点的差值,使输出图像各点的像素值与输入图像尽量相等。设输入图像为${\mathit{\boldsymbol{x}}} $,输出图像${\mathit{\boldsymbol{\bar x}}} $,则损失函数为

$ {L_2} = {\left\| {\mathit{\boldsymbol{x}} - \mathit{\boldsymbol{\bar x}}} \right\|_2} $ (14)

判别器的损失函数为$L_{D}$。HQGM训练主要分为生成器训练和判别器训练两部分。两部分训练分开进行,训练生成器时需要固定判别器参数,训练判别器时需要固定生成器参数。训练时使用的优化器为ADAM[19]。在实验中设置判别器和生成器的学习速率分别为$ρ_{D}$$ρ_{G}$,各损失函数权重系数为$λ_{2}$$λ_{f}$$λ_{gdl}$$λ_{G}$。数据集${\mathit{\boldsymbol{M}}} $中含有$m$个图片,从$ {\mathit{\boldsymbol{M}}} $中得到数据$\left( {{{\mathit{\boldsymbol{x}}}^1},{{\mathit{\boldsymbol{l}}}^1}} \right), \cdots ,\left( {{{\mathit{\boldsymbol{x}}}^m},{{\mathit{\boldsymbol{l}}}^m}} \right)$, ${\mathit{\boldsymbol{x}}} ^i$为数据集中的人脸图像,${\mathit{\boldsymbol{l}}} ^i$为对应图像的人脸年龄标签。

1) 训练判别器$D$,权重$W_{D}$

模型输入:${\mathit{\boldsymbol{x}}} ^i$为判别器输入的人脸图像,$\mathit{\boldsymbol{\bar x}} ^i$为解码器生成的人脸图像,${\mathit{\boldsymbol{l}}} ^i$为判别器输入的年龄标签。

2) 训练生成器$G$,权重$W_{G}$

模型输入:${\mathit{\boldsymbol{x}}} ^i$为编码器输入的人脸图像,${\mathit{\boldsymbol{l}}} ^i$为解码器输入的年龄标签。

模型输出:$\mathit{\boldsymbol{\bar x}} ^i$为解码器生成的人脸图像。

由此交替训练,生成器训练5次,判别器训练1次。

训练时使用NVIDIA的GTX1080显卡训练100个周期。输入的图像每一批次为100幅。由于处理集中在人脸的面部,但数据集中的图像包含了过多的背景信息,所以对每一批次的图像先进行预处理操作。对每幅图像进行人脸检测[22-23],通过识别人脸68个特征点,截取特征点周围图像,从而减少图像中背景的影响。训练方法同CAAE[8]

4 实验结果与分析

4.1 实验数据说明

实验使用UTKFace[20]和FGnet[21] 2个数据集。UTKFace数据集包含20 000多幅图像,每幅图像都有年龄标签,从1 78岁。FGnet数据集有1 002幅图像,包含82个人,每个人约有10幅不同年龄的人脸图像。实验数据为带有年龄标签的人脸图像共约21 000幅。将年龄标签分类为10个,分类依据[21]为人脸的变化在年龄较小时较为明显。所以20岁之前设置时间跨度为5年的年龄标签,20岁之后设置时间跨度为10年的年龄标签。10个年龄标签依次为0 5岁,6 10岁,11 15岁,16 20岁,21 30岁,31 40岁,41 50岁,51 60岁,61 70岁,70岁以上。

4.2 GDL损失函数对比实验

在图像中添加$L_{\rm{gdl}}$的预期效果是增加生成图像中人脸轮廓等高频信息。图 8是BEGAN损失函数对比实验,该组对比实验训练100个周期。

图 8 BEGAN损失函数对比实验
Fig. 8 Comparisons between adding BEGAN and no BEGAN

图 8第1行为输入图像,红框为明显的实验对比图,主要是5幅添加$L_{\rm{gdl}}$和未添加$L_{\rm{gdl}}$的人脸老化/去龄化实验对比。图 8中,标注为1、3、5、7、9的图像,训练时采用的损失函数$L=L_{2}+0.000 3×\mathit{\boldsymbol{\bar x}}L_{\rm{gdl}}+0.000 1×L_{G}$,标注为2、4、6、8、10的图像,训练时损失函数$L=L_{2}+0.000 1×L_{G}$。观察带红框的5组对比实验,可以看出添加$L_{\rm{gdl}}$生成的图像效果更好。主要表现为:标注为1、2、7、8且添加了$L_{\rm{gdl}}$的图像中,人脸五官更加清晰立体;标注为3、4且添加了$L_{\rm{gdl}}$的图像中,人脸胡须更加明显。总体而言,实验中5组添加了$L_{\rm{gdl}}$的图像表情更加明显、皮肤纹理感更强、人脸轮廓更明显、图像更加清晰。由此可知,添加$L_{\rm{gdl}}$可以生成线条、轮廓等高频信息更丰富的图像。

4.3 人脸特征损失函数对比实验

在图像中添加$L_\rm{f}$的预期效果是增加生成图像中人脸的特征信息。图 9是人脸特征损失函数对比实验,该组对比实验训练50个周期。

图 9 人脸特征损失函数对比实验
Fig. 9 Comparisons between adding $L_{\rm{f}}$ and no $L_{\rm{f}}$

图 9第1行是输入图像,红框为明显的实验对比图,主要是5幅添加$L_\rm{f}$和未添加$L_\rm{f}$的人脸实验结果对比。标注为1、3、5、7、9的图像,采用的损失函数$L=L_{2}+0.000 1×L_\rm{f}+0.000 1×L_{G}$,标注为2、4、6、8、10的图像,采用的损失函数$L=L_{2}+0.000 1× L_\rm{G}$。可以发现,由于$L_\rm{f}$的应用,老龄化和去龄化的人脸图像的质量均有提升,尤其在年龄跨度大的部分,红框圈选部分效果格外明显,添加$L_\rm{f}$有效减少了器官扭曲、大小眼、器官缺失等现象。同时可以发现,实验中5组添加了$L_\rm{f}$生成的图像更加清晰。由此可知,应用$L_\rm{f}$可以使生成图像具有更多纹理信息并减少人工鬼影噪声的产生。

4.4 CAAE对比实验

图 10是HQGM模型与CAAE模型的实验对比,这组对比实验训练100个周期。图 10第1行是输入图像,红框为明显的实验对比图,标注为1、3、5、7、9的图像使用CAAE方法,标注为2、4、6、8、10的图像使用HQGM方法。

图 10 HQGM模型与CAAE模型对比实验结果
Fig. 10 Comparison of experimental results between HQGM model and CAAE model

实验结果显示,HQGM的人脸老化/去龄化效果更好。主要体现在:1)生成图像在去龄时变化更加明显,在老化时纹理信息更加丰富;2)红框圈出部分表明,HQGM减少了器官扭曲、大小眼等现象;3)由标注3和标注4的两组图像对比可知,HQGM对表情的保留更加明显;4)从标注7和标注8的两组图像可观察到HQGM生成的图像人物眼睛更加有神生动;5)5组图像对比表明,HQGM方法生成的图像更加清晰。由此可以得出,HQGM生成的图像具有更多纹理信息和身份特征信息,人脸老化/去龄化效果优于CAAE。

4.5 生成图像质量对比

本文使用结构相似性(SSIM)和峰值信噪比(PSNR)指标进行生成图像质量的对比。SSIM是一种衡量两幅图像相似度的指标,从图像组成的角度将结构信息定义为独立于亮度和对比度的指数,反映场景中物体结构的属性。PSNR是使用最为广泛的一种图像客观评价指标,基于对应像素点间的误差对图像进行质量评价。Shi等人[18]在实验中即用SSIM和PSNR衡量GAN生成的图像质量。表 1是不同组合的损失函数与CAAE的损失函数的对比实验结果。表 1第1列是训练时生成器添加的损失函数。$L_{\rm{GAN}}$表示GAN的生成器损失函数,$L_{\rm{BEGAN}}$为BEGAN的生成器损失函数。$L_{\rm{CAAE}}$为CAAE的生成器损失函数。每组实验对40幅人脸图像进行测试,分别输入人脸图像和对应的年龄标签,将生成图像和真实图像代入公式中计算PSNR的值和SSIM的值。SSIM值越大,两幅图像越近似;PSNR值越大,失真越小。本文共对比了6组损失函数,实验参数均训练100个周期。

表 1可知:将$L_{2}+L_{\rm{GAN}}$$L_{2}+L_{\rm{BEGAN}}$对比,可以看出BEGAN生成的图像质量比GAN更与原图相似。通过$L_{2}+L_{\rm{BEGAN}}$$L_{2}+L_{\rm{BEGAN}}+L_\rm{f}$的对比,以及$L_{2}+L_{\rm{BEGAN}}+L_{\rm{gdl}}$$L_{2}+L_{\rm{BEGAN}}$的对比,可以得出,添加$L_\rm{f}$$L_{\rm{gdl}}$后,图像生成的质量都得到了提升。对比HQGM和CAAE的实验结果,可以得出HQGM生成的图像质量更高。综上可知,改进添加的3个损失函数均对提升图像质量有实质性的作用。并且HQGM在图像质量上,效果明显优于CAAE。

表 1 不同方法的SSIM和PSNR对比
Table 1 Comparion of different methods according to SSIM and PSNR

下载CSV
损失函数 SSIM PSNR/dB
$L_{2}+L_{\rm{GAN}}$ 0.70 23.2
$L_{2}+L_{\rm{BEGAN}}$ 0.71 23.8
$L_{2}+L_{\rm{BEGAN}}+L_\rm{f}$ 0.75 25.8
$L_{2}+L_{\rm{BEGAN}}+L_{\rm{gdl}}$ 0.73 24.9
$L_{2}+L_{\rm{BEGAN}}+L_{\rm{gdl}}+L_\rm{f}$ 0.78 26.6
$L_{\rm{CAAE}}$ 0.72 23.4

5 结论

HQGM使用CAAE的方法进行以年龄为条件的图像域变化,从三方面提高生成图像的质量。将CAAE网络结构中的GAN替换成BEGAN,使生成图像更加清晰,并添加$L_\rm{f}$$L_{\rm{gdl}}$两个损失函数。添加$L_\rm{f}$使生成图像具有大量真实图像的人脸特征信息和纹理信息。添加$L_{\rm{gdl}}$使生成的人脸图像具有更多轮廓线条等高频信息。经直接观察和对图像质量进行量化对比,三方面的改进均对提高图像质量有实质性的作用。相比于CAAE模型,HQGM生成的图像人脸特征信息和纹理信息更加丰富,效果明显优于CAAE模型。但是生成图像的纹理信息与真实的人脸高清图像仍有差距。未来工作中,一是需要尝试更好的生成模型,替代本文BEGAN嵌入到解码器的结构,生成更加清晰的人脸图像; 二是使用更多有效的损失函数,使老化的人脸具有更多皱纹等纹理信息。

参考文献

  • [1] Kemelmacher-Shlizerman I, Suwajanakorn S, Seitz S M. Illumination-aware age progression[C]//Proceedings of 2014 IEEE Conference on Computer Vision and Pattern Recognition. Columbus, OH, USA: IEEE, 2014: 3334-3341. [DOI: 10.1109/CVPR.2014.426]
  • [2] Tiddeman B, Burt M, Perrett D. Prototyping and transforming facial textures for perception research[J]. IEEE Computer Graphics and Applications, 2001, 21(5): 42–50. [DOI:10.1109/38.946630]
  • [3] Tazoe Y, Gohara H, Maejima A, et al. Facial aging simulator considering geometry and patch-tiled texture[C]//Proceedings of ACM SIGGRAPH 2012 Posters. Los Angeles, California: ACM, 2012. [DOI: 10.1145/2342896.2343002]
  • [4] Suo J L, Zhu S C, Shan S G, et al. A compositional and dynamic model for face aging[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2010, 32(3): 385–401. [DOI:10.1109/TPAMI.2009.39]
  • [5] Ramanathan N, Chellappa R. Modeling age progression in young faces[C]//Proceedings of 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition. New York, NY, USA: IEEE, 2006: 387-394. [DOI: 10.1109/CVPR.2006.187]
  • [6] Mirza M, Osindero S. Conditional generative adversarial nets[EB/OL].[2018-04-23].https://arxiv.org/pdf/1411.1784.pdf.
  • [7] Antipov G, Baccouche M, Dugelay J L. Face aging with conditional generative adversarial networks[C]//Proceedings of 2017 IEEE International Conference on Image Processing. Beijing, China: IEEE, 2017: 2089-2093. [DOI: 10.1109/ICIP.2017.8296650]
  • [8] Zhang Z F, Song Y, Qi H R. Age progression/regression by conditional adversarial autoencoder[C]//Proceedings of 2017 IEEE Conference on Computer Vision and Pattern Recognition. Honolulu, HI, USA: IEEE, 2017: 4352-4360. [DOI: 10.1109/CVPR.2017.463]
  • [9] Kingma D P, Welling M. Auto-encoding variational bayes[EB/OL].[2018-04-23].https://arxiv.org/pdf/1312.6114.pdf.
  • [10] Mirza M, Osindero S. Conditional generative adversarial nets[EB/OL].[2018-04-23].https://arxiv.org/pdf/1411.1784.pdf.
  • [11] Li Y F, Fu R D, Jin W, et al. Image super-resolution using multi-channel convolution[J]. Journal of Image and Graphics, 2017, 22(12): 1690–1700. [李云飞, 符冉迪, 金炜, 等. 多通道卷积的图像超分辨率方法[J]. 中国图象图形学报, 2017, 22(12): 1690–1700. ] [DOI:10.11834/jig.170325]
  • [12] Goodfellow I J, Pouget-Abadie J, Mirza M, et al. Generative adversarial nets[C]//Proceedings of the 27th International Conference on Neural Information Processing Systems. Montreal, Canada: ACM, 2014: 2672-2680.
  • [13] Berthelot D, Schumm T, Metz L. BEGAN: boundary equilibrium generative adversarial networks[EB/OL].[2018-04-23].https://arxiv.org/pdf/1703.10717.pdf.
  • [14] Mathieu M, Couprie C, LeCun Y. Deep multi-scale video prediction beyond mean square error[EB/OL].[2018-04-23].https://arxiv.org/pdf/1511.05440.pdf.
  • [15] Qawaqneh Z, Mallouh A A, Barkana B D. Deep convolutional neural network for age estimation based on VGG-face model[EB/OL].[2018-04-23].https://arxiv.org/pdf/1709.01664.pdf.
  • [16] Kupyn O, Budzan V, Mykhailych M, et al. DeblurGAN: blind motion deblurring using conditional adversarial networks[EB/OL].[2018-04-23].https://arxiv.org/pdf/1711.07064.pdf.
  • [17] Weng Y C, Tian Y, Lu D M, et al. Fine-grained bird classification based on deep region networks[J]. Journal of Image and Graphics, 2017, 22(11): 1521–1531. [翁雨辰, 田野, 路敦民, 等. 深度区域网络方法的细粒度图像分类[J]. 中国图象图形学报, 2017, 22(11): 1521–1531. ] [DOI:10.11834/jig.170262]
  • [18] Shi W Z, Caballero J, Huszár F, et al. Real-time single image and video super-resolution using an efficient sub-pixel convolutional neural network[C]//Proceedings of 2016 IEEE Conference on Computer Vision and Pattern Recognition. Las Vegas, NV, USA: IEEE, 2016: 1874-1883.[DOI: 10.1109/CVPR.2016.207]
  • [19] Kingma D P, Ba L J. ADAM: a method for stochastic optimization[EB/OL].[2018-04-23].https://arxiv.org/pdf/1412.6980.pdf. https://arxiv.org/pdf/1412.6980.pdf
  • [20] Wallhoff F. FGnet-facial expression and emotion database[R]. München: Technische Universität München, 2004.
  • [21] A. Lanitis, C. J. Taylor, and T. F. Cootes. Toward automatic simulation of aging effects on face images[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2002, 24(4): 442–455. [DOI:10.1109/34.993553]
  • [22] Rothe R, Timofte R, van Gool L. DEX: deep expectation of apparent age from a single image[C]//Proceedings of 2015 IEEE International Conference on Computer Vision Workshop. Santiago, Chile: IEEE, 2015: 252-257. [DOI: 10.1109/ICCVW.2015.41]
  • [23] Kazemi V, Sullivan J. One millisecond face alignment with an ensemble of regression trees[C]//Proceedings of 2014 IEEE Conference on Computer Vision and Pattern Recognition. Columbus, OH, USA: IEEE, 2014: 1867-1874. [DOI: 10.1109/CVPR.2014.241]