Journal of Physics:
Conference Series
PAPER • OPEN ACCESS You may also like
Face-based Gender recognition Analysis for
- How does gendered vulnerability shape
the adoption and impact of sustainable
livelihood interventions in an era of global
Nigerians Using CNN climate change?
Maia Call and Samuel Sellers
- Curbing the crises, gauging the gap:
To cite this article: C.O. Lawal et al 2019 J. Phys.: Conf. Ser. 1378 032014 measuring the nexus between gender and
the environment
Sara Duerto-Valero, Sneha Kaul, Lauren
Billi et al.
- The political economy of gender
View the article online for updates and enhancements. mainstreaming in energy access in
Senegal
Thomas W Klug, Rajah Saparapa, Victoria
Plutshack et al.
This content was downloaded from IP address 102.89.68.228 on 11/08/2025 at 05:47
International Conference on Engineering for Sustainable World IOP Publishing
Journal of Physics: Conference Series 1378 (2019) 032014 doi:10.1088/1742-6596/1378/3/032014
Face-based Gender recognition Analysis for Nigerians Using
CNN
C.O. Lawal 1, A. A. Akinrinmade 1, J. A. Badejo 1
1
Department of Electrical and Information Engineering, Covenant University, Ota, Ogun State, Nigeria
Corresponding Author;
[email protected] Abstract-
Estimating human gender from faces in images is an important area of research as many
applications rely on it. Facial recognition is a branch of biometrics that uses the face
which is a physical trait to uniquely identify individuals. Gender recognition using face
analysis is also an important task in computer vision as it helps in visual surveillance,
intelligent user interfaces, demographic studies etc. The fundamental of gender
recognition and other similar classification problem is broken into four stages i.e. the
image to be examined to the pre – processing of the image, feature extraction and lastly
classification. Several approaches including the deep learning approach which is a
representation of the learning procedure that discover multiple levels of representations
using neural network has been explored for gender recognition. This work is essential
in creating a face-based recognition for gender analysis for Nigerians. The face
database consists of over 6000 images of Nigerians with different variations. The
created database was used to analyze gender by pre-processing the images, extracting
necessary features and classification using the Convolutional Neural Network (CNN).
An overall recognition accuracy of 98.72% was achieved demonstrating the feasibility
and research potential in such direction.
Key words: ANN, CNN, Gender Recognition, Nigerians, MLP
1. Introduction
Gender classification serves as a groundwork for several applications. Analyzing genders
automatically from database helps in various applications such as; biometrics, visual
surveillance, electronic customer, human-computer interaction, commercial applications
etc. [1], [2]. Automatic gender classification also has it relevance in aiding the growth of
online social networking websites and social media [3]. Gender recognition can also be used
in the evaluation of students’ academic performance [4]. Humans can easily recognize
genders from faces but a computer or machine needs to train on database to be able to predict
gender accurately. Gender classification serves as a major challenge in speech processing.
It is required to identify the speaker’s gender in order to obtain robust features that will help
to design the in-depth of the required classifier [5]. Most places nowadays requires
authentication and face recognition is a major verification method. Authentication mainly
depends on the recognition accuracy. It was discovered that females have a lower
recognition rate compared to that of males [6]. Distinguishing human’s gender based on
faces is a difficult task. One of the state-of-art systems that has been used for features
extraction and classification is Convolutional neural Network and has been shown to give
good performance with difficult feature space [7]. The robustness of CNN over traditional
methods was also demonstrated in the work of [8]. Convolutional Neural Network (CNN)
Content from this work may be used under the terms of the Creative Commons Attribution 3.0 licence. Any further distribution
of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.
Published under licence by IOP Publishing Ltd 1
International Conference on Engineering for Sustainable World IOP Publishing
Journal of Physics: Conference Series 1378 (2019) 032014 doi:10.1088/1742-6596/1378/3/032014
has helped to improve the recognition accuracy of unconstrained images in a dataset used
for gender classification [9]. In demographic estimations, CNN has also been employed and
has been found suitable. In order to train CNN for gender recognition, four factors are
important. These are: (i) the training strategy, (ii) the target gender, (iii) pre-training of the
network, (iv) the CNN depth. To use CNN in multitask training mode, it needs to be built
from scratch [10]. Another area where CNN has been used to optimize segmentation is in
the use of Iris localization because it performs better that other traditional methods [11].
Apart from face images, other biometric traits has also been used for gender classification,
these includes handwriting and voice. The ability to perform gender classification based on
handwriting is useful in the development of intelligent systems which can be used by
forensic experts, neurologists and psychologists by exploiting texture as the discriminative
features between females and males [12]. Most gender analysis work were trained with
general database like the labeled faces in the wild (LFW), GoogleNet, VGGNet and so on.
Most of the images in the database mentioned, were taken in a controlled environment which
could stand as a factor for good accuracy(s) gotten when used to train. Getting primary data
in a controlled and uncontrolled environment, helps the machine or computer to analyze
genders from faces more effectively. The database used in this paper consists of only
Nigerians faces cutting across the various tribes we have in Nigeria. Training a computer
with world faces can be inadequate when needed to analyze genders for only Nigerians as
the physical trait differs from faces to faces and from tribe to tribe. The database used
exhibits “natural” variability in pose, lighting, focus, resolution, facial expression, age,
gender, race, accessories, make-up, occlusions, background, and photographic quality
which helps in training and learning of the algorithm used for the classification process.
Images in the database are expressed in a simple and consistent pattern to make it easy for
the CNN network to analyze.
Convolutional Neural Network (CNN or ConvNet) is a learning-based feature extraction
and classification method. It is a deep feed-forward Artificial Neural Network (ANN) since
it does not give room for feedbacks to previous layers in the system, it runs information in
the direction from input towards output just like the multilayer perception (MLP) although
CNN performs better due to its ability to reduce the nearest minimum classification error.
CNN is a state-of-the-art feature extraction and classification tool especially suited for
databases with large sample sizes and has proven over the years to be a good solution to
image/faces identification and classification problems. Inconsistencies between male and
female faces can be of help in biometrics [3].
2. Related Works
The authors in [13], used a combination of local features and contextual features (the foggy
face) that was extracted from images for gender classification. The experiment was done
using 4 CNN to extract the required features and Ada-boost based for the classification.
They experimented with five (5) widely used datasets i.e. LFW, FERET, Adience
benchmark and image of Groups dataset for training while Specs on Faces (SoF) was used
to evaluate the network. Their work was to check the improvement in generalized and
unrestricted datasets, they also argued that basic facial features are sufficient for gender
classification. Facial features like the two eyes, nose and mouth was used this was inspired
2
International Conference on Engineering for Sustainable World IOP Publishing
Journal of Physics: Conference Series 1378 (2019) 032014 doi:10.1088/1742-6596/1378/3/032014
by the behavior of humans in gender recognition. Their approach produced a great validation
accuracy.
Authors in [14], proposed a dictionary learning approach for gender classification. They
used three different dictionaries, a male dictionary, female dictionary and features
dictionary. The three dictionaries were learnt using two dictionary learning method i.e. a
Dictionary learning gender classification (DL-GC) and a Separate Dictionary Learning
gender classification (SDL-GC). They also used three (3) publicly available datasets, the
FERET, LFW and the Groups Dataset. An automatic features extraction was used to extract
necessary features (only 2 features were used) and the Sparce Representation Classification
was used as the classifier. They obtained an improvement on previous accuracies on gender
classification.
Another gender classification work was done using a Deep Convolutional Neural Network
(D-CNN) [3].(Amit Dhomme 2018), D-CNN was used on VGGNet architecture in attempt
to obtain a better accuracy for gender recognition as against accuracies gotten from
previously used method. The D-CNN has the ability to automatically extract features from
images other than methods that requires a separate feature descriptor. D-CNN was used for
both the features extraction and the classification of gender. D-CNN also has its distinct
from other methods because of its ability to assists the network layers in learning parameters
and reducing weight loss. Less parameters are also required when using D-CNN. The
accuracy gotten was an improvement on previous works.
Authors in [15], presented an effective technique to predict gender from offline handwriting
samples. The method uses textual features for prediction. They applied a generic and script
independent approach to English and Arabic handwritings. The proposed technique required
the use of multiple features descriptors like the Local Binary Pattern (LBP), Histogram of
Oriented Gradients (HOG), Statistics Computed from gray-level Co-occurrence Matrics
(GLCM) and the Segmentation-based fractal texture analysis (SFTA). Artificial Neural
Network (ANN), Support Vector Machine (SVM), Nearest Neighbor Classifier (NN),
Decision trees (DT) and random Forests (RF) were used as classifiers. The multiple
classifiers were combined using bagging, voting and stacking methods in order to optimize
the system performance. They used the QUWI dataset.
Authors in [16], studied the effect of word representation in gender classification using deep
learning. They used a dataset that has 18000 names from India, Japan and Sri Lanka for
gender classification. They also proposed a new technique for word embedding called the
Enhanced Integer representation to combine with the existing techniques like the One-Hot
representation and Integer Representation. They combined CNN together with word
embedding techniques and also combined LSTM with word embedding. LSTM
combination gave a better performance. The system performance was evaluated based on
the accuracy, training time and the input layer size.
From the literatures reviewed, it was discovered that gender classification was done using
publicly available dataset and general classification which may be limited in some areas.
Also different methods were used for features extraction and classification but in this paper,
CNN was used for both features extraction and Classification. Moreover the CNN used is a
standard CNN i.e. not a Deep CNN.
3
International Conference on Engineering for Sustainable World IOP Publishing
Journal of Physics: Conference Series 1378 (2019) 032014 doi:10.1088/1742-6596/1378/3/032014
3. Methodology
The dataset consists of over 6000 images of both male and female with different variations,
3063 face images of male and 3063 for females. The database was split into training data
and test data. There were two (2) classifications for the images labeled as M_faces for male
and F_faces for female.
3.1 Image Pre-processing
This entailed resizing all the images into a standard dimension to create uniformity. The
dimension used was 50 x 50. The images were subsequently converted to grayscale for
image enhancement in order to optimize the performance of the network, to reduce
processing time and make analysis easier as opposed to using multiple channel images.
3.2 The CNN Architecture
After thorough evaluation of the layers available in a CNN architecture, the architecture in
Figure 1 was designed and adopted. This architecture yielded a good accuracy.
FCL
CL,BNL, RL, PL CL,BNL,RL,PL CL,BNL,RL
Input
images
OUTPUT
FEATURE EXTRACTION CLASSIFICATION
Figure 1: The CNN architecture used
CL – Convolutional layer
BNL – batchnormalization layer
RL – relu layer
PL – pooling layer
4
International Conference on Engineering for Sustainable World IOP Publishing
Journal of Physics: Conference Series 1378 (2019) 032014 doi:10.1088/1742-6596/1378/3/032014
FCL – fully connected layer
4. Result and discussions
The CNN architecture was trained with 2900 random images from the male faces and 2900
random images of the female faces. Different learning parameters were used to obtain a
good validation accuracy. Fig. 2 shows the accuracy obtained from the network.
Figure 2. Validation accuracy of 98.72%
5. Conclusion
Although gender analysis through facial recognition is not a new thing, in this paper, we
have worked with only Nigerian faces using the state of the art algorithm i.e. CNN. The
CNN architecture adopted consists of only 3 Convolutional layer hence not a deep CNN.
No past work, to the best of our knowledge, used a CNN architecture for both extraction
and classification with only Nigerian faces for gender classification. MATLAB software
was used to implement the code.
6. Recommendation
The database used can be expanded to cover more than half of the population of Nigeria in
order to get a more robust system.
5
International Conference on Engineering for Sustainable World IOP Publishing
Journal of Physics: Conference Series 1378 (2019) 032014 doi:10.1088/1742-6596/1378/3/032014
Acknowledgements
The authors wish to acknowledge the financial support offered by Covenant University in
actualization of this research work for publication.
Reference
[1] Duan, M., et al. (2018). "A hybrid deep learning CNN–ELM for age and gender
classification." Neurocomputing 275: 448-461.
[2] Mingxing Duan, K. L., Canqun Yang, Keqin Li (2018). "A hybrid deep learnin CNN–
ELM for age and gender classification." Elsevier 275: 448-461.
[3] Amit Dhomne, R. K., Vijay Bhan (2018). "Gender Recognition Through Face Using
Deep Learning." International Conference on Computational Intelligence and Data Science
(ICCIDS 2018) 132: 2-10.
[4] Temitope M. John, J. A. B., Segun I. Popoola, David O. Omole, Jonathan A. Odukoya,
Priscilla O. Ajayi, Mary Aboyade, Aderemi A. Atayero (2018). "The role of gender on
academic performance in STEM-related disciplines: Data from a tertiary institution." Data in
Brief 18: 360-374.
[5] Zakariya Qawaqneh, A. A. M., Buket D. Barkana (2017). "Deep neural network
framework and transformed MFCCs for speaker’s age and gender classification." Knowledge-
Based Systems 115: 5-14.
[6] Shifeng wu, D. w. (2019). "Effect of subject’s age and gender on face recognition
results." J. Vis. Commun. Image R(60): 116-122.
[7] Zakariyah Qawaqneh, A. A. M., Buket D. Barkana (2017). "Age and gender
classification from speech and face images by jointly fine-tuned deep neural networks."
Expert Systems With Applications(85): 76-86.
[8] Joke A. Badejo, E. A., Adekunle Akinrinmade, Matthew B. Akande (2018). Medical
Image Classification with Hand-Designed or Machine-Designed Texture Descriptors: A
Performance Evaluation. International Conference on Bioinformatics and Biomedical
Engineering.
[9] Grigory Antipov, S.-A. B., Jean-Luc Dugelay (2016). "Minimalistic CNN-based
ensemble model for gender predictionfrom face images." Pattern Recognition Letters(70): 59-
65.
[10] Grigory Antipov, S.-A. B., Jean -Luc Dugelay, Moez Baccouchi (2017). "Effective
training of convolutional neural networks for face-based gender and age prediction." Pattern
Recognition(72): 15-26.
[11] Heinz Hofbauer, E. J., Andreas Uhl (2019). "Exploiting superior CNN-based iris
segmentation for better recognition accuracy." Pattern Recognition Letters(120): 17-23.
[12] Abdeljalil Gattal, C. D., Imran Siddiqi, Youcef Chibani (2018). "Gender classification
from offline multi-script handwriting images using oriented Basic Image Features(oBIFs)."
Expert Systems With Applications(99): 155-167
[13] Mahmoud Afifi, A. A. (2019). "Deep gender classification based on AdaBoost-based
fusion of isolated facial features and foggy faces." Journal of Visual Communication and
Image representation 62: 77-86.
[14] Hossein Moeini, S. M. (2017). "Gender dictionary learning for gender classification."
Journal of Visual Communication and Image Representation 42: 1-13.
6
International Conference on Engineering for Sustainable World IOP Publishing
Journal of Physics: Conference Series 1378 (2019) 032014 doi:10.1088/1742-6596/1378/3/032014
[15] Mahreen Ahmed, A. G. R., Hammed Afzal, Imran Siddifi (2017). "Improving
handwriting based gender classification using ensemble classifiers." Expert Systems with
Applications 85: 158-168.
[16] Ritesh, C., Bhagvati (2018). Word Representations For Gender Classification Using
Deep. International Conference on Computational Intelligence and Data Science (ICCIDS
2018), India.