Gender Face
Gender Face
1 Introduction
Over the past decades, a great number of papers have been published in the face
analysis area. Most of them dealt with face recognition [1,2] and face detection
[3,4,5,6] problems. However, automatic gender classification has recently become
an important issue in this area. Gender recognition has applications in several
fields, such as, in demographic data collection, and it also could be an interesting
starting point for other face image processes.
According to recent papers [3,4], face detection tasks obtain quite impressive
results, although they do not reach 100% accuracy in all situations. Moreover,
faces could be occluded by pieces of cloth, such as, scarves or glasses. Conse-
quently, we will focus on the gender recognition problem when the face is not
accurately detected and only a partial view of the face is available.
In this paper, we compare several characterization techniques in order to find
out which one performs better with the previous restrictions. All these techniques
consider a set of N × N windows over each face image. A feature vector is
extracted from each individual window in order to characterize the face. The
techniques used are: a well-know method based on Local Binary Patterns (LBPs)
which have achieved good results in the face recognition task [2], a description
This work was partially funded by Projects Consolider Ingenio 2010 CSD2007-00018,
DPI2006-15542, and AYA2008-05965-C04-04 from the Spanish Ministry of Science
and Innovation, and P1-1B2007-60 from the Fundació Caixa Castelló-Bancaixa.
E. Bayro-Corrochano and J.-O. Eklundh (Eds.): CIARP 2009, LNCS 5856, pp. 749–757, 2009.
c Springer-Verlag Berlin Heidelberg 2009
750 Y. Andreu, P. Garcı́a-Sevilla, and R.A. Mollineda
2 Face Descriptions
This section presents all the face characterization methods used in the experi-
ments, including our features called Ranking Labels.
All the face descriptions use a window that scans the face image to obtain
the feature vectors that will characterize the corresponding face. Two of the
characterization methods considered are based on histograms computed over
the image window (LBP and LCH) while the other method assigns a label to
each pixel in the window in such a way that it keeps the information about the
position of the pixels inside it.
rotationally invariant [9], all possible binary numbers that can be obtained by
starting the sequence from all neighbors in turn are considered. Then the smallest
of the constructed numbers is chosen. In case the face is slightly inclined in the
image, the rotation invariant uniform LBP (LBPri,u ) is supposed to provide a
more accurate description of the face. As the quantity of LBPri,u is 9 in this
case, a histogram of 10 bins describes each window.
When computing the LBPs the information about the contrast in the window
is lost. Therefore, local contrast histograms (LCH) can be used as an alterna-
tive feature set or combined together with LBPs in order to complement their
characterization [7].
To compute the local contrast value of a pixel, a neighborhood is defined in
a similar way as for LBP. Then the average of the grey level values of those
neighbors that are brighter than the central pixel is subtracted from the average
of the grey level values of the darker ones. Finally, all the local contrast values
are accumulated in a histogram to obtain the LCHP,R . This notation means that
the neighborhood used has P sample points on a circle of radius R. In order to
have the same number of features as for the LBPs, when the neighborhood used
has 8 samples points and its radius is 1 the LCH has 10 bins, whereas if the
radius is 2 a 59-bin histogram is obtained.
3 Experimental Set-Up
3.1 General Methodology
The methodology designed uses the full-frontal face images from the FERET
database [11], excluding those images where the person wears glasses. The images
used have been divided in two set: training and test with 60% and 40% of the
images, respectively. It is worth noting that there are several images of the same
person, but all of them are assigned to the same set of images.
The methodology design is divided in the following steps:
1. The face is detected using the Viola and Jones algorithm [6] implemented in
the OpenCV [12] library. This algorithm is completely automatic since only
takes the image as input. The system does not correct the inclination that
the face might have.
2. The top half of the resulting image from step 1 (the area of the image where
the face was detected) is extracted and then equalized and resized to a pre-
established smaller size. The interpolation process required for the resizing
step uses a three-lobed Lanczos windowed sinc function [13] which keeps the
original image aspect ratio.
3. A set of windows of N × N pixels are defined to obtain a collection of vectors
that characterize the top half of the face.
4. Given a test image, the classification process consists of assigning to each
vector the class label (female or male) of its nearest neighbor in the training
set. The gender of a test face is obtained by one of these procedures: 1) by
majority voting of all the labels of the face’s vectors or 2) by concatenating
the vectors of all windows to build a longer vector to characterize the face,
so the faces’s class label will be the same as its vector’s.
The distance metrics used are the Euclidean metric and the Chi square
metric and all the experiments have been done using both of them in order
to compare which one performs better our task.
Experiment 1. In this case the top half face is split into a set of windows
with no overlapping between them. This means that the pixels that belong to a
window are never considered in another one. From each of the non-overlapping
windows a feature vector is extracted. Then these vectors are concatenated to
make a longer one. Hence, the vector of a certain window will be always com-
pared with the vectors obtained from the windows that have the same position.
Dealing with Inaccurate Face Detection for Automatic Gender Recognition 753
3.3 Development
A complete set of experiments (see Table 1) have been carried out to test the face
descriptions described in Sect. 2 and several combinations of them. Specifically,
the face descriptions implemented are the following:
All the face descriptions based on LBPs, produced two experiments: one with the
sensitive to rotation version and the other one with the rotationally invariant
version. In case of sensitive to rotation descriptions the vectors produced are
composed of 10 features, while on the other case the vectors have 59 elements.
Ranking labels description produces 49 features vectors.
In all the experiments, the amount of images used was 2147. The top half
face images were reduced to a 45 × 18 pixels image. The size of the window that
scans the images is 7 × 7 in all cases.
The correct classification rates obtained for each experiment carried out are
shown in Table 1.
With regard to the distance metrics used, the Chi square succeeded in rec-
ognizing the genders with better rates than the Euclidean metric in 73% of the
cases.
Concerning the radius of the neighborhood used for the histogram based fea-
tures, radius 2 performs the recognition task better than radius 1 in 81% of
the cases. Nevertheless, the combination of the same face description using both
radii achieves higher rates, but using twice as many features.
As can be easily seen, the sensitive to rotation descriptions achieved better
results than the rotationally invariant ones when only the LBPs are used. How-
ever, the use of 59-bin histograms to describe the LCH provided worse results
in experiments 1 and 2. This could be explained by the higher dispersion of the
data which leads to a poorer characterization which also causes lower recognition
rates in most of the cases that combined LBP and LCH.
The results of experiments 1 and 2 show that the LCH is really useful to
discriminate between genders since recognition rates reached by the LCH are
very similar to those achieve using the LBP. LCH performs better when using
rotationally invariant descriptions, whereas the rates obtained using LBP are
slightly higher when the rotation dependent features were considered. As ex-
pected, when the LBP and the LCH with the radii 1 and 2 are used together
to describe the faces, the recognition rate goes up until 82.69% (experiment 1)
Dealing with Inaccurate Face Detection for Automatic Gender Recognition 755
LBPu
8,1
χ2 70.88 76.61 74.27 78.48 61.66 71.75 61.08 61.08
Euclidean 68.30 76.02 73.33 76.37 61.08 70.57 61.08 61.08
LBPu
8,2
χ2 68.42 79.06 81.17 78.95 61.43 75.26 61.08 61.08
Euclidean 68.42 76.73 77.89 75.56 62.02 72.92 62.14 62.14
LBPu
8,1 + LBP8,2
u
and 82.81% (experiment 2) which are the best rates of these experiment. How-
ever, the ranking label description achieved the best results when individual
features were considered (not combinations of several features). To summarize,
experiments 1 and 2 have proved that all the face descriptions are quite good to
discriminate between genders. Not very important differences were obtained in
the classification rates. In general, the more number of features used to describe
the faces, the best classification rates obtained.
For experiments 3 and 4, the ranking labels description was the most suitable
since it reached the best recognition rates which were close to 90%. That is, the
correct classification rates were even better than for experiments 1 and 2. In our
opinion, this is due to the fact that experiments 1 and 2 considered that the faces
have always been perfectly located in the images. The error tolerance introduced
in the classification experiments 3 and 4 helped to improve the rates obtained
as they avoided the influence of the localization errors. However, this significant
improvement only happens for the ranking labels features. Features based on
individual histograms performed in these cases worse than for experiments 1
and 2. This is probably because the ranking label features keep the positional
756 Y. Andreu, P. Garcı́a-Sevilla, and R.A. Mollineda
information of each pixel inside the corresponding window. Therefore, they keep
their discriminative power even when the features of a certain window are com-
pared against the features of another window which is located at a different spa-
tial position. However, histogram based features required this correspondence
between windows in the test and training images in order to keep their per-
formance. Combining all histogram-based features, the classification rates also
improved slightly, but using a very high number of features per window.
5 Conclusions
This paper has addressed the automatic gender classification problem in situa-
tions where the face was partially occluded and inaccurately detected.
The experiments have shown that LBPs and LCHs performed correctly when
the positional information is kept by the classification method. However, these
face descriptions are less reliable in situations with non-accurate face detections,
since there is an important spatial information loss.
The best characterization method in an inaccurate environment was the rank-
ing labels description which reached to almost a 90% of recognition rate due to
the fact that these features were designed to keep the information about the
position of the pixels in the different windows considered over the image.
Summing up, ranking labels are the most reliable characterization method as
it performs in a similar way in all experiments carried out. Although, LBPs and
LCHs performed correctly the gender recognition task, they were more depen-
dent on the accuracy of the face localization process.
References
1. Rajagopalan, A.N., Rao, K.S., Kumar, Y.A.: Face recognition using multiple facial
features. Pattern Recogn. Lett. 28(3), 335–341 (2007)
2. Ahonen, T., Hadid, A., Pietikainen, M.: Face description with local binary pat-
terns: Application to face recognition. IEEE Transactions on Pattern Analysis and
Machine Intelligence 28(12), 2037–2041 (2006)
3. Brubaker, S.C., Wu, J., Sun, J., Mullin, M.D., Rehg, J.M.: On the design of cas-
cades of boosted ensembles for face detection. Int. J. Comput. Vision 77(1-3), 65–86
(2008)
4. Ai, H., Li, Y., Lao, S.: High-performance rotation invariant multiview face de-
tection. IEEE Transactions on Pattern Analysis and Machine Intelligence 29(4),
671–686 (2007)
5. Garcia, C., Delakis, M.: Convolutional face finder: a neural architecture for fast
and robust face detection. IEEE Transactions on Pattern Analysis and Machine
Intelligence 26(11), 1408–1423 (2004)
6. Viola, P., Jones, M.: Robust real-time face detection. International Journal of Com-
puter Vision 57, 137–154 (2004)
7. Ahonen, T., Pietikainen, M., Harwood, D.: A comparative study of texture mea-
sures with classification based on featured distributions. Pattern Recognition 29(1),
51–59 (1996)
Dealing with Inaccurate Face Detection for Automatic Gender Recognition 757
8. Andreu, Y., Mollineda, R.: Gender recognition from a partial view of the face using
local feature vectors. In: Proc. of The Iberian Conf. on Pattern Recognition and
Image Analysis (IbPRIA 2009). LNCS, pp. 481–488. Springer, Heidelberg (2009)
9. Topi, M., Timo, O., Matti, P., Maricor, S.: Robust texture classification by subsets
of local binary patterns, vol. 3, pp. 935–938 (2000)
10. Ojala, T., Pietikäinen, M., Mäenpää, T.: Multiresolution gray-scale and rotation
invariant texture classification with local binary patterns. IEEE Trans. Pattern
Anal. Mach. Intell. 24(7), 971–987 (2002)
11. Phillips, H., Moon, P., Rizvi, S.: The FERET evaluation methodology for face
recognition algorithms. IEEE Trans. on PAMI 22(10) (2000)
12. Bradski, G.R., Kaehler, A.: Learning OpenCV. O’Reilly, Sebastopol (2008)
13. Turkowski, K.: Filters for common resampling tasks, pp. 147–165 (1990)