SlideShare a Scribd company logo
Facial Emotion Recognition with
Facial Gestures
By Ashwin Kedari Rachha
3263
Why Emotion Detection?
● The motivation behind choosing this topic specifically lies in the huge
investments large corporations do in feedbacks and surveys but fail to get
equitable response on their investments.
● Emotion Detection through facial gestures is a technology that aims to improve
product and services performance by monitoring customer behavior to certain
products or service staff by their evaluation
Some Companies that make us of emotion detection...
● While Disney uses emotion-detection tech to find out opinion on a completed
project, other brands have used it to directly inform advertising and digital
marketing.
● Kellogg’s is just one high-profile example, having used Affectiva’s software to test
audience reaction to ads for its cereal.
● Unilever does this, using HireVue’s AI-powered technology to screen prospective
candidates based on factors like body language and mood. In doing so, the
company is able to find the person whose personality and characteristics are best
suited to the job.
Emotion Expression Recognition Using SVM
What are Support Vector Machines?
SVMs plot the training vectors in high-dimensional
feature space, and label each vector with its class. A
hyperplane is drawn between the training vectors
that maximizes the distance between the different
classes. The hyperplane is determined through a
kernel function (radial basis, linear, polynomial or
sigmoid), which is given as input to the classification
software. [1999][Joachims, 1998b].
Facial Expression Detection using Fuzzy Classifier
● The algorithm is composed of three main
stages: image processing stage and facial
feature extraction stage, and emotion
detection stage.
● In image processing stage, the face region
and facial component is extracted by using
fuzzy color filter, virtual face model, and
histogram analysis method.
● The features for emotion detection are
extracted from facial component in facial
feature extraction stage.
FACIAL
EXPRESSION
RECOGNITION:
A DEEP
LEARNING
APPROACH
Facial Emotion Recognition by CNN
➽ Steps:
1. Data Preprocessing
2. Image Augmentation
3. Feature Extraction
4. Training
5. Validation
Dataset Description
The data consists of 48x48 pixel grayscale images of faces. The faces have been
categorized into facial expression in to one of seven categories (0=Angry, 1=Disgust,
2=Fear, 3=Happy, 4=Sad, 5=Surprise, 6=Neutral).
The training set consists of 28,709 examples. The public test set used for the
leaderboard consists of 3,589 examples. The final test set, which was used to determine
the winner of the competition, consists of another 3,589 examples.This dataset was
prepared by Pierre-Luc Carrier and Aaron Courville, as part of an ongoing research
project.
Data Preprocessing
● The fer2013.csv consists of three columns namely emotion, pixels and purpose.
● The column in pixel first of all is stored in a list format.
● Since computational complexity is high for computing pixel values in the range of
(0-255), the data in pixel field is normalized to values between [0-1].
● The face objects stored are reshaped and resized to the mentioned size of 48 X 48.
● The respective emotion labels and their respective pixel values are stored in
objects.
● We use scikit-learn’s train_test_split() function to split the dataset into training
and testing data. The test_size being 0.2 meaning, 20% of data is for validation
while 80% of the data will be trained.
More data is generated using the training set by applying
transformations. It is required if the training set is not sufficient
enough to learn representation. The image data is generated by
transforming the actual training images by rotation, crop, shifts,
shear, zoom, flip, reflection, normalization etc.
Data Augmentation
Mini-Exception Model for Emotion Recognition
The architecture of the Mini_Exception
model consists of:
● Two convolutional layers followed
by batch normalization
● Then one batch is again treated
with a convolutional layer and other
batch is treated by seperable-
convolutional layer.
● The layers are followed my max
pooling and global average pooling
finalized by the softmax algorithm.
Convolutional 2D
The 2D convolution is a fairly simple operation at heart: you start with a kernel, which
is simply a small matrix of weights. This kernel “slides” over the 2D input data,
performing an elementwise multiplication with the part of the input it is currently on,
and then summing up the results into a single output pixel.
Batch Normalization and Max Pooling 2D
Batch normalization reduces the amount by what the hidden unit values shift around
(covariance shift).
In case of Max Pooling, a kernel of size n*n is moved across the matrix and for each
position the max value is taken and put in the corresponding position of the output
matrix.
Global Average Pooling
(GAP) layers to minimize overfitting by reducing the total number of parameters in
the model. Similar to max pooling layers, GAP layers are used to reduce the spatial
dimensions of a three-dimensional tensor.
Optimizer, Loss function and Metrics.
● Loss function used is categorical crossentropy.
● Loss function simply measures the absolute difference between our prediction
and the actual value.
● Cross-entropy loss, or log loss, measures the performance of a classification model
whose output is a probability value between 0 and 1. Cross-entropy loss increases
as the predicted probability diverges from the actual label. So predicting a
probability of .012 when the actual observation label is 1 would be bad and result
in a high loss value.
● Optimizer used is the Adam() optimizer.
● Adam stands for Adaptive Moment Estimation. Adaptive
Moment Estimation (Adam) is another method that
computes adaptive learning rates for each parameter. In
addition to storing an exponentially decaying average of
past squared gradients like AdaDelta ,Adam also keeps
an exponentially decaying average of past gradients M(t),
similar to momentum:
Validation
● In the validation phase, various OpenCV functions and Keras functions have been
used.
● Initially the video frame is stored in a video object.
● An LBP cascade classifier is used to detect facial region of interest
● The image frame is converted into grayscale and resized and reshaped with the
help of numpy.
● This resized image is fed to the predictor which is loaded by
keras.models.load_model() function.
● The max argument is output.
● A rectangle is drawn around the facial regions and the output is formatted above
the rectangular box.
Performance Evaluation
The model gives 65-66% accuracy on validation set while training the model. The CNN
model learns the representation features of emotions from the training images. Below
are few epochs of training process with batch size of 64.
Output and statistics
Facial Emotion Recognition: A Deep Learning approach

More Related Content

What's hot

Speech emotion recognition
Speech emotion recognitionSpeech emotion recognition
Speech emotion recognition
saniya shaikh
 
4837410 automatic-facial-emotion-recognition
4837410 automatic-facial-emotion-recognition4837410 automatic-facial-emotion-recognition
4837410 automatic-facial-emotion-recognitionNgaire Taylor
 
Emotion recognition using image processing in deep learning
Emotion recognition using image     processing in deep learningEmotion recognition using image     processing in deep learning
Emotion recognition using image processing in deep learning
vishnuv43
 
Facial emotion detection on babies' emotional face using Deep Learning.
Facial emotion detection on babies' emotional face using Deep Learning.Facial emotion detection on babies' emotional face using Deep Learning.
Facial emotion detection on babies' emotional face using Deep Learning.
Takrim Ul Islam Laskar
 
Presentation on FACE MASK DETECTION
Presentation on FACE MASK DETECTIONPresentation on FACE MASK DETECTION
Presentation on FACE MASK DETECTION
ShantaJha2
 
Facial emotion recognition
Facial emotion recognitionFacial emotion recognition
Facial emotion recognition
Rahin Patel
 
Facial Expression Recognition
Facial Expression Recognition Facial Expression Recognition
Facial Expression Recognition
Rupinder Saini
 
Facial Emoji Recognition
Facial Emoji RecognitionFacial Emoji Recognition
Facial Emoji Recognition
ijtsrd
 
Face detection presentation slide
Face detection  presentation slideFace detection  presentation slide
Face detection presentation slide
Sanjoy Dutta
 
Face detection and recognition
Face detection and recognitionFace detection and recognition
Face detection and recognition
Pankaj Thakur
 
Face Detection and Recognition System
Face Detection and Recognition SystemFace Detection and Recognition System
Face Detection and Recognition System
Zara Tariq
 
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
raihansikdar
 
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
 
Face recognition attendance system
Face recognition attendance systemFace recognition attendance system
Face recognition attendance system
Naomi Kulkarni
 
Emotion based music player
Emotion based music playerEmotion based music player
Emotion based music player
Nizam Muhammed
 
Face recognition ppt
Face recognition pptFace recognition ppt
Face recognition pptSantosh Kumar
 
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
 
Attendance Management System using Face Recognition
Attendance Management System using Face RecognitionAttendance Management System using Face Recognition
Attendance Management System using Face Recognition
NanditaDutta4
 
Computer Vision - Real Time Face Recognition using Open CV and Python
Computer Vision - Real Time Face Recognition using Open CV and PythonComputer Vision - Real Time Face Recognition using Open CV and Python
Computer Vision - Real Time Face Recognition using Open CV and Python
Akash Satamkar
 
Automated Face Detection System
Automated Face Detection SystemAutomated Face Detection System
Automated Face Detection System
Abhiroop Ghatak
 

What's hot (20)

Speech emotion recognition
Speech emotion recognitionSpeech emotion recognition
Speech emotion recognition
 
4837410 automatic-facial-emotion-recognition
4837410 automatic-facial-emotion-recognition4837410 automatic-facial-emotion-recognition
4837410 automatic-facial-emotion-recognition
 
Emotion recognition using image processing in deep learning
Emotion recognition using image     processing in deep learningEmotion recognition using image     processing in deep learning
Emotion recognition using image processing in deep learning
 
Facial emotion detection on babies' emotional face using Deep Learning.
Facial emotion detection on babies' emotional face using Deep Learning.Facial emotion detection on babies' emotional face using Deep Learning.
Facial emotion detection on babies' emotional face using Deep Learning.
 
Presentation on FACE MASK DETECTION
Presentation on FACE MASK DETECTIONPresentation on FACE MASK DETECTION
Presentation on FACE MASK DETECTION
 
Facial emotion recognition
Facial emotion recognitionFacial emotion recognition
Facial emotion recognition
 
Facial Expression Recognition
Facial Expression Recognition Facial Expression Recognition
Facial Expression Recognition
 
Facial Emoji Recognition
Facial Emoji RecognitionFacial Emoji Recognition
Facial Emoji Recognition
 
Face detection presentation slide
Face detection  presentation slideFace detection  presentation slide
Face detection presentation slide
 
Face detection and recognition
Face detection and recognitionFace detection and recognition
Face detection and recognition
 
Face Detection and Recognition System
Face Detection and Recognition SystemFace Detection and Recognition System
Face Detection and Recognition System
 
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
 
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
 
Face recognition attendance system
Face recognition attendance systemFace recognition attendance system
Face recognition attendance system
 
Emotion based music player
Emotion based music playerEmotion based music player
Emotion based music player
 
Face recognition ppt
Face recognition pptFace recognition ppt
Face recognition ppt
 
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.
 
Attendance Management System using Face Recognition
Attendance Management System using Face RecognitionAttendance Management System using Face Recognition
Attendance Management System using Face Recognition
 
Computer Vision - Real Time Face Recognition using Open CV and Python
Computer Vision - Real Time Face Recognition using Open CV and PythonComputer Vision - Real Time Face Recognition using Open CV and Python
Computer Vision - Real Time Face Recognition using Open CV and Python
 
Automated Face Detection System
Automated Face Detection SystemAutomated Face Detection System
Automated Face Detection System
 

Similar to Facial Emotion Recognition: A Deep Learning approach

IRJET - Emotion Recognising System-Crowd Behavior Analysis
IRJET -  	  Emotion Recognising System-Crowd Behavior AnalysisIRJET -  	  Emotion Recognising System-Crowd Behavior Analysis
IRJET - Emotion Recognising System-Crowd Behavior Analysis
IRJET Journal
 
Face recognition technology
Face recognition technologyFace recognition technology
Face recognition technology
ranjit banshpal
 
Sign Detection from Hearing Impaired
Sign Detection from Hearing ImpairedSign Detection from Hearing Impaired
Sign Detection from Hearing Impaired
IRJET Journal
 
IRJET- An Overview on Automated Emotion Recognition System
IRJET-  	  An Overview on Automated Emotion Recognition SystemIRJET-  	  An Overview on Automated Emotion Recognition System
IRJET- An Overview on Automated Emotion Recognition System
IRJET Journal
 
IRJET - Hand Gesture Recognition to Perform System Operations
IRJET -  	  Hand Gesture Recognition to Perform System OperationsIRJET -  	  Hand Gesture Recognition to Perform System Operations
IRJET - Hand Gesture Recognition to Perform System Operations
IRJET Journal
 
Methods of Optimization in Machine Learning
Methods of Optimization in Machine LearningMethods of Optimization in Machine Learning
Methods of Optimization in Machine Learning
Knoldus Inc.
 
IRJET - Skin Disease Predictor using Deep Learning
IRJET - Skin Disease Predictor using Deep LearningIRJET - Skin Disease Predictor using Deep Learning
IRJET - Skin Disease Predictor using Deep Learning
IRJET Journal
 
A DEEP LEARNING APPROACH FOR SEMANTIC SEGMENTATION IN BRAIN TUMOR IMAGES
A DEEP LEARNING APPROACH FOR SEMANTIC SEGMENTATION IN BRAIN TUMOR IMAGESA DEEP LEARNING APPROACH FOR SEMANTIC SEGMENTATION IN BRAIN TUMOR IMAGES
A DEEP LEARNING APPROACH FOR SEMANTIC SEGMENTATION IN BRAIN TUMOR IMAGES
PNandaSai
 
cvpresentation-190812154654 (1).pptx
cvpresentation-190812154654 (1).pptxcvpresentation-190812154654 (1).pptx
cvpresentation-190812154654 (1).pptx
PyariMohanJena
 
ppt 20BET1024.pptx
ppt 20BET1024.pptxppt 20BET1024.pptx
ppt 20BET1024.pptx
ManeetBali
 
Bangla Handwritten Digit Recognition Report.pdf
Bangla Handwritten Digit Recognition  Report.pdfBangla Handwritten Digit Recognition  Report.pdf
Bangla Handwritten Digit Recognition Report.pdf
KhondokerAbuNaim
 
Real-Time Face Tracking with GPU Acceleration
Real-Time Face Tracking with GPU AccelerationReal-Time Face Tracking with GPU Acceleration
Real-Time Face Tracking with GPU Acceleration
QuEST Global (erstwhile NeST Software)
 
CUDA Accelerated Face Recognition
CUDA Accelerated Face RecognitionCUDA Accelerated Face Recognition
CUDA Accelerated Face Recognition
QuEST Global (erstwhile NeST Software)
 
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
 
IRJET- Facial Expression Recognition using GPA Analysis
IRJET-  	  Facial Expression Recognition using GPA AnalysisIRJET-  	  Facial Expression Recognition using GPA Analysis
IRJET- Facial Expression Recognition using GPA Analysis
IRJET Journal
 
IRJET- Mango Classification using Convolutional Neural Networks
IRJET- Mango Classification using Convolutional Neural NetworksIRJET- Mango Classification using Convolutional Neural Networks
IRJET- Mango Classification using Convolutional Neural Networks
IRJET Journal
 
IRJET- Survey on Face Recognition using Biometrics
IRJET-  	  Survey on Face Recognition using BiometricsIRJET-  	  Survey on Face Recognition using Biometrics
IRJET- Survey on Face Recognition using Biometrics
IRJET Journal
 
IRJET - Face Recognition based Attendance System
IRJET -  	  Face Recognition based Attendance SystemIRJET -  	  Face Recognition based Attendance System
IRJET - Face Recognition based Attendance System
IRJET Journal
 
Brain Tumor Classification using Support Vector Machine
Brain Tumor Classification using Support Vector MachineBrain Tumor Classification using Support Vector Machine
Brain Tumor Classification using Support Vector Machine
IRJET Journal
 
IRJET- Class Attendance using Face Detection and Recognition with OPENCV
IRJET- Class Attendance using Face Detection and Recognition with OPENCVIRJET- Class Attendance using Face Detection and Recognition with OPENCV
IRJET- Class Attendance using Face Detection and Recognition with OPENCV
IRJET Journal
 

Similar to Facial Emotion Recognition: A Deep Learning approach (20)

IRJET - Emotion Recognising System-Crowd Behavior Analysis
IRJET -  	  Emotion Recognising System-Crowd Behavior AnalysisIRJET -  	  Emotion Recognising System-Crowd Behavior Analysis
IRJET - Emotion Recognising System-Crowd Behavior Analysis
 
Face recognition technology
Face recognition technologyFace recognition technology
Face recognition technology
 
Sign Detection from Hearing Impaired
Sign Detection from Hearing ImpairedSign Detection from Hearing Impaired
Sign Detection from Hearing Impaired
 
IRJET- An Overview on Automated Emotion Recognition System
IRJET-  	  An Overview on Automated Emotion Recognition SystemIRJET-  	  An Overview on Automated Emotion Recognition System
IRJET- An Overview on Automated Emotion Recognition System
 
IRJET - Hand Gesture Recognition to Perform System Operations
IRJET -  	  Hand Gesture Recognition to Perform System OperationsIRJET -  	  Hand Gesture Recognition to Perform System Operations
IRJET - Hand Gesture Recognition to Perform System Operations
 
Methods of Optimization in Machine Learning
Methods of Optimization in Machine LearningMethods of Optimization in Machine Learning
Methods of Optimization in Machine Learning
 
IRJET - Skin Disease Predictor using Deep Learning
IRJET - Skin Disease Predictor using Deep LearningIRJET - Skin Disease Predictor using Deep Learning
IRJET - Skin Disease Predictor using Deep Learning
 
A DEEP LEARNING APPROACH FOR SEMANTIC SEGMENTATION IN BRAIN TUMOR IMAGES
A DEEP LEARNING APPROACH FOR SEMANTIC SEGMENTATION IN BRAIN TUMOR IMAGESA DEEP LEARNING APPROACH FOR SEMANTIC SEGMENTATION IN BRAIN TUMOR IMAGES
A DEEP LEARNING APPROACH FOR SEMANTIC SEGMENTATION IN BRAIN TUMOR IMAGES
 
cvpresentation-190812154654 (1).pptx
cvpresentation-190812154654 (1).pptxcvpresentation-190812154654 (1).pptx
cvpresentation-190812154654 (1).pptx
 
ppt 20BET1024.pptx
ppt 20BET1024.pptxppt 20BET1024.pptx
ppt 20BET1024.pptx
 
Bangla Handwritten Digit Recognition Report.pdf
Bangla Handwritten Digit Recognition  Report.pdfBangla Handwritten Digit Recognition  Report.pdf
Bangla Handwritten Digit Recognition Report.pdf
 
Real-Time Face Tracking with GPU Acceleration
Real-Time Face Tracking with GPU AccelerationReal-Time Face Tracking with GPU Acceleration
Real-Time Face Tracking with GPU Acceleration
 
CUDA Accelerated Face Recognition
CUDA Accelerated Face RecognitionCUDA Accelerated Face Recognition
CUDA Accelerated Face Recognition
 
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- Facial Expression Recognition using GPA Analysis
IRJET-  	  Facial Expression Recognition using GPA AnalysisIRJET-  	  Facial Expression Recognition using GPA Analysis
IRJET- Facial Expression Recognition using GPA Analysis
 
IRJET- Mango Classification using Convolutional Neural Networks
IRJET- Mango Classification using Convolutional Neural NetworksIRJET- Mango Classification using Convolutional Neural Networks
IRJET- Mango Classification using Convolutional Neural Networks
 
IRJET- Survey on Face Recognition using Biometrics
IRJET-  	  Survey on Face Recognition using BiometricsIRJET-  	  Survey on Face Recognition using Biometrics
IRJET- Survey on Face Recognition using Biometrics
 
IRJET - Face Recognition based Attendance System
IRJET -  	  Face Recognition based Attendance SystemIRJET -  	  Face Recognition based Attendance System
IRJET - Face Recognition based Attendance System
 
Brain Tumor Classification using Support Vector Machine
Brain Tumor Classification using Support Vector MachineBrain Tumor Classification using Support Vector Machine
Brain Tumor Classification using Support Vector Machine
 
IRJET- Class Attendance using Face Detection and Recognition with OPENCV
IRJET- Class Attendance using Face Detection and Recognition with OPENCVIRJET- Class Attendance using Face Detection and Recognition with OPENCV
IRJET- Class Attendance using Face Detection and Recognition with OPENCV
 

Recently uploaded

AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 

Recently uploaded (20)

AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 

Facial Emotion Recognition: A Deep Learning approach

  • 1. Facial Emotion Recognition with Facial Gestures By Ashwin Kedari Rachha 3263
  • 2. Why Emotion Detection? ● The motivation behind choosing this topic specifically lies in the huge investments large corporations do in feedbacks and surveys but fail to get equitable response on their investments. ● Emotion Detection through facial gestures is a technology that aims to improve product and services performance by monitoring customer behavior to certain products or service staff by their evaluation
  • 3. Some Companies that make us of emotion detection... ● While Disney uses emotion-detection tech to find out opinion on a completed project, other brands have used it to directly inform advertising and digital marketing. ● Kellogg’s is just one high-profile example, having used Affectiva’s software to test audience reaction to ads for its cereal. ● Unilever does this, using HireVue’s AI-powered technology to screen prospective candidates based on factors like body language and mood. In doing so, the company is able to find the person whose personality and characteristics are best suited to the job.
  • 4. Emotion Expression Recognition Using SVM What are Support Vector Machines? SVMs plot the training vectors in high-dimensional feature space, and label each vector with its class. A hyperplane is drawn between the training vectors that maximizes the distance between the different classes. The hyperplane is determined through a kernel function (radial basis, linear, polynomial or sigmoid), which is given as input to the classification software. [1999][Joachims, 1998b].
  • 5. Facial Expression Detection using Fuzzy Classifier ● The algorithm is composed of three main stages: image processing stage and facial feature extraction stage, and emotion detection stage. ● In image processing stage, the face region and facial component is extracted by using fuzzy color filter, virtual face model, and histogram analysis method. ● The features for emotion detection are extracted from facial component in facial feature extraction stage.
  • 7. Facial Emotion Recognition by CNN ➽ Steps: 1. Data Preprocessing 2. Image Augmentation 3. Feature Extraction 4. Training 5. Validation
  • 8. Dataset Description The data consists of 48x48 pixel grayscale images of faces. The faces have been categorized into facial expression in to one of seven categories (0=Angry, 1=Disgust, 2=Fear, 3=Happy, 4=Sad, 5=Surprise, 6=Neutral). The training set consists of 28,709 examples. The public test set used for the leaderboard consists of 3,589 examples. The final test set, which was used to determine the winner of the competition, consists of another 3,589 examples.This dataset was prepared by Pierre-Luc Carrier and Aaron Courville, as part of an ongoing research project.
  • 9. Data Preprocessing ● The fer2013.csv consists of three columns namely emotion, pixels and purpose. ● The column in pixel first of all is stored in a list format. ● Since computational complexity is high for computing pixel values in the range of (0-255), the data in pixel field is normalized to values between [0-1]. ● The face objects stored are reshaped and resized to the mentioned size of 48 X 48. ● The respective emotion labels and their respective pixel values are stored in objects. ● We use scikit-learn’s train_test_split() function to split the dataset into training and testing data. The test_size being 0.2 meaning, 20% of data is for validation while 80% of the data will be trained.
  • 10.
  • 11. More data is generated using the training set by applying transformations. It is required if the training set is not sufficient enough to learn representation. The image data is generated by transforming the actual training images by rotation, crop, shifts, shear, zoom, flip, reflection, normalization etc. Data Augmentation
  • 12. Mini-Exception Model for Emotion Recognition The architecture of the Mini_Exception model consists of: ● Two convolutional layers followed by batch normalization ● Then one batch is again treated with a convolutional layer and other batch is treated by seperable- convolutional layer. ● The layers are followed my max pooling and global average pooling finalized by the softmax algorithm.
  • 13. Convolutional 2D The 2D convolution is a fairly simple operation at heart: you start with a kernel, which is simply a small matrix of weights. This kernel “slides” over the 2D input data, performing an elementwise multiplication with the part of the input it is currently on, and then summing up the results into a single output pixel.
  • 14. Batch Normalization and Max Pooling 2D Batch normalization reduces the amount by what the hidden unit values shift around (covariance shift). In case of Max Pooling, a kernel of size n*n is moved across the matrix and for each position the max value is taken and put in the corresponding position of the output matrix.
  • 15. Global Average Pooling (GAP) layers to minimize overfitting by reducing the total number of parameters in the model. Similar to max pooling layers, GAP layers are used to reduce the spatial dimensions of a three-dimensional tensor.
  • 16. Optimizer, Loss function and Metrics. ● Loss function used is categorical crossentropy. ● Loss function simply measures the absolute difference between our prediction and the actual value. ● Cross-entropy loss, or log loss, measures the performance of a classification model whose output is a probability value between 0 and 1. Cross-entropy loss increases as the predicted probability diverges from the actual label. So predicting a probability of .012 when the actual observation label is 1 would be bad and result in a high loss value.
  • 17. ● Optimizer used is the Adam() optimizer. ● Adam stands for Adaptive Moment Estimation. Adaptive Moment Estimation (Adam) is another method that computes adaptive learning rates for each parameter. In addition to storing an exponentially decaying average of past squared gradients like AdaDelta ,Adam also keeps an exponentially decaying average of past gradients M(t), similar to momentum:
  • 18. Validation ● In the validation phase, various OpenCV functions and Keras functions have been used. ● Initially the video frame is stored in a video object. ● An LBP cascade classifier is used to detect facial region of interest ● The image frame is converted into grayscale and resized and reshaped with the help of numpy. ● This resized image is fed to the predictor which is loaded by keras.models.load_model() function. ● The max argument is output. ● A rectangle is drawn around the facial regions and the output is formatted above the rectangular box.
  • 19. Performance Evaluation The model gives 65-66% accuracy on validation set while training the model. The CNN model learns the representation features of emotions from the training images. Below are few epochs of training process with batch size of 64.