Face alignment, also known as facial landmark localization, is an essential step in many computer vision methods such as face verification [Bayes] and facial motion capture [Animation]. The majority of face alignment methods proposed in the last several years are based on Cascaded Shape Regression (CSR), which was first proposed in [ESR].
CSR is usually initialized by placing the average face shape in the location provided by the face detector. Starting from this initialization, the face shape is refined in a fixed number of iterations. In each iteration features are extracted from the regions around each landmark of the face shape. The extracted features are then used in a regression method to estimate a correction to the current positions of the landmarks.
In [LBF] Ren et al. proposed Local Binary Features (LBF) where binary descriptors are created based on regression forests [forests] built on simple pixel difference features. The proposed features were incorporated into the CSR framework, which lead to a very fast method, running at the speed of 3000 frames per second on standard desktop hardware.
Our face alignment method is based on LBF, but instead of standard regression forests with pixel features, we use novel K-cluster Regression Forests with Weighted Splitting (KRFWS) and Pyramid HOG (PHOG) features. PHOG features consist of HOG [HOG] taken over the same area with progressively larger cell sizes, more details can be found in [KRF].
K-cluster Regressions Forests (KRF) were originally proposed in [KRF]
for head pose estimation and car orientation estimation. In KRF, at each split, the target space is divided into K clusters, which locally minimize the loss function of the tree. Each K-fold split is performed using a separate k-class linear SVM classifier. The advantage of this type of splitting is that it allows to split on multidimensional features such as HOG, whereas standard regression forest splitting uses only scalar, one dimensional features.
In this work we propose K-cluster Regression Forests with Weighted Splitting (KRFWS) by introducing weights on individual samples for classification at each split. We test KRFWS on the Pointing’04 dataset [Pointing], for which KRF was originally designed, and show improved accuracy.
Recently Li et al. proposed Affine-Transformation Parameter Regression for Face Alignment (APR) [APR], which estimates a 2D affine transform that refines the current face shape estimate. As opposed to the standard regression step in CSR, which refines the positions of the individual landmarks, APR applies a rigid transform. In [APR] it was shown that embedding such alignment before and between standard cascaded shape regression iterations improves face alignment accuracy.
In this work we propose two major extensions to the APR method. First, we show that using KRFWS instead of linear regression improves the accuracy of the estimated transform. Second, we propose 3D-APR, where, we estimate a 3D transform of the current face shape estimate. The use of a 3D transform allows for the compensation of out-of-plane rotation of the head, which is not possible with standard APR.
, divided into two clusters using k-means clustering. The size of each point corresponds to its weight, (a) uses uniform weighting, while (c) uses the weighting scheme proposed in KRFWS. Figures (b) and (d) show classification results obtained from data in (a) and (c). The misclassified samples in (d) are more likely to be located close to the border between the two clusters and in consequence their influence on SSE is limited.
Ii-a K-cluster Regression Forests with Weighted Splitting
In this chapter we describe K-cluster Regression Forests with Weighted Splitting (KRFWS) which are an extension of K-cluster regression forests (KRF). Regression forests, like all other regression methods, map a point in the input space onto a point in the target space . KRF differ from other similar methods in the way splitting is performed and in the fact that in KRF each node has child nodes, whereas in most methods each node has 2 children.
The aim of splitting is to find a rule that once applied to the input space , partitions the target space in a way that minimizes the loss function of the tree. KRF use the most common loss function, which is the sum of squared errors (SSE) of the child nodes. As explained in [KRF], the SSE of the child nodes of any given node is locally minimized by a partition defined by the result of k-means clustering on the target space of samples in that node.
In KRF, the problem of splitting is defined as a classification problem. To preserve the partition defined by the k-means clustering, a classifier is trained at each split. This is achieved by applying a class one-versus-rest linear SVM classifier on the input space of samples in each node. The advantage of this approach is that the splits can be performed on multidimensional features. This in turn facilitates the use of image features, for example PHOG, as the input space.
In most cases the separating hyperplane produced by the SVM does not partition the input set perfectly. In practice this means that some of the samples will not be forwarded to the correct child node. The misclassified samples increase the value of the loss function and make the splitting problem more difficult in the child nodes.
We propose to reduce the impact of this problem by giving more importance to the samples that, should they be misclassified, would have the largest impact on SSE. This is achieved by assigning each sample in the current node a weight , where 0 would signify that the sample is of no importance. The weights are then used as an input to a weighted SVM classifier included in the LIBLINEAR [LIBLINEAR] package. Below we describe our method for generating the sample weights for splits with clusters. While the method does generalize to any number of clusters, the description of the generalized procedure is beyond the scope of this short article.
Given a node divided into two clusters and with their respective centroids and , the weights are defined as follows:
where and . Equation (1) transforms each point of the target space into a distance of that point from the hyperplane separating the two clusters. The distances are then normalized in equation (2) so that .
Effectively each weight is the normalized distance of a given sample from the hyperplane separating and . The samples close to the boundary between the two clusters have a small weight as even if they are incorrectly classified, the SSE will not increase greatly. The samples that are far from the boundary on the other hand, have large weights as, should they be misclassified, the SSE would be heavily affected. The weighting scheme and its influence are illustrated in Figure 1.
KRFWS is not the only decision forest method that utilizes sample weights, one other method is boosting with decision trees[boosting]. There are however several key differences between the two methods. In boosting with decision trees, the learning of each tree is dependent upon its predecessors. The samples are weighted based on their error in previously trained trees. In KRFWS each tree is trained independently using a different subset of the training data (bagging). The sample weights are calculated independently at each split, and reflect the influence a given samples would have on the loss if it was misclassified.
Ii-B Affine Pose Regression
Affine Pose Regression (APR) was recently proposed in [APR] as a method for improving the performance of face alignment methods. In contrast to Cascaded Shape Regression (CSR), APR estimates a rigid transforms of the entire face shape:
where , a matrix, is the current estimate of the face shape, is the number of landmarks in the face shape and
are the parameters of the transform. The parameters are estimated by linear regression based on HOG features extracted at the facial landmarks. APR can be applied before CSR or in between CSR iterations to efficiently compensate for inaccurate initialization of the face shape in scale, translation and in-plane rotation.
In this work we propose to improve the original APR framework by using KRFWS instead of linear regression. We estimate all the transform parameters by creating separate KRFWS models for and a joint model for . Instead of extracting features at individual landmarks we extract a single feature that covers the entire face. We show the effectiveness of our approach in experiments on the 300-W dataset [300-W] in section III.
Ii-C 3D Affine Pose Regression
As mentioned in the previous section, APR can be applied before CSR to compensate for inaccuracy in scale, translation and in-plane rotation of the face shape estimate. In this section we propose a method to extend APR by taking into account out-of-plane rotation of the head, namely: yaw and pitch. Our method, which we call 3D-APR, fits an average 3D face shape to the face in the image and uses the 2D projection of that shape as an initialization for face alignment.
3D Affine Pose Regression (3D-APR) consists of two steps: first we fit an average 3D face shape to the initial face shape estimate . The fitting is accomplished using a scaled orthographic projection:
where is the projected shape, is a scaling factor, are the first two rows of a rotation matrix and , are translation parameters. The values of the parameters for any shape are obtained by solving the following optimization problem:
The optimization is performed using the Gauss-Newton method as in [2Dvs3D].
In the second step we estimate an update to that refines the projected 3D shape so that it is closer to the true shape of the face in the image. As in APR the estimation is performed using KRFWS based on a PHOG descriptor extracted at the face region. Separate KRFWS models are trained to estimate and , a joint model is used for and . The projection matrix is parametrized using euler rotations. In practice, the estimation of is equivalent to head pose estimation.
Learning is performed similarly to learning in APR and CSR. The training set consists of a set of images with corresponding ground truth landmark locations. For each image a number of initial shapes are generated from the ground truth shape. For each initial shape, the initial parameters and the ground truth parameters are obtained using equation (5) and the ground truth annotations. KRFWS learning is then applied to map the PHOG descriptor to the update .
In this section we test the effectiveness of the proposed methods in affine pose regression, face alignment and head pose estimation. The parameters we use for our methods in APR and face alignment have been established through cross-validation, with the exception of the number of children . was set following [KRF], where the authors have found to be optimal for a target space similar to ours. We plan to investigate different values of in future experiments..
Iii-a Affine pose regression
We test the effectiveness of APR and 3D-APR on the 300-W dataset [300-W], which consists of face images with corresponding ground truth annotations of 68 characteristic points and bounding boxes generated by a face detector. The images in 300-W are gathered from several other datasets: AFW [AFW], HELEN [HELEN], IBUG [300-W] and LFPW [LFPW]. For learning we use the AFW dataset and the training subsets of the HELEN and LFPW datasets, which together consist of 3148 face images. Our test dataset consists of two subsets: the challenging IBUG dataset (135 images) and the less challenging test subsets of the LFPW and HELEN datasets (554 images). Together the two datasets form what we refer to as the full set. This division of the 300-W dataset is a standard in face alignment testing, employed in many recent articles [LBF, CFSS, TransferredDCNN].
Each method is initialized with the face detector bounding box provided in the 300-W dataset. Similarly to [LBF],[CFSS] we use the inter-pupil distance normalized landmark error, all errors are expressed as the % of the inter-pupil distance. The pupil locations are assumed to be the centroids of the landmarks located around each of the eyes.
Five different configurations of APR and 3D-APR are tested: (1) Linear APR with feature extraction at landmarks, (2) Linear APR with a single feature extracted at the face center, (3) KRF APR with a single feature extracted at the face center, (4) KRFWS APR with a single feature extracted at the face center, (5) KRFWS APR followed by 3D-APR with a single feature extracted at the face center (Combined APR, CAPR). In all of the configurations the images are rescaled so that the face size is approximately pixels. In all experiments APR is performed for two iterations, while 3D-APR is performed once.
In the first configuration Pyramid HOG [KRF] features covering pixels are extracted at each landmark. The input descriptor for APR is formed by concatenating the descriptors from each of the landmarks.
In configurations (2), (3), (4) and (5) a single PHOG is extracted at the face center. As the feature size is not a concern in this scenario (only one feature is extracted instead of 68) we use the extended version of the HOG feature described in [extHOG]. The descriptor covers an area of pixels.
The results of the experiments are shown in Table I. KRFWS APR outperforms Linear APR on the challenging subset by 6%. CAPR shows the best accuracy of all tested methods, reducing the error of Linear APR by 35% on the full set.
|Linear APR single feature||12.77||25.85||15.32|
|KRFWS APR + 3D-APR (CAPR)||8.61||15.26||9.90|
Iii-B Face alignment
In face alignment we use the same training and evaluation data as in the APR experiments. In order to facilitate comparison with other methods we report the results of our full pipeline for both inter-pupil normalisation [LBF],[CFSS] and inter-ocular normalisation [MDM]. Our face alignment method uses the Local Binary Feature framework [LBF], where instead of standard regression forests we use KRFWS, and instead of pixel difference features we use PHOG. The forest generated for each landmark consists of 5 trees with a maximum depth of 7, the PHOG extracted at landmarks cover an area of pixels each, with a single block per pyramid level. Similarly to [LBF], our method is performed for 5 iterations.
We test the accuracy of our face alignment method with four different initialization configurations: (1) face detector bounding boxes provided in the 300-W dataset, (2) Linear APR, (3) KRFWS APR, (4) KRFWS APR + 3D-APR (CAPR).
The results of the experiments are shown in Table II
along with the results of several state-of-the-art methods, all trained on the same datasets and all initialized as in configuration (1). The methods we compare to perform face alignment using a variety of machine learning tools, including: linear regression[SDM], decision trees [LBF]
and deep learning[TransferredDCNN, MDM].
The experiments we have performed show the effectiveness of our face alignment combined with KRFWS APR and 3D-APR. In configuration (1) the proposed face alignment method outperforms the original LBF in all cases by between 2% and 8%. The addition of KRFWS APR and CAPR for initialization leads to an improvement of 18% and 20% over the original LBF on the challenging IBUG dataset.
Our face alignment combined with CAPR initialization shows state-of-the-art results on all datasets. The addition of CAPR resulted in an error reduction of over 13% on the challenging subset in comparison to face detector initialization.
Figure 2 shows a diagram of our face alignment pipeline along with images at its consecutive stages.
|Transferred DCNN [TransferredDCNN]||4.73||12.37||6.23|
|Linear APR + KRFWS LBF||4.76||10.57||5.89|
|KRFWS APR + KRFWS LBF||4.65||9.82||5.66|
|CAPR + KRFWS LBF||4.62||9.48||5.57|
|CAPR + KRFWS LBF||3.34||6.56||3.97|
Iii-C Head pose estimation
In order to compare KRFWS to the original KRF we test our method on the head pose estimation task. We use the Pointing’04 [Pointing] dataset, which was also used to test the original KRF. The Pointing’04 dataset consists of images of 15 subjects, each photographed in two separate sessions. During both sessions each subject had 93 photographs taken with pitch and yaw of the head both varying from -90 to +90. Each image in the dataset is accompanied by a manually annotated bounding box containing the head.
For fair comparison we use experimental settings identical to those proposed in [KRF]. From each image we extract a single Pyramid HOG feature, set K in KRFWS to 2 and have each forest consist of 20 trees. The splitting stops when a node has less than 5 samples.
We compare our method to the baseline KRF in two experiments, in both we use the Mean Absolute Error (MAE) measure. In the first experiment we perform 2-fold cross validation, where each fold consists only of images from a single session. In the second experiment we perform 5-fold cross validation, where the images in each fold are chosen at random. Our method shows an improvement of 4% over the baseline KRF in the first test and a 3.7% improvement in the second test. The results of both tests can be found in Table III along with the results for KRF and Adaptive KRF (AKRF) [KRF].
In MATLAB the training time for a single tree in the 5-fold cross validation test is 6.65 sec for KRF and 6.45 sec for KRFWS. This shows that the training of KRFWS is actually faster than training of KRF, despite the additional weight calculation step. We believe that this is because in KRFWS less splits are required to reach the stopping criterion.
|2-fold cross validation|
|KRF (baseline)||5.06||3.59||4.32 0.138|
|5-fold cross validation|
|KRF (baseline)||5.13||2.88||4.01 0.171|
In this article we have proposed a face alignment pipeline based on novel K-cluster Regression Forests with Weighted Splitting. Our pipeline consists of two separate stages: face shape initialization and face alignment. The first step performs APR and novel 3D-APR to improve the initial shape, provided by the face detector, in terms of translation, scale and in and out of plane rotation. The second step performs face alignment using an adapted version of the LBF framework. The proposed face alignment pipeline shows state-of-the-art results on the entire 300-W dataset.