Professional Documents
Culture Documents
Internship Report on
Assistant Professor
Department of Information Technology
1
DECLARATION
I hereby declare that the work described in this report entitled “Age and Gender
The work is original and has not been submitted for any Degree or Diploma of this
D. Vaishnavi Reddy
(19881A1213 )
2
DEPARTMENT OF INFORMATION TECHNOLOGY
CERTIFICATE
This is to certify that the Internship report entitled, “Age and Gender Detection”, done by
D. Vaishnavi Reddy (19881A1213), Submitting to the Department of Information
Technology, VARDHAMAN COLLEGE OF ENGINEERING, in partial fulfillment of the
requirements for the Degree of BACHELOR OF TECHNOLOGY in Information
Technology, during the year 2022-23. It is certified that he/she has completed the
Internship satisfactorily.
3
Internship Certificate
4
ACKNOWLEDGEMENT
5
The satisfaction that accompanies the successful completion of the task would be
put incomplete without the mention of the people who made it possible, whose constant
guidance and encouragement crown all the efforts with success.
The goal is to help others to gain personal and professional skills in the area of
Technological development. The purpose is to provide a structure through which
students may exercise their right to freely associate in pursuit of a common purpose
or goal that enhances community at LetsGrowMore.
I express our heartfelt thanks to Ms. Farhana Begum, Assistant Professor, for his
suggestions in the selection and carrying out an in-depth study of the topic. His valuable
guidance and encouragement really helped us to shape this report to perfection.
I express our heartfelt thanks to Ms. Sujata Gupta, Internship Coordinator and
Dr. K Ramesh, Associate Professor & Project Coordinator, for his suggestions invaluable
inputs and assessment really helped us to shape this report to perfection.
I wish to express our deep sense of gratitude to Dr. Muni Sekhar Velpuru,
Associate Professor& Head, Department of Information Technology, Vardhaman College of
Engineering, for his intense support and encouragement, which helped us to mold our
project into a successful one.
I also owe our special thanks to our honorable Principal Dr. J. V. R Ravindra, of
Vardhaman College of Engineering, for providing all the infrastructural facilities and
congenial atmosphere to complete the project successfully.
I avail this opportunity to express our deep sense of gratitude and heartful thanks to
Dr. T. Vijender Reddy, Chairman and Sri T. Upender Reddy, Secretary, of Vardhaman
College of Engineering, for providing the infrastructural facilities and congenial
atmosphere to complete the project successfully.
I also thank all the staff members of the Information Technology department for
their valuable support and generous advice.
Finally, thanks to all my friends and family members for their continuous support
and enthusiastic help.
D.Vaishnavi Reddy
(19881A1213)
ABSTRACT
6
The main goal of this project is to detect the age and gender of the given image. This can be
done using deep learning in OpenCV. The goal here is to create a program that will predict the
gender and age of the person using an image. There are many uncertainties that researchers
have faced when they treated this as a regression problem, like camera quality, brightness,
climate condition, background, etc. The solution to this problem is quite simple, instead of
predicting an exact image, let’s classify the age into a specific range like 0-6,18-25, etc. And
that’s what researchers did and found that the results were amazing and the accuracy rose up
by a lot in real-world scenarios. In this project pre-trained models for age prediction are used
because main focus is how to implement the age predictor using OpenCV, using these models.
LetsGrowMore is a ground-based organisation that aims at building the future through nourish-
ing the present. We at LetsGrowMore believe in making our youth especially the students self-
aware and exploring the untouched world of technology and tremendous growth-making fields
and our belief finally took us where we are standing today. Today we are an officially MSME reg-
istered start-up with nearly 100+ people working under the same establishment.
Table of CONTENTS
Page No’s
Title Page 1
7
Declaration 2
College Certificate 3
Internship Offer letter 4
Internship Certificate 5
Acknowledgement 6
Abstract 7
Table of Contents 8
List of Figures 10
Symbols & Abbreviations 10
Weekly Report Activities 12
1. Introduction 20
1.1 INTRODUCTION
1.2 Scope/ Problem definition
1.3 Purpose/ Objective of Project
1.4 Limitations of Project
1.5 Modules
2. LITERATURE SURVEY 21
Existing system and its limitations
Proposed Method and advantages
3. ANALYSIS 22
3.1 Introduction
3.2 Software Requirement Specification
3.2.1 Software requirement
3.2.2 Hardware requirement
3.3 Algorithms and Flowcharts 23
4. DESIGN 25
4.1 Introduction
4.2 Module design and organization
5. IMPLEMENTATION 26
5.1 Introduction
5.2 Explanation of Key functions
5.3 Technology
5.4 Method of Implementation
5.2.1 Forms
5.2.2 Output Screens
5.2.3 Result Analysis
8
7. CONCLUSION
REFERENCES
LIST OF FIGURES
FIGURE NO. TITLE OF FIGURES PAGE NO.
Fig 3.1 DL AI ML 23
9
Fig 3.2 CNN 24
Fig 3.3 OpenCV 24
Fig 5.1 Output screen-1 26
Fig 5.2 Output screen-2 26
Fig 5.3 Output screen-3 26
Fig 5.4 Output screen-4 27
Fig 5.5 Output screen-5 27
Fig 5.6 DNN 28
Fig 5.7 Output screen-6 29
Fig 5.8 Output screen-7 29
Fig 5.9 Output screen-8 30
Fig 6.1 Test-1 31
Fig 6.2 Test-2 32
Fig 6.3 Test-3 32
Fig 6.4 Test-4 33
Fig 6.5 Test-5 33
LIST OF Abbreviations
Abbreviation Meaning
ML Machine learning
DL Deep Learning
CNN Concolutional Neural Network
10
Weekly Work Report
Week 1
S.NO Date: Description of work Sign of Supervisor
11
Day-1 1-8-2022 Information about company
and tasks
Day-2 2-8-2022 Worked on Mathematical &
Statistical Skills
Day-3 3-8-2022
Basics of Machine Learning
Day-4 4-8-2022 Algorithms used in Machine
Learning
Day-5 5-8-2022 Statistical Foundations for
Data Science
Day-6 6-8-2022 Learning on Data Structures
& Algorithms
Name of the Supervisor : Ms. Farhana Begum
Supervisor's Sign :
Remarks by Supervisor :
Weekly Summary:
Duration: From: 1st August To 6th August
Work assigned by the supervisor: (Write point wise)
Introduction about the company.
12
Orientation session.
Tutorial about data science.
Learning Outcomes: (Write point wise)
Basics of machine learning
Remarks:
Week 2
S.NO Date: Description of work Sign of Supervisor
13
Day-7 8-8-2022
Understanding Exploratory
Data Analysis
Day-8 9-8-2022 Data Mining, Data
Structures, and Data
Manipulation
Day-9 10-8-2022 Learning about Data
Scientist Roles and
Responsibilities
Day-10 11-8-2022 Data Acquisition and Data
Science Life Cycle
Day-11 12-8-2022 Experimentation,
Evaluation and Project
Deployment Tools
Day-12 13-8-2022 Predictive Analytics and
Segmentation using
Clustering
Name of the Supervisor : Ms. Farhana Begum
Supervisor's Sign :
Remarks by Supervisor :
Weekly Summary:
Duration: From: 8th August To 13th August
Work assigned by the supervisor: (Write point wise)
Understanding basics of data science
14
Project deployment tools
Learning Outcomes: (Write point wise)
Predictive analytics segmentation and clustering
Remarks:
Week 3
S.NO Date: Description of work Sign of Supervisor
15
Day-13 16-8-2022 Sample projects for practice
assigned
Supervisor's Sign :
Remarks by Supervisor :
Weekly Summary:
Duration: From: 16th August To 22nd August
Work assigned by the supervisor:
Sample projects assigned
16
Learning Outcomes: (Write point wise)
Implemented exploratory Analysis and Iris flower classification
OpenCV basics
Remarks:
Week 4
S.NO Date: Description of work Sign of Supervisor
17
Day-18 23-8-2022 Tutorial regarding OpenCV
Supervisor's Sign :
Remarks by Supervisor :
Weekly Summary:
Duration: From: 23rd August To 29th August
Work assigned by the supervisor: (Write point wise)
Tutorial about OpenCV
Main Project assigned
18
Learning Outcomes: (Write point wise)
Implementation of Main Project
Remarks:
Introduction
1.1 Introduction
In this fast-emerging world Artificial Intelligence plays a very vital role in every field of
science. Everything is being automated from operating a remote to driving a car using Artificial
19
Intelligence. We show a glimpse of such automated experience with this project. In this project
we show how easy it is to detect faces and identify gender along with gender with the help of
CNN(Convolutional Neural Networks) and OpenCV. Using these fields of Artificial Intelligence,
we can reduce the use of hardware components and complexities in this project. Along with
CNN and OpenCV we use Adience dataset so that the output is achieved with accurate values in
training and validation. For the output to be determined even with multiple parameters we use
pre-trained model that is caffee model along with OpenCV. The proposed model can be used in
surveillance purposes or in medical purposes.
1.2 Scope
The output prediction depends on the present inputs for those algorithms. Deep Learning
improves the overall performance and the efficiency of the model which has to detect
characteristics of the person like age and gender by developing a neural network. The model
being developed can be used for surveillance purposes.
1.4 Limitations
Security problems, lack of privacy, fear legal issues, huge technological cost.
LITERATURE SURVEY
20
Many early methods in age and gender detection were handcrafted, focusing on manually
engineering the facial features from the face. To mention a few, in 1999, Kwon and Lobo[5]
developed the very first method for age estimation focusing on geometric features of the face
that determine the ratios among different dimensions of facial features. These geometric features
separate babies from adult successfully but are incapable of distinguishing between young adult
and senior adult. Hence, in 2004, Lanitis et al. [6] proposed an Active Appearance Model
(AAM) based method that included both the geometric and texture features, for the estimation
task. This method is not suitable for the unconstrained imaging conditions attributed to real-
world face images which have different degrees of variations in illumination, expression, poses,
and so forth. From 2007, most of the approaches also employed manually designed features for
the estimation task: Gabor[7], Spatially Flexible Patches (SFP)[8], Local Binary Patterns (LBP)
[9,10], and Biologically Inspired Features (BIF)[11]. In recent years, classification and
regression methods are employed to classify the age and gender of facial images using
those features. Classification methods in [12,13-15] used Support Vector Machine (SVM) based
methods for age and gender classification. Linear regression[16,17], Support Vector Regression
(SVR)[18], Canonical Correlation Analysis (CCA)[19], and Partial Least Squares (PLS)[20] are
the common regression methods for age and gender predictions. Dileep and Danti [21] also
proposed an approach that used feed-forward propagation neural networks and 3-sigma control
limits approach to classify people’s age into children, middle-aged adults, and old-aged adults.
However they all were incompetent when given large datasets therefore, cannot be relied on to
achieve respectable performance in practical application.
Proposed System
In our proposed model we use CNN and Opencv for facial recognition. This proposed
model can detect faces, divide into Male/Female based facial features, divide an image with face
of a person into one of 8 age ranges. Convolutional neural networks (CNN): There are various
neural networks available which can be used as per the requirement or inputs being given. They
have 3 main layers are input layer, hidden layer(s) and the output layer. Each layer has large
number of neurons where each is associated with a certain value of weights. The values of the
weights are updated at the time of forward and backward propagations, along with the help of an
activation function at every layer/neuron in order to activate them. Updating the weights,
governs the overall accuracy of the neural network model, as the cost/loss function is reduced to
a minimum value, at a certain point in the gradient descent[3,4].
ANALYSIS
3.1 Introduction
21
We want to define the purpose of our product, describe what we are building, detail the
individual requirements, and deliver it for approval. A good SRS document will define
everything from how software will interact when embedded in hardware to the expectations
when connected to other software. An even better SRS documents also account for real-life users
and human interaction. The best SRS documents define how the software will interact when
embedded in hardware or when connected to other software. Good SRS documents also account
for real-life users. A software requirements specification (SRS) includes in-depth descriptions of
the software that will be developed.
Anaconda
Jupyter notebook
• System: laptop/desktop
22
element of data science, which includes statistics and predictive modeling. It is extremely
beneficial to data scientists who are tasked with collecting, analyzing and interpreting large
amounts of data; deep learning makes this process faster and easier. At its simplest, deep
learning can be thought of as a way to automate predictive analytics. While traditional machine
learning algorithms are linear, deep learning algorithms are stacked in a hierarchy of increasing
complexity and abstraction.
Fig 3.1: DL
CNN: Within Deep Learning, a Convolutional Neural Network or CNN is a type of artificial
neural network, which is widely used for image/object recognition and classification. Deep
Learning thus recognizes objects in an image by using a CNN. CNNs are playing a major role in
diverse tasks/functions like image processing problems, computer vision tasks like localization
and segmentation, video analysis, to recognize obstacles in self-driving cars, as well as speech
recognition in natural language processing. As CNNs are playing a significant role in these fast-
growing and emerging areas, they are very popular in Deep Learning.
23
Fig 3.2: CNN
OpenCV: OpenCV is the huge open-source library for the computer vision, machine learning,
and image processing and now it plays a major role in real-time operation which is very
important in today’s systems. By using it, one can process images and videos to identify objects,
faces, or even handwriting of a human. When it integrated with various libraries, such as
NumPy, python is capable of processing the OpenCV array structure for analysis. To Identify
image pattern and its various features we use vector space and perform mathematical operations
on these features.
24
DESIGN
4.1 Introduction
A typical neural network will have an input layer, hidden layers, and an output layer.
CNNs are inspired by the architecture of the brain. Just like a neuron in the brain processes and
transmits information throughout the body, artificial neurons or nodes in CNNs take inputs,
processes them and sends the result as output. The image is fed as input. The input layer accepts
the image pixels as input in the form of arrays. In CNNs, there could be multiple hidden layers,
which perform feature extraction from the image by doing calculations. This could include
convolution, pooling, rectified linear units, and fully connected layers. Convolution is the first
layer that does feature extraction from an input image. The fully connected layer classifies the
object and identifies it in the output layer. “CNNs are feedforward networks in that information
flow takes place in one direction only, from their inputs to their outputs. Just as artificial neural
networks (ANN) are biologically inspired, so are CNNs. The visual cortex in the brain, which
consists of alternating layers of simple and complex cells, motivates their architecture. CNN
architectures come in several variations; however, in general, they consist of convolutional and
pooling (or subsampling) layers, which are grouped into modules.
Data Collection:
gender_net.caffemodel: It is the pre-trained model weights for gender detection.
deploy_gender.prototxt: is the model architecture for the gender detection model (a plain text file
with a JSON-like structure containing all the neural network layer’s definitions).
age_net.caffemodel: It is the pre-trained model weights for age detection.
deploy_age.prototxt: is the model architecture for the age detection model (a plain text file with a
JSON-like structure containing all the neural network layer’s definitions).
res10_300x300_ssd_iter_140000_fp16.caffemodel: The pre-trained model weights for face
detection.
deploy.prototxt.txt: This is the model architecture for the face detection model.
Importing Libraries: OpenCV and numpy.
25
IMPLEMENTATION
5.1 Introduction
AI/ML represents an important evolution in computer science and data processing that is quickly
transforming a vast array of industries. As businesses and other organizations undergo digital
transformation, they’re faced with a growing tsunami of data that is at once incredibly valuable
and increasingly burdensome to collect, process and analyze. New tools and methodologies are
needed to manage the vast quantity of data being collected, to mine it for insights and to act on
those insights when they’re discovered.
Installing OpenCV:
Importing libraries:
Defining the variables of weights and architectures for face, age, and gender detection models:
26
Loading the models:
5.3 Technology
1. Python:
• import cv2: OpenCV-Python is a library of Python bindings designed to solve
computer vision problems. cv2. imread() method loads an image from the specified
file. If the image cannot be read (because of missing file, improper permissions,
unsupported or invalid format) then this method returns an empty matrix.
• Import numpy as np: The import numpy portion of the code tells Python to bring the
NumPy library into your current environment. The as np portion of the code then tells
Python to give NumPy the alias of np. This allows you to use NumPy functions by
simply typing np. function_name rather than numpy.
2. Machine Learning:
• Deep learning: Deep learning is a subset of machine learning, which is a
subset of artificial intelligence. Artificial intelligence is a general term that
refers to techniques that enable computers to mimic human behavior. Machine
27
learning represents a set of algorithms trained on data that make all of this
possible. Deep learning is just a type of machine learning, inspired by the
structure of the human brain.
3. OpenCV: Computer Vision is one of the techniques from which we can understand
images and videos and can extract information from them. It is a subset of artificial
intelligence that collects information from digital images or videos. Python OpenCV is
the most popular computer vision library. By using it, one can process images and videos
to identify objects, faces, or even handwriting of a human. When it is integrated with
various libraries, such as NumPy, python is capable of processing the OpenCV array
structure for analysis.
28
5.4 Method of Implementation
Displaying an image:
29
Defining the two functions for age and gender detection:
30
TESTING & RESULTS
6.1 Introduction
The importance of testing a machine learning model is plenty in number. This testing is also
essential because the demand for machine learning, artificial intelligence, and data science has
increased exponentially. Since the importance of these subjects has increased and people have
started to realize the value of this all companies are ready to spend on this technology. This is
quite a lengthy project and also a complex one. This requires a lot of attention to make sure that
the accuracy of the model is well above average and the performance of the model is good. All
these things make testing of the machine learning model quite essential and a must-have before
deploying it to the main framework. Features are often called variables or parameters. Features
more or less decide the accuracy of the model and also helps in elevating model performance. To
be able to test if the correct features are present in the dataset or not one should have quite an
amount of business knowledge. If the business knowledge is proper then choosing correct
parameters becomes an easy job. One should be aware of the business context so as to know
which variables to consider to build a good machine learning model.
31
#Testcase2(teen):
#Testcase3(adult):
32
#Testcase4(middleage):
#Testcase5(seniorcitizen):
33
CONCLUSION
The age and gender detection using OpenCV will be very beneficial in authorization
purposes,medical purposes or surveillance purposes. The CNN and OpenCV combined can give
great results. The OIU-Adience dataset used in the project gives result with greater accuracy. We
used protocol buffer and caffee model files. This project shows how OpenCV can be used for
face detection without any other complicated process.
This project can be enhanced in few ways such that this project can be used to its fullest:
1) Application- The project can be developed into a web application or a mobile application such
that it is easily accessible.
2)In public places- using sensors this can be used in public places like restaurants, ATM places,
shops such then when a theft happens the scope of finding the person could be much more easy.
3) Enhancing this project to detect multiple individuals-this project can be enhanced such it can
estimate age and gender even for a group of individuals in the image. This model does detect the
face of individuals in a group but cannot give the accurate age and gender estimation.
34
REFERENCES
[1] Van der Aalst, W. (2016). Data Science in Action. Process Mining, 3– 23. doi:10.1007/978-
3-662-49851-4_1 .
[2] Sanchez-Pinto LN, Luo Y, Churpek MM, Big Data and Data Science in Critical Care,
CHEST (2018), doi:
10.1016/j.chest.2018.04.037 .
[3] Duan, Y., Edwards, J. S., & Dwivedi, Y. K. (2019). Artificial intelligence for decision
making in the era of Big Data – evolution,
challenges and research agenda. International Journal of Information Management, 48, 63– 71.
doi:10.1016/j.ijinfomgt.2019.01.021 [4] Salehi, H., & Burgueño, R. (2018). Emerging artificial
intelligence methods in
structural engineering. Engineering Structures, 171, 170–189.
doi:10.1016/j.engstruct.2018.05.084 .
[5] Y. H. Kwon and N. Da Vitoria Lobo, “Age classification from facial images,” Computer
Vision and Image Understanding, vol.
74, no. 1, pp. 1–21, 1999
35
To be filled by the Supervisor
Kindly refer to the mark scale provided below in assessing the performance of the intern.
b) Overall Attendance /4
c) Punctuality /4
d) Compliance to policies /4
e) Interest in Work /4
2. Knowledge
h) Technical knowledge / Software knowledge
/4
3. Skills
j) Problem solving
/4
36
n) Written Communication Skills /4
o) Leadership /4
p) Team work /4
r) Creative thinking /4
4. Performance
s) Quality of work performed
/4
u) Initiative to learn /4
w) Commitment to work /4
x) Value-added contribution /4
y) Overall Report /4
/100
Total:
Comments (if any):
Supervisor's Name :
Designation :
37
Mobile No. :
Signature :
Date :
38