International Journal of Advanced Robotic Systems Gender Classification by Fuzzy Inference System Regular Paper

which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Abstract Gender classification from face images has many applications and is thus an important research topic. This paper presents an approach to gender classification based on shape and texture information gathered to design a fuzzy decision making system. Beside face shape features, Zernik moments are applied as system inputs to improve the system output which is considered as the probability of being male face image. After parameters tuning of the proposed fuzzy decision making system, 85.05% classification rate on the FERET face database (including 1199 individuals from different poses and facial expressions) shows acceptable results compare to other methods.


Introduction
Accurate gender identification is justified by its many applications and plays an important role in improving the interaction between humans and machines. In addition, it can be applied in: improving search engine retrieval accuracy, demographic data collection, requiring a search of only half the subject database in a biometric recognition framework and in psychology [1].
As gender classification is considered as a complex problem, different features of face images are applied to design a fuzzy inference system (FIS) to classify facesʹ gender, in this paper. Male and female faces differ both for shape and texture, so both shape and texture cues are used to present an accurate fuzzy system. In this section, after the brief review of the previous work on gender classification the mail materials and methods are expanded. Then we outline the main contributions of this paper.

Brief Review
An issue, up until recently, has been the difficulty in objective comparison between different gender recognition approaches since much of the published work was evaluated in non-replicable datasets. Depending on the type of features used, current gender classification methods fall into two main categories [2]. The first is geometrically based gender classification which uses biometric features such as the dimensions of the face, the salient features (eyes, nose, mouth, etc.), and the distances between the salient feature points.
In [3], two competing Hyper BF networks were trained using 16 geometrical features. Burton et al. in [4] extracted 73 points from full-face photographs and 34 points from the profile views, and measured the 2D and 3D distances between points. The method achieved an accuracy approaching human performance (94% accuracy).
The second class of methods is appearance based which make use of facial image contents without extracting any geometric features. In the case of low-resolution 'thumbnail' images, the entire image is provided as features for gender classification [5]. An alternative approach is to use image subspace techniques to reduce the dimensionality of the problem. Jain and Huang [6] extracted features by applying independent component analysis to face images. Buchala etc. [7] applied principal component analysis (PCA) and explored the PCA components that gave the greatest gender discrimination using linear discriminant analysis (LDA). In [8], genetic algorithms were applied to PCA feature vectors to select the gender discriminating feature subset. Recently, Lu et al. in [9] explored the use of a pixel-pattern-based texture feature for gender classification. This method is motivated by the idea that face images can be regarded as a composition of micro-patterns. The pattern templates were obtained through PCA, and Adaboost was used to select the discriminating feature subset. Active appearance models (AAM) have also been used as a feature extraction mechanism in gender classification. In [10], the AAM was compared with ICA for gender classification using four different classifiers. In [11], Saatci and Town utilized AAM and support vector machine (SVM) for gender and expression recognition.
Learning the classifier is another important issue in gender classification. Fleming and Cottrell [12] used a two-layer neural network. The first layer was for image compression (feature extraction) and the second for classification. Colomb etc. [3] adopted a similar two-layer neural network called Sex Net. Gutta etc. [13] used a mixture of experts consisting of ensembles of radial basis functions (RBFs). Here decision trees and support vector machines are used to implement the gating network components. In [5], Moghaddam and Yang demonstrated the superiority of nonlinear SVMs over traditional linear pattern classifiers together with RBFs and large ensemble-RBF networks. An accuracy of over 96% was reported on the FERET face database. Kim et al. [14] performed gender classification using Gaussian process classifiers, which are a class of Bayesian kernel classifiers. This technique overcame the difficulty encountered by SVMs in determining the hyper parameters for the kernels. A fuzzy SVM approach [15] has also been developed recently to improve the generalization ability for gender classification.
Another popular approach to gender classification is Adaboost. This type of classifier is much faster than SVMs, and represents a better choice for real-time applications. Shakhnarovich et al. [16] applied a thresholded weak classifier variant of Adaboost to detected face images for gender classification. Wu et al. [17] used the weak classifier Adaboost approach together with a look-up-table to learn gender classifiers. Baluja et al. [18] explored using Adaboost on low resolution grayscale face images and achieved over 93% gender classification accuracy with 50 times faster performance than the SVM-based classifiers. Recently, Makinen and Raisamo [19] combined face detection and gender classification, and gave a comprehensive comparison of state-of-the-art gender classification methods. Small differences in the classification rates between the methods were reported. However a combination of neural network and Adaboost classifiers were recommended where classification speed is important. Moreover, in [19], Makinen and Raisamo also suggested to improve the classification rate by combining the outputs of different gender classifiers.

Material and Methods
Although the determination of gender from facial images has been the focus of sustained activity over the past 20 years, designing an accurate gender classifier is still challenging problem. Here different male and female face features, beside texture properties are applied to overcome this complexity. Utilizing fuzzy inference system increases the system flexibility.
Fuzzy logic provides an inference structure that enables the human reasoning capabilities to be applied to artificial knowledge-based systems. It is a means for converting linguistic strategy into control actions and thus offers a high-level computation.
Fuzzy logic provides mathematical strength to the emulation of certain perceptual and linguistic attributes associated with human cognition, whereas the science of neural networks provides a new computing tool with learning and adaptation capabilities. The theory of fuzzy logic provides an inference mechanism under cognitive uncertainty; computational neural networks offer exciting advantages such as learning, adaptation, fault tolerance, parallelism, and generalization [20].
Fuzzy sets theory is the base of materializing a fuzzy rulebased system which contains a rule base, a decision making unit, and finally a defuzzifacation interface. The function of each block is as follow [21]: Fuzzy inference systems mostly are implemented in Mamdani and Sugeno methods [20]. Such systems have been applied to many disciplines such as control systems, decision making and pattern recognition. To apply texture properties as FIS inputs, Zernike moments descriptor information is defined. Zernike moments are a class of orthogonal moments and have been shown effective in terms of image representation. Zernike moments can be easily constructed to an arbitrary order. Although higher order moments carry more fine details of an image, they are also more susceptible to noise. Therefore, we have experimented with different orders of Zernike moments to determine the optimal order for our problem.
The Zernike polynomials are a set of complex, orthogonal polynomials defined over the interior of a unit circle x 2 +y 2 =1 [22].
where n is a non-negative integer, m is an integer such that n-|m| is even and |m|≤n, 2 2 x y    , and Projecting the image function onto the basis set, the Zernike moment of order n with repetition m is: As the Zernike moments are calculated using the radial polynomials, they have inherent rotation invariant property. It has been shown in [23] that the Zernike moments on a rotated image differ from those of the original un-rotated image in phase shifts, but not in magnitudes. Therefore |An,m| can be used as a rotation invariant feature of the image function. Since An,-m= An,m, and therefore |An,-m|=|An,m|, we will use only |An,m| for features. Since |A0,0| and |A1,1| are the same for all of the normalized symbols, they will not be used in the feature set. Therefore the extracted features of the order n start from the second order moments up to the n th order moments. These moments are calculated here to obtain face image texture properties. More details are presented in next section.
The outline of the paper is as follows. The section 2 describes how FIS is implemented. In the section 3 obtained results are discussed and the paper is concluded by in the section 4.

Fuzzy Inference System Designing
Since classification of face images into male and female classes is complex and should be applicable for digital images in various lighting/ resolution/ size and environmental conditions, using fuzzy inference system is a proper offer to overcome this complexity [24]. In designing FIS three major steps should be followed: 1. The number of inputs and designing their MFs 2. The number of outputs and designing their MFs 3. Defining rules to connect inputs and outputs Four inputs are considered for FIS. To achieve accurate system, a Zernike moments descriptor information is applied to define first and second inputs. These inputs add image texture properties to our system. Two dimensional images are needed to calculate Zernike moments. The center of image is considered as a center of unit circle and image is mapping inside it. Using Equation (3) Zernike moments could be calculated. To have both low and high moments information, we use 3 th and 30 th magnitude (at θ=30°) moments as first and second inputs, respectively. As just the |Anm| is applied as a rotation invariant feature of the image function, the θ value is chosen arbitrary.
Two other inputs are defined according to male and female face feature. After investigating, comparing and face processing of various male and female sample pictures, these inputs are defined as: a) the ratio of lip area to the face area. As the face area of male is usually more than female, this value would be different for them and b) Eye distance.
The probability of being men face, is defined as an output. For both inputs and output, three different clusters are considered. The inputs are defined in the way that output shows the probability of being male face sample. 42 different male and female sample images are provided as a training data set [25]. Figure.1 illustrates these images.
Mamdani fuzzy inference system is applied to make decision. Both inputs and output clusters should be interpreted by appropriate membership functions (MFs). In this stage, after various investigations and based on experimental knowledge, 30 rules are defined and centroid method [21] is utilized to have crisp outputs. All the rules are achieved experimentally and to increase system speed unnecessary ones are eliminated. Some samples of these rules are as follows: 

If a is male and b is male and c is male and d is male then e is male  If a is male and b is rather_male and c is male and d is rather_male then e is male  If a is rather_male and b is rather_male and c is rather_male and d is male then e is rather_male  If a is rather_male and b is rather_male and c is male and d is not_male then e is rather_ male  If a is male and b is rather_male and c is male and d is not_male then e is rather_ male  If a is rather_ male and b is rather_male and c is not_male and d is not_male then e is not_male  If a is not_male and b is not_male and c is not_male and d is male then e is not_ male  If a is male and b is rather_male and c is not_male and d is not_ male then e is not_male
The samples with the output more than 70% will introduce as the male faces. Figure 2 shows inputs and output MFs. In figure 3 the overall of deciding process is depicted.

Results
To demonstrate effectiveness of the proposed approach, it is applied on FERET face image database [25]. The FERET database contains good quality gray scale images of 1199 individuals from different poses and with varying facial expressions. Table 1 shows the classification rates for the proposed method along by the reported results of following methods [26]: Support vector machine (SVM): Support Vector Machines are very popular for discrimination roles because they can accurately combine a lot of features to find an optimal separating hyper plane. SVMs minimize the classification error based on two constraints contemporary. They both search to a hyper plane with a major margin (i.e. the distance from the nearest example for separating hyper plane) and minimize the number of incorrect classified training samples, using slack variables. If a sample is utterly classifiable in feature space, then the second constraint is not necessary. Albeit, this is not the case in our issue, so SVMs both minimize the error on the training set and maximize the margin, increasing their generalization ability Local Binary Patterns (LBPs) combined with SVM: Local Binary Patterns (LBPs) are features that are calculated from pixel intensities in a pixel neighborhood. The basic idea is that as many binary values are created as there are pixels in the neighborhood of the center pixel. At the end these are concatenated to one binary value. Originally LBP was defined for 33 pixel neighborhoods but later it was extended to different neighborhoods and also some other modifications were done.
Rotation invariant uniform patterns are an extension to the original LBP. They solve the practical problem that some patterns may occur too rarely to create reliable statistics for specific analysis problem. Here LBP with SVM is combined.
Neural Network: The neural network is trained by giving it female and male face example images as input. It is trained in rounds, so that all examples are inputted to it one by one in a round. The connection weights are changed after each image. When the image is inputted the next time to the network the output is closer to the expected output. The connection weights are changed using the back-propagation algorithm. Adaboost: In the Adaboost algorithm specific features are selected. The weak classifiers that are used with the selected features form together a strong (reliable) classifier. The features and weak classifiers can be anything as long as they classify the given data examples (in this case face images) to specified classes (female/male). In the experiments we used Haar-like features, three kinds of weak classifiers (threshold, mean and LUT), face images as data and two classes (female and male).
In the threshold weak classifiers, each weak classifier has a selected threshold value. When an image is classified with the weak classifier the value calculated for the image with the classifier is compared to the threshold. The classification is decided either as male or female depending on whether the calculated value is smaller or bigger than the threshold. The optimal threshold is selected during training so that the smallest possible number of example faces is misclassified with the feature.
In this paper simple rectangular features with the threshold weak classifiers is used that are also used with the cascaded face detector.

Conclusion
This paper addresses the problem of gender classification using fuzzy system and also proposed a novel method to improve the current state-of-the-art. Beside appearance face information the image texture properties were applied by computing Zernike moments. All information was used as inputs of fuzzy inference system for making decision and classification.
The probability of being male face image is the system output. After selecting 70% probability as threshold value, 85.05% classification rate on the FERET face database is obtained which is acceptable compare to other methods.