SlideShare a Scribd company logo
1 of 28
Download to read offline
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Emotion recognition in images
From idea to a model in production
Hagay Lupesko
Sandeep Krishnamurthy
©2018 Amazon Web Services, Inc. or its affiliates, All rights reserved
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Brief Intro to Deep Learning
AI
Machine
Learning
Deep
Learning
Can machines think?
Can machines do what we can?
(Turing, 1950)
Machine
Learning
Data
Answers Rules
Traditional
Programming
Data
Rules Answers
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Inspired by the brain’s Neurons
We have ~100B of them, and ~1Q Synapses
w1
w2
wn
x1
x2
xn
Σ φ
Inputs Weights Non-Linear
Activation
!
…
! = #(%
&'(
)
*+,+)
Brief Intro to Deep Learning – Artificial Neurons
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Brief Intro to Deep Learning – Neural Networks
Output
Layer
Input
Layer
Hidden
Layers
Many
More…
• Non linear
• Hierarchical
feature learning
• Scalable
architecture
• Computationally
intensive
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Training Neural Networks
Forward Pass
Backwards Pass
Input Data
Neural
Network
Inference
Loss
Back
Propagate
Update
Weights
Backwards Pass is where the magic of learning happens,
leveraging Gradient Descent.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Deep Learning is a Big Deal
It has a growing impact on our lives
Personalization Logistics Voice Autonomous
Vehicles
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Deep Learning is a Big Deal
It’s able to do better than humans (and ML)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Facial Emotion Recognition
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Misconception - AI First Strategy
• Start with the problem statement!
• Problem -> Is AI necessary -> Use AI
• I want to use AI -> Let me solve this problem with AI ->
How can I solve it now?
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Problem Statement
XYZ bank wants to improve the customer experience rating. They
recognize bank customer care representative is one of the main
factor to improve the experience for customers visiting the bank
branch offices. XYZ bank decides to analyze the emotion {Happy,
Stressed, Tired …} of its customer facing employees in different
settings {Time of the day, location, before and after event …} and
strategize on –
Happy employees, happy customers!
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Stage 1 - Problem Formulation
• Scalable solution is to automate.
• Capture photos of the customer care representatives and analyze
the emotions.
• We want a machine to be able to See, learn and classify.
• A good problem to be solved with AI using Computer Vision (CV)
techniques.
“We want to build a Facial Emotion Recognition model”
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Stage 2 – Do I need to build my model?
SOTA
• State of the Art Research (SOTA)
Model Zoo
• Is the pre-trained model available in Model Zoo - https://github.com/onnx/models,
https://gluon-cv.mxnet.io/model_zoo/index.html, http://gluon-nlp.mxnet.io/scripts/index.html
Transfer
Learning / Fine
Tuning
• Extend the pre-trained model – Transfer Learning, Fine Tuning?
Build the Model
• Build and Train the model for your problem.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SOTA – FER+
• FER+ – Training Deep Networks for Facial Expression Recognition
with Crowd-Sourced Label Distribution by Barsoum et. al.
https://arxiv.org/pdf/1608.01041.pdf
• 8 emotion types: {neutral, happiness, surprise, sadness, anger,
disgust, fear, and contempt}
• Pre-trained model in ONNX model zoo -
https://github.com/onnx/models/tree/master/emotion_ferplus
For this talk, let us implement the FER+ in Apache MXNet GLUON
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Apache MXNet - Background
• Apache (incubating) open source project
• Framework for building and training
DNNs
• Created by academia (CMU and UW)
• Adopted by AWS as DNN framework of
choice, Nov 2016
http://mxnet.io
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Apache MXNet - Highlights
• Imperative, Symbolic and Dynamic APIs
• APIs in Python, Scala, C, C++, R (and more)
• Examples and tutorials
Ease of Use
• Optimized for CPU, GPU, ARM (and more)
• Highly scalable distributed training
• Quantization, Sparse, NCCL, and more…
Performance
• Train on cloud, predict on edge
• Model serving framework
• ONNX support
Portability
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Model Training Lab
https://github.com/TalkAI/facial-emotion-recognition-gluon
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Model
Model Server
Mobile
Desktop
IoT
Internet
So what does a deployed model looks like?
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Performance
Availability
Networking
Monitoring
Model Decoupling
Cross Framework
Cross Platform
The Undifferentiated
Heavy Lifting of
Model Serving
Model Server for
MXNet
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
MXNet Model Server
• Machine learning model server
• Serves MXNet and ONNX models
• Automated HTTP endpoints setup
• Auto-scales to all available CPUs and GPUs
• Pre-built and configured containers
• CLI to package model artifacts for serving
• Open source project under AWS Labs
http://modelserver.io
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Trained
Network
Model
Signature
Custom
Code
Auxiliary
Assets
Model Archive
Model Export CLI
Model Archive
Back
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Serving Our Model
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Containerization
• Production-ready orchestration tools: ECS, Docker, Kubernetes
• Easy to scale out
• Robust and scalable images
• Automatically leverages all GPUs and CPUs on host
• Pre-configured images on DockerHub:
awsdeeplearningteam/mms_cpu
Back
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
MMS
Docker
Image
Pull or Build
Run
Containerization
Container Cluster
MMS Container
MMS ContainerMMS Container
MXNet NGINX
MXNet Model Server
Load
Balancer
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Deploying Models with Containers
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Demo - http://bit.ly/mxnet-fer
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Apache MXNet Resources
• http://mxnet.incubator.apache.org/
• Learn Deep Learning with Gluon - https://gluon.mxnet.io/
• GitHub Repo - https://github.com/apache/incubator-mxnet
• Medium: https://medium.com/apache-mxnet
• Twitter: @ApacheMXNet
• Wiki: https://cwiki.apache.org/confluence/display/MXNET
• Subscribe to dev list – dev@mxnet.incubator.apache.org
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Apache MXNet Evaluation
• Want to learn more and start using MXNet?
• Our experts can review your use cases
• We will help you with an evaluation of MXNet
• We can walk you through the steps to get to a production ready state
• Partner with AWS!
• Become a customer reference
• Write a blog and receive market and peer recognition
• Customer case study to promote what you’re doing in Deep Learning
• Contact Marcelo Bossi to get started
• Email: mbbossi@amazon.com
• Cell: (650) 796-1781
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Try it out, Star and Contribute!
http://mxnet.io
http://modelserver.io

More Related Content

What's hot

What's hot (18)

Speed up your Machine Learning workflows with build-in algorithms
Speed up your Machine Learning workflows with build-in algorithmsSpeed up your Machine Learning workflows with build-in algorithms
Speed up your Machine Learning workflows with build-in algorithms
 
A pragmatic introduction to natural language processing models (October 2019)
A pragmatic introduction to natural language processing models (October 2019)A pragmatic introduction to natural language processing models (October 2019)
A pragmatic introduction to natural language processing models (October 2019)
 
Innovations and The Cloud
Innovations and The CloudInnovations and The Cloud
Innovations and The Cloud
 
Amazon SageMaker workshop
Amazon SageMaker workshopAmazon SageMaker workshop
Amazon SageMaker workshop
 
Devoxx: Building AI-powered applications on AWS
Devoxx: Building AI-powered applications on AWSDevoxx: Building AI-powered applications on AWS
Devoxx: Building AI-powered applications on AWS
 
Optimize your Machine Learning Workloads on AWS (July 2019)
Optimize your Machine Learning Workloads on AWS (July 2019)Optimize your Machine Learning Workloads on AWS (July 2019)
Optimize your Machine Learning Workloads on AWS (July 2019)
 
Deep Learning on Amazon Sagemaker (July 2019)
Deep Learning on Amazon Sagemaker (July 2019)Deep Learning on Amazon Sagemaker (July 2019)
Deep Learning on Amazon Sagemaker (July 2019)
 
NEW LAUNCH! Introducing Amazon Transcribe – Now in Preview - MCL215 - re:Inve...
NEW LAUNCH! Introducing Amazon Transcribe – Now in Preview - MCL215 - re:Inve...NEW LAUNCH! Introducing Amazon Transcribe – Now in Preview - MCL215 - re:Inve...
NEW LAUNCH! Introducing Amazon Transcribe – Now in Preview - MCL215 - re:Inve...
 
Build, train, and deploy ML models at scale.pdf
Build, train, and deploy ML models at scale.pdfBuild, train, and deploy ML models at scale.pdf
Build, train, and deploy ML models at scale.pdf
 
NEW LAUNCH! Introducing Amazon Translate – Now in Preview - MCL209 - re:Inven...
NEW LAUNCH! Introducing Amazon Translate – Now in Preview - MCL209 - re:Inven...NEW LAUNCH! Introducing Amazon Translate – Now in Preview - MCL209 - re:Inven...
NEW LAUNCH! Introducing Amazon Translate – Now in Preview - MCL209 - re:Inven...
 
DeepLearning001&ApacheMXNetWithSparkForInference-ACNA2018
DeepLearning001&ApacheMXNetWithSparkForInference-ACNA2018DeepLearning001&ApacheMXNetWithSparkForInference-ACNA2018
DeepLearning001&ApacheMXNetWithSparkForInference-ACNA2018
 
AWS Machine Learning Week SF: Build, Train & Deploy ML Models Using SageMaker
AWS Machine Learning Week SF: Build, Train & Deploy ML Models Using SageMakerAWS Machine Learning Week SF: Build, Train & Deploy ML Models Using SageMaker
AWS Machine Learning Week SF: Build, Train & Deploy ML Models Using SageMaker
 
Build, train and deploy ML models with SageMaker (October 2019)
Build, train and deploy ML models with SageMaker (October 2019)Build, train and deploy ML models with SageMaker (October 2019)
Build, train and deploy ML models with SageMaker (October 2019)
 
Building AI-powered Serverless Applications on AWS
Building AI-powered Serverless Applications on AWSBuilding AI-powered Serverless Applications on AWS
Building AI-powered Serverless Applications on AWS
 
How serverless helps startups innovate and scale
How serverless helps startups innovate and scaleHow serverless helps startups innovate and scale
How serverless helps startups innovate and scale
 
Build, train, and deploy Machine Learning models at scale (May 2018)
Build, train, and deploy Machine Learning models at scale (May 2018)Build, train, and deploy Machine Learning models at scale (May 2018)
Build, train, and deploy Machine Learning models at scale (May 2018)
 
AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)
AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)
AIM361 Optimizing machine learning models with Amazon SageMaker (December 2019)
 
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
AIM410R Deep Learning Applications with TensorFlow, featuring Mobileye (Decem...
 

Similar to Emotion Recognition in Images

Similar to Emotion Recognition in Images (20)

Emotion recognition in images: from idea to a model in production - Nordic DS...
Emotion recognition in images: from idea to a model in production - Nordic DS...Emotion recognition in images: from idea to a model in production - Nordic DS...
Emotion recognition in images: from idea to a model in production - Nordic DS...
 
Machine Learning Models with Apache MXNet and AWS Fargate
Machine Learning Models with Apache MXNet and AWS FargateMachine Learning Models with Apache MXNet and AWS Fargate
Machine Learning Models with Apache MXNet and AWS Fargate
 
Introduction to Machine Learning, Deep Learning and MXNet
Introduction to Machine Learning, Deep Learning and MXNetIntroduction to Machine Learning, Deep Learning and MXNet
Introduction to Machine Learning, Deep Learning and MXNet
 
Machine Learning State of the Union - MCL210 - re:Invent 2017
Machine Learning State of the Union - MCL210 - re:Invent 2017Machine Learning State of the Union - MCL210 - re:Invent 2017
Machine Learning State of the Union - MCL210 - re:Invent 2017
 
Maschinelles Lernen auf AWS für Entwickler, Data Scientists und Experten
Maschinelles Lernen auf AWS für Entwickler, Data Scientists und ExpertenMaschinelles Lernen auf AWS für Entwickler, Data Scientists und Experten
Maschinelles Lernen auf AWS für Entwickler, Data Scientists und Experten
 
Artificial Intelligence (Machine Learning) on AWS: How to Start
Artificial Intelligence (Machine Learning) on AWS: How to StartArtificial Intelligence (Machine Learning) on AWS: How to Start
Artificial Intelligence (Machine Learning) on AWS: How to Start
 
Artificial Intelligence (Machine Learning) on AWS: How to Start
Artificial Intelligence (Machine Learning) on AWS: How to StartArtificial Intelligence (Machine Learning) on AWS: How to Start
Artificial Intelligence (Machine Learning) on AWS: How to Start
 
Deep Learning Workshop
Deep Learning WorkshopDeep Learning Workshop
Deep Learning Workshop
 
Building Your Smart Applications with Amazon AI.pdf
Building Your Smart Applications with Amazon AI.pdfBuilding Your Smart Applications with Amazon AI.pdf
Building Your Smart Applications with Amazon AI.pdf
 
Build, train, and deploy machine learning models at scale - AWS Summit Cape T...
Build, train, and deploy machine learning models at scale - AWS Summit Cape T...Build, train, and deploy machine learning models at scale - AWS Summit Cape T...
Build, train, and deploy machine learning models at scale - AWS Summit Cape T...
 
AI / ML Services - re:Invent Comes to London 2.0
AI / ML Services - re:Invent Comes to London 2.0AI / ML Services - re:Invent Comes to London 2.0
AI / ML Services - re:Invent Comes to London 2.0
 
Time series modeling workd AMLD 2018 Lausanne
Time series modeling workd AMLD 2018 LausanneTime series modeling workd AMLD 2018 Lausanne
Time series modeling workd AMLD 2018 Lausanne
 
Moving to Amazon ECS – the Not-So-Obvious Benefits - CON356 - re:Invent 2017
Moving to Amazon ECS – the Not-So-Obvious Benefits - CON356 - re:Invent 2017Moving to Amazon ECS – the Not-So-Obvious Benefits - CON356 - re:Invent 2017
Moving to Amazon ECS – the Not-So-Obvious Benefits - CON356 - re:Invent 2017
 
Model Serving for Deep Learning with MXNet Model Server
Model Serving for Deep Learning with MXNet Model ServerModel Serving for Deep Learning with MXNet Model Server
Model Serving for Deep Learning with MXNet Model Server
 
Integrating Deep Learning In the Enterprise
Integrating Deep Learning In the EnterpriseIntegrating Deep Learning In the Enterprise
Integrating Deep Learning In the Enterprise
 
Deep Learning Fundamentals
Deep Learning FundamentalsDeep Learning Fundamentals
Deep Learning Fundamentals
 
Integrating Deep Learning into your Enterprise
Integrating Deep Learning into your EnterpriseIntegrating Deep Learning into your Enterprise
Integrating Deep Learning into your Enterprise
 
New AI/ML services at AWS re:Invent 2017
New AI/ML services at AWS re:Invent 2017New AI/ML services at AWS re:Invent 2017
New AI/ML services at AWS re:Invent 2017
 
Integrating Deep Learning Into Your Enterprise
Integrating Deep Learning Into Your EnterpriseIntegrating Deep Learning Into Your Enterprise
Integrating Deep Learning Into Your Enterprise
 
Deep Learning for Developers (December 2017)
Deep Learning for Developers (December 2017)Deep Learning for Developers (December 2017)
Deep Learning for Developers (December 2017)
 

More from Apache MXNet

More from Apache MXNet (20)

Recent Advances in Natural Language Processing
Recent Advances in Natural Language ProcessingRecent Advances in Natural Language Processing
Recent Advances in Natural Language Processing
 
Fine-tuning BERT for Question Answering
Fine-tuning BERT for Question AnsweringFine-tuning BERT for Question Answering
Fine-tuning BERT for Question Answering
 
Introduction to GluonNLP
Introduction to GluonNLPIntroduction to GluonNLP
Introduction to GluonNLP
 
Introduction to object tracking with Deep Learning
Introduction to object tracking with Deep LearningIntroduction to object tracking with Deep Learning
Introduction to object tracking with Deep Learning
 
Introduction to GluonCV
Introduction to GluonCVIntroduction to GluonCV
Introduction to GluonCV
 
Introduction to Computer Vision
Introduction to Computer VisionIntroduction to Computer Vision
Introduction to Computer Vision
 
Image Segmentation: Approaches and Challenges
Image Segmentation: Approaches and ChallengesImage Segmentation: Approaches and Challenges
Image Segmentation: Approaches and Challenges
 
Introduction to Deep face detection and recognition
Introduction to Deep face detection and recognitionIntroduction to Deep face detection and recognition
Introduction to Deep face detection and recognition
 
Generative Adversarial Networks (GANs) using Apache MXNet
Generative Adversarial Networks (GANs) using Apache MXNetGenerative Adversarial Networks (GANs) using Apache MXNet
Generative Adversarial Networks (GANs) using Apache MXNet
 
Deep Learning With Apache MXNet On Video by Ben Taylor @ ziff.ai
Deep Learning With Apache MXNet On Video by Ben Taylor @ ziff.aiDeep Learning With Apache MXNet On Video by Ben Taylor @ ziff.ai
Deep Learning With Apache MXNet On Video by Ben Taylor @ ziff.ai
 
Using Java to deploy Deep Learning models with MXNet
Using Java to deploy Deep Learning models with MXNetUsing Java to deploy Deep Learning models with MXNet
Using Java to deploy Deep Learning models with MXNet
 
AI powered emotion recognition: From Inception to Production - Global AI Conf...
AI powered emotion recognition: From Inception to Production - Global AI Conf...AI powered emotion recognition: From Inception to Production - Global AI Conf...
AI powered emotion recognition: From Inception to Production - Global AI Conf...
 
MXNet Paris Workshop - Intro To MXNet
MXNet Paris Workshop - Intro To MXNetMXNet Paris Workshop - Intro To MXNet
MXNet Paris Workshop - Intro To MXNet
 
Apache MXNet ODSC West 2018
Apache MXNet ODSC West 2018Apache MXNet ODSC West 2018
Apache MXNet ODSC West 2018
 
Apache MXNet EcoSystem - ACNA2018
Apache MXNet EcoSystem - ACNA2018Apache MXNet EcoSystem - ACNA2018
Apache MXNet EcoSystem - ACNA2018
 
ONNX and Edge Deployments
ONNX and Edge DeploymentsONNX and Edge Deployments
ONNX and Edge Deployments
 
Distributed Inference with MXNet and Spark
Distributed Inference with MXNet and SparkDistributed Inference with MXNet and Spark
Distributed Inference with MXNet and Spark
 
Multivariate Time Series
Multivariate Time SeriesMultivariate Time Series
Multivariate Time Series
 
AI On the Edge: Model Compression
AI On the Edge: Model CompressionAI On the Edge: Model Compression
AI On the Edge: Model Compression
 
Building Content Recommendation Systems using MXNet Gluon
Building Content Recommendation Systems using MXNet GluonBuilding Content Recommendation Systems using MXNet Gluon
Building Content Recommendation Systems using MXNet Gluon
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Emotion Recognition in Images

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Emotion recognition in images From idea to a model in production Hagay Lupesko Sandeep Krishnamurthy ©2018 Amazon Web Services, Inc. or its affiliates, All rights reserved
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Brief Intro to Deep Learning AI Machine Learning Deep Learning Can machines think? Can machines do what we can? (Turing, 1950) Machine Learning Data Answers Rules Traditional Programming Data Rules Answers
  • 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Inspired by the brain’s Neurons We have ~100B of them, and ~1Q Synapses w1 w2 wn x1 x2 xn Σ φ Inputs Weights Non-Linear Activation ! … ! = #(% &'( ) *+,+) Brief Intro to Deep Learning – Artificial Neurons
  • 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Brief Intro to Deep Learning – Neural Networks Output Layer Input Layer Hidden Layers Many More… • Non linear • Hierarchical feature learning • Scalable architecture • Computationally intensive
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Training Neural Networks Forward Pass Backwards Pass Input Data Neural Network Inference Loss Back Propagate Update Weights Backwards Pass is where the magic of learning happens, leveraging Gradient Descent.
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Deep Learning is a Big Deal It has a growing impact on our lives Personalization Logistics Voice Autonomous Vehicles
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Deep Learning is a Big Deal It’s able to do better than humans (and ML)
  • 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Facial Emotion Recognition
  • 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Misconception - AI First Strategy • Start with the problem statement! • Problem -> Is AI necessary -> Use AI • I want to use AI -> Let me solve this problem with AI -> How can I solve it now?
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Problem Statement XYZ bank wants to improve the customer experience rating. They recognize bank customer care representative is one of the main factor to improve the experience for customers visiting the bank branch offices. XYZ bank decides to analyze the emotion {Happy, Stressed, Tired …} of its customer facing employees in different settings {Time of the day, location, before and after event …} and strategize on – Happy employees, happy customers!
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Stage 1 - Problem Formulation • Scalable solution is to automate. • Capture photos of the customer care representatives and analyze the emotions. • We want a machine to be able to See, learn and classify. • A good problem to be solved with AI using Computer Vision (CV) techniques. “We want to build a Facial Emotion Recognition model”
  • 12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Stage 2 – Do I need to build my model? SOTA • State of the Art Research (SOTA) Model Zoo • Is the pre-trained model available in Model Zoo - https://github.com/onnx/models, https://gluon-cv.mxnet.io/model_zoo/index.html, http://gluon-nlp.mxnet.io/scripts/index.html Transfer Learning / Fine Tuning • Extend the pre-trained model – Transfer Learning, Fine Tuning? Build the Model • Build and Train the model for your problem.
  • 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. SOTA – FER+ • FER+ – Training Deep Networks for Facial Expression Recognition with Crowd-Sourced Label Distribution by Barsoum et. al. https://arxiv.org/pdf/1608.01041.pdf • 8 emotion types: {neutral, happiness, surprise, sadness, anger, disgust, fear, and contempt} • Pre-trained model in ONNX model zoo - https://github.com/onnx/models/tree/master/emotion_ferplus For this talk, let us implement the FER+ in Apache MXNet GLUON
  • 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Apache MXNet - Background • Apache (incubating) open source project • Framework for building and training DNNs • Created by academia (CMU and UW) • Adopted by AWS as DNN framework of choice, Nov 2016 http://mxnet.io
  • 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Apache MXNet - Highlights • Imperative, Symbolic and Dynamic APIs • APIs in Python, Scala, C, C++, R (and more) • Examples and tutorials Ease of Use • Optimized for CPU, GPU, ARM (and more) • Highly scalable distributed training • Quantization, Sparse, NCCL, and more… Performance • Train on cloud, predict on edge • Model serving framework • ONNX support Portability
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Model Training Lab https://github.com/TalkAI/facial-emotion-recognition-gluon
  • 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Model Model Server Mobile Desktop IoT Internet So what does a deployed model looks like?
  • 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Performance Availability Networking Monitoring Model Decoupling Cross Framework Cross Platform The Undifferentiated Heavy Lifting of Model Serving Model Server for MXNet
  • 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. MXNet Model Server • Machine learning model server • Serves MXNet and ONNX models • Automated HTTP endpoints setup • Auto-scales to all available CPUs and GPUs • Pre-built and configured containers • CLI to package model artifacts for serving • Open source project under AWS Labs http://modelserver.io
  • 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Trained Network Model Signature Custom Code Auxiliary Assets Model Archive Model Export CLI Model Archive Back
  • 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serving Our Model
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Containerization • Production-ready orchestration tools: ECS, Docker, Kubernetes • Easy to scale out • Robust and scalable images • Automatically leverages all GPUs and CPUs on host • Pre-configured images on DockerHub: awsdeeplearningteam/mms_cpu Back
  • 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. MMS Docker Image Pull or Build Run Containerization Container Cluster MMS Container MMS ContainerMMS Container MXNet NGINX MXNet Model Server Load Balancer
  • 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Deploying Models with Containers
  • 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Demo - http://bit.ly/mxnet-fer
  • 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Apache MXNet Resources • http://mxnet.incubator.apache.org/ • Learn Deep Learning with Gluon - https://gluon.mxnet.io/ • GitHub Repo - https://github.com/apache/incubator-mxnet • Medium: https://medium.com/apache-mxnet • Twitter: @ApacheMXNet • Wiki: https://cwiki.apache.org/confluence/display/MXNET • Subscribe to dev list – dev@mxnet.incubator.apache.org
  • 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Apache MXNet Evaluation • Want to learn more and start using MXNet? • Our experts can review your use cases • We will help you with an evaluation of MXNet • We can walk you through the steps to get to a production ready state • Partner with AWS! • Become a customer reference • Write a blog and receive market and peer recognition • Customer case study to promote what you’re doing in Deep Learning • Contact Marcelo Bossi to get started • Email: mbbossi@amazon.com • Cell: (650) 796-1781
  • 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Try it out, Star and Contribute! http://mxnet.io http://modelserver.io