SlideShare a Scribd company logo
1 of 11
Download to read offline
Emotion Detection
Using AI
How Emotion Detection can change the future
BY-ARYAN TRISAL
In this Presentation
Here's what we have covered:
Introduction
Problems Faced
Solutions
Need for the proposed system
Implementation
Code
Future Scope
Introduction
Facial expression is an essential part of
communication. For this reason, the issue of
human emotions evaluation using a computer is a
very interesting topic, which has gained more and
more attention in recent years. It is mainly related
to the possibility of applying facial expression
recognition in many fields such as HCI, video
games, virtual reality, and analysing customer
satisfaction etc. Emotion’s determination
(recognition process) is often performed in 3 basic
phases: face detection, facial features extraction,
and last stage - expression classification.
Facial emotion
recognition is a
complex task and
the machine
learning approach
to recognize faces
requires several
steps to perform
it, some are:
Feature selection: This stage refers to attribute
selection for the training of the machine learning
algorithm. The process includes the selection of
predictors for construction of the learning system
Feature classification: When it comes to
supervised learning algorithms, classification
consists of two stages. Training and classification,
where training helps in discovering which features
are helpful in classification.
Feature extraction:Machine learning requires
numerical data for learning and training. During
feature extraction, processing is done to
transform arbitrary data, text or images, to gather
the numerical data
Classifiers:This is the final step in this process.
Based on the inference from the features, the
algorithm performs data classification.
Problems Faced
Technical challenges
Emotion recognition shares a lot of challenges with detecting moving
objects in the video identifying an object, continuous detection,
incomplete or unpredictable actions, etc.
Data augmentation
As with any machine learning and deep learning algorithms, ER solutions
require a lot of training data. This data must include videos at various
frame rates, from various angles, with various backgrounds, with people
of different genders, nationalities, and races, etc.
Solutions
1.Create your own dataset: This is the most
expensive and time-consuming way, but you’ll end
up with a dataset perfectly suited for your task.
2.Combine several datasets: You can cross-check
the performance of your solution on several other
datasets.
3.Modify the data as you go: Some researchers
suggest editing videos that you’ve already used:
crop them, change the lighting, slow them down,
speed them up, add noise, etc.
Need for the proposed system
Detecting emotions with technology is quite a challenging task, yet one where machine
learning algorithms have shown great promise. By using Facial Emotion Detection,
businesses can process images, and videos in real-time for monitoring video feeds or
automating video analytics, thus saving costs and making life better for their users. Some
examples are given below:
Emotion recognition in video game testing
Automotive industry and emotion recognition
Emotion recognition in Health Care
Implementation
Tools and Libraries used
OpenCV
OpenCV is the library we
will be using for image
transformation functions
such as converting the
image to grayscale
Deep Learning
Deep learning is a subset
of machine learning in
artificial intelligence that
has networks capable of
learning unsupervised from
data that is unstructured
or unlabelled
NumPy
NumPy is a library for the
Python programming
language, adding support
for large, multi-
dimensional arrays
Keras
Keras is an open-source
software library that
provides a Python
interface for artificial
neural networks.
Python
Python is a powerful
scripting language and is
very useful for solving
statistical problems
involving machine learning
algorithms
CODE
from keras.models import load_model
from time import sleep
from keras.preprocessing.image import img_to_array
from keras.preprocessing import image
import cv2
import numpy as np
face_classifier =
cv2.CascadeClassifier('./haarcascade_frontalface_default.xml')
classifier =load_model('./Emotion_Detection.h5')
class_labels = ['Angry','Happy','Neutral',]
cap = cv2.VideoCapture(0)
while True:
# Grab a single frame of video
ret, frame = cap.read()
labels = []
gray = cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)
faces = face_classifier.detectMultiScale(gray,1.3,5)
for (x,y,w,h) in faces:
cv2.rectangle(frame,(x,y),(x+w,y+h),(255,0,0),2)
roi_gray = gray[y:y+h,x:x+w]
roi_gray = cv2.resize(roi_gray,(48,48),interpolation=cv2.INTER_AREA)
if np.sum([roi_gray])!=0:
roi = roi_gray.astype('float')/255.0
roi = img_to_array(roi)
roi = np.expand_dims(roi,axis=0)
# make a prediction on the ROI, then lookup the class
preds = classifier.predict(roi)[0]
print("nprediction = ",preds)
label=class_labels[preds.argmax()]
print("nprediction max = ",preds.argmax())
print("nlabel = ",label)
label_position = (x,y)
cv2.putText(frame,label,label_position,cv2.FONT_HERSHEY_SIMPLEX,2,
(0,255,0),3)
else:
cv2.putText(frame,'No Face Found',
(20,60),cv2.FONT_HERSHEY_SIMPLEX,2,(0,255,0),3)
print("nn")
cv2.imshow('Emotion Detector',frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release() cv2.destroyAllWindows()
FUTURE SCOPE
Automotive Safety and Research Systems:
For the safety of the driver and passengers by recognizing the facial expression of the driver.
Medical Research into Autism:
Ability to read the facial expression of people with autism and finding the best solutions for
them.
Market Research:
Facial expression marketing to help get the necessary information regarding respective
trends.
Pay-per-Laugh:
Faced with rising ticket prices and declining audiences in 2014, a Spanish theatre
experimented with charging audiences 30 cents a laugh for its comedy shows, installing
emotion recognition cameras in front of each seat, and fixing a ceiling of 24 euros per
customer for the more successful events.
EMOTION DETECTION USING AI

More Related Content

What's hot

Speech emotion recognition
Speech emotion recognitionSpeech emotion recognition
Speech emotion recognitionsaniya shaikh
 
Emotion recognition using facial expressions and speech
Emotion recognition using facial expressions and speechEmotion recognition using facial expressions and speech
Emotion recognition using facial expressions and speechLakshmi Sarvani Videla
 
Hand Gesture Recognition Applications
Hand Gesture Recognition ApplicationsHand Gesture Recognition Applications
Hand Gesture Recognition ApplicationsImon_Barua
 
SPEECH BASED EMOTION RECOGNITION USING VOICE
SPEECH BASED  EMOTION RECOGNITION USING VOICESPEECH BASED  EMOTION RECOGNITION USING VOICE
SPEECH BASED EMOTION RECOGNITION USING VOICEVamshidharSingh
 
HUMAN EMOTION RECOGNIITION SYSTEM
HUMAN EMOTION RECOGNIITION SYSTEMHUMAN EMOTION RECOGNIITION SYSTEM
HUMAN EMOTION RECOGNIITION SYSTEMsoumi sarkar
 
Face recognition technology
Face recognition technologyFace recognition technology
Face recognition technologyranjit banshpal
 
Emotion based music player
Emotion based music playerEmotion based music player
Emotion based music playerNizam Muhammed
 
Emotion Speech Recognition - Convolutional Neural Network Capstone Project
Emotion Speech Recognition - Convolutional Neural Network Capstone ProjectEmotion Speech Recognition - Convolutional Neural Network Capstone Project
Emotion Speech Recognition - Convolutional Neural Network Capstone ProjectDiego Rios
 
Emotion Recognition Based On Audio Speech
Emotion Recognition Based On Audio SpeechEmotion Recognition Based On Audio Speech
Emotion Recognition Based On Audio SpeechIOSR Journals
 
Introduction to emotion detection
Introduction to emotion detectionIntroduction to emotion detection
Introduction to emotion detectionTyler Schnoebelen
 
Machine learning seminar ppt
Machine learning seminar pptMachine learning seminar ppt
Machine learning seminar pptRAHUL DANGWAL
 
Face Recognition System for Door Unlocking
Face Recognition System for Door UnlockingFace Recognition System for Door Unlocking
Face Recognition System for Door UnlockingHassan Tariq
 
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
 
Human age and gender Detection
Human age and gender DetectionHuman age and gender Detection
Human age and gender DetectionAbhiAchalla
 
4837410 automatic-facial-emotion-recognition
4837410 automatic-facial-emotion-recognition4837410 automatic-facial-emotion-recognition
4837410 automatic-facial-emotion-recognitionNgaire Taylor
 
Mind reading computer ppt
Mind reading computer pptMind reading computer ppt
Mind reading computer pptTarun tyagi
 
Emotion Detection in text
Emotion Detection in text Emotion Detection in text
Emotion Detection in text kashif kashif
 
Facial Emoji Recognition
Facial Emoji RecognitionFacial Emoji Recognition
Facial Emoji Recognitionijtsrd
 
Predicting Emotions through Facial Expressions
Predicting Emotions through Facial Expressions  Predicting Emotions through Facial Expressions
Predicting Emotions through Facial Expressions twinkle singh
 
Computational Intelligence and Applications
Computational Intelligence and ApplicationsComputational Intelligence and Applications
Computational Intelligence and ApplicationsChetan Kumar S
 

What's hot (20)

Speech emotion recognition
Speech emotion recognitionSpeech emotion recognition
Speech emotion recognition
 
Emotion recognition using facial expressions and speech
Emotion recognition using facial expressions and speechEmotion recognition using facial expressions and speech
Emotion recognition using facial expressions and speech
 
Hand Gesture Recognition Applications
Hand Gesture Recognition ApplicationsHand Gesture Recognition Applications
Hand Gesture Recognition Applications
 
SPEECH BASED EMOTION RECOGNITION USING VOICE
SPEECH BASED  EMOTION RECOGNITION USING VOICESPEECH BASED  EMOTION RECOGNITION USING VOICE
SPEECH BASED EMOTION RECOGNITION USING VOICE
 
HUMAN EMOTION RECOGNIITION SYSTEM
HUMAN EMOTION RECOGNIITION SYSTEMHUMAN EMOTION RECOGNIITION SYSTEM
HUMAN EMOTION RECOGNIITION SYSTEM
 
Face recognition technology
Face recognition technologyFace recognition technology
Face recognition technology
 
Emotion based music player
Emotion based music playerEmotion based music player
Emotion based music player
 
Emotion Speech Recognition - Convolutional Neural Network Capstone Project
Emotion Speech Recognition - Convolutional Neural Network Capstone ProjectEmotion Speech Recognition - Convolutional Neural Network Capstone Project
Emotion Speech Recognition - Convolutional Neural Network Capstone Project
 
Emotion Recognition Based On Audio Speech
Emotion Recognition Based On Audio SpeechEmotion Recognition Based On Audio Speech
Emotion Recognition Based On Audio Speech
 
Introduction to emotion detection
Introduction to emotion detectionIntroduction to emotion detection
Introduction to emotion detection
 
Machine learning seminar ppt
Machine learning seminar pptMachine learning seminar ppt
Machine learning seminar ppt
 
Face Recognition System for Door Unlocking
Face Recognition System for Door UnlockingFace Recognition System for Door Unlocking
Face Recognition System for Door Unlocking
 
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.
 
Human age and gender Detection
Human age and gender DetectionHuman age and gender Detection
Human age and gender Detection
 
4837410 automatic-facial-emotion-recognition
4837410 automatic-facial-emotion-recognition4837410 automatic-facial-emotion-recognition
4837410 automatic-facial-emotion-recognition
 
Mind reading computer ppt
Mind reading computer pptMind reading computer ppt
Mind reading computer ppt
 
Emotion Detection in text
Emotion Detection in text Emotion Detection in text
Emotion Detection in text
 
Facial Emoji Recognition
Facial Emoji RecognitionFacial Emoji Recognition
Facial Emoji Recognition
 
Predicting Emotions through Facial Expressions
Predicting Emotions through Facial Expressions  Predicting Emotions through Facial Expressions
Predicting Emotions through Facial Expressions
 
Computational Intelligence and Applications
Computational Intelligence and ApplicationsComputational Intelligence and Applications
Computational Intelligence and Applications
 

Similar to EMOTION DETECTION USING AI

Machine Learning AND Deep Learning for OpenPOWER
Machine Learning AND Deep Learning for OpenPOWERMachine Learning AND Deep Learning for OpenPOWER
Machine Learning AND Deep Learning for OpenPOWERGanesan Narayanasamy
 
Face Recognition Home Security System
Face Recognition Home Security SystemFace Recognition Home Security System
Face Recognition Home Security SystemSuman Mia
 
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
 
Machine Learning Contents.pptx
Machine Learning Contents.pptxMachine Learning Contents.pptx
Machine Learning Contents.pptxNaveenkushwaha18
 
Deep learning and its problem types
Deep learning and its problem typesDeep learning and its problem types
Deep learning and its problem typesQualitasTechnology
 
Machine Learning for Designers - DX Meetup Basel
Machine Learning for Designers - DX Meetup BaselMachine Learning for Designers - DX Meetup Basel
Machine Learning for Designers - DX Meetup BaselMemi Beltrame
 
What Is Computer Vision as a Service? (Only Guide You Need)
What Is Computer Vision as a Service? (Only Guide You Need)What Is Computer Vision as a Service? (Only Guide You Need)
What Is Computer Vision as a Service? (Only Guide You Need)Kavika Roy
 
Emotion Detection Using Facial Expression Recognition to Assist the Visually ...
Emotion Detection Using Facial Expression Recognition to Assist the Visually ...Emotion Detection Using Facial Expression Recognition to Assist the Visually ...
Emotion Detection Using Facial Expression Recognition to Assist the Visually ...IRJET Journal
 
Hrms industrial training report
Hrms industrial training reportHrms industrial training report
Hrms industrial training reportNitesh Dubey
 
Final Report on Optical Character Recognition
Final Report on Optical Character Recognition Final Report on Optical Character Recognition
Final Report on Optical Character Recognition Vidyut Singhania
 
Hyf azure ml_1
Hyf azure ml_1Hyf azure ml_1
Hyf azure ml_1KatoK1
 
face_detection_att.pptx
face_detection_att.pptxface_detection_att.pptx
face_detection_att.pptxDeeJeeV
 
Amazon SageMaker 內建機器學習演算法 (Level 400)
Amazon SageMaker 內建機器學習演算法 (Level 400)Amazon SageMaker 內建機器學習演算法 (Level 400)
Amazon SageMaker 內建機器學習演算法 (Level 400)Amazon Web Services
 
IRJET - Cognitive based Emotion Analysis of a Child Reading a Book
IRJET -  	  Cognitive based Emotion Analysis of a Child Reading a BookIRJET -  	  Cognitive based Emotion Analysis of a Child Reading a Book
IRJET - Cognitive based Emotion Analysis of a Child Reading a BookIRJET Journal
 
Machine learning_ Replicating Human Brain
Machine learning_ Replicating Human BrainMachine learning_ Replicating Human Brain
Machine learning_ Replicating Human BrainNishant Jain
 

Similar to EMOTION DETECTION USING AI (20)

Machine Learning AND Deep Learning for OpenPOWER
Machine Learning AND Deep Learning for OpenPOWERMachine Learning AND Deep Learning for OpenPOWER
Machine Learning AND Deep Learning for OpenPOWER
 
Face Recognition Home Security System
Face Recognition Home Security SystemFace Recognition Home Security System
Face Recognition Home Security System
 
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)
 
Face Scope.pptx
Face Scope.pptxFace Scope.pptx
Face Scope.pptx
 
A guide to Face Detection in Python.pdf
A guide to Face Detection in Python.pdfA guide to Face Detection in Python.pdf
A guide to Face Detection in Python.pdf
 
Machine Learning Contents.pptx
Machine Learning Contents.pptxMachine Learning Contents.pptx
Machine Learning Contents.pptx
 
Deep learning and its problem types
Deep learning and its problem typesDeep learning and its problem types
Deep learning and its problem types
 
Machine Learning for Designers - DX Meetup Basel
Machine Learning for Designers - DX Meetup BaselMachine Learning for Designers - DX Meetup Basel
Machine Learning for Designers - DX Meetup Basel
 
What Is Computer Vision as a Service? (Only Guide You Need)
What Is Computer Vision as a Service? (Only Guide You Need)What Is Computer Vision as a Service? (Only Guide You Need)
What Is Computer Vision as a Service? (Only Guide You Need)
 
Emotion Detection Using Facial Expression Recognition to Assist the Visually ...
Emotion Detection Using Facial Expression Recognition to Assist the Visually ...Emotion Detection Using Facial Expression Recognition to Assist the Visually ...
Emotion Detection Using Facial Expression Recognition to Assist the Visually ...
 
Hrms industrial training report
Hrms industrial training reportHrms industrial training report
Hrms industrial training report
 
AI NOTES.docx
AI NOTES.docxAI NOTES.docx
AI NOTES.docx
 
Final Report on Optical Character Recognition
Final Report on Optical Character Recognition Final Report on Optical Character Recognition
Final Report on Optical Character Recognition
 
Hyf azure ml_1
Hyf azure ml_1Hyf azure ml_1
Hyf azure ml_1
 
face_detection_att.pptx
face_detection_att.pptxface_detection_att.pptx
face_detection_att.pptx
 
Amazon SageMaker 內建機器學習演算法 (Level 400)
Amazon SageMaker 內建機器學習演算法 (Level 400)Amazon SageMaker 內建機器學習演算法 (Level 400)
Amazon SageMaker 內建機器學習演算法 (Level 400)
 
IRJET - Cognitive based Emotion Analysis of a Child Reading a Book
IRJET -  	  Cognitive based Emotion Analysis of a Child Reading a BookIRJET -  	  Cognitive based Emotion Analysis of a Child Reading a Book
IRJET - Cognitive based Emotion Analysis of a Child Reading a Book
 
Machine learning_ Replicating Human Brain
Machine learning_ Replicating Human BrainMachine learning_ Replicating Human Brain
Machine learning_ Replicating Human Brain
 
Work Portfolio
Work PortfolioWork Portfolio
Work Portfolio
 
Python Project.pptx
Python Project.pptxPython Project.pptx
Python Project.pptx
 

Recently uploaded

Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...Call Girls in Nagpur High Profile
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 

Recently uploaded (20)

Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 

EMOTION DETECTION USING AI

  • 1. Emotion Detection Using AI How Emotion Detection can change the future BY-ARYAN TRISAL
  • 2. In this Presentation Here's what we have covered: Introduction Problems Faced Solutions Need for the proposed system Implementation Code Future Scope
  • 3. Introduction Facial expression is an essential part of communication. For this reason, the issue of human emotions evaluation using a computer is a very interesting topic, which has gained more and more attention in recent years. It is mainly related to the possibility of applying facial expression recognition in many fields such as HCI, video games, virtual reality, and analysing customer satisfaction etc. Emotion’s determination (recognition process) is often performed in 3 basic phases: face detection, facial features extraction, and last stage - expression classification.
  • 4. Facial emotion recognition is a complex task and the machine learning approach to recognize faces requires several steps to perform it, some are: Feature selection: This stage refers to attribute selection for the training of the machine learning algorithm. The process includes the selection of predictors for construction of the learning system Feature classification: When it comes to supervised learning algorithms, classification consists of two stages. Training and classification, where training helps in discovering which features are helpful in classification. Feature extraction:Machine learning requires numerical data for learning and training. During feature extraction, processing is done to transform arbitrary data, text or images, to gather the numerical data Classifiers:This is the final step in this process. Based on the inference from the features, the algorithm performs data classification.
  • 5. Problems Faced Technical challenges Emotion recognition shares a lot of challenges with detecting moving objects in the video identifying an object, continuous detection, incomplete or unpredictable actions, etc. Data augmentation As with any machine learning and deep learning algorithms, ER solutions require a lot of training data. This data must include videos at various frame rates, from various angles, with various backgrounds, with people of different genders, nationalities, and races, etc.
  • 6. Solutions 1.Create your own dataset: This is the most expensive and time-consuming way, but you’ll end up with a dataset perfectly suited for your task. 2.Combine several datasets: You can cross-check the performance of your solution on several other datasets. 3.Modify the data as you go: Some researchers suggest editing videos that you’ve already used: crop them, change the lighting, slow them down, speed them up, add noise, etc.
  • 7. Need for the proposed system Detecting emotions with technology is quite a challenging task, yet one where machine learning algorithms have shown great promise. By using Facial Emotion Detection, businesses can process images, and videos in real-time for monitoring video feeds or automating video analytics, thus saving costs and making life better for their users. Some examples are given below: Emotion recognition in video game testing Automotive industry and emotion recognition Emotion recognition in Health Care
  • 8. Implementation Tools and Libraries used OpenCV OpenCV is the library we will be using for image transformation functions such as converting the image to grayscale Deep Learning Deep learning is a subset of machine learning in artificial intelligence that has networks capable of learning unsupervised from data that is unstructured or unlabelled NumPy NumPy is a library for the Python programming language, adding support for large, multi- dimensional arrays Keras Keras is an open-source software library that provides a Python interface for artificial neural networks. Python Python is a powerful scripting language and is very useful for solving statistical problems involving machine learning algorithms
  • 9. CODE from keras.models import load_model from time import sleep from keras.preprocessing.image import img_to_array from keras.preprocessing import image import cv2 import numpy as np face_classifier = cv2.CascadeClassifier('./haarcascade_frontalface_default.xml') classifier =load_model('./Emotion_Detection.h5') class_labels = ['Angry','Happy','Neutral',] cap = cv2.VideoCapture(0) while True: # Grab a single frame of video ret, frame = cap.read() labels = [] gray = cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY) faces = face_classifier.detectMultiScale(gray,1.3,5) for (x,y,w,h) in faces: cv2.rectangle(frame,(x,y),(x+w,y+h),(255,0,0),2) roi_gray = gray[y:y+h,x:x+w] roi_gray = cv2.resize(roi_gray,(48,48),interpolation=cv2.INTER_AREA) if np.sum([roi_gray])!=0: roi = roi_gray.astype('float')/255.0 roi = img_to_array(roi) roi = np.expand_dims(roi,axis=0) # make a prediction on the ROI, then lookup the class preds = classifier.predict(roi)[0] print("nprediction = ",preds) label=class_labels[preds.argmax()] print("nprediction max = ",preds.argmax()) print("nlabel = ",label) label_position = (x,y) cv2.putText(frame,label,label_position,cv2.FONT_HERSHEY_SIMPLEX,2, (0,255,0),3) else: cv2.putText(frame,'No Face Found', (20,60),cv2.FONT_HERSHEY_SIMPLEX,2,(0,255,0),3) print("nn") cv2.imshow('Emotion Detector',frame) if cv2.waitKey(1) & 0xFF == ord('q'): break cap.release() cv2.destroyAllWindows()
  • 10. FUTURE SCOPE Automotive Safety and Research Systems: For the safety of the driver and passengers by recognizing the facial expression of the driver. Medical Research into Autism: Ability to read the facial expression of people with autism and finding the best solutions for them. Market Research: Facial expression marketing to help get the necessary information regarding respective trends. Pay-per-Laugh: Faced with rising ticket prices and declining audiences in 2014, a Spanish theatre experimented with charging audiences 30 cents a laugh for its comedy shows, installing emotion recognition cameras in front of each seat, and fixing a ceiling of 24 euros per customer for the more successful events.