0% found this document useful (0 votes)
11 views7 pages

Sample

The document discusses using convolutional neural networks for age and gender prediction from facial images. It describes the process of using pre-trained deep CNNs to extract features from images and estimate age and gender accurately. The methodology involves utilizing convolution layers of CNNs to produce robust outputs for age and gender detection systems.

Uploaded by

Abhinav Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views7 pages

Sample

The document discusses using convolutional neural networks for age and gender prediction from facial images. It describes the process of using pre-trained deep CNNs to extract features from images and estimate age and gender accurately. The methodology involves utilizing convolution layers of CNNs to produce robust outputs for age and gender detection systems.

Uploaded by

Abhinav Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Age and Gender Detection Using Deep

Learning

Abhinav Singh Avanish Kumar


Student of Information Technology Student of Information Technology
KIET Group of Institutions KIET Group of Institutions
Delhi-NCR Delhi-NCR
[email protected] [email protected]

Anshika Gupta Abhishek Kumar Tiwari


Student of Information Technology Student of Information Technology
KIET Group of Institutions KIET Group of Institutions
Delhi-NCR Delhi-NCR
anshigupta178.com [email protected]

Deepak Vishwakarma
Asst. Prof. Information Technology Department
KIET Group of Institutions
Delhi-NCR
[email protected]

Abstract— Facial attributes are crucial in breaking success in face recognition and im-
numerous applications such as access control age classification tasks. Leveraging pre-trained
and video surveillance, where demographic deep CNNs, this research aims to estimate
data like age and gender can be inferred age and gender accurately from facial images.
from facial images. Automatic estimation of The methodology involves utilizing convolution
age and gender enables tailored content de- layers to produce a robust and compact output,
livery and personalized services. However, ex- enhancing the efficiency of age and gender
tracting effective features from facial images detection systems.
poses a significant challenge. This paper pro-
poses employing Convolutional Neural Net- I. INTRODUCTION
works (CNNs) for automatic age and gender
Age and gender prediction have be-
prediction. CNNs have demonstrated ground-
come one of the more recognized fields
in deep learning because of the rise in
picture uploads on the internet in to-
day’s data-driven environment. Although
humans are naturally skilled at identi-
fying one another, figuring out gender,
and assessing ethnicity, age assessment
is nevertheless a challenging task. To
underscore the complexity of the issue,
consider this: The most used statistic for
assessing an individual’s age prediction is Fig. 1. Face Dataset
mean absolute error (MAE). According
to research, depending on the database
settings, people can estimate the age of Interaction), has led to an ever-growing
an individual over 15 with an MAE of interest in this area. Law enforcement,
7.2–7.4. This indicates that human fore- security management, and forensics are
casts are often wrong by 7.2–7.4 years. a few possible uses. Using these models
The question is, can we do better? Can with IoT is another useful use. A restau-
we automate this problem in a bid to rant may decide to alter its theme, for
reduce human dependency and simultane- instance, by calculating the average age
ously obtain better results? For these rea- or gender of patrons who have come in
sons, persons of comparable ages might thus far.
appear substantially different from one
another. Because of this, estimating age II. PROCEDURE
is fundamentally a difficult undertaking. A. Deep Learning
This issue is further exacerbated by the
An artificial intelligence (AI) method
non-linear relationship between age and
called deep learning aims to mimic the
gender and face appearance, as well as
human brain by learning from experience.
the extreme lack of big, balanced datasets
These representations are learned through
with accurate labelling. There are very
a technique called training. We must first
few such datasets available; the majority
train the program with a huge number of
are severely skewed, with a large pro-
object photos that we classify into vari-
portion of participants in the 20–75 age
ous groups to teach it how to recognize
range, or they are gender-biased. It is
objects. Deep learning-based algorithms
not advisable to use such biased datasets
take longer to train than conventional
since testing on real-time pictures will
machine learning techniques and need a
result in a distribution mismatch and sub-
lot more training data. It takes a lot of ef-
par performance. There is an enormous
fort and complexity to identify distinctive
amount of untapped potential in this field
features while attempting to identify any
of research. The enormous potential that
item or letter on a picture. Deep learning
autonomous age and gender prediction
techniques, which automatically extract
offers in a variety of computer science do-
significant characteristics from data, can
mains, including HCI (Human Computer
be used to solve issues, in contrast to clas-
sical machine learning, where features are map. For example, when given a human
collected manually. face image as input, the Convolution layer
Deep learning is the use of numerous processes its 3D matrix of RGB pixels,
hidden layers in a neural network. Once defining the image’s length, width, and
a picture has been taught throughout the height. Within each layer, we establish
network, they can proceed to construct filter and stride matrices to aid in the
more complex ideas from simpler ones. crucial process of feature extraction.
An image may be taught in the network to The filter serves as a feature detector,
understand objects like characters, faces, taking on a 2-dimensional form and ca-
and so forth by incorporating basic fea- pable of a variety of sizes, such as a 3
tures like form, edges, and corners. Each by 3 matrix. This filter acts as a compact
layer receives a basic attribute as the representation of numbers, which we use
picture moves across them, progressing to with the input data to pinpoint specific
the next one. The network may potentially features. The stride dictates how far the
learn more complicated characteristics as filter will move in each direction. The
the layers get bigger and combine them stride value is crucial in determining the
to identify the image. Deep learning has size of the output image matrix. A larger
found many applications in the field of stride, such as 4 or 5, will result in a
computer vision. The most significant smaller output matrix and potential loss
computer vision applications were found of information and vice versa.
in the fields dealing with face data. After passing the input image through
the convolutional layer, ReLU activation
B. Convolutional Neural Networks function is applied elementwise to the
Convolutional neural networks (CNNs) feature maps produced by the convolu-
are a popular type of machine learning tional layer in CNN. Applying ReLU
algorithm used for image processing and introduces non-linearity to the network
recognition. They excel at categorizing and allows it to learn complex patterns
images by taking them as input and pro- and representations in the data. It helps
cessing them with a given dataset. Com- in capturing and amplifying important
prised of fully connected layers responsi- features while suppressing irrelevant or
ble for classifying images after extract- negative values. Then it is passed through
ing features. CNN utilizes a blend of the pooling layer where down sampling
both supervised and unsupervised learn- of the feature maps happens for faster
ing methods, specifically through a mul- computation.
tilayer feed-forward architecture. These The concept of Transfer Learning is
distinctive stages consist of numerous application of the knowledge learned by
layers, each with their own designated one model to be applied to another. It is
functions and objectives. The Convolu- used when there is a dearth of suitable
tion layer is a crucial element of the CNN learning data. Deep neural network can
algorithm, responsible for most of its be trained with previously saved model
computations. It takes in key components weights using transfer learning on large
such as the input image, filter, and feature datasets. Therefore, a pre-trained model
spatial dropout with keep probabilities of
0.8 and 0.6, respectively. After every con-
volution block, a 2x2 kernel max pooling
was performed. The three layers of the
fully linked system included 648, 312,
and 128 neurons each, and their corre-
Fig. 2. Layers of Convolutional Neural Network sponding dropout keep probabilities were
0.2, 0.2, and 1.
can be improved using large-scale deep TABLE I
transfer learning and limited data. N ETWORK A RCHITECTURE FOR AGE E STIMATION
The UTK Face dataset is a very small
Layer Filters Output Size Kernel Size Activation
dataset to capture the complexity involved Image - 180 x 180 x 3 - -
in age and gender estimation, so we fo- Separable Conv1 64 180 x 180 x 64 3x3 ReLU
cused our attention further on leveraging Max Pooling - 90 x 90 x 64 2x2 -
Separable Conv2 128 90 x 90 x 128 3x3 ReLU
transfer learning. Therefore, we are us- Max Pooling - 45 x 45 x 128 2x2 -
ing convolutional blocks of VGG16 pre- Separable Conv3 128 45 x 45 x 128 3x3 ReLU
trained on VGG Face and ResNet50 pre- Max Pooling - 22 x 22 x 128 2x2 -
Separable Conv4 256 22 x 22 x 128 3x3 ReLU
trained on VGG Face2, as feature ex- Max Pooling - 11 x 11 x 256 2x2 -
tractors. These models are originally pro- Separable Conv5 256 11 x 11 x 256 3x3 ReLU
posed for facial recognition, thus can be Max Pooling - 5 x 5 x 256 2x2 -
used for higher level of feature extraction. FC1 - 128 - ReLU
FC2 - 64 - ReLU
VGG Face is composed of two blocks, FC3 - 32 - ReLU
each containing layers for batch normal- Output - 1 - ReLU
ization, spatial dropout with a probability
of 0.5, separable convolutions layers with
312 filters of size 3x3, maintaining the III. R ESULT
same padding, and max pooling with ker- We conducted experiments on Age and
nel size 2x2. The ResNet50 gender con- gender Recognition, utilizing a Convo-
sists of only the fully connected system lutional Neural Network (CNN) as our
with batch norm, dropout with probability primary algorithm. The CNN underwent
of 0.5, and 128 units with exponential training and testing using a dataset com-
linear unit (ELU) activation. The fully posed of Human faces images with age
connected system was composed of batch and gender mentioned. The following are
normalization layers, alpha dropout, and the pivotal elements of our experiments
128 neurons with ReLU activation. and the resulting outcomes:
The two convolution blocks that make 1) Database: Our dataset is rich and
up the VGG face for age estimation diverse, encompassing a wide range
are separated by a separable convolution of traffic sign images. It includes
layer that has 312 filters of size 3x3, multiple types of signs, varying
padding the same so that the dimension light and weather conditions, and
remains constant with the ReLU activa- a range of perspectives. To prepare
tion function, a batch norm layer, and and assess our CNN model, the
it with a dataset that it had not pre-
viously encountered. This step was
essential in determining the model’s
ability to handle unfamiliar data.
Fig. 3. ResNet50 Model Architecture The evaluation process involved us-
ing various metrics such as accu-
racy, precision, recall, and F1-score,
providing a comprehensive measure
dataset was split into separate train-
of the model’s performance.
ing and testing sets.
2) Model Architecture: Our team de-
veloped a cutting-edge CNN archi- A confusion matrix provides insight
tecture specifically tailored for the into the model’s performance, errors, and
purpose of recognizing traffic signs. weaknesses. It breaks down the number of
This intricate design comprises sev- correct and incorrect predictions by each
eral essential components, includ- class, and can be used to calculate metrics
ing convolutional layers, pooling such as:
layers, and fully connected layers.
To perfect our model, we meticu- • Accuracy: The proportion of predic-
lously fine-tuned important hyper- tions that the model classified cor-
parameters such as the number of rectly
layers, filter sizes, and the size of • Precision: The proportion of rele-
the fully connected layers. This en- vant instances among the retrieved
sured optimal performance and ac- instances
curacy for our revolutionary Age • Recall: The proportion of the to-
and Gender detection system. tal amount of relevant instances that
3) Training: The training process was were retrieved
a vital component, as it entailed
inputting the training dataset into
the CNN model. Through this, the
model was able to acquire the abil- Actual Values
ity to accurately distinguish and
categorize traffic signs based on the Positive (1) Negative (0)
visual data provided. Our approach
Predicted Values

involved carefully selecting suitable Positive (1) TP FP


loss functions and optimization al-
gorithms, fine-tuning the model’s
inner workings (weight and biases)
to effectively reduce any classifica-
Negative (0) FN TN
tion errors.
4) Evaluation: Once the training was
complete, we proceeded to assess
the model’s performance by testing Fig. 4. Confusion Matrix
R EFERENCES
tp + tn [1] Amit Dohme, Ranjit Kumar, and Vijay Bhan,
Accuracy =
tp + f p + f n + tn “Gender Recognition Through Face Using Deep
tp Learning”, International Conference on Compu-
Sensitivity = tational Intelligence and Data Science (ICCIDS
tp + f n 2018).
tn [2] Akash. B. N, Akshay. K Kulkarni, Deek-
Specificity = shith.A and Gowtham Gowda4, “Age and Gender
f p + tn Recognition using Convolution Neural Network”,
tp IJESC, ISSN 2321 3361 Volume 10 Issue No.6.
Precision = [3] Anto A Micheal and R Shankar, “Automatic
tp + f p
Age and Gender Estimation using Deep Learning
2.tp and Extreme Learning Machine”, Turkish Journal
F1 - score = of Computer and Mathematics Education Vol.12
2.tp + f p + f n
No.14 (2021), 63- 73.
[4] Shubham Patil, Bhagyashree Patil and Ganesh
The symbols fp, fn, tp, and tn refer Tartare, “Gender Recognition and Age Approx-
to abbreviations of false positive, false imation using Deep Learning Techniques”, In-
negative, true positive and true negative ternational Journal of Engineering Research &
respectively. Technology (IJERT), Vol. 9 Issue 04, April-2020.
[5] SHUBHAM KUMAR TIWARI (1613112045),
“AGE AND GENDER DETECTION”, GALGO-
IV. CONCLUSIONS TIAS UNIVERSITY, Project Report of Capstone
Project- 2.
• Training Accuracy: The CNN [6] Sasikumar Gurumurthy, C. Ammu and B.
Sreedevi, “Age Estimation and Gender Classifi-
demonstrated exceptional learning cation Based on Face Detection and Feature Ex-
ability by achieving a training traction”, International Journal of Management &
accuracy of 95.75%, showcasing its Information Technology, ISSN 2278-5612 Vol.4,
No.1.
prowess on the provided dataset.
[7] Mahija Kante, Dr. Esther Sunandha Bandaru,
• Test Accuracy: The test accuracy, Gadilid Manasa, Meghana Emandi and Varanasi
a crucial measure of how well the Leela Lavanya, “Age and Gender Detection using
model can perform on unfamiliar OpenCV”, INTERNATIONAL JOURNAL OF
ADVANCE RESEARCH, IDEAS, AND INNO-
data, boasted an impressive score of VATIONS IN TECHNOLOGY, (Volume 7, Issue
90.40%. Such a high level of accu- 3 - V7I3-2163).
racy showcases the model’s excep- [8] X. Wang, R. Guo, and C. Kambhamettu, “Deeply-
learned feature for age estimation,” in Proc.
tional capability in identifying traffic IEEE Winter Conf. Appl. Comput. Vision,
signs in real-life situations. Moving 2015, pp. 534–541.
forward, our goal is to enhance the [9] Rothe, Rasmus, Radu Timofte, and Luc Van Gool.
"Dex: Deep expectation of apparent age from a
system’s capabilities by expanding single image." Proceedings of the IEEE Inter-
the range of classes for traffic signs national Conference on Computer Vision Work-
and improving the quality of the im- shops. 2015.
[10] Krizhevsky, Alex, Ilya Sutskever, and Geoffrey E.
ages. As is typical in machine learn- Hinton. "Imagenet classification with deep con-
ing studies, improving model quality volutional neural networks." Advances in neural
is a critical and time-consuming pro- information processing systems. 2012.
cess which is achieved by training [11] G. Guo, Y. Fu, T. S. Huang, and C. R.
Dyer, "Locally Adjusted Robust Regression for
the deep learning model with huge Human Age Estimation," 2008 IEEE Work-
number of human face images. shop on Applications of Computer Vision,
Copper Mountain, CO, 2008, pp. 1-6, doi: [16] S. Tamura, H. Kawai, and H. Mitsumoto,
10.1109/WACV.2008.4544009. “Male/female identification from 8 × 6 very low
[12] Angulu, R., Tapamo, J. R., & Adewumi, A. O. resolution face images by neural network,” Pattern
(2018). Age estimation via face images: A survey. Recognition, vol. 29, no. 2, pp. 331–335, 1996.
EURASIP Journal on Image and Video Process- [17] Y. Fu, G. Guo, and T. S. Huang, “Age synthesis
ing, 2018(1). doi:10.1186/s13640-018-0278-6 and estimation via faces: a survey,” IEEE Transac-
[13] Akhand, M. A., Sayim, M. I., Roy, S., & Sid- tions on Pattern Analysis & Machine Intelligence,
dique, N. (2020). Human Age Prediction from vol. 32, pp. 1955–1976, 2010.
Facial Image Using Transfer Learning in Deep
Convolutional Neural Networks. Proceedings of
International Joint Conference on Computational
Intelligence Algorithms for Intelligent Sys-tems,
217-229. doi:10.1007/978-981-15-3607-6_17
[14] Cao, Q., Shen, L., Xie, W., Parkhi, O. M., &
Zisserman, A. (2018). VGGFace2: A Dataset for
Recognising Faces across Pose and Age. 2018
13th IEEE International Conference on Auto-
matic Face & GestureRecognition (FG 2018).
doi:10.1109/fg.2018.00020
[15] H. Han, C. Otto, and A. K. Jain, “Age estima-
tion from face images: Human vs. machine per-
formance,” in Proc. Int. Conf. BTAS, Jun. 2013,
pp. 1–8.

You might also like