Gender Classification Using Opencv: Under The Guidance of
Gender Classification Using Opencv: Under The Guidance of
Gender Classification Using Opencv: Under The Guidance of
B. TECH
SUBMITTED BY
Under the
Guidance Of
Ms Gurminder Kaur Mr
Tushar Verma
Mr Pardeep Tyagi
Name of incharge CSE Department
H.O.D. COMPUTER SCIENCE AND ENGINEERING
DEPARTMENT OF COMPUTER SCIENCE AND
ENGINEERING
CANDIDATE’S DECLARATION
It is hereby certified that the work which is being presented in the B. Tech
Major Project Report entitled "Age and Gender Estimator" in partial fulfilment
of the requirements for the award of the degree of Bachelor of Technology
and submitted in the Department of Computer science and engineering ,
B.M.I.E.T (Affiliated to Guru Gobind Singh Indraprastha University, Delhi)
is an authentic record of our own work carried out during a period from
FEB,2021 to JUNE,2021 under the guidance of Ms Gurminder Kaur ,
Associate Professor , CSE
The matter presented in the B. Tech Major Project Report has not been submitted
by me for the award of any other degree of this or any other Institute.
This is to certify that the above statement made by the candidate is correct to the
best of my knowledge. They are permitted to appear in the External Major Project
Examination
We would like to extend my sincere thanks to HOD, for his time to time
suggestions to complete my project work. I am also thankful to Dr.HARISH
MITTAL for providing me the facilities to carry out my project work.
Saurav Jain
CSE/17/225
List of Figures
S.NO. NAME P.NO.
1. Methodology 11
2. Residual block 12
3. ResNet50 13
4. Mod1 flow diagram 14
5. Mod2 flow diagram 15
6. Final output 16
7. Final output 17
ABSTRACT
This report describes my minor project that has been done in partial
fulfilment of the requirements for the award of the degree of Bachelor of
Technology. The title of this project is “Age and Gender Estimator”. This
project is basically divided into 2 Modules namely Mod1 and Mod2.
This project report is divided into four different chapters
Chapter 1 includes the problem statement, nee of the study, introduction
and the objective of the project. It also includes the theoretical
explanation about the same.
Chapter2 includes all the necessary introduction to the projects with brief
into about the functionality of Mod1 and Mod2. All the important data flow
diagrams, flow hart related to project is covered in this chapter. Software
and hardware required for this project is also included in this chapter.
Chapter 3 includes experimental result with all the necessary output and
result with screenshots attached. This chapter also included the merit
and demerit of the project and the output obtained from this project.
Chapter 4 includes conclusions and the future scope of this project. All
the future idea that how can this project be extended will be cover in this
chapter. The final conclusion and accuracy of this project is discussed in
this chapter briefly.
CHAPTER 1: INTRODUCTION
To extend the face recognition system, an age predictor and gender classifier is to be
added.
1.3 Introduction
As technology enhances, the applications that combine the advanced fields of
pattern recognition and image processing are used to find age and gender. In
today's world, age plays a prominent role, when you appear for an interview,
health check-ups.
These expressions confuse us while finding the age, and as their expression
change, the facial feature differs, resulting in either higher or low than the
people's ideal age. Age estimation is a subfield of face recognition and face
tracking which in combination can predict the health of the individual. Many
health care applications use this mechanism to keep track of health by
monitoring their daily activities.
To predict the age and gender, we will use a wide range of machine learning
and deep learning algorithms. Neural networks is one of the most used
techniques for age and gender detection. We will use OpenCV library to capture
images, Haar Cascade classifier for face detection and Residual networks for
gender and age estimation.
Deep Neural Networks are becoming deeper and more complex. On adding
more layers to a Neural Network can make it more robust for image-related
tasks but can also cause them to lose accuracy. Therefore, to improve the
accuracy of our model, we will use Residual networks in place of deep neural
networks for age and gender estimation.
To develop a algorithm which can predict Gender and Age of a user using
webcam.
CHAPTER 2: TECHNOLOGY USED
3.1 Methodology
2. Identify faces in the webcam and prepare these images for the deep
Residual Networks
Figure 3.3
As we can see from the figure, the person shown in the image is a Male and his
actual age is between 20 to 25 years, the model correctly classifies the person
as male and also shows a correct estimation of his age.
Figure 4.1 This figure shows the gender and age prediction of the given picture.
3.1 Merits
The biggest of this project that we can use this security mechanism in
websites, Apps and any other specific platform applications. As mobile phones
or website’s security is always a major issue, to ensure the security and
privacy, this project will play an important role in the same field.
It will capture the data in real time which hardly takes 4-5 minutes. The
training duration is also very short which completes in about few minutes.
This project is portable as well and can be used on any OS which has python
installed in it.
3.2 Demerits
It requires proper lightning while capturing images.
CHAPTER 5: CONCLUSIONS AND FUTURE SCOPE
5.1 Conclusions
Gender classifier and age estimator was built using Residual networks and
Keras. This part had two modules, one for Res Net and the other for real time
testing of the model. Similar to the first section, this section also used Haar
Cascade Classifier for face detection. A weights hdf5 file was used to store
Keras weights. A function is called which would pick up/load the Haar cascade
classifier and weights file and then all the weights were loaded into the Res Net
module. After which the webcam was initialised and OpenCV was used for
capturing images. If the image was classified according to the Haar Cascade
classifier, pre-processing was done on the image such as cropping of the face
etc. At last, we got a model that is able to work both as a Face Lock as well as a
Gender classifier and age estimator.
Figure 5.1 This figure shows the gender and age prediction of the given picture.
This project provides the vast opportunities of changes it. We can implement
this security mechanism in website and apps.
Despite these, this project may further be extended for numerous other
applications such as in forensics for preventing frauds, reporting duplicate
voters, document verification, attendance tracking, mood detection using facial
expressions , disease prediction by age estimation and facial expressions, etc.
References
https://docs.opencv.org/master/d6/d00/tutorial_py_root.html
https://docs.opencv.org/3.4/javadoc/org/opencv/face/LBPHFaceRecognizer.
html
D. B. Desai and S. N. Kavitha, "Face Anti-spoofing Technique Using CNN and
SVM," 2019 International Conference on Intelligent Computing and Control
Systems (ICCS), Madurai, India, 2019, pp. 37-41, doi:
10.1109/ICCS45141.2019.9065873.