Towards Large-Pose Face Frontalization in the Wild

Xi Yin, Xiang Yu, Kihyuk Sohn, Xiaoming Liu, Manmohan Chandraker

Introduction

Frontalization of face images observed from extreme viewpoints is a problem of fundamental interest in both human and machine facial processing and recognition. Indeed, while humans are innately skilled at face recognition, newborns do not perform better than chance on recognition from profile views , although this ability seems to develop rapidly within a few months of birth . Similarly, dealing with profile views of faces remains an enduring challenge for computer vision too. The advent of deep convolutional neural networks (CNNs) has led to large strides in face recognition, with verification accuracy surpassing human levels on datasets such as LFW. But even representations learned with state-of-the-art CNNs suffer for profile views, with severe accuracy drops reported in recent studies . Besides aiding recognition, frontalization of faces is also a problem of independent interest, with potential applications such as face editing, accessorizing and creation of models for use in virtual and augmented reality.

In recent years, CNNs have leveraged the availability of large-scale face datasets to also learn pose-invariant representations for recognition, using either a joint single framework or multi-view pose-specific networks . Early works on face frontalization in computer vision rely on frameworks inspired by computer graphics. The well-known 3D Morphable Model (3DMM) explicitly models facial shape and appearance to match an input image as closely as possible. Subsequently, the recovered shape and appearance can be used to generate a face image under novel viewpoints. Many 3D face reconstruction methods build upon this direction by improving speed or accuracy. Deep learning has made inroads into data-driven estimation of 3DMM models too , circumventing some drawbacks of early methods such as over-reliance on the accuracy of 2D landmark localization . Due to restricted Gaussian assumptions and nature of losses used, insufficient representation ability for facial appearance prevents such deep models from producing outputs of high quality. While inpainting methods such as attempt to minimize the impact on quality due to self-occlusions, they still do not retain identity information.

In this paper, we propose a novel generative adversarial network framework FF-GAN that incorporates elements from both deep 3DMM and face recognition CNNs to achieve high-quality and identity-preserving frontalization, using a single input image that can be a profile view up to 90∘90^{\circ}. Our framework targets more on face-in-the-wild conditions which show more challenge on illumination, head pose variation, self-occlusion and so on. To the best of our knowledge, this is the first face frontalization work that handles pose variations at such extreme poses.

Noting the challenge of purely data-driven face frontalization, Section 3.1 proposes to enhance the input to the GAN with 3DMM coefficients estimated by a deep network. This provides a useful prior to regularize the frontalization, however, it is well known that deep 3DMM reconstructions are limited in their ability to retain high-frequency information. Thus, Section 3.2 proposes a method to combine 3DMM coefficients with the input image to generate an image that maintains both global pose accuracy and retains local information present in the input image. In particular, the generator in our GAN produces a frontal image based on a reconstruction loss, a smoothness loss and a novel symmetry-enforcing loss. The aim of the generator is to fool the discriminator, presented in Section 3.3, into being unable to distinguish the generated frontal image from a real one. However, neither the 3DMM that loses high-frequency information, nor the GAN that only aligns domain-level distributions, suffice to preserve identity information in the generated image. To retain identity information, Section 3.4 proposes to use a recognition engine to align the feature representations of the generated image with the input. A balanced training with all the above objectives results in high-quality frontalized faces that preserve identity.

We extensively evaluate our framework on several well-known datasets including Multi-PIE, AFLW, LFW, and IJB-A. In particular, Section 5 demonstrates that the face verification accuracy on LFW dataset that uses information from our frontalized outputs exceeds previous state of the art. We observe even larger improvements on the Multi-PIE dataset especially for the viewpoints beyond 45∘45^{\circ} and being the sole method among recent works to produce high recognition accuracies for 75∘75^{\circ}-90∘90^{\circ}. We present ablation studies to analyze the effect of each module and several qualitative results to visualize the quality of our frontalization.

A novel GAN-based end-to-end deep framework to achieve face frontalization even for extreme viewpoints.

A deep 3DMM model to provide shape and appearance regularization beyond the training data.

Effective symmetry-based loss and smoothness regularization that lead to generation of high-quality images.

Use of a deep face recognition CNN to enforce that generated faces satisfy identity-preservation, besides realism and frontalization.

Consistent improvements on several datasets across multiple tasks, such as face recognition, landmark localization and 3D reconstruction.

Related Work

Synthesizing a frontal view of a face from a single image with large pose variation is very challenging because recovering the 3D information from 2D projections is ambiguous and there exists self-occlusion. A straightforward method is to build 3D models for faces and directly rotate the 3D face models. Seminal works date back to the 3D Morphable Model (3DMM) , which models both the shape and appearance as PCA spaces. Such 3DMM fitting helps boost 3D face reconstruction and 3D landmark localization performance. Hassner et al. apply a shared 3D shape model combined with input images to produce the frontalized appearance. Ferrari et al. use 3DMM to fit to the input image and search for the dense point correspondence to complete the occlusion region. Zhu et al. provide a high fidelity pose and expression normalization method based on 3DMM.

Besides model-based methods, Sagonas et al. propose frontalization as a low-rank constraint optimization problem to target landmark localization. Some deep learning based methods also show promising performance in terms of pose rectification. In , a recurrent transform unit is proposed to synthesize discrete 3D views. A concatenated network structure is applied in to rotate the face, where the output is regularized by the image level reconstruction loss. In , a perception loss is designed to supervise the generator training. Our method is also based on deep learning. We incorporate 3DMM into a deep network and propose a novel GAN based framework to jointly utilize the geometric prior from 3DMM and high frequency information from the original image. A discriminator and a face recognition engine are proposed to regularize the generator to preserve identity.

Generative Adversarial Networks

Introduced by Goodfellow et al. , the Generative Adversarial Network (GAN) maps from a source data distribution to a target distribution using a minimax optimization over a generator and a discriminator. GANs have been used for a wide range of applications including image generation , 3D object generation , etc. Deep Convolutional GAN (DC-GAN) extended the original GAN multi-layer perceptron network into convolutional structures. Many methods favor conditional settings by introducing latent factors to disentangle the objective space and thereby achieve better synthesis. For instance, Info-GAN employs the latent code for information loss to regularize the generative network.

A recent method, DR-GAN , has been proposed concurrent to this work. It also uses a recognition engine to regularize the identity, while using a pose code as input to the encoder to generate an image with specific pose. Instead of explicitly injecting the latent code, our framework learns the shape and appearance code from a differentiable 3DMM deep network, which supports the flavor of end-to-end joint optimization for the GAN. Unlike our framework, it is the encoder in that is required to be identity-preserving, which suffices for reconstruction, but results in loss of spatial and high-frequency information crucial for image generation.

Pose-Invariant Feature Representation

While face frontalization may be considered an image-level pose-invariant representation, feature representations invariant to pose have also been a mainstay of face recognition. Early works employ Canonical Correlation Analysis (CCA) to analyze the commonality among pose-variant samples. Recently, deep learning based methods consider several aspects, such as multiview perception layers , to learn a model separating identity from viewpoints. Feature pooling across different poses is also proposed to allow a single network structure for multiple pose inputs. Pose-invariant feature disentanglement or identity preservation methods aim to factorize out the non-identity part with carefully designed networks. Some other methods focus on fusing information at the feature level or distance level . Our method is mostly related to identity preserving methods, in which we apply a face recognition engine as an additional discriminator to guide the generator for better synthesis, while it updates itself towards better discriminative capability for identity classification.

Proposed Approach

The mainstay of FF-GAN is a generative adversarial network that consists of a generator GG and a discriminator DD. GG takes a non-frontal face as input to generate a frontal output, while DD attempts to classify it as a real frontal image or a generated one. Additionally, we include a face recognition engine CC that regularizes the generator output to preserve identity features. A key component is a deep 3DMM model RR that provides shape and appearance priors to the GAN that play a crucial role in alleviating the difficulty of large pose face frontalization. Figure 2 summarizes our framework.

Frontalization from extreme pose variation is a challenging problem. While a purely data-driven approach might be possible given sufficient data and an appropriate training regimen, however it is non-trivial. Therefore, we propose to impose a prior on the generation process, in the form of a 3D Morphable Model (3DMM) . This reduces the training complexity and leads to better empirical performance with limited data.

Recall that 3DMM represents faces in the PCA space:

where S{\bf{S}} are the 3D shape coordinates computed as the linear combination of the mean shape Sˉ\bf{\bar{S}}, the shape basis Aid{\bf{A}}_{id}, and the expression basis Aexp{\bf{A}}_{exp}, while T{\bf{T}} is the texture that is the linear combination of the mean texture Tˉ\bf{\bar{T}} and the texture basis Atex{\bf{A}}_{tex}. The coefficients {αid,αexp,αtex}\{{\bf{\alpha}}_{id},{\bf{\alpha}}_{exp},{\bf{\alpha}}_{tex}\} define a unique 3D face.

where W{\bf{W}} is the importance matrix whose diagonal is the weight of each parameter.

2 Generation Module

The pose estimate obtained from 3DMM is quite accurate, however, frontalization using it leads to loss of high frequency details present in the original image. This is understandable, since a low-dimensional PCA representation can preserve most of the energy in lower frequency components. Thus, we use a generative model that relies on 3DMM coefficients p{\bf{p}} and the input image x{\bf{x}} to recover a frontal face that preserves both the low and high frequency components.

In Figure 2, features from the two inputs to the generator GG are fused through an encoder-decoder network to synthesize a frontal face xf=G(x,p){\bf{x}}^{f}=G({\bf{x}},{\bf{p}}). To penalize the output from ground truth xg{\bf{x}}^{g}, the straight-forward objective is the reconstruction loss that aims at reconstructing the ground truth with minimal error:

Since an L2L_{2} loss empirically leads to blurry output, we use an L1L_{1} loss to better preserve high frequency signals. At the beginning of training, the reconstruction loss harms the overall process since the generation is far from frontalized, so the reconstruction loss operates on a poor set of correspondences. Thus, the weight for reconstruction loss should be set in accordance to the training stage. The details of tuning the weight are discussed in Section 4.

To reduce block artifacts, we use a spatial total variation loss to encourage smoothness in the generator output:

Based on the observation that human faces share self-similarity across left and right halves, we explicitly impose a symmetry loss. We recover a frontalized 2D projected silhouette, M\mathcal{M}, from the frontalized 3DMM model indicating the visible parts of the face. The mask M\mathcal{M} is binary, with nonzero values indicating visible regions and zero otherwise. Similar masking constraint is shown effective in recent work . By horizontally flipping the face, we achieve another mask Mflip\mathcal{M}_{flip}. We demand that generated frontal images for the original input image and its flipped version should be similar within their respective masks:

Here, xflip{\bf{x}}_{flip} is the horizontal flipped image for input x\bf{x}, pflip{\bf{p}}_{flip} are the 3DMM coefficients for xflip{\bf{x}}_{flip} and ⊙\odot denotes element-wise multiplication. Note that the role of the mask is to focus on the visible face portion, rather than invisible face portion and background.

3 Discrimination Module

Generative Adversarial Networks , formulated as a two-player game between a generator and a discriminator, have been widely used for image generation. In this work, the generator GG synthesizes a frontal face image xf{\bf{x}}^{f} and the discriminator DD distinguishes between the generated face from the frontal face xg{\bf{x}}^{g}. Note that in a conventional GAN, all images used for training are considered as real samples. However, we limit “real” faces to frontal views only. Thus, GG must generate both realistic and frontal face images.

Our DD consists of five convolutional layers and one linear layer that generates a 2D vector with each dimension representing the probability of the input to be real or generated. During training, DD is updated with two batches of samples in each iteration. The following objective is minimized:

where R\mathcal{R} and K\mathcal{K} are the real and generated image sets respectively.

On the other hand, GG aims to fool DD to classify the generated image to be real with the following loss:

The competition between GG and DD improves both modules. In the early stages when face images are not fully frontalized, DD focuses on the pose of the face to make the real or generated decision, which in turn helps GG to generate a frontal face. In the later stages when face images are frontalized, DD focuses on subtle details of frontal faces, which guides GG to generate a realistic frontal face that is difficult to achieve with the supervisions of (3) and (5) alone.

4 Recognition Module

A key challenge in large-pose face frontalization is to preserve the original identity. This is a difficult task due to self-occlusion in profile faces. The discriminator above can only determine whether the generated image is realistic and in frontal pose, but does not consider whether identity of the input image is retained. Although we have L1, total variation and masked symmetry losses for face generation, they treat each pixel equally that result in the loss of discriminative power for identity features. Therefore, we use a recognition module CC to impart correct identity to the generated images.

We use a CASIA-Net structure for the recognition engine CC, with a cross-entropy loss for training CC to classify image x{\bf{x}} with the ground truth identity yy:

where jj is the index of the identity classes. Now, our generator GG is regularized by the signal from CC to preserve the same identity as the input image. If the identity label of the input image is not available, we regularize the extracted identity features hf{\bf{h}}^{f} of the generated image to be similar to those of the input image, denoted as h{\bf{h}}. During training, CC is updated with real input images to retain discriminative power and the loss from the generated images is back-propagated to update the generator GG:

To summarize the framework, the reconstruction module RR provides guidance to the frontalization through (2), the discriminator does so through (6) and the recognition engine through (8). Thus, the generator combines all these sources of information to optimize an overall objective function:

The weights above are discussed in Section 4 to illustrate how each component contributes to joint optimization of GG.

Implementation Details

Our framework consists of mainly four parts as shown in Figure 2, the deep 3DMM reconstructor RR, a two-way fused encoder-decoder generator, the real/generated discriminator and a face recognition engine jointly trained for the identity regularization. All the detailed network structures are introduced in the appendix. It is difficult to initialize the overall network from scratch. The generator GG is expected to receive the correct 3DMM coefficients, whereas the reconstructor needs to be pre-trained. Our identity regularization also requires correct identity information from the recognizer. Thus, the reconstructor RR is pre-trained until we achieve comparable performance for face alignment compared to previous work using 300W-LP . The recognizer is pre-trained using CASIA-WebFace to achieve good verification accuracy on LFW.

The end-to-end joint training is conducted after RR and CC are ready. Notice that we leave generator GG and discriminator DD training from scratch simultaneously because we believe pre-trained GG and DD do not contribute much to the adversarial training. Good GG with poor DD will quickly pull GG to be poor again and vice versa. Further these two components should also match with each other. Good GG may be evaluated poor by a good DD as the discriminator may be trained from other sources. As shown in Equation 10, we set up five balance factors to control the loss contribution to the overall loss. The end-to-end training can be divided into three steps. For the first step, λrec\lambda_{rec} is set to and λid\lambda_{id} is set to 0.01, since these two parts are highly related with the mapping from the generated output to the reference input. Typical values for λtv\lambda_{tv}, λsym\lambda_{sym} and λgan\lambda_{gan} are all 1.0. Once the training error of GG and DD strikes a balance within usually 20 epochs, we change λrec\lambda_{rec} and λid\lambda_{id} to be 1.0 while tuning down λtv\lambda_{tv} to be 0.5, λsym\lambda_{sym} to be 0.8, respectively. It takes another 20 epochs to strike a new balance. Note that we fix model CC for such two-stage training. After that, we relax model CC and further fine-tune all the modules jointly. Further details are included in the supplementary materials. Network structures and more results are refered to: http://cvlab.cse.msu.edu/project-face-frontalization.html.

Experiments

We evaluate our proposed FF-GAN on a variety of tasks including face frontalization, 3D face reconstruction and face recognition. Frontalization and 3D reconstruction are evaluated qualitatively by comparing the visual quality of the generated images to ground truth. We also report quantitative results on sparse 2D landmark localization accuracy. Face recognition is evaluated quantitatively over several challenging databases. We pre-process the images by applying some state-of-the-art face detection and face alignment algorithms and crop to 100×100100\times 100 image size across all the databases. The face databases used for training and testing are introduced below.

300W-LP consists of 122,450122,450 images that are augmented from 300W by the face profiling approach , which is designed to generate images with yaw angles ranging from −90∘-90^{\circ} to 90∘90^{\circ}. We use 300W-LP as our training set by forming image pairs of pose-variant and frontal-view images of the same identity. The estimated 3DMM coefficients provided with dataset are treated as ground truth to train module RR.

AFLW2000 is constructed for 3D face alignment evaluation by the same face profiling method applied in 300W-LP. The database includes 3DMM coefficients and augmented 6868 landmarks for the first 2,0002,000 images in AFLW. We use this database to evaluate module RR for reconstruction.

Multi-PIE consists of 754,200754,200 images from 337337 subjects with large variations in pose, illumination and expression. We select a subset of 301,600301,600 images with 1313 poses, 2020 illuminations, neutral expression from all four sessions. The first 200200 subjects are used for training and the remaining 137137 subjects for testing, in the setting of . We randomly choose one image for each subject with frontal pose and neutral illumination as gallery and all the rest as probe images.

CASIA consists of 494,414494,414 images of 10,57510,575 subjects where the images of 2626 overlapping subjects with IJB-A are removed. It is a widely applied large-scale database for face recognition. We apply it to pre-train and finetune module CC.

LFW contains 13,23313,233 images collected from Internet. The verification set consists of 1010 folders, each with 300300 same-person pairs and 300300 different-person pairs. We evaluate face verification performance on frontalized images and compare with previous frontalization algorithms.

IJB-A includes 5,3965,396 images and 20,41220,412 video frames for 500500 subjects, which is a challenging with uncontrolled pose variations. Different from previous databases, IJB-A defines face template matching where each template contains a variant amount of images. It consists of 1010 folders, each of which being a different partition of the full set. We finetune model CC on the training set of each folder and evaluate on the testing set for face verification and identification.

2 3D Reconstruction

FF-GAN borrows prior shape and appearance information from 3DMM to serve as the reference for frontalization. Though we do not specifically optimize for the reconstruction task, it is interesting to see whether our reconstructor is doing a fair job in the 3D reconstruction task.

Figure 3 (a) shows five examples on AFLW2000 for landmark localization and frontalization. Our method localizes the key points correctly and generates realistic frontal faces even for extreme profile inputs. We also quantitatively evaluated the landmark localization performance using the normalized mean square error. Our model RR achieves 6.016.01 normalized mean square error, compared to 5.425.42 for 3DDFA and 6.126.12 for SDM . Note that our method achieves competitive performance compared to 3DDFA and SDM, even though those methods are tuned specifically for the localization task. This indicates that our reconstruction module performs well in providing correct geometric information.

Given the input images in (a), we compute the 3DMM coefficients with our model RR and generate the 3D geometry and texture using (1), as shown in Figure 3 (b). We observe that our method effectively preserves shape and identity information in the estimated 3D models, which can even outperform the ground truth provided by 3DDFA. For example, the shape and texture estimations in the last example is more similar to the input while the ground truth clearly shows a male subject rather than a female. Given that the 3DMM coefficients cannot preserve local appearance, we obtain such high frequency information from the input image. Thus, the choice of fusing 3DMM coefficients with the original input is shown to be a reasonable one empirically.

3 Face Recognition

One motivation for face frontalization is to see, whether the frontalized images bring in the correct identity information for the self-occluded missing part, and thus boost the performance in face recognition. To verify this, we evaluate our model CC on LFW , MultiPIE , and IJB-A for verification and identification tasks. Features are extracted from model CC across all the experiments. Euclidean distance is used as the metric for face matching.

Evaluation on LFW We evaluate the face verification performance on our frontalized images of LFW, compared to previous face frontalization methods. LFW-FF-GAN represents our method to generate frontalized images, LFW-3D is from , and LFW-HPEN from . Those collected databases are pre-processed in the same way as ours. As shown in Table 1, our method achieves strong results compared to the state-of-the-art methods, which verifies that our frontalization technique better preserves identity information. Figure 4 shows some visual examples. Compared to the state-of-the-art, our method can generate realistic and identity-preserving faces especially for large poses. The facial detail filling technique in relies on a symmetry assumption and may lead to inferior results (11st row, 44th column). In contrast, we introduce a symmetry loss in the training process that generalizes to test images without the need to impose symmetry as a hard constraint for post-processing.

Evaluation on IJB-A We further evaluate our algorithm on IJB-A database. Following prior work , we select a subset of well aligned images in each template for face matching. We define our distance metric as the original image pair distance plus the weighted generated image pair distance. The weights are the confidence score provided by our model DD, i.e. D(G(x,p))D(G({\bf{x},\bf{p}})). Recall that model DD is trained for real or generated classification task, which reflects the quality of the generated images. Obviously, the poorer quality of the generated image, the less likely we take the generated image pair for distance metric. With the fused metric distance, we expect the generated images to provide complimentary information to boost the recognition performance.

Table 2 shows the verification and identification performance. On verification, our method achieves consistently better accuracy compared to the baseline methods. The gap is 6.46%6.46\% at FAR 0.010.01 and 11.13%11.13\% at FAR 0.0010.001, which is a significant improvement. On identification, our fused metric also achieves consistently better result, 4.95%4.95\% improvement at Rank-11 and 1.66%1.66\% at Rank-55. As a challenging face database in the wild, large pose variations, complex background and the uncontrolled illumination prevent the compared methods to perform well. Closing one of those variation gaps would lead to large improvement, as evidenced by our face frontalization method in rectifying pose variation.

Evaluation on Multi-PIE Multi-PIE allows for a graded evaluation with respect to pose, illumination, and expression variations. Thus, it is an important database to validate the performance of our methods with respect to prior works on frontalization. The rank-11 identification rate is reported in Table 3. Note that previous works only consider poses within 60∘60^{\circ}, while our method can handle all pose variation including profile views at 90∘90^{\circ}. The results suggest that when pose variation is within 15∘15^{\circ}, which is near frontal, our method is competitive to state-of-the-art methods. But when the pose is 30∘30^{\circ} or larger, our method demonstrates significant advantages over all the other methods. Although the recognition rate of the synthetic images performs worse than the original images, the fused results perform better than the original images, especially on large-pose face images.

4 Qualitative Results

Figure 5 shows some visual results for unseen images on Multi-PIE, AFLW, and IJB-A. The input images are of medium to large pose and under a large variation of race, age, expression, and lighting conditions. However, FF-GAN can still generate realistic and identity-preserved frontal faces.

5 Ablation Study on Multi-PIE

Figure 6 shows visual comparisons between the proposed framework and its incomplete variants. Our method is visually better than those variants, across all different poses, which suggests that each component in our model is essential for face frontalization. Without the recognizer CC, it is hard to preserve identity especially on large poses. Without the discriminator DD, the generated images are blurry without much high-frequency identity information. Without the reconstructor RR, there are artifacts on the generated faces, which highlights the effectiveness of 3DMM in frontalization. Without the reconstruction loss GidG_{id}, the identity can be preserved to some extent, however the overall image quality is low and the lighting condition is not preserved.

Table 4 shows the quantitative results of the ablation study models by evaluating the recognition rate of the synthetic images generated from each model. Our FF-GAN with all modules and all loss functions performs the best among all other variants, which suggests the effectiveness of each part of our framework. For example, the performance drops dramatically without the recognition engine regularization. The 3DMM module also performs a significant role in face frontalization.

Conclusions

In this work, we propose a 3DMM-conditioned GAN framework to frontalize faces under all pose ranges including extreme profile views. To the best of our knowledge, this is the first work to expand pose ranges to 90∘90^{\circ} in challenging large-scale in-the-wild databases. The 3DMM reconstruction module provides an important shape and appearance prior to guide the generator to rotate faces. The recognition engine regularizes the generated image to preserve identity. We propose new losses and carefully design the training procedure to obtain high-quality frontalized images. Extensive experiments suggest that FF-GAN can boost face recognition performance and be applied for 3D face reconstruction. Large-pose face frontalization in the wild is a challenging and ill-posed problem; we believe this work has made convincing progress towards a viable solution.

References