SlideShare uma empresa Scribd logo
1 de 17
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!

Mais conteúdo relacionado

Mais procurados

Image classification using CNN
Image classification using CNNImage classification using CNN
Image classification using CNNNoura Hussein
 
Face recognition technology - BEST PPT
Face recognition technology - BEST PPTFace recognition technology - BEST PPT
Face recognition technology - BEST PPTSiddharth Modi
 
Facial Emotion Recognition: A Deep Learning approach
Facial Emotion Recognition: A Deep Learning approachFacial Emotion Recognition: A Deep Learning approach
Facial Emotion Recognition: A Deep Learning approachAshwinRachha
 
Predicting Emotions through Facial Expressions
Predicting Emotions through Facial Expressions  Predicting Emotions through Facial Expressions
Predicting Emotions through Facial Expressions twinkle singh
 
Gender and Age Detection using OpenCV.pptx
Gender and Age Detection using OpenCV.pptxGender and Age Detection using OpenCV.pptx
Gender and Age Detection using OpenCV.pptxSakshiVishwakarma12
 
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
 
Face recognition ppt
Face recognition pptFace recognition ppt
Face recognition pptSantosh Kumar
 
Face detection and recognition
Face detection and recognitionFace detection and recognition
Face detection and recognitionPankaj Thakur
 
Convolution Neural Network (CNN)
Convolution Neural Network (CNN)Convolution Neural Network (CNN)
Convolution Neural Network (CNN)Suraj Aavula
 
Object detection with deep learning
Object detection with deep learningObject detection with deep learning
Object detection with deep learningSushant Shrivastava
 
Object detection
Object detectionObject detection
Object detectionSomesh Vyas
 
Project Face Detection
Project Face Detection Project Face Detection
Project Face Detection Abu Saleh Musa
 
Emotion detection using cnn.pptx
Emotion detection using cnn.pptxEmotion detection using cnn.pptx
Emotion detection using cnn.pptxRADO7900
 
Object detection presentation
Object detection presentationObject detection presentation
Object detection presentationAshwinBicholiya
 
Facial emotion recognition
Facial emotion recognitionFacial emotion recognition
Facial emotion recognitionRahin Patel
 
SPEECH BASED EMOTION RECOGNITION USING VOICE
SPEECH BASED  EMOTION RECOGNITION USING VOICESPEECH BASED  EMOTION RECOGNITION USING VOICE
SPEECH BASED EMOTION RECOGNITION USING VOICEVamshidharSingh
 
Facial Expression Recognition (FER) using Deep Learning
Facial Expression Recognition (FER) using Deep LearningFacial Expression Recognition (FER) using Deep Learning
Facial Expression Recognition (FER) using Deep LearningEmmeline Tsen
 
OpenGL Mini Projects With Source Code [ Computer Graphics ]
OpenGL Mini Projects With Source Code [ Computer Graphics ]OpenGL Mini Projects With Source Code [ Computer Graphics ]
OpenGL Mini Projects With Source Code [ Computer Graphics ]Daffodil International University
 
Attendance system based on face recognition using python by Raihan Sikdar
Attendance system based on face recognition using python by Raihan SikdarAttendance system based on face recognition using python by Raihan Sikdar
Attendance system based on face recognition using python by Raihan Sikdarraihansikdar
 

Mais procurados (20)

Image classification using CNN
Image classification using CNNImage classification using CNN
Image classification using CNN
 
Face recognition technology - BEST PPT
Face recognition technology - BEST PPTFace recognition technology - BEST PPT
Face recognition technology - BEST PPT
 
Facial Emotion Recognition: A Deep Learning approach
Facial Emotion Recognition: A Deep Learning approachFacial Emotion Recognition: A Deep Learning approach
Facial Emotion Recognition: A Deep Learning approach
 
Predicting Emotions through Facial Expressions
Predicting Emotions through Facial Expressions  Predicting Emotions through Facial Expressions
Predicting Emotions through Facial Expressions
 
Gender and Age Detection using OpenCV.pptx
Gender and Age Detection using OpenCV.pptxGender and Age Detection using OpenCV.pptx
Gender and Age Detection using OpenCV.pptx
 
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.
 
Face recognition ppt
Face recognition pptFace recognition ppt
Face recognition ppt
 
Face detection and recognition
Face detection and recognitionFace detection and recognition
Face detection and recognition
 
Convolution Neural Network (CNN)
Convolution Neural Network (CNN)Convolution Neural Network (CNN)
Convolution Neural Network (CNN)
 
Human Emotion Recognition
Human Emotion RecognitionHuman Emotion Recognition
Human Emotion Recognition
 
Object detection with deep learning
Object detection with deep learningObject detection with deep learning
Object detection with deep learning
 
Object detection
Object detectionObject detection
Object detection
 
Project Face Detection
Project Face Detection Project Face Detection
Project Face Detection
 
Emotion detection using cnn.pptx
Emotion detection using cnn.pptxEmotion detection using cnn.pptx
Emotion detection using cnn.pptx
 
Object detection presentation
Object detection presentationObject detection presentation
Object detection presentation
 
Facial emotion recognition
Facial emotion recognitionFacial emotion recognition
Facial emotion recognition
 
SPEECH BASED EMOTION RECOGNITION USING VOICE
SPEECH BASED  EMOTION RECOGNITION USING VOICESPEECH BASED  EMOTION RECOGNITION USING VOICE
SPEECH BASED EMOTION RECOGNITION USING VOICE
 
Facial Expression Recognition (FER) using Deep Learning
Facial Expression Recognition (FER) using Deep LearningFacial Expression Recognition (FER) using Deep Learning
Facial Expression Recognition (FER) using Deep Learning
 
OpenGL Mini Projects With Source Code [ Computer Graphics ]
OpenGL Mini Projects With Source Code [ Computer Graphics ]OpenGL Mini Projects With Source Code [ Computer Graphics ]
OpenGL Mini Projects With Source Code [ Computer Graphics ]
 
Attendance system based on face recognition using python by Raihan Sikdar
Attendance system based on face recognition using python by Raihan SikdarAttendance system based on face recognition using python by Raihan Sikdar
Attendance system based on face recognition using python by Raihan Sikdar
 

Semelhante a Human age and gender Detection

ageandgenderdetection-220802061020-9ee5a2cd.pptx
ageandgenderdetection-220802061020-9ee5a2cd.pptxageandgenderdetection-220802061020-9ee5a2cd.pptx
ageandgenderdetection-220802061020-9ee5a2cd.pptxdhaliwalharsh055
 
Report face recognition : ArganRecogn
Report face recognition :  ArganRecognReport face recognition :  ArganRecogn
Report face recognition : ArganRecognIlyas 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 LearningIRJET 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 Learningijtsrd
 
Scalable constrained spectral clustering
Scalable constrained spectral clusteringScalable constrained spectral clustering
Scalable constrained spectral clusteringNishanth Harapanahalli
 
Anomaly Detection with Azure and .NET
Anomaly Detection with Azure and .NETAnomaly Detection with Azure and .NET
Anomaly Detection with Azure and .NETMarco 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 ArchitectureIRJET 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 V2IRJET 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 countIRJET 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 PiIRJET 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 learningpratik 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
 
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 KerasIRJET 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 SystemIRJET 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 CNNIRJET Journal
 

Semelhante a 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
 

Último

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Último (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

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.