Human Gender and Age Detection Based On Attributes of Face
Human Gender and Age Detection Based On Attributes of Face
Human Gender and Age Detection Based On Attributes of Face
net/publication/360808188
CITATIONS READS
0 194
2 authors, including:
Shaimaa Hameed
University of Technology, Iraq
72 PUBLICATIONS 63 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Shaimaa Hameed on 24 May 2022.
Abstract—The main target of the work in this paper is to detect the gender
and oldness of a person with an accurate decision and efficient time based on the
number of facial outward attributes extracted using Linear-Discriminate Analysis
to classify a person within a certain category according to his(her) gender and
age. This work was deal with color facial images via the Iterative Dichotomiser3
algorithm as a classifier to detect the oldness of a person after gender detected.
This paper used the Face-Gesture-Recognition-Research-Network aging dataset.
All facial images in the dataset were categorizing into binary categories using
k-means. This is followed by the process of dividing all samples according to age
classes that belonging to each specific sex category. Thus, this division process
enabled us to reach a quick and accurate decision. The results showed that the
accuracy of the proposal was 90.93%, and F-measure was 89.4.
1 Introduction
Gender and age are human’s identification that plays the main role in social com-
munication [1]. A detection system is combined of two phases: gender detection and
age detection which is a structure of three parts: face detection, gender estimate, and
age guesstimate. Face detection is used to localize the faces in an image, there is quite
challenging due to several reasons like environment, lighting, movement, orientation,
and facial expressions, these factors lead to variations in color, shadows, luminance,
and contours of images [2, 3]. In the real world, some males/females may lookthe
same gender and this an error, some of the people may look youthful or more adult
than the real age that leads to the differences between apparent age and real age [4–6].
The various attributes can be identified from the color-image of a human face such as
hair on the upper lip, male/female, hair on the chin, age, scars, hair, height, skin color,
weight, glasses, tattoo marks, facial attributes, etc [7–10]. Required information can be
extracted from these attributes and compared with the patterns stored in the database
to determine an identity [11, 12]. There are some difficulties in computer-based facial
gender and age estimation [13].
176 http://www.i-jim.org
Paper—Human Gender and Age Detection Based on Attributes of Face
To distinguish the face from the image there are keypoints in human faces must
be detected and extracted [14, 15], these key points are called landmarks which
included the eye, nose, and mouth, as shown in Figure 1 [16]. Texture descriptors.
MuhammadSajid, et al. [17], in 2019, proved the importance of exact similarity aging
inefficient age estimation. The findings of that work depended on two large datasets.
Fatma S. Abousaleh, et al. [18], in 2016, proposed a proportional deep learning frame-
work, named CCRCNN, the proposal first compares the input image of a face with
known face ages that considered as a reference to produce a set of hints the input face
is either younger or older than a reference. later, the estimation stage combines the
hints to approximate the person’s age. SudipMandal, et al. [19], in 2017, proposed an
automatic age estimation system from facial images using wrinkle feature and Neural
Network the system was implemented using MATLAB. Only three groups of age were
taken into consideration child, young and old. Prajakta A. Mélange and G. S. Sable [8],
in 2018, introduced a method to predicate sex and how older persons depend on some
facial characteristics. Such that used Preprocessing phase then selected some geometric
features for classification. Depended on the face angle, left the eye to right eye distance,
and some other distance from eye to nose in addition eye to chin distance, with eye to
lip distance. Bosea, S. Bandyopadhyay [20] in 2021 introduced a method of features
extraction based on the size of the Face to the size of the Eye of a Face to identify the
human. The main objective of this work is to find an automatic method to rapidly guess-
timate human gender and oldness of the human using some information and attributes
of the color face image accurately based on Iterative Dichotomiser3(ID3) algorithms.
In addition to the introduction section, the paper structure is dealing with six other
sections. Section two describes the features extracted from images while section three
tells the details about the dataset that use. Section four with all subsections explain the
required steps of the proposed method design, then discusses the results illustrated in
section five. Section six expresses the conclusions and some ideas of future work.
Classification of people depends on person faces images that contain signs and char-
acteristics to classify those persons, so a face aging prediction is used in many appli-
cations in digital entertainment. Features of facial image detection consist of the facial
features region of nose detection, Eyebrows, Lip detection, mustache, beard, Left/Right
eye position, and skin wrinkle analysis i.e. eyebrows also help in gender recognition.
Female eyebrows are longer, thinner, and curly at the ends. On the other hand, male
eyebrows are mismanaged and thicker. Also, the male face has a more protuberant nose,
brow, chin/jaw than the female face. Gender and age detection are estimated according
to the number of these facial geometric features called the attributes [20–22].
3 FG-NET dataset
The FG-NET aging database is a publicly accessible aging database that has been
broadly utilized for evaluation. The database is consisting of 1,002 color images of
82 different subjects. For males, there are 607 color images and 395 colorimages of
females. Most subjects gossip from 10 to 13 images of themselves [23–26], Figure 2
shows some images of the FG-NET database. Split these images into a training setcon-
taining 720 images divided into 14 classes as shown in Table 1. Results demonstrate
that some classes have the same number of features after extracting the features from
these 14 classes. Then combined it into Multiclasses upon the Sum-attributes of fea-
tures it contains as shown in Table 2 (explains in 4.1).
178 http://www.i-jim.org
Paper—Human Gender and Age Detection Based on Attributes of Face
The proposed method applies decision tree mechanisms to intelligent gender and
age estimation from facial images using the ID3 classifier on the FG-NET dataset after
extracting the features by the LDA algorithm. The contents of the FG-NET dataset are
categorized into two categories by k-means classifier, one for 607 male images and the
other one is for 395 female images as a process to gender detection using the attributes
extracted of each face-image in this dataset.The proposed method is shown in Figure 3.
The first phase of the proposed system is preprocessing phase. This phase includes
six steps which are image capturing, converting image into grayscale, removing noise
from it using median filtering, detecting the face from the color image using a viola-joins
algorithm which consists of 4 levels that are Haar-like features, integral image, Adaboost
training, and cascade classifier as shown in Figure 3, normalization that can be done
using contrast stretching and finally clipping it to delete undesirable outside parts of a
color image such as white space in the background image around the face. In the pro-
posal, the dataset was categorized into six categories as shown in Table 2, These catego-
ries were depended after manyexperiments, where it was found that thesechoices of age
range mentioned for females or males within each category have the same number of
attributes and does not constitute a distinction, so they were considered within the same
category. To estimate the human-gender and human-age, there are two phases training
set was 80% of dataset and the other 20% of it was the testing set.
The second phase of this work is the data mining phase that includes the features
extraction process and classification process.
Dimension reduction as features extraction process. Feature extraction is
decreasing the dimension through excluded the most significant information from the
entire data [27]. Using Fisher’s face depends on the mechanism of Linear Discriminates
Analysis LDA [28]. This is an important step that is used to decrease the dimension
of the image in the dataset with good separable classes to avoid the problem of over-
fitting and to decrease the complexity of total cost-value. So the steps of LDA are as
the following:
1st step: The image in 2D n×m was converted into a column vector that represents
n×1.
2nd step: To calculate d-dimension mean vectors for classes from the dataset use
eq (1):
1
n
Ii Xi (1)
ni i 1
3rd step: Using scatter matrix to calculate the scatter matrix which comprises of
three classes such that eq (2) to calculate within-class scatter matrix, eq (3) to calculate
class-covariance matrices, and eq (4) to calculate between-class:
∑ ∑
c Nj
Sw = ( I i j − Iˆ j ) (2)
j =1 i =1
Where I i j is the ith sample of class j, Iˆ j is the mean-value of class j, c is the real
number of classes and Nj is the number-value of samples in class j.
1
∑
n
∑j= ( X i − Ij )( X i − Iˆ j )T (3)
N i =1
(4)
∑
c
Sb = Ij − Iˆ Ij − IˆT
j =1
Where Iˆ represent the mean of all classes and Ij is the mean-value of class j.
180 http://www.i-jim.org
Paper—Human Gender and Age Detection Based on Attributes of Face
4th step: Calculate the eigenvectors and eigenvalues for the scatter matrices using
eq (5)
AV = λV (5)
EntropyS P log
i 1
i 2
Pi (7)
Where A is an attribute that is a set of all possible values v and Sv is the subset
of S. To implement the decision tree algorithm, the entropy of each target was cal-
culated and the dataset was divided into distinct attributes the entropy-value of each
division-tree was computed then accumulated together to get the overall total number
of entropies. The Gain-value of information is computed from the differences between
of entropy-value as a result and the entropy-value before the divide. The gain of the
largest information called attribute was chosen as a decision node and the dataset was
split up by its branches, this procedure was repeated on every branch. A leaf node was
generated when the value of entropy is zero while it was a non-leaf node when it holds
a value greater than zero and split furthermore. All non-leaf branches are considered
by ID3-algorithm which executes recursively pending all data is classified. To detect
human gender age, the image is classified into one of six classes, as shown in Table 2.
The number of selected features from the image was checked with the feature number
of class one, if it is matched then match tested image features with the rules of class
one, the same procedure was done for all six classes, if true match the gender and age
are estimated. Figure 4 summarizes this procedure, where Ti represents the test image
and nf represents the number of features.
The proposed system has three-phase which were face image detection, data mining
model, and Gender and age detection model. Implement the normalization step using
contrast streaking on images after face detection steps on these preprocessing input
images. The next step is feature extraction of the face’s image using the LDA algo-
rithm. The final step is the classification based on ID3 deals with the attributes of the
face’s image that is found from the previous step. It is worth mentioning that 120 of
the additional images of human faces that the classifier trained on were added to the
test dataset, to get a test dataset containing both known and unknown images of faces.
Table 3 describes the correctly and incorrectly percentage of six class categories and
the total correct rate of gender detection. First-class has 7 attributes with correctly clas-
sified of 195 images while incorrectly classified of 20 images. Class no. three describes
with 5 attributes with correctly classified of 377 images while incorrectly classified of
32 images. So class five has 9 attributes with correctly classified of 68 images while
incorrectly classified of 28. See class two has 8 attributes with correctly classified of
182 http://www.i-jim.org
Paper—Human Gender and Age Detection Based on Attributes of Face
192 images while incorrectly classified of 23 images. Class four has 6 attributes with
correctly classified 371 images while incorrectly classified of 38 images. The last one
is class no. six which has 11 attributes with correctly classified 66 images while incor-
rectly classified of 30. So, the total correctly classified percentage is 85.9, 85.6 for
males and females respectively while the total missed classified percentage is 14.28,
14.29 for males and females respectively. Table 4 reviews the accuracy of performance
evaluation measures of the ID3 classification step on the items which are used as train-
ing set where the total number of these items is 720. The criterion Mean-Absolute-Error
M.A.E. and Root-Mean-Square-Error R.M.S.E. are measures of error rate in prediction
[29, 30]. Nevertheless, R.M.S.E. is more robust since it is less sensitive to extreme val-
ues than mean-absolute-error [31], A small value for these criteria means that the esti-
mated model is close to the real value, thus 0.7628 of M.A.E. and 14.2814 of R.M.S.E.
are mean the error rate is very low. In Table 5, based on LDA and ID3 human age of
class1 and class2 of 450 sample size has a total correct rate equal to 93.3%, while the
210 males and 330 females of class3 and 4 has a total correct rate equal to 93.5% and
the human age of class5 and class6 of 100 sample size has total correct rate equal to
86%. That means the total correct rate for all 1090 sample sizes is 90.93%. Figure 5
states the diagram of the age detection-based samples of the Table 6. When comparing
the results of the proposed method to classify the human gender as male and female
with other existing methods like PNN and SVM1.The results of the gender test on 20%
of items are used for testing of data set that is used, so the proposed method introduces
an acceptable rate of correctly classified corresponding to the PNN and SVM1 [32]
methods as shown in Table 6. So the proposal achieve is too close to the other existing
methods. Table 7, the number of all instances was 1090 images. For the male gender,
the highest precision is for class2 because FP is the biggest one according to the number
of attributes of this class, and the class sample size is bigger than others. class1 has the
highest recall because FN is big although class3 has the same FN as class1 the number
of attributes is bigger than one of class1 also a sample size of class3 is less than the
sample size of class1. Also, notice that the highest F-measure is for class2 because it
provides a single score that balances both the concerns of precision and recall in one
number. For the female gender, the highest precision is class4 because of the balance
of attributes number and FP is the large enough relative to sample size while the class5
has the highest recall although class6 has FN that bigger than it but attributes the num-
ber of this class is bigger than class5. So the highest F-measure is for class4 because
of balancing between the number of facial attributes and sample size. Figure 6 shows
the accuracy of the proposed detection method depending on the number of attributes.
Table 8 displays the results of the LDA and ID3 classifier of accuracy. The six classes
have calculated the precision, recall, and F-measure. The average of accuracy in the
three classes of male gender gave precision of 83.066, recall 93.8.569, and f-measure
88.49. While the average accuracy in the three classes of female gender gave precision
of 87.8, recall 93.33.569, and F-measure 90.4. The obtained results of the proposal
were compared with another classifier.
184 http://www.i-jim.org
Paper—Human Gender and Age Detection Based on Attributes of Face
1
n
MAE = yi
yi where n = 1442 0.0198
n i 1
1
n
RMSE = ( yi
yi ) 2 where n = 1442 0.7525
n i 1
Table 5. The total correct rate of human age using LDA and ID3
Sample Correctly Correct Total Correct
Age Gender
Size Detect Rate Rate
Male 200 186 93.00%
(3–7) (26–30) 93.30%
Female 250 234 93.60%
Male 210 189 90.00%
(8–13) (14–19)(20–25) 93.50%
Female 330 322 97.00%
Male 59 52 82.00%
(31–40)(41–50) 86.00%
Female 41 37 90.00%
Total M+F 1090 1020 90.93% 90.93%
350
300
250
100
50
0
1 2 3 4 5 6
Table 6. Result of gender test on 20% of items are used for testing of Dataset
PNN SVM1 Proposed Method
Gender Type
Male Female Male Female Male Female
Male 89.75 10.25 95.08 4.29 89.73 10.7
Female 11.88 88.12 4.41 95.59 12.77 87.23
Correctly classified % 88.935 95.335 88.48
186 http://www.i-jim.org
Paper—Human Gender and Age Detection Based on Attributes of Face
12
10
Attribute
6
0
1 2 3 4 5 6
CLASS #
6 Acknowledgments
The authors would like to thank the University of Technology – Iraq www.uotech-
nology.edu.iq and Mustansiriyah University – Iraq www.uomustansiriyah.edu.iq for
the present work.
7 References
[1] P. Rodríguez, G. Cucurull, J. M. Gonfaus, F. X. Roca, and J. Gonzalez, “Age and gender rec-
ognition in the wild with deep attention,” Pattern Recognition, vol. 72, pp. 563–571, 2017.
https://doi.org/10.1016/j.patcog.2017.06.028
[2] A. Kumar, A. Kaur, and M. Kumar, “Face detection techniques: a review,” Artificial Intelli-
gence Review, vol. 52, no. 2, pp. 927–948, 2019. https://doi.org/10.1007/s10462-018-9650-2
[3] F. Q. Abdulalla and S. H. Shaker, “A Surveyof human face detection methods,” Journal of
Al-Qadisiyah for computer science mathematics, vol. 10, no. 2, pp. Page 108–117, 2018.
https://doi.org/10.29304/jqcm.2018.10.2.392
188 http://www.i-jim.org
Paper—Human Gender and Age Detection Based on Attributes of Face
[20] S. Ghosh and S. K. Bandyopadhyay, “Gender classification and age detection based on
human facial features using multi-class SVM,” British Journal of Applied Science Technol-
ogy, vol. 10, no. 4, pp. 1–15, 2015. https://doi.org/10.9734/BJAST/2015/19284
[21] C. Huda, H. Tolle, and F. Utaminingrum, “Mobile-based driver sleepiness detection
using facial landmarks and analysis of EAR values,” International Journal of Interactive
Mobile Technologies (iJIM), vol. 14, no. 14, pp. 16–30, 2020. https://doi.org/10.3991/ijim.
v14i14.14105
[22] R. A. Azeez, M. K. Abdul-Hussein, M. S. Mahdi, and H. T. S. ALRikabi, “Design a system
for an approved video copyright over cloud based on biometric iris and random walk genera-
tor using watermark technique,” Periodicals of Engineering Natural Sciences, vol. 10, no. 1,
pp. 178–187, 2021. https://doi.org/10.21533/pen.v10i1.2577
[23] G. Ozbulak, Y. Aytar, and H. K. Ekenel, “How transferable are CNN-based features for age
and gender classification?,” in 2016 International Conference of the Biometrics Special Inter-
est Group (BIOSIG), 2016, pp. 1–6: IEEE. https://doi.org/10.1109/BIOSIG.2016.7736925
[24] G. Panis and A. Lanitis, “An overview of research activities in facial age estimation using the
fg-net aging database,” in European Conference on Computer Vision, 2014, pp. 737–750:
Springer. https://doi.org/10.1007/978-3-319-16181-5_56
[25] H. T. Salim and I. A. Aljazaery, “Encryption of color image based on dna strand and expo-
nential factor,” International journal of online and biomedical engineering(iJOE), vol. 18,
no. 3, 2022. https://doi.org/10.3991/ijoe.v18i03.28021
[26] H. TH and N. Alseelawi, “A novel method of multimodal medical image fusion based on
hybrid approach of NSCT and DTCWT,” International journal of online and biomedical
engineering, vol. 18, no. 3, 2022.
[27] F. Q. Al-Khalidi, S. H. Al-Kananee, and S. A. Hussain, “Monitoring the breathing rate in
the human thermal image based on detecting the region of interest,” Journal of Theoretical
Applied Information Technology, vol. 99, no. 8, 2021.
[28] A. Onan, H. Bulut, and S. Korukoglu, “An improved ant algorithm with LDA-based rep-
resentation for text document clustering,” Journal of Information Science, vol. 43, no. 2,
pp. 275–292, 2017. https://doi.org/10.1177/0165551516638784
[29] N. Nordin and N. M. Fauzi, “A web-based mobile attendance system with facial recognition
feature,” 2020. https://doi.org/10.3991/ijim.v14i05.13311
[30] H. Tauma, and H. Salim, “Enhanced data security of communication system using combined
encryption and steganography,” International Journal of Interactive Mobile Technologies,
vol. 15, no. 16, pp. 144–157, 2021. https://doi.org/10.3991/ijim.v15i16.24557
[31] R. Rothe, R. Timofte, and L. Van Gool, “Deep expectation of real and apparent age from a
single image without facial landmarks,” International Journal of Computer Vision, vol. 126,
no. 2, pp. 144–157, 2018. https://doi.org/10.1007/s11263-016-0940-3
[32] M. Sedaghi, “A comparative study of gender and age classification in speech signals,”
Iranian Journal of Electrical & Electronic Engineering, vol. 5, no. 1, 2009.
8 Authors
Article submitted 2022-02-14. Resubmitted 2022-03-13. Final acceptance 2022-03-14. Final version
published as submitted by the authors.
190 http://www.i-jim.org