SlideShare a Scribd company logo
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

Introduction to emotion detection
Introduction to emotion detectionIntroduction to emotion detection
Introduction to emotion detection
Tyler Schnoebelen
 
Facial emotion recognition
Facial emotion recognitionFacial emotion recognition
Facial emotion recognition
Anukriti Dureha
 
Emotion detection using cnn.pptx
Emotion detection using cnn.pptxEmotion detection using cnn.pptx
Emotion detection using cnn.pptx
RADO7900
 
4837410 automatic-facial-emotion-recognition
4837410 automatic-facial-emotion-recognition4837410 automatic-facial-emotion-recognition
4837410 automatic-facial-emotion-recognition
Ngaire Taylor
 
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
 
Face detection ppt
Face detection pptFace detection ppt
Face detection ppt
Pooja R
 
Face recognition ppt
Face recognition pptFace recognition ppt
Face recognition ppt
Santosh Kumar
 
Face recognition technology
Face recognition technologyFace recognition technology
Face recognition technology
ranjit banshpal
 
Sign language recognizer
Sign language recognizerSign language recognizer
Sign language recognizer
Bikash Chandra Karmokar
 
Facial Emoji Recognition
Facial Emoji RecognitionFacial Emoji Recognition
Facial Emoji Recognition
ijtsrd
 
Face Detection and Recognition System
Face Detection and Recognition SystemFace Detection and Recognition System
Face Detection and Recognition System
Zara Tariq
 
Sign Language Recognition based on Hands symbols Classification
Sign Language Recognition based on Hands symbols ClassificationSign Language Recognition based on Hands symbols Classification
Sign Language Recognition based on Hands symbols Classification
Triloki Gupta
 
Facial Expression Recognitino
Facial Expression RecognitinoFacial Expression Recognitino
Facial Expression Recognitino
International Islamic University
 
Face mask detection
Face mask detection Face mask detection
Face mask detection
Sonesh yadav
 
Face detection and recognition
Face detection and recognitionFace detection and recognition
Face detection and recognition
Pankaj Thakur
 
Synops emotion recognize
Synops emotion recognizeSynops emotion recognize
Synops emotion recognize
Avdhesh Gupta
 
FACE RECOGNITION TECHNOLOGY
FACE RECOGNITION TECHNOLOGYFACE RECOGNITION TECHNOLOGY
FACE RECOGNITION TECHNOLOGY
JASHU JASWANTH
 
Face recognition Face Identification
Face recognition Face IdentificationFace recognition Face Identification
Face recognition Face Identification
Kalyan Acharjya
 
Emotion recognition and drowsiness detection using python.ppt
Emotion recognition and drowsiness detection using python.pptEmotion recognition and drowsiness detection using python.ppt
Emotion recognition and drowsiness detection using python.ppt
Gopi Naidu
 
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
Lakshmi Sarvani Videla
 

What's hot (20)

Introduction to emotion detection
Introduction to emotion detectionIntroduction to emotion detection
Introduction to emotion detection
 
Facial emotion recognition
Facial emotion recognitionFacial emotion recognition
Facial emotion recognition
 
Emotion detection using cnn.pptx
Emotion detection using cnn.pptxEmotion detection using cnn.pptx
Emotion detection using cnn.pptx
 
4837410 automatic-facial-emotion-recognition
4837410 automatic-facial-emotion-recognition4837410 automatic-facial-emotion-recognition
4837410 automatic-facial-emotion-recognition
 
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.
 
Face detection ppt
Face detection pptFace detection ppt
Face detection ppt
 
Face recognition ppt
Face recognition pptFace recognition ppt
Face recognition ppt
 
Face recognition technology
Face recognition technologyFace recognition technology
Face recognition technology
 
Sign language recognizer
Sign language recognizerSign language recognizer
Sign language recognizer
 
Facial Emoji Recognition
Facial Emoji RecognitionFacial Emoji Recognition
Facial Emoji Recognition
 
Face Detection and Recognition System
Face Detection and Recognition SystemFace Detection and Recognition System
Face Detection and Recognition System
 
Sign Language Recognition based on Hands symbols Classification
Sign Language Recognition based on Hands symbols ClassificationSign Language Recognition based on Hands symbols Classification
Sign Language Recognition based on Hands symbols Classification
 
Facial Expression Recognitino
Facial Expression RecognitinoFacial Expression Recognitino
Facial Expression Recognitino
 
Face mask detection
Face mask detection Face mask detection
Face mask detection
 
Face detection and recognition
Face detection and recognitionFace detection and recognition
Face detection and recognition
 
Synops emotion recognize
Synops emotion recognizeSynops emotion recognize
Synops emotion recognize
 
FACE RECOGNITION TECHNOLOGY
FACE RECOGNITION TECHNOLOGYFACE RECOGNITION TECHNOLOGY
FACE RECOGNITION TECHNOLOGY
 
Face recognition Face Identification
Face recognition Face IdentificationFace recognition Face Identification
Face recognition Face Identification
 
Emotion recognition and drowsiness detection using python.ppt
Emotion recognition and drowsiness detection using python.pptEmotion recognition and drowsiness detection using python.ppt
Emotion recognition and drowsiness detection using python.ppt
 
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
 

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 OpenPOWER
Ganesan Narayanasamy
 
Face Recognition Home Security System
Face Recognition Home Security SystemFace Recognition Home Security System
Face Recognition Home Security System
Suman 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
 
Face Scope.pptx
Face Scope.pptxFace Scope.pptx
Face Scope.pptx
AymanRedabelal
 
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
3sitservices IT Software Company
 
Machine Learning Contents.pptx
Machine Learning Contents.pptxMachine Learning Contents.pptx
Machine Learning Contents.pptx
Naveenkushwaha18
 
Deep learning and its problem types
Deep learning and its problem typesDeep learning and its problem types
Deep learning and its problem types
QualitasTechnology
 
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
Memi 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 report
Nitesh Dubey
 
AI NOTES.docx
AI NOTES.docxAI NOTES.docx
AI NOTES.docx
gfgcmagadi
 
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_1
KatoK1
 
face_detection_att.pptx
face_detection_att.pptxface_detection_att.pptx
face_detection_att.pptx
DeeJeeV
 
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 Book
IRJET Journal
 
Machine learning_ Replicating Human Brain
Machine learning_ Replicating Human BrainMachine learning_ Replicating Human Brain
Machine learning_ Replicating Human Brain
Nishant Jain
 
Work Portfolio
Work PortfolioWork Portfolio
Work Portfolio
Amit Prabhudesai
 
Python Project.pptx
Python Project.pptxPython Project.pptx
Python Project.pptx
TimePass720676
 

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

Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
mamamaam477
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
University of Maribor
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
Las Vegas Warehouse
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
Casting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdfCasting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdf
zubairahmad848137
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
NazakatAliKhoso2
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
sachin chaurasia
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
IJECEIAES
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
171ticu
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 

Recently uploaded (20)

Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
Casting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdfCasting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdf
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 

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.