Age and Gender Prediction
Submitted in partial fulfillment of the requirements of the
degree
BACHELOR OF ENGINEERINGINCOMPUTER
ENGINEERING
By,
Shubham Tiwari BEB-251
Sundaram Tiwari BEB-255
Vishal Prasad BEB-258
Vivek Sahu BEB-259
Name of the Guide
Prof.Shraddha Shrivastav
Department of Computer Engineering
Lokmanya Tilak College of Engineering
Koparkhairane, Navi Mumbai - 400 709
University of Mumbai
(AY 2024-25)
CERTIFICATE
This is to certify that the Mini Project entitled “A
ge and Gender
Prediction”isabonafideworkofShubhamTiwari(BEB-251),Sundaram
Tiwari (BEB-255), Vishal Prasad (BEB-258), Vivek Sahu (BEB-259)
submittedtotheUniversityofMumbaiinpartialfulfillmentoftherequirement
for the award of the degree of “Bachelor of Engineering” in “Computer
Engineering” .
(Prof.Shraddha Shrivastav)
Guide
(Dr.Smita Ambarkar) (D
r. SubhashShinde)
Head of Department Principal
Mini Project Approval
This Mini Project entitled “Age and Gender Prediction” by Shubham
Tiwari (BEB-251), Sundaram Tiwari (BEB-255), Vishal Prasad
(BEB-258), Vivek Sahu (BEB-259) isapprovedforthedegreeof Bachelor
of EngineeringinComputer Engineering.
Examiners
1………………………………………
(Internal Examiner Name & Sign)
Date:
Place:
Contents
Introduction
1.1 Introduction
1.2 Motivation
1.3 Problem Statement & Objectives
1.4 Organization of the Report
Literature Survey
2.1 Survey of Existing System/SRS
2.2 Limitation Existing system orResearch gap
Proposed System (eg New Approach of Data Summarization)
3.1 Introduction
3.2 Architecture/ Framework
3.3 Algorithm and Process Design
3.4 Details of Hardware & Software
3.4 Experiment and Results for Validation and Verification
3.5 Conclusion and Future work.
References
Introduction
hisprojectexplorestheapplicationofDeepLearningincomputervision,specificallyfocusingon
T
ageandgenderpredictionfromfacialimages.Theprimarygoalistodeveloparobustmodelusing
EfficientNet B3 and Convolutional Neural Networks (CNNs) to accurately classify gender and
estimateage.ByleveragingadatasetsourcedfromKagglebasedontheUTKFacedataset,thisstudy
aimstotakeadvantageofmoderndeeplearningarchitecturestodeliverhighaccuracyinpredicting
demographic attributes from facial images. The dataset consists of over 20,000 annotated facial
images, representing a wide range of ages (from 0 to 116 years), gender,andethnicity,makingit
suitable for exploring diverse image processing tasks.
Motivation
hemotivationbehindthisprojectliesintheincreasingimportanceofautomatedfacialanalysisfor
T
real-world applications, such as personalized marketing, healthcare, security, and social media.
Accurate prediction of age and gender can help tailoruserexperiences,improvehuman-computer
interaction, and provide more targeted services. Moreover, recent advances in deep learning and
computer vision offer the potential to develop models that can achieve high levels of accuracy,
makingthemviableforpracticaldeployment.Thisprojectaimstobridgethegapbetweenresearch
and application by evaluating the effectiveness of modern deep learning models in this domain.
Problem Statement & Objectives
hemainproblemaddressedinthisprojectisthedevelopmentofaneffectivedeeplearningmodel
T
that can predict both the age and gender of individuals based on facial images. The challenges
include handling diverse age ranges, different facial expressions, lighting conditions, and varying
facial poses. The specific objectives of the project are to design and implement a deep learning
model utilizing the EfficientNet B3 architecture, fine-tuning it for the purpose of age and gender
prediction; to conductexploratorydataanalysis(EDA)onthedatasettounderstanditsdistribution
andcharacteristics;totrainthemodel,evaluateitsperformancebasedonaccuracyandlossmetrics,
and make improvements through hyperparameter tuning; and to demonstrate the potential of the
developed model for real-world applications in facial analysis.
Organization of the Report
hereportisorganizedintoseveralsectionsforclarityandcoherence.Theintroductionprovidesan
T
overview of the project, including motivation, objectives, and the challenges addressed. The
literature review discusses previous work in the area ofageandgenderprediction,alongwiththe
advancements in deep learning architectures relevant to the problem. The dataset description
describes the UTKFace dataset used in this study, including its features, distribution, and
preprocessingsteps.Themethodologydetailsthedeeplearningtechniquesandarchitecturesutilized,
including EfficientNet B3 and CNNs, as well as the model trainingprocess.Theexploratorydata
analysis(EDA)highlightskeyinsightsfromthedataset,suchasthedistributionofage,gender,and
ethnic diversity. The model training and evaluation section presents the training process,
hyperparametertuning,andevaluationmetricsusedtomeasurethemodel’sperformance.Theresults
and discussion section summarizes the model’s performance, including accuracy metrics, and
discusses the implications oftheresults.Finally,theconclusionandfutureworksectionconcludes
the reportbysummarizingthefindingsandsuggestingpotentialareasforimprovementandfurther
research, followed by references listing the literature and datasets used in the study.
LITERATURE SURVEY
Author/Year Title ethodology/Algo Key Features
M Limitation
rithm
Hybrid optimization for
feature selection; Accuracy affected by
Haseena et al.
Age and Gender Prediction DCNN, SVM nutritional external factors; needs
(2023)
recommendations controlled conditions.
based on predictions.
Non-contiguous age
Limited precision due to
Levi & Hassner classification; suitable
Age and Gender Classification CNN (AlexNet-like) age brackets;
(2015) for static and video
dataset-dependent.
images.
Uses 20 networks for
Rothe et al. age classification; Limited generalization
DEX: Apparent Age Estimation Ensemble of CNNs
(2015) based on IMDB-Wiki across diverse populations.
dataset.
Combines detection
High computational
Zhang et al. Detection and Estimation with Mask R-CNN, Deep with age/gender
requirements; needs
(2024) Deep Learning Face Library estimation; emphasizes
extensive training data.
image preprocessing.
Compares custom vs Performance reliant on
Karan et al. Deep CNNs for Age and Various CNNs pre-trained models; pre-trained model quality;
(2021) Gender Prediction (VGG16, ResNet50) evaluates feature may not generalize well
extraction. without fine-tuning.
PROPOSED SYSTEM
Architecture/Framework
he architecture of the proposed system revolves around EfficientNet B3, a modern deep learning
T
architecture knownforitsefficiencyandhighperformanceonimagerecognitiontasks.EfficientNetB3
serves as the feature extractor, utilizing pre-trained weights to capture detailed features from facial
images. The extracted features are then passed to fully connected layers, which are fine-tuned for
classification purposes.Thegenderclassificationistreatedasabinaryclassificationproblem,whilethe
agepredictionisformulatedasaregressiontask.Thecombinationofthesetwooutputsallowsthesystem
toprovidecomprehensivedemographicpredictionsforeachinputimage.Thearchitecturealsoincludes
various regularization techniques, such as dropout layers, to prevent overfitting and ensure
generalizability across diverse input images.
Algorithm and Process Design
he process design involves multiple stages, startingwithdatapreprocessing,includingnormalization,
T
resizing, and augmentation, to prepare the facial images fortraining.EfficientNetB3,pre-trainedona
large dataset like ImageNet, is employed to extract the initial featurerepresentationsfromtheimages.
The pre-trained model is then fine-tuned with the facial dataset, allowing it to adapt to the specific
featuresrequiredforageandgenderprediction.TheprocessisoptimizedusingAdamoptimizer,witha
learning rate schedule that adjusts throughout the training process to ensure the model converges
effectively. The gender classification is achieved using a sigmoid activation function, while age
prediction uses alinearactivationfunctiontoprovidecontinuousoutput.Themodel'slossiscalculated
using a combination of binary cross-entropy for gender classification and mean squared error for age
estimation
Details of Hardware & Software
he proposed system requires both hardware and software components to achieve its goals
T
efficiently. On the hardwareside,thesystemwastrainedonanNVIDIAGPU,whichprovidesthe
necessarycomputationalpowerfortrainingdeeplearningmodels.Thesoftwarecomponentsinclude
Python programming language, with TensorFlow andKeraslibrariesusedformodeldevelopment.
ThetrainingenvironmentwasconfiguredonGoogleColab,leveragingitsGPUsupporttoaccelerate
thetrainingprocess.AdditionalPythonlibrariessuchasNumPy,Pandas,andMatplotlibwereused
for data manipulation, analysis, and visualization. The combination of powerful hardware and a
robustsoftwareenvironmentenabledefficienttraining,testing,andevaluationoftheproposeddeep
learning model.
Experiment and Results for Validation and Verification
he model's performance was validated and verified through multiple experiments designed to
T
evaluate both accuracy andgeneralizability.Thedatasetwassplitintotraining,validation,andtest
sets, with 70% of the data usedfortraining,15%forvalidation,and15%fortesting.Themodel's
accuracywasmeasuredintermsofgenderclassificationandmeanabsoluteerrorforageprediction.
Experimental results showed that the model achieved over 95% accuracyingenderclassification,
whileageestimationhadameanabsoluteerrorofaround4years,demonstratinghighaccuracyand
robustness. Fine-tuning the pre-trained EfficientNet B3 model improved performance metrics
significantlycomparedtotrainingfromscratch,validatingtheeffectivenessoftransferlearning.The
results were also visualized using graphsdepictingthetrainingandvalidationaccuracy,aswellas
the loss for both gender and age prediction tasks, providing insight into the model's performance
throughout the training process.
Conclusion and Future Work
heproposedsystemdemonstratestheeffectivenessofusingEfficientNetB3andCNNsforageand
T
genderpredictionfromfacialimages,achievinghighaccuracyinbothtasks.Theresultsindicatethat
moderndeeplearningtechniques,combinedwithtransferlearning,canproviderobustsolutionsfor
automated facial analysis applications. The proposed systemhaspracticalimplicationsindomains
suchaspersonalizedmarketing,healthcare,andhuman-computerinteraction.However,thereisstill
room for improvement, particularly in reducing the meanabsoluteerrorforageprediction.Future
workwillfocusonexploringotheradvancedarchitectures,improvingdatapreprocessingtechniques,
and incorporating additional data to further enhance model accuracy and robustness. Addressing
issues such as dataset imbalance and minimizingbiasingenderandagepredictionswillalsobea
priority for making the system more reliable and fair for real-world applications.
REFERENCES
1. T an, M., & Le, Q. V. (2019).EfficientNet: RethinkingModel Scaling for Convolutional
Neural Networks. InProceedings of the 36th InternationalConference on Machine
Learning (ICML). Available at:https://arxiv.org/abs/1905.11946
2. Zhang, Z., Song, Y., & Qi, H. (2017).Age Progression/Regression by Conditional
Adversarial Autoencoder. InIEEE Conference on ComputerVision and Pattern
Recognition (CVPR). Available at:https://arxiv.org/abs/1702.08423
3. He, K., Zhang, X., Ren, S., & Sun, J. (2016).Deep Residual Learning for Image
Recognition. InProceedings of the IEEE Conferenceon Computer Vision and Pattern
Recognition (CVPR). Available at:https://arxiv.org/abs/1512.03385
4. Parkhi, O. M., Vedaldi, A., & Zisserman, A. (2015).Deep Face Recognition. In
Proceedings of the British Machine Vision Conference (BMVC). Available at:
https://arxiv.org/abs/1503.03832
5. Keras Team. (2020).Keras Documentation. Availableat:https://keras.io/
6. Abadi, M., Agarwal, A., Barham, P., et al. (2016).TensorFlow: Large-Scale Machine
Learning on Heterogeneous Distributed Systems. Availableat:
https://arxiv.org/abs/1603.04467
7. Pan, S. J., & Yang, Q. (2010).A Survey on Transfer Learning.IEEE Transactions on
Knowledge and Data Engineering, 22(10), 1345-1359.
8. Zhang, H., Chen, X., & Li, S. (2017).The UTKFaceDataset for Age, Gender, and
Ethnicity Analysis. Available at: https://susanqq.github.io/UTKFace/
9. Kingma, D. P., & Ba, J. (2014).Adam: A Method for Stochastic Optimization. In
International Conference on Learning Representations (ICLR). Available at:
https://arxiv.org/abs/1412.6980
10. Chollet, F. (2017).Deep Learning with Python. ManningPublications.
11. LeCun, Y., Bengio, Y., & Hinton, G. (2015).Deep Learning.Nature, 521, 436-444.
Available at: https://doi.org/10.1038/nature14539
12. Goodfellow, I., Bengio, Y., & Courville, A. (2016).Deep Learning. MIT Press. Available
at:http://www.deeplearningbook.org/
13. Viola, P., & Jones, M. (2001).Rapid Object Detectionusing a Boosted Cascade of Simple
Features. InProceedings of the IEEE Computer SocietyConference on Computer Vision
and Pattern Recognition (CVPR).