Dense 3D Face Decoding over 2500FPS: Joint Texture & Shape Convolutional Mesh Decoders

Yuxiang Zhou, Jiankang Deng, Irene Kotsia, Stefanos Zafeiriou

Introduction

Twenty years ago, Blanz and Vetter demonstrated a remarkable achievement . They showed that it is possible to reconstruct 3D facial geometry from a single image. This was possible by solving a non-linear optimization problem whose solution space was confined by a linear statistical model of the 3D facial shape and texture, the so-called 3D Morphable Model (3DMM). Methods based on 3DMMs are still among the state-of-the-art for 3D face reconstruction, even from images captured in-the-wild .

During the past two years, a lot of works have been conducted on how to harness the power of Deep Convolutional Neural Networks (DCNNs) for 3D shape and texture estimation from 2D facial images. The first such methods either trained regression DCNNs from image to the parameters of a 3DMM or used a 3DMM to synthesize images and formulate an image-to-image translation problem in order to estimate the depth, using DCNNs . The recent, more sophisticated, DCNN-based methods were trained using self-supervised techniques and made use of differentiable image formation architectures and differentiable renderers . The most recent methods such as and used self-supervision to go beyond the standard 3DMMs in terms of texture and shape. In particular, used both the 3DMMs model, as well as additional network structures (called correctives) that can capture information outside the space of 3DMMs, in order to represent the shape and texture. The method in tried to learn non-linear spaces (i.e., decoders, which are called non-linear 3DMMs) of shape and texture directly from the data. Nevertheless, in order to avoid poor training performance, these methods used 3DMMs fittings for the model pre-training.

In all the above methods the 3DMMs, linear or non-linear in a form of a decoder, were modelled with either fully connected nodes or, especially in the texture space, with 2D convolutions on unwrapped UV space . In this paper, we take a radically different direction. That is, motivated by the line of research on Geometric Deep Learning (GDL), a field that attempts to generalize DCNNs to non-Euclidean domains such as graphs/manifolds/meshes , we make the first attempt to develop a non-linear 3DMM, that describes both shape and texture, by using mesh convolutions. Apart from being more intuitive defining non-linear 3DMMs using mesh convolutions, their major advantage is that they are defined by networks that have a very small number of parameters and hence can have very small computational complexity. In summary, the contributions of our paper are the following:

We demonstrate how recent techniques that find dense or sparse correspondences (e.g., densereg , landmark localization methods ) can be easily extended to estimate 3D facial geometric information by means of mesh convolutional decoders.

We present the first, to the best of our knowledge, non-linear 3DMM using mesh convolutions. The proposed method decodes both shape and texture directly on the mesh domain with a compact model size (1717MB) and amazing efficiency (over 2500 FPS on CPU). This decoder is different from the recently proposed decoder in which only decodes 3D shape information.

We propose an encoder-decoder structure that reconstructs the texture and shape directly from an in-the-wild 2D facial image. Due to the efficiency of the proposed Coloured Mesh Decoder (CMD), our method can estimate the 3D shape over 300300 FPS (for the entire system).

Related Work

In the following, we briefly touch upon related topics in the literature such as linear and non-linear 3DMM representations.

Linear 3D Morphable Models. For the past two decades, the method of choice for representing and generating 3D faces was Principal Component Analysis (PCA). PCA was used for building statistical 3D shape models (i.e., 3D Morphable Models (3DMMs)) in many works . Recently, PCA was adopted for building large-scale statistical models of the 3D face and head . It is very convenient for representing and generating faces to decouple facial identity variations from expression variations. Hence, statistical blend shape models were introduced representing only the expression variations using PCA . The original 3DMM used a PCA model for also describing the texture variations. Nevertheless, this is quite limited in describing the texture variability in image captured in-the-wild conditions.

Non-linear 3D Morphable Models. In the past year, the first attempts for learning non-linear 3DMMs were introduced . These 3DMMs can be regarded as decoders that use DCNNs, coupled with an image-encoder. In particular, the method used self-supervision to learn a new decoder with fully-connected layers that combined a linear 3DMM with new structures that can reconstruct arbitrary images. Similarly, the methods used either fully connected layers or 2D convolutions on a UV map for decoding the shape and texture.

All the above methods used either fully connected layers or 2D convolutions on unwrapped spaces to define the non-linear 3DMM decoders. However, these methods lead to deep networks with a large number of parameters and do not exploit the local geometry of the 3D facial structure. Therefore, decoders that use convolutions directly in the non-Euclidean facial mesh domain should be built. The field of deep learning on non-Euclidean domains, also referred to as Geometric Deep Learning , has recently gained some popularity. The first works included that proposed the so-called MeshVAE which trains a Variational-Auto-Encoder (VAE) using convolutional operators from and CoMA that used a similar architecture with spectral Chebyshev filters and additional spatial pooling to generate 3D facial meshes. The authors demonstrated that CoMA can represent better faces with expressions than PCA in a very small dimensional latent space of only eight dimensions.

In this paper, we propose the first auto-encoder that directly uses mesh convolutions for joint texture and shape representation. This brings forth a highly effective and efficient coloured mesh decoder which can be used for 3D face reconstruction for in-the-wild data.

Proposed Approach

The operation of the convolution on a graph can be defined by formulating mesh filtering with a kernel gθg_{\theta} using a recursive Chebyshev polynomial . The filter gθg_{\theta} can be parameterized as a truncated Chebyshev polynomial expansion of order KK,

The spectral convolution can be defined as

QdQ_{d} is calculated by iteratively contracting vertex pairs under the constraint of minimizing quadric error . During down-sampling, we store the barycentric coordinates of the discarded vertices with regard to the down-sampled mesh so that the up-sampling step can add new vertices with the same barycentric locations information.

For up-sampling, vertices directly retained during the down-sampling step undergo convolutional transformations. Vertices discarded during down-sampling are mapped into the down-sampled mesh surface using recorded barycentric coordinates. The up-sampled mesh with vertices Vu\mathcal{V}_{u} is efficiently predicted by a sparse matrix multiplication, Vu=QuVd\mathcal{V}_{u}=Q_{u}\mathcal{V}_{d}.

2 Coloured Mesh Decoder in-the-Wild

The non-linear 3DMM fitting in-the-wild is designed in an unsupervised/self-supervised manner. As we are able to construct joint shape & texture bases with the coloured mesh auto-encoder, the problem can be treated as a matrix multiplication between the bases and the optimal coefficients that reconstruct the 3D face. From the perspective of a neural network, this can be viewed as an image encoder EI(I;θI)E_{I}(I;\mathbf{\theta_{I}}) that is trained to regress to the 3D shape and texture, noted as fSAf_{SA}. As shown in Fig. 2, a 2D convolution network is used to encode in-the-wild images followed by a mesh decoder D(fSA;θD)\mathcal{D}(\mathbf{f_{SA}};\mathbf{\theta_{D}}), whose weights are shared across the decoder in the mesh auto-encoder. However, the output of the joint shape & texture decoder is a coloured mesh within a unit sphere. Like linear 3DMM , a camera model is required to project the 3D mesh from the object-centered Cartesian coordinates into an image plane in the same Cartesian coordinates.

Projection Model. We employ a pinhole camera model in this work, which utilizes a perspective transformation model. The parameters of the projection operation can be formulated as following:

Differentiable Renderer. To make the network end-to-end trainable, we incorporated a differentiable renderer to project the output mesh D(fSA)\mathcal{D}(\mathbf{f_{SA}}) onto the image plane I^\mathbf{{\hat{I}}}. The l1l_{1} norm is pixel-wisely calculated as the loss function. The renderer, also known as rasterizer, generates barycentric coordinates and corresponding triangle IDs for each pixel at the image plane. The rendering procedure involves Phong shading and interpolating according to the barycentric coordinates. Also, camera and illumination parameters are computed in the same framework. The whole pipeline is able to be trained end-to-end with the loss gradients back-propagated through the differentiable renderer.

Losses. We have formulated a loss function applied jointly to under-controlled coloured mesh auto-encoder and in-the-wild coloured mesh decoder, thus enabling supervised and self-supervised end-to-end training. It is formulated as below:

is applied to enforce shape and texture reconstruction of the coloured mesh auto-encoder, in which l2l_{2} and l1l_{1} norms are applied on shape SS and texture AA, respectively. The term:

represents the pixel-wise reconstruction error for in-the-wild images when applying a mask to only visible facial pixels. We use λ=0.01\lambda=0.01 and gradually increase to 1.01.0 during training.

Experimental Results

We train our method using both under-controlled data (3DMD ) and in-the-wild data (300W-LP and CelebA ). The 3DMD dataset contains around 2121k raw scans of 3,564 unique identities with expression variations. The 300W-LP dataset consists of about 6060k large pose facial data, which are synthetically generated by the profiling method of . The CelebA dataset is a large-scale face attributes dataset with more than 200200k celebrity images, which cover large pose variations and background clutter. Each training image is cropped to bounding boxes of indexed 68 facial landmarks with random perturbation to simulate a coarse face detector.

We perform extensive qualitative experiments on AFLW2000-3D , 300VW and CelebA testset . We also conducted quantitative comparisons with prior works on FaceWarehouse and Florence , where accurate 3D meshes are available for evaluation. FaceWarehouse is a 3D facial expressions database collected by a Kinect RGBD camera. 150 candidates aged from 7 to 80 of various ethnic groups are involved. Florence is a 3D face dataset that contains 53 subjects with their ground truth 3D meshes acquired from a structured-light scanning system.

2 Implementation Details

Network Architecture. Our architecture consists of four sub-modules as shown in Fig. 2, named Image Encoder , Coloured Mesh Encoder , a shared Coloured Mesh Decoder and a differentiable rendering module . The image encoder part takes input images of shape 112×112×3112\times 112\times 3 followed by 10 convolution layers. It reduces the dimension of the input images to 7×7×2567\times 7\times 256 and applies a fully connected layer that constructs a 256×1256\times 1-dimension embedding space. Every convolutional layer is followed by a batch normalization layer and a ReLU activation layer. The kernel size of all convolution layers is 3 and the stride is 2 for any down-sampling convolution layer. The coloured mesh decoder takes an embedding of size 256×1256\times 1 and decodes to a coloured mesh of size 28431×628431\times 6 (3 shape and 3 texture channels). The encoder/decoder consists of 4 geometric convolutional filters , each one of which is followed by a down/up-sampling layer that reduces/increases the number of vertices by 4 times. Every graph convolutional layer is followed by a ReLU activation function similar to those in the image encoder.

Training Details. Both (1) the under-controlled coloured mesh auto-encoder and (2) the in-the-wild coloured mesh decoder are jointly trained end-to-end although each one uses a different data source. Both models are trained with Adam optimizer with a start learning rate of 1e-4. A learning rate decay is applied with the rate at 0.98 of each epoch. We train the model for 200 epochs. We perturb the training image with a random flipping, random rotation, random scaling and random cropping to the size of 112×112112\times 112 from a 136×136136\times 136 input.

3 Ablation Study on Coloured Mesh Auto-Encoder

Reconstruction Capacity. We compare the power of linear and non-linear 3DMMs in representing real-world 3D scans with different embedding dimensions to emphasize the compactness of our coloured mesh decoder. Here, we use 10%10\% of 3D face scans from the 3DMD dataset as the test set.

As illustrated in the top of Fig. 3, we compare the visual quality of reconstruction results produced by linear and non-linear models. To quantify the results of shape modelling, we use the Normalized Mean Error (NME), which is the averaged per-vertex errors between the ground-truth shapes and the reconstructed shapes normalized by inter-ocular distances. For evaluation of texture modelling, we employ the pixel-wise Mean Absolute Error (MAE) between the ground-truth and reconstructed texture.

As shown in Tab. 1, our non-linear shape model has a significantly smaller shape reconstruction error than the linear model. Moreover, the joint non-linear model notably reduces the reconstruction error even further, indicating that integrating texture information is helpful to constrain the deformation of vertices. For the comparison on the texture reconstruction, a slightly higher reconstruction error of texture is expected as the missing texture information between vertices was interpolated in our model, while a linear model has the full texture information.

Attribute Embedding. To get a better understanding of different faces embedded in our coloured mesh decoder, we investigate the semantic attribute embedding. For a given attribute, e.g., smile, we feed the face data (shape and texture) with that attribute {Ii}i=1n\{\mathbf{I}_{i}\}_{i=1}^{n} into our coloured mesh encoder to obtain the embedding parameters {fSAi}i=1n\{\mathbf{f}_{SA}^{i}\}_{i=1}^{n}, which represent corresponding distributions of the attribute in the low dimensional embedding space. Taking the mean parameters fˉSA\mathbf{\bar{f}}_{SA} as input to the trained coloured mesh decoder, we can reconstruct the mean shape and texture with that attribute. Based on the principal component analysis on the embedding parameters {fSAi}i=1n\{\mathbf{f}_{SA}^{i}\}_{i=1}^{n}, we can conveniently use one variable (principal component) to change the attribute. Fig. 3 shows some 3D shapes with texture sampled from the latent space. Here, we can observe that the power of our non-linear coloured mesh decoder is excellent at modelling expressions, illuminations and even beards with a tight embedding dimension (fSA=256f_{SA}=256).

4 Coloured Mesh Decoder Applied In-the-wild

Since our method can model shape and texture simultaneously, we apply it for 3D morphable fitting in the wild and test the performance on the task of sparse 3D face alignment. We compare our model with the most recent state-of-the-art methods, e.g. 3DDFA , N-3DMM and PRNet on the AFLW2000-3D dataset. The accuracy is evaluated by the Normalized Mean Error (NME), that is the average of landmark error normalized by the bounding box size on three pose subsets .

3DDFA is a cascade of CNNs that iteratively refines its estimation in multiple steps. N-3DMM utilizes the 2D deep convolutional neural networks to build a non-linear 3DMM on the UV position and texture maps, and fits the unconstrained 2D in-the-wild face images in a weakly supervised way. By contrast, our method employs the coloured mesh decoder to build the non-linear 3DMM. Our model not only has better performance but also has a more compact model size and a more efficient running time. PRNet employs an encoder-decoder neural network to directly regress the UV position map. The performance of our method is slightly worse than PRNet majorly due to the complexity of the network.

In Fig. 4, we give some exemplary alignment results, which demonstrate successful sparse 3D face alignment results under extreme poses, exaggerated expressions, heavy occlusions and variable illuminations. We also see that the dense shape (vertices) predictions are also very robust in the wild, which means that for any kind of facial landmark configuration our method is able to give accurate localization results if the landmark correspondence with our shape configuration is given.

4.2 3D Face Reconstruction

We first qualitatively compare our approach with five recent state-of-the-art 3D face reconstruction methods: (1) 3DMM fitting networks learned in a supervised way (Sela et al. ), (2) 3DMM fitting networks learned in an unsupervised way named MoFA (Tewari et al. ), (3) a direct volumetric CNN regression approach called VRN (Jackson et al. ), (4) a direct UV position map regression method named PRNet (Feng et al. ), (5) a non-linear 3DMM fitting networks learned in weakly supervised fashion named N-3DMM (Tran et al. ). As PRNet and N-3DMM both employ 2D convolution networks on the UV position map to learn the shape model, we view PRNet and N-3DMM as the closest baselines to our method.

Comparison to Sela et al. . Their elementary image-to-image network is trained on synthetic data generated by the linear model. Due to the domain gap between synthetic and real images, the network output tends to be unstable on some occluded regions for the in-the-wild testing (Fig. 5), which leads to failure in later steps. By contrast, our coloured mash decoder is trained on the real-world unconstrained dataset in an end-to-end self-supervised fashion, thus our model is robust in handling the in-the-wild variations. In addition, the method of Sela et al. requires a slow off-line nonrigid registration step (∼180\sim 180s) to obtain a hole-free reconstruction from the predicted depth map. Nevertheless, the proposed coloured mesh decoder can run extremely fast. Furthermore, our method is complementary to Sela et al. ’s fine detail reconstruction module. Employing Shape from Shading (SFS) to refine our fitting results could lead to better results with details.

Comparison to MoFA . The monocular 3D face reconstruction method, MoFA, proposed by Tewari et al. , employs an unsupervised fashion to learn 3DMM fitting in the wild. However, their reconstruction space is still limited to the linear bases. Hence, their reconstructions suffer from unnatural surface deformations when dealing with very challenging texture,i.e. beard, as shown in Fig. 6. By contrast, our method employs a non-linear coloured mesh decoder to jointly reconstruct shape and texture. Therefore, our method can achieve high-quality reconstruction results even under hairy texture.

Comparison to VRN . We also compare our approach with a direct volumetric regression method proposed by Jackson et al. . VRN directly regresses a 3D shape volume via an encoder-decoder network with skip connection (i.e. Hourglass structure) to avoid explicitly using a linear 3DMM prior. This strategy potentially helps the network to explore a larger solution space than the linear model. However, this method discards the correspondence between facial meshes and the regression target is very large in size. Fig. 7 shows a visual comparison of 3D face reconstructions between VRN and our method. In general, VRN can robustly handle in-the-wild texture variations. However, due to the volumetric shape representation, the surface is not smooth and does not preserve details. By contrast, our method directly models shape and texture of vertices, thus the model size is more compact and the output results are more smooth.

Besides qualitative comparisons with state-of-the-art 3D face reconstruction methods, we also conducted quantitative comparisons on the FaceWarehouse dataset and the Florence dataset to show the superiority of the proposed coloured mesh decoder.

FaceWarehouse. Following the same setting in , we also quantitatively compared our method with prior works on 9 subjects from the FaceWarehouse dataset . Visual and quantitative comparisons are illustrated in Fig. 8. We achieved comparable results with Garrido et al. and N-3DMM , while surpassing all other regression methods . As shown on the right side of Fig. 8, we can easily infer the expression of these three samples from their coloured vertices.

Florence. Following the same setting in , we also quantitatively compared our approach with state-of-the-art methods (e.g. VRN and PRNet ) on the Florence dataset . The face bounding boxes were calculated from the ground truth point cloud and the face images were cropped and used as the network input. Each subject was rendered with different poses as in : pitch rotations of −15∘-15^{\circ}, 20∘20^{\circ} and 25∘25^{\circ} and raw rotations between −80∘-80^{\circ} and 80∘80^{\circ}. We only chose the common face region to compare the performance. For evaluation, we first used the Iterative Closest Points (ICP) algorithm to find the corresponding nearest points between our model output and ground truth point cloud and then calculated Mean Squared Error (MSE) normalized by the inter-ocular distance of 3D coordinates.

Fig. 9(a) shows that our method obtained comparable results with PRNet. To better evaluate the reconstruction performance of our method across different poses, we calculated the NME under different yaw angles. As shown in Fig. 9(b), all the methods obtain good performance under the near frontal view. However, 3DDFA and VRN fail to keep low error as the yaw angle increases. The performance of our method is relatively stable under pose variations and comparable with the performance of PRNet under profile views.

5 Running Time and Model Size Comparisons

In Tab. 3, we compare the running time and the model size for multiple 3D reconstruction approaches. Since some methods were not publicly available , we only provide an approximate estimation for them. Sela et al. , VRN and PRNet all use an encoder-decoder network with similar running time. However, Sela et al. requires an expensive nonrigid registration step as well as a refinement module.

Our method gets a comparable encoder running time with N-3DMM and MoFA . However, N-3DMM requires decoding features via two CNNs for shape and texture, respectively. MoFA directly uses liner bases, and the decoding step is a single multiplication around 1.51.5ms for 28K points. By contrast, the proposed coloured mesh decoder only needs one efficient mesh convolution network. On CPU (Intel i9-7900X@3.30GHz), our method can complete coloured mesh decoding within 0.367 ms (2500FPS), which is even faster than using linear shape bases. The model size of our non-linear coloured mesh decoder (1717M) is almost one-seventh of the liner shape bases (120120MB) employed in MoFA. Most importantly, the capacity of our non-linear mesh decoder is much higher than that of the linear bases as proved in the above experiments.

Conclusions

In this paper, we presented a novel non-linear 3DMM method using mesh convolutions. Our method decodes both shape and texture directly on the mesh domain with compact model size (1717MB) and very low computational complexity (over 2500 FPS on CPU). Based on the mesh decoder, we propose an image encoder plus a coloured mesh decoder structure that reconstruct the texture and shape directly from an in-the-wild 2D facial image. Extensive qualitative visualization and quantitative reconstruction results confirm the effectiveness of the proposed method.

Acknowledgements

Stefanos Zafeiriou acknowledges support from EPSRC Fellowship DEFORM (EP/S010203/1) and a Google Faculty Fellowship. Jiankang Deng acknowledges insightful advice from friends (e.g. Sarah Parisot, Yao Feng, Luan Tran and Grigorios Chrysos), financial support from the Imperial President’s PhD Scholarship, and GPU donations from NVIDIA.

References