SlideShare a Scribd company logo
GAYATRI VIDYA PARISHAD COLLEGE OF ENGINEERING(A)
DEPARTMENT OF COMPUTER SCIENCE ENGINEERING
GENDER AND AGE
CLASSIFICATION USING MACHINE
LEARNING
Project done by:
Abhi Achalla (17131A0502)
TABLE OF CONTENTS
 Abstract
 Introduction
 Technologies used
 Flowchart
 Procedure
 Applications
 Output
 Conclusion
 Future Scope
ABSTRACT
• Automatic gender and age classification has become quite relevant in the rise of social
media platforms. However, the existing methods have not been completely successful in
achieving this. Through this project, an attempt has been made to determine the gender
and age based on a frame of the person. This is done by using deep learning, OpenCV
which is capable of processing the real-time frames. This frame is given as input and the
predicted gender and age are given as output. It is difficult to predict the exact age of a
person using one frame due the facial expressions, lighting, makeup and so on so for this
purpose various age ranges are taken, and the predicted age falls in one of them. The
Adience dataset is used as it is a benchmark for face photos and includes various real-
world imaging conditions like noise, lighting etc.
• Keywords: Deep learning, OpenCV, Adience, gender detection, age determination
INTRODUCTION
• Age and gender, two of the key facial attributes, play a very foundational role in
social interactions, making age and gender estimation from a single face frame is an
important task in intelligent applications, such as access control, human-computer
interaction, law enforcement, marketing intelligence and visual surveillance, etc.
• In this project, a frame is taken as input and the algorithm will determine the age
and gender of person(s) in the frame. We divide the age into 8 ranges[ (0 – 2), (4 – 6),
(8 – 12), (15 – 20), (25 – 32), (38 – 43), (48 – 53), (60 – 100)] and the output age will
fall into one of them. While, the gender will be either male or female.
TECHNOLOGIES USED
1. OpenCV
OpenCV is Open Source Computer vision. This library is capable of processing real-time frame and video while also boasting analytical
capabilities. OpenCV is used to display text on the picture using putText(). Imshow() is used for the frame output. The
cv2.dnn.blobFromframe function returns a blob which is our input frame after mean subtraction, normalizing, and channel swapping..
Features of OpenCV Library : MEAN SUBTRACTION USING blobFromImage() OF OpenCV
Using OpenCV library, you can −
•Read and write frames
•Capture and save videos
•Process frames (filter, transform)
•Perform feature detection
•Detect specific objects such as faces, eyes, cars, in the videos or frames.
•Analyze the video, i.e., estimate the motion in it, subtract the background, and track objects in it.
OpenCV was originally developed in C++. In addition to it, Python and Java bindings were provided. OpenCV runs on various Operating Systems such as windows,
Linux, OSx, FreeBSD, Net BSD, Open BSD, etc.
2. CONVOLUTIONAL NEURAL
NETWORKS(CNN)
A Convolutional Neural Network is a deep neural network (DNN) widely used for the purposes of frame recognition and processing and NLP. Also known as a
ConvNet, a CNN has input and output layers, and multiple hidden layers, many of which are convolutional. In a way, CNNs are regularized multilayer perceptrons.
The convolutional neural network for this python project has 3 convolutional layers:
Convolutional layer; 96 nodes, kernel size 7
•Convolutional layer; 256 nodes, kernel size 5
•Convolutional layer; 384 nodes, kernel size 3
It has 2 fully connected layers, each with 512 nodes, and a final output layer of softmax type.
1. A first fully connected layer that receives the output of the third convolutional layer and contains 512 neurons, followed by a ReLU and a dropout layer.
2. A second fully connected layer that receives the 512- dimensional output of the first fully connected layer and again contains 512 neurons, followed by a ReLU and
a dropout layer.
3. A third, fully connected layer which maps to the final classes for age or gender.
3. TENSORFLOW
TensorFlow is an end-to-end open source platform for machine learning. TensorFlow is a rich system for managing all aspects of a
machine learning system. . TensorFlow allows developers to create dataflow graphs—structures that describe how data moves through
a graph, or a series of processing nodes. Each node in the graph represents a mathematical operation, and each connection or edge
between nodes is a multidimensional data array, or tensor. The single biggest benefit TensorFlow provides for machine learning
development is abstraction. Instead of dealing with the nitty-gritty details of implementing algorithms, or figuring out proper ways to
hitch the output of one function to the input of another, the developer can focus on the overall logic of the application. TensorFlow takes
care of the details behind the scenes.
For face detection, we have a .pb file- this is a protobuf file (protocol buffer); it holds the graph definition and the trained
weights of the model. We can use this to run the trained model. And while a .pb file holds the protobuf in binary format, one
with the .pbtxt extension holds it in text format. These are TensorFlow files.
FLOW CHART
Start
Image
Acquisition
Face
Detection
Feature
Extraction
Support
Vector
Machine
Trained
Database
Convolution
Neural Network
Final Output
(Display)
STEPS INVOLVED IN FACE
RECOGNITION
•Detect faces : When given a frame/video, the CNN algorithm first detects for faces in each frame.
•Classify into Male/Female : Once it finds faces in the frame, the features of the faces are
extracted, and the gender is determined using second layer of CNN.
•Classify into one of the 8 age ranges :In the third layer of CNN, the age of the faces is
determined and falls under either of the 8 age ranges [ (0 – 2), (4 – 6), (8 – 12), (15 – 20), (25 – 32),
(38 – 43), (48 – 53), (60 – 100)]
•Put the results on the frame and display it : the result is displayed on the frame containing the age
range and gender using OpenCV. The resulting frame consists of a square box around the faces
with the estimated gender and age.
PROCEDURE
The Dataset
• For this python project, we’ll use the Adience dataset; the dataset is available in the public domain and you can
find it. For this python project, we’ll use the Adience dataset; the dataset is available in the public domain and
you can find it here. This dataset serves as a benchmark for face photos and is inclusive of various real-world
imaging conditions like noise, lighting, pose, and appearance.
• The images have been collected from Flickr albums and distributed under the Creative Commons (CC) license.
It has a total of 26,580 photos of 2,284 subjects in eight age ranges (as mentioned above) and is about 1GB in
size.
• The models we will use have been trained on this dataset This dataset serves as a benchmark for face photos
and is inclusive of various real-world imaging conditions like noise, lighting, pose, and appearance.
• The images have been collected from Flickr albums and distributed under the Creative Commons (CC) license.
It has a total of 26,580 photos of 2,284 subjects in eight age ranges (as mentioned above) and is about 1GB in
size. The models we will use have been trained on this dataset.
 We use the argparse library to create an argument parser so we can get the frame argument from the
command prompt. We make it parse the argument holding the path to the frame to classify gender
and age for.
 For face, age, and gender, initialize protocol buffer and model.
 Initialize the mean values for the model and the lists of age ranges and genders to classify from. Now,
use the readNet() method to load the networks. The first parameter holds trained weights and the
second carries network configuration.
 We make a call to the highlightFace() function with the faceNet and frame parameters, and what this
returns, we will store in the names resultImg and faceBoxes. And if we got 0 faceBoxes, it means there
was no face to detect.
PROCEDURE(CONT.)
 But if there are indeed faceBoxes, for each of those, we define the face, create a 4-
dimensional blob from the frame. In doing this, we scale it, resize it, and pass in the mean
values.
 We feed the input and give the network a forward pass to get the confidence of the two
class. Whichever is higher, that is the gender of the person in the picture.
Then, we do the same thing for age. We’ll add the gender and age texts to the resulting frame and display
it with imshow().
APPLICATIONS
• Quividi which is an AI software application which is used to detect age and gender of
users who passes by based on online face analyses and automatically starts playing
advertisements based on the targeted audience.
• Human gender and age recognition is an emerging application for intelligent video
analysis.
• In the forensic field, where often only the description of a suspect is available, usually
the data that is always available are the gender and an age range, which would be very
useful in reducing the list of candidates to be compared with the sketch to get the
answers to be more precise.
EXPECTED RESULT
Input frame Output
+ our
model
VIDEO OUTPUT
CONCLUSION
Though many previous methods have addressed the problems of age and gender classification,
until recently, much of this work has focused on constrained images taken in lab settings. Such
settings do not adequately reflect appearance variations common to the real-world images in social
websites and online repositories. The easy availability of huge image collections provides modern
machine learning based systems with effectively endless training data, though this data is not always
suitably labeled for supervised learning.
Two important conclusions can be made from our results. First, CNN can be used to provide
improved age and gender classification results, even considering the much smaller size of
contemporary unconstrained image sets labeled for age and gender. Second, the simplicity of our
model implies that more elaborate systems using more training data may well be capable of
substantially improving results beyond those reported here.
Overall, I think the accuracy of the models is decent but can be improved further by using more
data, data augmentation and better network architectures. One can also try to use a regression model
instead of classification for Age Prediction if enough data is available.
FUTURE SCOPE
 Some future improvements can be made to this project. To improve the
accuracy, a dataset with more number of images can be given.
 The algorithm can be improved to an extent where it can be able to process and
give the desired result on images with disturbances like lack of clarity, a different
angle, or any kind of accessories on the face. For example, if the person is wearing
sunglasses, or has makeup on the face, the algorithm will be able to give the
desired result.
THANK YOU!

More Related Content

What's hot

Face detection and recognition
Face detection and recognitionFace detection and recognition
Face detection and recognition
Pankaj Thakur
 
Driver drowsiness monitoring system using visual behavior and Machine Learning.
Driver drowsiness monitoring system using visual behavior and Machine Learning.Driver drowsiness monitoring system using visual behavior and Machine Learning.
Driver drowsiness monitoring system using visual behavior and Machine Learning.
AasimAhmedKhanJawaad
 
Age Estimation And Gender Prediction Using Convolutional Neural Network.pptx
Age Estimation And Gender Prediction Using Convolutional Neural Network.pptxAge Estimation And Gender Prediction Using Convolutional Neural Network.pptx
Age Estimation And Gender Prediction Using Convolutional Neural Network.pptx
Bulbul Agrawal
 
Attendance Management System using Face Recognition
Attendance Management System using Face RecognitionAttendance Management System using Face Recognition
Attendance Management System using Face Recognition
NanditaDutta4
 
face detection
face detectionface detection
face detection
Smriti Tikoo
 
Handwritten Digit Recognition(Convolutional Neural Network) PPT
Handwritten Digit Recognition(Convolutional Neural Network) PPTHandwritten Digit Recognition(Convolutional Neural Network) PPT
Handwritten Digit Recognition(Convolutional Neural Network) PPT
RishabhTyagi48
 
Deep learning
Deep learningDeep learning
Deep learning
Mohamed Loey
 
YOLO
YOLOYOLO
Sign language recognizer
Sign language recognizerSign language recognizer
Sign language recognizer
Bikash Chandra Karmokar
 
Virtual Mouse using hand gesture recognition
Virtual Mouse using hand gesture recognitionVirtual Mouse using hand gesture recognition
Virtual Mouse using hand gesture recognition
MuktiKalsekar
 
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Simplilearn
 
Face recognition technology
Face recognition technologyFace recognition technology
Face recognition technology
ranjit banshpal
 
[PR12] You Only Look Once (YOLO): Unified Real-Time Object Detection
[PR12] You Only Look Once (YOLO): Unified Real-Time Object Detection[PR12] You Only Look Once (YOLO): Unified Real-Time Object Detection
[PR12] You Only Look Once (YOLO): Unified Real-Time Object Detection
Taegyun Jeon
 
Image recognition
Image recognitionImage recognition
Image recognition
Aseed Usmani
 
Facial Expression Recognition System using Deep Convolutional Neural Networks.
Facial Expression Recognition  System using Deep Convolutional Neural Networks.Facial Expression Recognition  System using Deep Convolutional Neural Networks.
Facial Expression Recognition System using Deep Convolutional Neural Networks.
Sandeep Wakchaure
 
Image captioning
Image captioningImage captioning
Image captioning
Muhammad Zbeedat
 
Emotion detection using cnn.pptx
Emotion detection using cnn.pptxEmotion detection using cnn.pptx
Emotion detection using cnn.pptx
RADO7900
 
Color Image Processing
Color Image ProcessingColor Image Processing
Color Image Processing
kiruthiammu
 
Cnn
CnnCnn
Activation function
Activation functionActivation function
Activation function
Astha Jain
 

What's hot (20)

Face detection and recognition
Face detection and recognitionFace detection and recognition
Face detection and recognition
 
Driver drowsiness monitoring system using visual behavior and Machine Learning.
Driver drowsiness monitoring system using visual behavior and Machine Learning.Driver drowsiness monitoring system using visual behavior and Machine Learning.
Driver drowsiness monitoring system using visual behavior and Machine Learning.
 
Age Estimation And Gender Prediction Using Convolutional Neural Network.pptx
Age Estimation And Gender Prediction Using Convolutional Neural Network.pptxAge Estimation And Gender Prediction Using Convolutional Neural Network.pptx
Age Estimation And Gender Prediction Using Convolutional Neural Network.pptx
 
Attendance Management System using Face Recognition
Attendance Management System using Face RecognitionAttendance Management System using Face Recognition
Attendance Management System using Face Recognition
 
face detection
face detectionface detection
face detection
 
Handwritten Digit Recognition(Convolutional Neural Network) PPT
Handwritten Digit Recognition(Convolutional Neural Network) PPTHandwritten Digit Recognition(Convolutional Neural Network) PPT
Handwritten Digit Recognition(Convolutional Neural Network) PPT
 
Deep learning
Deep learningDeep learning
Deep learning
 
YOLO
YOLOYOLO
YOLO
 
Sign language recognizer
Sign language recognizerSign language recognizer
Sign language recognizer
 
Virtual Mouse using hand gesture recognition
Virtual Mouse using hand gesture recognitionVirtual Mouse using hand gesture recognition
Virtual Mouse using hand gesture recognition
 
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
 
Face recognition technology
Face recognition technologyFace recognition technology
Face recognition technology
 
[PR12] You Only Look Once (YOLO): Unified Real-Time Object Detection
[PR12] You Only Look Once (YOLO): Unified Real-Time Object Detection[PR12] You Only Look Once (YOLO): Unified Real-Time Object Detection
[PR12] You Only Look Once (YOLO): Unified Real-Time Object Detection
 
Image recognition
Image recognitionImage recognition
Image recognition
 
Facial Expression Recognition System using Deep Convolutional Neural Networks.
Facial Expression Recognition  System using Deep Convolutional Neural Networks.Facial Expression Recognition  System using Deep Convolutional Neural Networks.
Facial Expression Recognition System using Deep Convolutional Neural Networks.
 
Image captioning
Image captioningImage captioning
Image captioning
 
Emotion detection using cnn.pptx
Emotion detection using cnn.pptxEmotion detection using cnn.pptx
Emotion detection using cnn.pptx
 
Color Image Processing
Color Image ProcessingColor Image Processing
Color Image Processing
 
Cnn
CnnCnn
Cnn
 
Activation function
Activation functionActivation function
Activation function
 

Similar to Human age and gender Detection

ageandgenderdetection-220802061020-9ee5a2cd.pptx
ageandgenderdetection-220802061020-9ee5a2cd.pptxageandgenderdetection-220802061020-9ee5a2cd.pptx
ageandgenderdetection-220802061020-9ee5a2cd.pptx
dhaliwalharsh055
 
Report face recognition : ArganRecogn
Report face recognition :  ArganRecognReport face recognition :  ArganRecogn
Report face recognition : ArganRecogn
Ilyas CHAOUA
 
Real Time Sign Language Recognition Using Deep Learning
Real Time Sign Language Recognition Using Deep LearningReal Time Sign Language Recognition Using Deep Learning
Real Time Sign Language Recognition Using Deep Learning
IRJET Journal
 
深度學習在AOI的應用
深度學習在AOI的應用深度學習在AOI的應用
深度學習在AOI的應用
CHENHuiMei
 
Facial expression recognition projc 2 (3) (1)
Facial expression recognition projc 2 (3) (1)Facial expression recognition projc 2 (3) (1)
Facial expression recognition projc 2 (3) (1)
AbhiAchalla
 
Image Captioning Generator using Deep Machine Learning
Image Captioning Generator using Deep Machine LearningImage Captioning Generator using Deep Machine Learning
Image Captioning Generator using Deep Machine Learning
ijtsrd
 
Scalable constrained spectral clustering
Scalable constrained spectral clusteringScalable constrained spectral clustering
Scalable constrained spectral clustering
Nishanth Harapanahalli
 
Anomaly Detection with Azure and .NET
Anomaly Detection with Azure and .NETAnomaly Detection with Azure and .NET
Anomaly Detection with Azure and .NET
Marco Parenzan
 
IRJET - Gender and Age Prediction using Wideresnet Architecture
IRJET - Gender and Age Prediction using Wideresnet ArchitectureIRJET - Gender and Age Prediction using Wideresnet Architecture
IRJET - Gender and Age Prediction using Wideresnet Architecture
IRJET Journal
 
Semantic Concept Detection in Video Using Hybrid Model of CNN and SVM Classif...
Semantic Concept Detection in Video Using Hybrid Model of CNN and SVM Classif...Semantic Concept Detection in Video Using Hybrid Model of CNN and SVM Classif...
Semantic Concept Detection in Video Using Hybrid Model of CNN and SVM Classif...
CSCJournals
 
IRJET - Explicit Content Detection using Faster R-CNN and SSD Mobilenet V2
 IRJET - Explicit Content Detection using Faster R-CNN and SSD Mobilenet V2 IRJET - Explicit Content Detection using Faster R-CNN and SSD Mobilenet V2
IRJET - Explicit Content Detection using Faster R-CNN and SSD Mobilenet V2
IRJET Journal
 
Age and Gender Prediction and Human count
Age and Gender Prediction and Human countAge and Gender Prediction and Human count
Age and Gender Prediction and Human count
IRJET Journal
 
IRJET- Implementation of Gender Detection with Notice Board using Raspberry Pi
IRJET- Implementation of Gender Detection with Notice Board using Raspberry PiIRJET- Implementation of Gender Detection with Notice Board using Raspberry Pi
IRJET- Implementation of Gender Detection with Notice Board using Raspberry Pi
IRJET Journal
 
Real Time Object Dectection using machine learning
Real Time Object Dectection using machine learningReal Time Object Dectection using machine learning
Real Time Object Dectection using machine learning
pratik pratyay
 
FACE EXPRESSION RECOGNITION USING CONVOLUTION NEURAL NETWORK (CNN) MODELS
FACE EXPRESSION RECOGNITION USING CONVOLUTION NEURAL NETWORK (CNN) MODELS FACE EXPRESSION RECOGNITION USING CONVOLUTION NEURAL NETWORK (CNN) MODELS
FACE EXPRESSION RECOGNITION USING CONVOLUTION NEURAL NETWORK (CNN) MODELS
ijgca
 
slide-171212080528.pptx
slide-171212080528.pptxslide-171212080528.pptx
slide-171212080528.pptx
SharanrajK22MMT1003
 
IRJET - Visual Question Answering – Implementation using Keras
IRJET -  	  Visual Question Answering – Implementation using KerasIRJET -  	  Visual Question Answering – Implementation using Keras
IRJET - Visual Question Answering – Implementation using Keras
IRJET Journal
 
Metaphorical Analysis of diseases in Tomato leaves using Deep Learning Algori...
Metaphorical Analysis of diseases in Tomato leaves using Deep Learning Algori...Metaphorical Analysis of diseases in Tomato leaves using Deep Learning Algori...
Metaphorical Analysis of diseases in Tomato leaves using Deep Learning Algori...
IRJET Journal
 
Real-Time Face-Age-Gender Detection System
Real-Time Face-Age-Gender Detection SystemReal-Time Face-Age-Gender Detection System
Real-Time Face-Age-Gender Detection System
IRJET Journal
 
Blood Cell Image Classification for Detecting Malaria using CNN
Blood Cell Image Classification for Detecting Malaria using CNNBlood Cell Image Classification for Detecting Malaria using CNN
Blood Cell Image Classification for Detecting Malaria using CNN
IRJET Journal
 

Similar to Human age and gender Detection (20)

ageandgenderdetection-220802061020-9ee5a2cd.pptx
ageandgenderdetection-220802061020-9ee5a2cd.pptxageandgenderdetection-220802061020-9ee5a2cd.pptx
ageandgenderdetection-220802061020-9ee5a2cd.pptx
 
Report face recognition : ArganRecogn
Report face recognition :  ArganRecognReport face recognition :  ArganRecogn
Report face recognition : ArganRecogn
 
Real Time Sign Language Recognition Using Deep Learning
Real Time Sign Language Recognition Using Deep LearningReal Time Sign Language Recognition Using Deep Learning
Real Time Sign Language Recognition Using Deep Learning
 
深度學習在AOI的應用
深度學習在AOI的應用深度學習在AOI的應用
深度學習在AOI的應用
 
Facial expression recognition projc 2 (3) (1)
Facial expression recognition projc 2 (3) (1)Facial expression recognition projc 2 (3) (1)
Facial expression recognition projc 2 (3) (1)
 
Image Captioning Generator using Deep Machine Learning
Image Captioning Generator using Deep Machine LearningImage Captioning Generator using Deep Machine Learning
Image Captioning Generator using Deep Machine Learning
 
Scalable constrained spectral clustering
Scalable constrained spectral clusteringScalable constrained spectral clustering
Scalable constrained spectral clustering
 
Anomaly Detection with Azure and .NET
Anomaly Detection with Azure and .NETAnomaly Detection with Azure and .NET
Anomaly Detection with Azure and .NET
 
IRJET - Gender and Age Prediction using Wideresnet Architecture
IRJET - Gender and Age Prediction using Wideresnet ArchitectureIRJET - Gender and Age Prediction using Wideresnet Architecture
IRJET - Gender and Age Prediction using Wideresnet Architecture
 
Semantic Concept Detection in Video Using Hybrid Model of CNN and SVM Classif...
Semantic Concept Detection in Video Using Hybrid Model of CNN and SVM Classif...Semantic Concept Detection in Video Using Hybrid Model of CNN and SVM Classif...
Semantic Concept Detection in Video Using Hybrid Model of CNN and SVM Classif...
 
IRJET - Explicit Content Detection using Faster R-CNN and SSD Mobilenet V2
 IRJET - Explicit Content Detection using Faster R-CNN and SSD Mobilenet V2 IRJET - Explicit Content Detection using Faster R-CNN and SSD Mobilenet V2
IRJET - Explicit Content Detection using Faster R-CNN and SSD Mobilenet V2
 
Age and Gender Prediction and Human count
Age and Gender Prediction and Human countAge and Gender Prediction and Human count
Age and Gender Prediction and Human count
 
IRJET- Implementation of Gender Detection with Notice Board using Raspberry Pi
IRJET- Implementation of Gender Detection with Notice Board using Raspberry PiIRJET- Implementation of Gender Detection with Notice Board using Raspberry Pi
IRJET- Implementation of Gender Detection with Notice Board using Raspberry Pi
 
Real Time Object Dectection using machine learning
Real Time Object Dectection using machine learningReal Time Object Dectection using machine learning
Real Time Object Dectection using machine learning
 
FACE EXPRESSION RECOGNITION USING CONVOLUTION NEURAL NETWORK (CNN) MODELS
FACE EXPRESSION RECOGNITION USING CONVOLUTION NEURAL NETWORK (CNN) MODELS FACE EXPRESSION RECOGNITION USING CONVOLUTION NEURAL NETWORK (CNN) MODELS
FACE EXPRESSION RECOGNITION USING CONVOLUTION NEURAL NETWORK (CNN) MODELS
 
slide-171212080528.pptx
slide-171212080528.pptxslide-171212080528.pptx
slide-171212080528.pptx
 
IRJET - Visual Question Answering – Implementation using Keras
IRJET -  	  Visual Question Answering – Implementation using KerasIRJET -  	  Visual Question Answering – Implementation using Keras
IRJET - Visual Question Answering – Implementation using Keras
 
Metaphorical Analysis of diseases in Tomato leaves using Deep Learning Algori...
Metaphorical Analysis of diseases in Tomato leaves using Deep Learning Algori...Metaphorical Analysis of diseases in Tomato leaves using Deep Learning Algori...
Metaphorical Analysis of diseases in Tomato leaves using Deep Learning Algori...
 
Real-Time Face-Age-Gender Detection System
Real-Time Face-Age-Gender Detection SystemReal-Time Face-Age-Gender Detection System
Real-Time Face-Age-Gender Detection System
 
Blood Cell Image Classification for Detecting Malaria using CNN
Blood Cell Image Classification for Detecting Malaria using CNNBlood Cell Image Classification for Detecting Malaria using CNN
Blood Cell Image Classification for Detecting Malaria using CNN
 

Recently uploaded

Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 

Recently uploaded (20)

Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 

Human age and gender Detection

  • 1. GAYATRI VIDYA PARISHAD COLLEGE OF ENGINEERING(A) DEPARTMENT OF COMPUTER SCIENCE ENGINEERING GENDER AND AGE CLASSIFICATION USING MACHINE LEARNING Project done by: Abhi Achalla (17131A0502)
  • 2. TABLE OF CONTENTS  Abstract  Introduction  Technologies used  Flowchart  Procedure  Applications  Output  Conclusion  Future Scope
  • 3. ABSTRACT • Automatic gender and age classification has become quite relevant in the rise of social media platforms. However, the existing methods have not been completely successful in achieving this. Through this project, an attempt has been made to determine the gender and age based on a frame of the person. This is done by using deep learning, OpenCV which is capable of processing the real-time frames. This frame is given as input and the predicted gender and age are given as output. It is difficult to predict the exact age of a person using one frame due the facial expressions, lighting, makeup and so on so for this purpose various age ranges are taken, and the predicted age falls in one of them. The Adience dataset is used as it is a benchmark for face photos and includes various real- world imaging conditions like noise, lighting etc. • Keywords: Deep learning, OpenCV, Adience, gender detection, age determination
  • 4. INTRODUCTION • Age and gender, two of the key facial attributes, play a very foundational role in social interactions, making age and gender estimation from a single face frame is an important task in intelligent applications, such as access control, human-computer interaction, law enforcement, marketing intelligence and visual surveillance, etc. • In this project, a frame is taken as input and the algorithm will determine the age and gender of person(s) in the frame. We divide the age into 8 ranges[ (0 – 2), (4 – 6), (8 – 12), (15 – 20), (25 – 32), (38 – 43), (48 – 53), (60 – 100)] and the output age will fall into one of them. While, the gender will be either male or female.
  • 5. TECHNOLOGIES USED 1. OpenCV OpenCV is Open Source Computer vision. This library is capable of processing real-time frame and video while also boasting analytical capabilities. OpenCV is used to display text on the picture using putText(). Imshow() is used for the frame output. The cv2.dnn.blobFromframe function returns a blob which is our input frame after mean subtraction, normalizing, and channel swapping.. Features of OpenCV Library : MEAN SUBTRACTION USING blobFromImage() OF OpenCV Using OpenCV library, you can − •Read and write frames •Capture and save videos •Process frames (filter, transform) •Perform feature detection •Detect specific objects such as faces, eyes, cars, in the videos or frames. •Analyze the video, i.e., estimate the motion in it, subtract the background, and track objects in it. OpenCV was originally developed in C++. In addition to it, Python and Java bindings were provided. OpenCV runs on various Operating Systems such as windows, Linux, OSx, FreeBSD, Net BSD, Open BSD, etc.
  • 6. 2. CONVOLUTIONAL NEURAL NETWORKS(CNN) A Convolutional Neural Network is a deep neural network (DNN) widely used for the purposes of frame recognition and processing and NLP. Also known as a ConvNet, a CNN has input and output layers, and multiple hidden layers, many of which are convolutional. In a way, CNNs are regularized multilayer perceptrons. The convolutional neural network for this python project has 3 convolutional layers: Convolutional layer; 96 nodes, kernel size 7 •Convolutional layer; 256 nodes, kernel size 5 •Convolutional layer; 384 nodes, kernel size 3 It has 2 fully connected layers, each with 512 nodes, and a final output layer of softmax type. 1. A first fully connected layer that receives the output of the third convolutional layer and contains 512 neurons, followed by a ReLU and a dropout layer. 2. A second fully connected layer that receives the 512- dimensional output of the first fully connected layer and again contains 512 neurons, followed by a ReLU and a dropout layer. 3. A third, fully connected layer which maps to the final classes for age or gender.
  • 7. 3. TENSORFLOW TensorFlow is an end-to-end open source platform for machine learning. TensorFlow is a rich system for managing all aspects of a machine learning system. . TensorFlow allows developers to create dataflow graphs—structures that describe how data moves through a graph, or a series of processing nodes. Each node in the graph represents a mathematical operation, and each connection or edge between nodes is a multidimensional data array, or tensor. The single biggest benefit TensorFlow provides for machine learning development is abstraction. Instead of dealing with the nitty-gritty details of implementing algorithms, or figuring out proper ways to hitch the output of one function to the input of another, the developer can focus on the overall logic of the application. TensorFlow takes care of the details behind the scenes. For face detection, we have a .pb file- this is a protobuf file (protocol buffer); it holds the graph definition and the trained weights of the model. We can use this to run the trained model. And while a .pb file holds the protobuf in binary format, one with the .pbtxt extension holds it in text format. These are TensorFlow files.
  • 9. STEPS INVOLVED IN FACE RECOGNITION •Detect faces : When given a frame/video, the CNN algorithm first detects for faces in each frame. •Classify into Male/Female : Once it finds faces in the frame, the features of the faces are extracted, and the gender is determined using second layer of CNN. •Classify into one of the 8 age ranges :In the third layer of CNN, the age of the faces is determined and falls under either of the 8 age ranges [ (0 – 2), (4 – 6), (8 – 12), (15 – 20), (25 – 32), (38 – 43), (48 – 53), (60 – 100)] •Put the results on the frame and display it : the result is displayed on the frame containing the age range and gender using OpenCV. The resulting frame consists of a square box around the faces with the estimated gender and age.
  • 10. PROCEDURE The Dataset • For this python project, we’ll use the Adience dataset; the dataset is available in the public domain and you can find it. For this python project, we’ll use the Adience dataset; the dataset is available in the public domain and you can find it here. This dataset serves as a benchmark for face photos and is inclusive of various real-world imaging conditions like noise, lighting, pose, and appearance. • The images have been collected from Flickr albums and distributed under the Creative Commons (CC) license. It has a total of 26,580 photos of 2,284 subjects in eight age ranges (as mentioned above) and is about 1GB in size. • The models we will use have been trained on this dataset This dataset serves as a benchmark for face photos and is inclusive of various real-world imaging conditions like noise, lighting, pose, and appearance. • The images have been collected from Flickr albums and distributed under the Creative Commons (CC) license. It has a total of 26,580 photos of 2,284 subjects in eight age ranges (as mentioned above) and is about 1GB in size. The models we will use have been trained on this dataset.  We use the argparse library to create an argument parser so we can get the frame argument from the command prompt. We make it parse the argument holding the path to the frame to classify gender and age for.  For face, age, and gender, initialize protocol buffer and model.  Initialize the mean values for the model and the lists of age ranges and genders to classify from. Now, use the readNet() method to load the networks. The first parameter holds trained weights and the second carries network configuration.  We make a call to the highlightFace() function with the faceNet and frame parameters, and what this returns, we will store in the names resultImg and faceBoxes. And if we got 0 faceBoxes, it means there was no face to detect.
  • 11. PROCEDURE(CONT.)  But if there are indeed faceBoxes, for each of those, we define the face, create a 4- dimensional blob from the frame. In doing this, we scale it, resize it, and pass in the mean values.  We feed the input and give the network a forward pass to get the confidence of the two class. Whichever is higher, that is the gender of the person in the picture. Then, we do the same thing for age. We’ll add the gender and age texts to the resulting frame and display it with imshow().
  • 12. APPLICATIONS • Quividi which is an AI software application which is used to detect age and gender of users who passes by based on online face analyses and automatically starts playing advertisements based on the targeted audience. • Human gender and age recognition is an emerging application for intelligent video analysis. • In the forensic field, where often only the description of a suspect is available, usually the data that is always available are the gender and an age range, which would be very useful in reducing the list of candidates to be compared with the sketch to get the answers to be more precise.
  • 13. EXPECTED RESULT Input frame Output + our model
  • 15. CONCLUSION Though many previous methods have addressed the problems of age and gender classification, until recently, much of this work has focused on constrained images taken in lab settings. Such settings do not adequately reflect appearance variations common to the real-world images in social websites and online repositories. The easy availability of huge image collections provides modern machine learning based systems with effectively endless training data, though this data is not always suitably labeled for supervised learning. Two important conclusions can be made from our results. First, CNN can be used to provide improved age and gender classification results, even considering the much smaller size of contemporary unconstrained image sets labeled for age and gender. Second, the simplicity of our model implies that more elaborate systems using more training data may well be capable of substantially improving results beyond those reported here. Overall, I think the accuracy of the models is decent but can be improved further by using more data, data augmentation and better network architectures. One can also try to use a regression model instead of classification for Age Prediction if enough data is available.
  • 16. FUTURE SCOPE  Some future improvements can be made to this project. To improve the accuracy, a dataset with more number of images can be given.  The algorithm can be improved to an extent where it can be able to process and give the desired result on images with disturbances like lack of clarity, a different angle, or any kind of accessories on the face. For example, if the person is wearing sunglasses, or has makeup on the face, the algorithm will be able to give the desired result.