SlideShare una empresa de Scribd logo
1 de 47
Biometric Systems -
Automate Video Streaming Analysis
with Microsoft Azure
and Amazon Web Services
S. CLINCIU, R. FALCONI, F. GUIDI, C. NAVARRA
Sapienza – University of Rome
MSc in Engineering in Computer Science
Prof. M. De Marsico, Course of Biometric Systems
A.Y. 2019/20
OVERVIEW
• Introduction
• Ideas
• Technologies: .NET Core, Azure APIs, AWS SDK, OpenCV and Visual Studio
• Microsoft Azure: Dashboard, Cognitive Services, Face API, Computer Vision API and pricing
• Face Detection and Face Recognition according to Microsoft
• Experiments: Microsoft Azure compared to AWS
• AWS: Management Console, AWS Lambda, S3, Amazon Rekognition, Kinesis Video Streaming and pricing
• Face Detection and Face Recognition according to Amazon
• .NET Core and C# implementation
• Conclusions
• Appendices: how to run the code, references and useful links
INTRODUCTION
• The goal of our project is to:
• Perform near-real-time analysis on faces (emotion, gender,
age, etc.) taken from a live video stream with the OpenCV
.NET SDK
• Acquire frames from a video source
• Select which frames to analyze
• Submit these frames to the Microsoft Azure Face, Computer
Vision and Emotion APIs
• Consume each analysis result that is returned from the API
call
• Return positive or negative results basing the test on Face
IDs
• Experimental comparison between Microsoft Azure and
AWS
IDEAS
BIOMETRIC SYSTEMS
MICROSOFT AZURE VS AWS
USING FACE ID AS A UNIQUE
IDENTIFIER STRING FOR EACH
DETECTED AND ANALYSED FACE
DISTIL ACTIONABLE INFO FROM
IMAGES OF THE REAL WORLD
DETECT, IDENTIFY, ANALYSE,
ORGANIZE, AND TAG FACES IN
PHOTOS WITH BOTH MICROSOFT
AZURE AND AWS
TECHNOLOGIES
• To develop our software, to write the code and to build the final
project, we have used the following tools and technologies:
• Microsoft .NET Core context and C# programming language
• Visual Studio Enterprise 2019 integrated development
environment (IDE)
• OpenCV (Open Source Computer Vision Library) to provide an
infrastructure for biometric systems and apps
• Microsoft Azure with Cognitive Services, Computer Vision,
Emotion and Face APIs
• AWS with Amazon Rekognition and Amazon Kinesis
TECHNOLOGIES:
.NET CORE
• We have started developing our software in C# programming
language using Microsoft .NET Core environments and
libraries
• .NET Core is a free and open-source, managed computer
software framework for Windows, Linux, and macOS
operating systems
• It is a cross-platform successor to .NET Framework
• The project is primarily developed by Microsoft and released
under the MIT License, but it is widely supported by
developers and competitors (such as Amazon)
TECHNOLOGIES: OPENCV
• OpenCV (Open source computer vision) is a library of
programming functions mainly aimed at real-time computer
vision.
• The library is cross-platform and free for use under the open-
source BSD license.
• We used it to develop a near-real-time video streaming linked
to Azure Cognitive Services.
TECHNOLOGIES:
AZURE
• Microsoft Azure is a cloud computing
service created by Microsoft for
building, testing, deploying, and
managing applications and services
through Microsoft-managed data
centers.
• It provides software as a service
(SaaS), platform as a service (PaaS)
and infrastructure as a service (IaaS)
and supports many different
programming languages.
• In our project, we used Cognitive
Services as described later.
AMAZON WEB SERVICES (AWS)
• Amazon Web Services (AWS) provides on-demand cloud
computing platforms and APIs to individuals, companies, and
governments, on a metered pay-as-you-go basis.
• Cloud computing web services provide a set of primitive
abstract technical infrastructure and distributed computing
building blocks and tools.
• In our project, we used AWS to be compared with Microsoft
Azure, one of its major competitors.
TECHNOLOGIES:
VISUAL STUDIO
• Microsoft Visual Studio is an
integrated development environment
(IDE) from Microsoft.
• Team Explorer is used to integrate the
capabilities of Azure DevOps (either
Azure DevOps Services or Azure
DevOps Server) into the IDE.
MICROSOFT AZURE
DASHBOARD
•Microsoft Azure Dashboard is a focused
and organized view of your cloud
resources, in the Azure portal.
•We used the dashboard as a workspace
where you can quickly launch tasks for
day-to-day operations and monitor
resources.
MICROSOFT AZURE
COGNITIVE SERVICES
• A comprehensive family of AI
services and cognitive APIs to help
you build intelligent apps
• Cognitive Services bring AI within
reach of every developer—
without requiring machine-
learning expertise. All it takes is an
API call to embed the ability to
see, hear, speak, search,
understand, and accelerate
decision-making into your apps.
MICROSOFT AZURE
RELEVANT SERVICES
• Cognitive Services
• Face and Computer Vision APIs
• Face Detection
• Face Recognition:
Verification
• Face Recognition:
Identification
• Custom Vision
• Train your model in a web
app
• Tag and describe your
dataset
MICROSOFT AZURE
FACE AND COMPUTER VISION
APIS
• Explore the Azure services to get started with
Computer Vision and Face
• Get the API Key and endpoint to authenticate
your applications and start sending calls to the
service: All Computer Vision calls, and Docker
container activations require a key. Specify the
key either in the request header (Web API),
the Computer Vision client (SDK) or through
the command-line (Docker container)
• Try the service in the API console - requires an
API Key and selecting your location: west
Europe
• Make a web API call - requires your API Key
and endpoint
FACE DETECTION
• Face detection is the action of locating
human faces in an image and returning
different kinds of face-related data.
• Each detected face corresponds to a face-
rectangle field in the response as a set of
pixel coordinates.
• Using these coordinates, you can get the
location of the face and its size. In the API
response, faces are listed in size order
from largest to smallest.
• If you're detecting faces from a video feed,
you may be able to improve performance
by adjusting certain settings on your video
camera.
FACE DETECTION
• The face ID is a unique identifier string for
each detected face in an image. You can
request a face ID in your Face – Detect API
call.
• Face landmarks are a set of easy-to-find
points on a face, such as the pupils or the tip
of the nose. By default, there are 27
predefined landmark points.
• Attributes are a set of features that can
optionally be detected by the Face -
Detect API. The following attributes can be
detected: age, gender, glasses, hair, noise and
smile.
FACE RECOGNITION
Verify and Identify face recognition
operations and the underlying data
structures
Recognition describes the work of
comparing two different faces to
determine if they're similar or belong to
the same person
Verify operation takes two face ID and
determines whether they belong to the
same person
Identify operation takes one or several
face IDs and returns faces might belong
to the IDs
FACE RECOGNITION
• It is possible to write C# code by using
the Azure Cognitive Services Face API
client library to apply Verify operation.
• Every call to the Face API requires a
subscription key. This key can be either
passed through a query string
parameter or specified in the request
header. To pass the subscription key
through a query string.
• To get the subscription key, it is
required to go in the Azure
Marketplace from the Azure portal.
AZURE PRICING
TIER
The cost of your cognitive services depends on the
actual usage and the options you choose below.
Both Face API and Vision API, in the Cognitive
Services of Azure, cost 0.84 EUR / 1000 Calls as the
day of writing this document in Europe.
CUSTOM VISION
At the beginning, we used Custom Vision
for tests and as a workbench.
Custom Vision is a fully available web
app powered by Azure to:
• Easily train your models
• Analyze its performance and make
quickly predictions
• Use Computer Vision API in a user-
friendly way without use of code
AWS MANAGEMENT
CONSOLE
• Access and manage Amazon Web
Services through a simple and
intuitive web-based user interface.
• Administer your AWS account: the
Console facilitates cloud management
for all aspects of your AWS account.
• Finding Services in the AWS Console:
there are several ways for you to
locate and navigate to the services
you need thanks to the AWS Console.
• We used AWS IAM, Lambda, S3,
Rekognition and Kinesis.
AWS IAM
• AWS Identity and Access
Management (IAM) enables you to
manage access securely, because you
can create and manage AWS users,
groups and permissions to allow and
deny their access to any AWS
resources.
• IAM is a feature of your AWS account
offered at no additional charge. You
will be charged only for use of other
AWS services by your users.
AWS LAMBDA AND
AMAZON S3
• AWS Lambda is an event-driven, serverless computing platform. It runs
code in response to events and automatically manages the computing
resources required.
• Amazon Simple Storage Service (S3) provides object storage through a
web user interface.
• We put together Lambda and S3 because the first is hosted by the second.
AMAZON REKOGNITION AND
AMAZON KINESIS
• Amazon Rekognition is a cloud-based Software as a service (SaaS)
computer vision platform, it provides several computer vision
capabilities.
• Amazon Kinesis makes it easy to collect and analyze real-time,
streaming data so you can react quickly to new information.
• We put together Rekognition and Kinesis because they work in close
contact.
AWS LAMBDA
PRICING TIER
• AWS Lambda Prices are clearly
declared, but are not easy to
understand, at least not as much as
Azure does.
• While Azure declares a cost of 0.84
EUR / 1000 APIs calls for Cognitive
Services, AWS explain costs in a less
easy to understand way as the
following image shows.
AMAZON S3
PRICING TIER
• Other than AWS Lambda, you must
pay also for both you store in S3 (the
Lambda function itself and the video
streaming) and for any request or data
retrieval.
• It follows that the cost is a sum of
Lambda and S3 cost, each one is a
result of a complex calculation, as
shown in the following images.
.NET CORE CLI
• In a console window (such as cmd,
PowerShell, or Bash), the dotnet
new command lets you create a
new console app with the name
face-quickstart.
• This command creates a simple
"Hello World" C# project with a
single source file: Program.cs.
USED LIBRARIES
• Once we had the Program, we used
the following directives, for the AWS
and Azure APIs respectively.
• In the application's Main method,
create variables for your resource’s
Azure and AWS endpoints and keys.
• Within the application directory, we
installed the Face Client Library for
.NET, AWS .NET SDK, AWS Toolkit for
Visual Studio and OpenCV Sharp in the
NuGet. library
FROM A SIMPLE APPROACH
TO PARALLELIZING API CALLS
• The simplest design for a near-real-
time analysis system is an infinite loop.
• However, when analysis happens in
the cloud, the latency involved means
that an API call might take several
seconds.
• The solution to this lag problem is to
allow the long-running API calls to
execute in parallel with the frame-
grabbing. In C#, we could achieve this
using Task-Based Parallelism.
A PRODUCER-CONSUMER DESIGN
• With C# Task-Based Parallelism, Multiple API calls
might occur in parallel.
• The new problem is that results might get
returned in the wrong order.
• Final step is to add a "consumer" thread that will
raise exceptions, kill long-running tasks and
ensure that the results get consumed in the
correct order.
AWS LAMBDA FUNCTION:
TWO CONSTRUCTORS
• The first is used when Lambda
invokes your function, it determine
acceptable confidence levels and
creates S3 and Rekognition service
clients and gets the AWS
credentials for these clients from
the IAM.
• AWS Region is set to the region
your Lambda function is running
in.
• The second constructor is used for
testing purposes and to check if
everything is running well.
AWS LAMBDA
FUNCTIONHANDLER
• FunctionHandler is the method
Lambda calls after it constructs
the instance.
• The S3Event contains all the
information about the event
triggered in Amazon S3.
• The function loops through all the
S3 objects that were part of the
event and tells Rekognition to
detect labels.
• After the labels are detected, they
are added as tags to the S3 object.
AWS TOOLKIT AND
AWS EXPLORER
• The AWS Toolkit for Visual Studio is
an extension for Microsoft Visual
Studio running on Microsoft
Windows that makes it easier for
developers to develop, debug, and
deploy .NET applications using
Amazon Web Services.
• With the AWS Toolkit for Visual
Studio, you'll be able to get started
faster and be more productive when
building AWS applications using
AWS Explorer.
UPLOAD
AWS LAMBDA FUNCTION
• This launches the deployment
process, which builds and packages
the Lambda project and then creates
the Lambda function.
• Once publishing is complete, the
Function view in the AWS Explorer
window is displayed. From here, you
can invoke a test function.
OPENCV SHARP
• NuGet is a free and open-source
package manager, distributed as a
Visual Studio extension.
• OpenCVSharp is an essential
library used in our project with
Azure to the cloud providers and
the APIs.
EXPERIMENTS DATASET
• We used Extended Cohn-Kanade Dataset (CK+), which is released under a Creative Commons
Attribution license, it contains 123 subjects and 593 image sequences (327 sequences having discrete
emotion labels) of both posed and spontaneous smiles, at a resolution of 640*490.
• A facial expression database is a collection of images or video clips with facial expressions of a range of
emotions.
• Well-annotated (emotion-tagged) media content of facial behavior is essential for training, testing, and
validation of algorithms for the development of expression recognition systems.
• The emotion annotation can be done in discrete emotion labels or on a continuous scale.
EXPERIMENTS
• AWS lets you upload to S3 an image
and to analyse it (with Rekognition),
thanks to a Lambda function.
• Rekognition send back its results.
• We uploaded to our AWS Bucket and
Azure Cognitive Services different
sets of images from the CK+ Dataset.
EXPERIMENT: APIS COMPARISON
APIsEmotion Anger Disgust Contempt Fear Sadness Happiness Surprise Neutral
Azure 51 83 20 80 45 98 75 134
AWS 43 67 24 68 34 95 70 135
CK+ 49 79 26 75 40 104 77 143
APIsEmotion Anger Disgust Contempt Fear Sadness Happiness Surprise Neutral
Azure 104,08 105,06 76,93 106,66 112,25 94,23 97,40 90,90
AWS 87,75 84,81 92,30 90,66 85 91,34 90,90 94,40
EXPERIMENT: APIS COMPARISON
0
20
40
60
80
100
120
140
160
Azure AWS CK+
Anger Disgust Contempt Fear Sadness Happiness Surprise Neutral
ROC CURVE
• Receiver operating characteristic (or
ROC) is a plot of the correctly
classified labels vs. the incorrectly
classified labels for a particular
model.
ROC
False Match Rate
GenuineAcceptRate
Azure - AWS
CMC CURVE
• Cumulative Match Characteristic (or
CMC) is a plot of the rank at which a
true match occurs vs. the
identification accuracy.
CMC
Rank
Identificationaccuracy
Azure - AWS
CONCLUSIONS
• By numbers, Microsoft Azure Cognitive Services is quite
more accurate than Amazon Rekognition:
• Azure has clear over fitting and over confidence
problems but…
• …overall, AWS even if does not suffer by these
problems, has quite bad results
• By us, Microsoft Azure provides:
• Best User-Friendly experiences (Dashboard is clearer
than Management Console and almost all services
provides the same UI).
• Clearer names (Cognitive, Speech Services, Face,
Emotion APIs etc. are speaking names and they are
easier to remember while compared with Amazon
Rekognition, Polly, Kinesis).
• Clearer prices (Azure just says EUR / Calls, while AWS
provides very complex tables and calculations to do).
• Hybrid cloud approaches, mixing local and web
infrastructure, fundamental for Italian Public
Administration.
FUTURE WORK
• It would be very interesting to make more
comparison and discover new services:
• Compare more services between AWS
and Microsoft Azure, such as their
respective Amazon Polly and Speech
Services.
• Compare more Cloud Provider to AWS
and Microsoft Azure, such as Google
Cloud and IBM Cloud.
HOW TO RUN
THE CODE
We have tried to make it easy to run
the project.
Get your own Cognitive Services API
keys on microsoft.com/cognitive, for
video frame analysis the applicable
APIs are Computer Vision API and Face
API.
Open the sample in Visual Studio, build
and run the application inserting the
API keys in the settings using IIS
(Internet Information Services).
USEFUL LINKS
•https://github.com/ChiaraNavarra
•https://github.com/FedericoGuidi
•https://github.com/RobertoFalconi
•https://github.com/Clincius
GitHub:
•https://www.linkedin.com/in/chiaranavarra/
•https://www.linkedin.com/in/federico-guidi/
•https://www.linkedin.com/in/roberto-falconi/
•https://www.linkedin.com/in/stefan-clinciu-7421b2a6/
LinkedIn:
•https://www.slideshare.net/RobertoFalconi4
•https://www.slideshare.net/FedericoGuidi5SlideShare:
REFERENCES
• OpenCV: https://opencv.org/
• Microsoft Azure Cognitive Services: https://azure.microsoft.com/en-
us/services/cognitive-services/
• Computer Vision: https://azure.microsoft.com/en-us/services/cognitive-
services/computer-vision/
• Custom Vision API: https://azure.microsoft.com/en-us/services/cognitive-
services/custom-vision-service/
• Face API: https://azure.microsoft.com/en-us/services/cognitive-services/face/
• Face Detection: https://docs.microsoft.com/bs-latn-ba/azure/cognitive-
services/face/face-api-how-to-topics/howtodetectfacesinimage
• Analyze Videos in Real-Time: https://docs.microsoft.com/it-it/azure/cognitive-
services/face/face-api-how-to-topics/howtoanalyzevideo_face
• Understanding ML automated results: https://docs.microsoft.com/en-
us/azure/machine-learning/how-to-understand-automated-ml#roc
• AWS Toolkit for Visual Studio: https://aws.amazon.com/visualstudio/
• Creating IAM Users (Console):
https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html
• Amazon Rekognition Lambda Application: https://docs.aws.amazon.com/toolkit-
for-visual-studio/latest/user-guide//lambda-rekognition-example.html
• Facial datasets: https://en.wikipedia.org/wiki/Facial_expression_databases
• Cohn-Kanade database download: http://www.consortium.ri.cmu.edu/ckagree/
THANK YOU
Roberto Falconi – 1663546
Chiara Navarra – 1652197
Federico Guidi – 1660655
Stefan Clinciu – 1659871

Más contenido relacionado

La actualidad más candente

aws-iot-button-slideshow
aws-iot-button-slideshowaws-iot-button-slideshow
aws-iot-button-slideshow
Sagar Rao
 

La actualidad más candente (20)

One Click Enterprise IoT Services - March 2017 AWS Online Tech Talks
One Click Enterprise IoT Services - March 2017 AWS Online Tech TalksOne Click Enterprise IoT Services - March 2017 AWS Online Tech Talks
One Click Enterprise IoT Services - March 2017 AWS Online Tech Talks
 
AWS物聯網基礎架構及連線概覽
AWS物聯網基礎架構及連線概覽AWS物聯網基礎架構及連線概覽
AWS物聯網基礎架構及連線概覽
 
Getting Started with AWS IoT
Getting Started with AWS IoTGetting Started with AWS IoT
Getting Started with AWS IoT
 
Alexa IoT Skills Workshop
Alexa IoT Skills WorkshopAlexa IoT Skills Workshop
Alexa IoT Skills Workshop
 
Developing Applications with the IoT Button - March 2017 AWS Online Tech Talks
Developing Applications with the IoT Button - March 2017 AWS Online Tech TalksDeveloping Applications with the IoT Button - March 2017 AWS Online Tech Talks
Developing Applications with the IoT Button - March 2017 AWS Online Tech Talks
 
Introduzione ad Amazon Lex
Introduzione ad Amazon LexIntroduzione ad Amazon Lex
Introduzione ad Amazon Lex
 
AWS re:Invent 2016: Internet of Things (IoT) Edge and Device Services (IOT202)
AWS re:Invent 2016: Internet of Things (IoT) Edge and Device Services (IOT202)AWS re:Invent 2016: Internet of Things (IoT) Edge and Device Services (IOT202)
AWS re:Invent 2016: Internet of Things (IoT) Edge and Device Services (IOT202)
 
Deep Dive: Amazon Lex
Deep Dive: Amazon LexDeep Dive: Amazon Lex
Deep Dive: Amazon Lex
 
AWS September Webinar Series - Build Cross-Platform Mobile Apps with AWS and...
AWS September Webinar Series -  Build Cross-Platform Mobile Apps with AWS and...AWS September Webinar Series -  Build Cross-Platform Mobile Apps with AWS and...
AWS September Webinar Series - Build Cross-Platform Mobile Apps with AWS and...
 
Mobile Applications and The Internet of Things: AWS Lambda & AWS Cognito – Ad...
Mobile Applications and The Internet of Things: AWS Lambda & AWS Cognito – Ad...Mobile Applications and The Internet of Things: AWS Lambda & AWS Cognito – Ad...
Mobile Applications and The Internet of Things: AWS Lambda & AWS Cognito – Ad...
 
Developing Mobile Services on AWS
Developing Mobile Services on AWSDeveloping Mobile Services on AWS
Developing Mobile Services on AWS
 
AWS Mobile Hub Overview
AWS Mobile Hub OverviewAWS Mobile Hub Overview
AWS Mobile Hub Overview
 
Trends in Cloud and Mobile Computing - Alain Azagury, IBM
Trends in Cloud and Mobile Computing - Alain Azagury, IBMTrends in Cloud and Mobile Computing - Alain Azagury, IBM
Trends in Cloud and Mobile Computing - Alain Azagury, IBM
 
AWS re:Invent 2016: Deep Dive: Building and Delivering Mobile Apps for the En...
AWS re:Invent 2016: Deep Dive: Building and Delivering Mobile Apps for the En...AWS re:Invent 2016: Deep Dive: Building and Delivering Mobile Apps for the En...
AWS re:Invent 2016: Deep Dive: Building and Delivering Mobile Apps for the En...
 
aws-iot-button-slideshow
aws-iot-button-slideshowaws-iot-button-slideshow
aws-iot-button-slideshow
 
High Quality Mobile Apps Using AWS Device Farm - DevDay Los Angeles 2017
High Quality Mobile Apps Using AWS Device Farm - DevDay Los Angeles 2017High Quality Mobile Apps Using AWS Device Farm - DevDay Los Angeles 2017
High Quality Mobile Apps Using AWS Device Farm - DevDay Los Angeles 2017
 
AWS NYC Meetup - May 2017 - "AWS IoT and Greengrass"
AWS NYC Meetup - May 2017 - "AWS IoT and Greengrass"AWS NYC Meetup - May 2017 - "AWS IoT and Greengrass"
AWS NYC Meetup - May 2017 - "AWS IoT and Greengrass"
 
Getting started with AWS IoT on Raspberry Pi
Getting started with AWS IoT on Raspberry PiGetting started with AWS IoT on Raspberry Pi
Getting started with AWS IoT on Raspberry Pi
 
AWS re:Invent 2016: IoT State of the Union (IOT307)
AWS re:Invent 2016: IoT State of the Union (IOT307)AWS re:Invent 2016: IoT State of the Union (IOT307)
AWS re:Invent 2016: IoT State of the Union (IOT307)
 
(MBL317) NEW! Introducing AWS Mobile Hub
(MBL317) NEW! Introducing AWS Mobile Hub(MBL317) NEW! Introducing AWS Mobile Hub
(MBL317) NEW! Introducing AWS Mobile Hub
 

Similar a Biometric Systems - Automate Video Streaming Analysis with Azure and AWS

Deploy Deep Learning Models on Amazon ECS - DevDay Austin 2017
Deploy Deep Learning Models on Amazon ECS - DevDay Austin 2017Deploy Deep Learning Models on Amazon ECS - DevDay Austin 2017
Deploy Deep Learning Models on Amazon ECS - DevDay Austin 2017
Amazon Web Services
 
Creating applications that can see, hear, speak or understand using microso...
Creating applications that can see, hear, speak or understand   using microso...Creating applications that can see, hear, speak or understand   using microso...
Creating applications that can see, hear, speak or understand using microso...
Radu Vunvulea
 
AWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless RecapAWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless Recap
Daniel Zivkovic
 

Similar a Biometric Systems - Automate Video Streaming Analysis with Azure and AWS (20)

Canada DevOps Summit 2020 Presentation Nov_03_2020
Canada DevOps Summit 2020 Presentation Nov_03_2020Canada DevOps Summit 2020 Presentation Nov_03_2020
Canada DevOps Summit 2020 Presentation Nov_03_2020
 
AWS 2016 re:Invent Launch Summary
AWS 2016 re:Invent Launch SummaryAWS 2016 re:Invent Launch Summary
AWS 2016 re:Invent Launch Summary
 
Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)
 
Getting started with development in azure
Getting started with development in azureGetting started with development in azure
Getting started with development in azure
 
ANZ Dev Lounge Session - Feb 2017
ANZ Dev Lounge Session - Feb 2017ANZ Dev Lounge Session - Feb 2017
ANZ Dev Lounge Session - Feb 2017
 
Microsoft Azure - The Best Platform for AI
Microsoft Azure - The Best Platform for AIMicrosoft Azure - The Best Platform for AI
Microsoft Azure - The Best Platform for AI
 
Accelerate your Cloud Success with Platform Services
Accelerate your Cloud Success with Platform ServicesAccelerate your Cloud Success with Platform Services
Accelerate your Cloud Success with Platform Services
 
Build an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million UsersBuild an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million Users
 
Build an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million UsersBuild an App on AWS for Your First 10 Million Users
Build an App on AWS for Your First 10 Million Users
 
Announcing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck TalksAnnouncing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck Talks
 
AWS Summit Auckland - Getting Started with AWS Lambda and the Serverless Cloud
AWS Summit Auckland - Getting Started with AWS Lambda and the Serverless CloudAWS Summit Auckland - Getting Started with AWS Lambda and the Serverless Cloud
AWS Summit Auckland - Getting Started with AWS Lambda and the Serverless Cloud
 
"Fast Start to Building on AWS", Igor Ivaniuk
"Fast Start to Building on AWS", Igor Ivaniuk"Fast Start to Building on AWS", Igor Ivaniuk
"Fast Start to Building on AWS", Igor Ivaniuk
 
Deploy Deep Learning Models on Amazon ECS - DevDay Austin 2017
Deploy Deep Learning Models on Amazon ECS - DevDay Austin 2017Deploy Deep Learning Models on Amazon ECS - DevDay Austin 2017
Deploy Deep Learning Models on Amazon ECS - DevDay Austin 2017
 
Deploy Deep Learning Models on Amazon ECS - DevDay Los Angeles 2017
Deploy Deep Learning Models on Amazon ECS - DevDay Los Angeles 2017Deploy Deep Learning Models on Amazon ECS - DevDay Los Angeles 2017
Deploy Deep Learning Models on Amazon ECS - DevDay Los Angeles 2017
 
Introduction to AWS X-Ray
Introduction to AWS X-RayIntroduction to AWS X-Ray
Introduction to AWS X-Ray
 
ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...
ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...
ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...
 
Ovations AWS pop-up loft 2019 Technical presentation
Ovations AWS pop-up loft 2019 Technical presentationOvations AWS pop-up loft 2019 Technical presentation
Ovations AWS pop-up loft 2019 Technical presentation
 
Introduction to Azure Functions
Introduction to Azure FunctionsIntroduction to Azure Functions
Introduction to Azure Functions
 
Creating applications that can see, hear, speak or understand using microso...
Creating applications that can see, hear, speak or understand   using microso...Creating applications that can see, hear, speak or understand   using microso...
Creating applications that can see, hear, speak or understand using microso...
 
AWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless RecapAWS re:Invent 2020 Serverless Recap
AWS re:Invent 2020 Serverless Recap
 

Más de Roberto Falconi

Más de Roberto Falconi (15)

River Trail: A Path to Parallelism in JavaScript
River Trail: A Path to Parallelism in JavaScriptRiver Trail: A Path to Parallelism in JavaScript
River Trail: A Path to Parallelism in JavaScript
 
Biometric Systems - Automate Video Streaming Analysis with Azure and AWS
Biometric Systems - Automate Video Streaming Analysis with Azure and AWSBiometric Systems - Automate Video Streaming Analysis with Azure and AWS
Biometric Systems - Automate Video Streaming Analysis with Azure and AWS
 
Black-Box attacks against Neural Networks - technical project presentation
Black-Box attacks against Neural Networks - technical project presentationBlack-Box attacks against Neural Networks - technical project presentation
Black-Box attacks against Neural Networks - technical project presentation
 
Black-Box attacks against Neural Networks - technical project report
Black-Box attacks against Neural Networks - technical project reportBlack-Box attacks against Neural Networks - technical project report
Black-Box attacks against Neural Networks - technical project report
 
SUOMI - UCD approach to build an IoT smart guide for spa
SUOMI - UCD approach to build an IoT smart guide for spaSUOMI - UCD approach to build an IoT smart guide for spa
SUOMI - UCD approach to build an IoT smart guide for spa
 
Kalypso: She who hides. Encryption and decryption web app.
Kalypso: She who hides. Encryption and decryption web app.Kalypso: She who hides. Encryption and decryption web app.
Kalypso: She who hides. Encryption and decryption web app.
 
Game ratings predictor
Game ratings predictorGame ratings predictor
Game ratings predictor
 
Bb 8 run - a star wars video game
Bb 8 run - a star wars video gameBb 8 run - a star wars video game
Bb 8 run - a star wars video game
 
Malware analysis
Malware analysisMalware analysis
Malware analysis
 
Venice boats classification
Venice boats classificationVenice boats classification
Venice boats classification
 
Visual Analytics: Traffic Collisions in Italy
Visual Analytics: Traffic Collisions in ItalyVisual Analytics: Traffic Collisions in Italy
Visual Analytics: Traffic Collisions in Italy
 
Visual Analytics: Traffic Collisions in Italy
Visual Analytics: Traffic Collisions in ItalyVisual Analytics: Traffic Collisions in Italy
Visual Analytics: Traffic Collisions in Italy
 
SUOMI - Web and mobile app for spa users, using STM32 IoT, Microsoft Azure Cl...
SUOMI - Web and mobile app for spa users, using STM32 IoT, Microsoft Azure Cl...SUOMI - Web and mobile app for spa users, using STM32 IoT, Microsoft Azure Cl...
SUOMI - Web and mobile app for spa users, using STM32 IoT, Microsoft Azure Cl...
 
BB8 RUN - A Star Wars video game
BB8 RUN - A Star Wars video gameBB8 RUN - A Star Wars video game
BB8 RUN - A Star Wars video game
 
Game Ratings Predictor - machine learning software to predict video games co...
Game Ratings Predictor  - machine learning software to predict video games co...Game Ratings Predictor  - machine learning software to predict video games co...
Game Ratings Predictor - machine learning software to predict video games co...
 

Último

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Último (20)

%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 

Biometric Systems - Automate Video Streaming Analysis with Azure and AWS

  • 1. Biometric Systems - Automate Video Streaming Analysis with Microsoft Azure and Amazon Web Services S. CLINCIU, R. FALCONI, F. GUIDI, C. NAVARRA Sapienza – University of Rome MSc in Engineering in Computer Science Prof. M. De Marsico, Course of Biometric Systems A.Y. 2019/20
  • 2. OVERVIEW • Introduction • Ideas • Technologies: .NET Core, Azure APIs, AWS SDK, OpenCV and Visual Studio • Microsoft Azure: Dashboard, Cognitive Services, Face API, Computer Vision API and pricing • Face Detection and Face Recognition according to Microsoft • Experiments: Microsoft Azure compared to AWS • AWS: Management Console, AWS Lambda, S3, Amazon Rekognition, Kinesis Video Streaming and pricing • Face Detection and Face Recognition according to Amazon • .NET Core and C# implementation • Conclusions • Appendices: how to run the code, references and useful links
  • 3. INTRODUCTION • The goal of our project is to: • Perform near-real-time analysis on faces (emotion, gender, age, etc.) taken from a live video stream with the OpenCV .NET SDK • Acquire frames from a video source • Select which frames to analyze • Submit these frames to the Microsoft Azure Face, Computer Vision and Emotion APIs • Consume each analysis result that is returned from the API call • Return positive or negative results basing the test on Face IDs • Experimental comparison between Microsoft Azure and AWS
  • 4. IDEAS BIOMETRIC SYSTEMS MICROSOFT AZURE VS AWS USING FACE ID AS A UNIQUE IDENTIFIER STRING FOR EACH DETECTED AND ANALYSED FACE DISTIL ACTIONABLE INFO FROM IMAGES OF THE REAL WORLD DETECT, IDENTIFY, ANALYSE, ORGANIZE, AND TAG FACES IN PHOTOS WITH BOTH MICROSOFT AZURE AND AWS
  • 5. TECHNOLOGIES • To develop our software, to write the code and to build the final project, we have used the following tools and technologies: • Microsoft .NET Core context and C# programming language • Visual Studio Enterprise 2019 integrated development environment (IDE) • OpenCV (Open Source Computer Vision Library) to provide an infrastructure for biometric systems and apps • Microsoft Azure with Cognitive Services, Computer Vision, Emotion and Face APIs • AWS with Amazon Rekognition and Amazon Kinesis
  • 6. TECHNOLOGIES: .NET CORE • We have started developing our software in C# programming language using Microsoft .NET Core environments and libraries • .NET Core is a free and open-source, managed computer software framework for Windows, Linux, and macOS operating systems • It is a cross-platform successor to .NET Framework • The project is primarily developed by Microsoft and released under the MIT License, but it is widely supported by developers and competitors (such as Amazon)
  • 7. TECHNOLOGIES: OPENCV • OpenCV (Open source computer vision) is a library of programming functions mainly aimed at real-time computer vision. • The library is cross-platform and free for use under the open- source BSD license. • We used it to develop a near-real-time video streaming linked to Azure Cognitive Services.
  • 8. TECHNOLOGIES: AZURE • Microsoft Azure is a cloud computing service created by Microsoft for building, testing, deploying, and managing applications and services through Microsoft-managed data centers. • It provides software as a service (SaaS), platform as a service (PaaS) and infrastructure as a service (IaaS) and supports many different programming languages. • In our project, we used Cognitive Services as described later.
  • 9. AMAZON WEB SERVICES (AWS) • Amazon Web Services (AWS) provides on-demand cloud computing platforms and APIs to individuals, companies, and governments, on a metered pay-as-you-go basis. • Cloud computing web services provide a set of primitive abstract technical infrastructure and distributed computing building blocks and tools. • In our project, we used AWS to be compared with Microsoft Azure, one of its major competitors.
  • 10. TECHNOLOGIES: VISUAL STUDIO • Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. • Team Explorer is used to integrate the capabilities of Azure DevOps (either Azure DevOps Services or Azure DevOps Server) into the IDE.
  • 11. MICROSOFT AZURE DASHBOARD •Microsoft Azure Dashboard is a focused and organized view of your cloud resources, in the Azure portal. •We used the dashboard as a workspace where you can quickly launch tasks for day-to-day operations and monitor resources.
  • 12. MICROSOFT AZURE COGNITIVE SERVICES • A comprehensive family of AI services and cognitive APIs to help you build intelligent apps • Cognitive Services bring AI within reach of every developer— without requiring machine- learning expertise. All it takes is an API call to embed the ability to see, hear, speak, search, understand, and accelerate decision-making into your apps.
  • 13. MICROSOFT AZURE RELEVANT SERVICES • Cognitive Services • Face and Computer Vision APIs • Face Detection • Face Recognition: Verification • Face Recognition: Identification • Custom Vision • Train your model in a web app • Tag and describe your dataset
  • 14. MICROSOFT AZURE FACE AND COMPUTER VISION APIS • Explore the Azure services to get started with Computer Vision and Face • Get the API Key and endpoint to authenticate your applications and start sending calls to the service: All Computer Vision calls, and Docker container activations require a key. Specify the key either in the request header (Web API), the Computer Vision client (SDK) or through the command-line (Docker container) • Try the service in the API console - requires an API Key and selecting your location: west Europe • Make a web API call - requires your API Key and endpoint
  • 15. FACE DETECTION • Face detection is the action of locating human faces in an image and returning different kinds of face-related data. • Each detected face corresponds to a face- rectangle field in the response as a set of pixel coordinates. • Using these coordinates, you can get the location of the face and its size. In the API response, faces are listed in size order from largest to smallest. • If you're detecting faces from a video feed, you may be able to improve performance by adjusting certain settings on your video camera.
  • 16. FACE DETECTION • The face ID is a unique identifier string for each detected face in an image. You can request a face ID in your Face – Detect API call. • Face landmarks are a set of easy-to-find points on a face, such as the pupils or the tip of the nose. By default, there are 27 predefined landmark points. • Attributes are a set of features that can optionally be detected by the Face - Detect API. The following attributes can be detected: age, gender, glasses, hair, noise and smile.
  • 17. FACE RECOGNITION Verify and Identify face recognition operations and the underlying data structures Recognition describes the work of comparing two different faces to determine if they're similar or belong to the same person Verify operation takes two face ID and determines whether they belong to the same person Identify operation takes one or several face IDs and returns faces might belong to the IDs
  • 18. FACE RECOGNITION • It is possible to write C# code by using the Azure Cognitive Services Face API client library to apply Verify operation. • Every call to the Face API requires a subscription key. This key can be either passed through a query string parameter or specified in the request header. To pass the subscription key through a query string. • To get the subscription key, it is required to go in the Azure Marketplace from the Azure portal.
  • 19. AZURE PRICING TIER The cost of your cognitive services depends on the actual usage and the options you choose below. Both Face API and Vision API, in the Cognitive Services of Azure, cost 0.84 EUR / 1000 Calls as the day of writing this document in Europe.
  • 20. CUSTOM VISION At the beginning, we used Custom Vision for tests and as a workbench. Custom Vision is a fully available web app powered by Azure to: • Easily train your models • Analyze its performance and make quickly predictions • Use Computer Vision API in a user- friendly way without use of code
  • 21. AWS MANAGEMENT CONSOLE • Access and manage Amazon Web Services through a simple and intuitive web-based user interface. • Administer your AWS account: the Console facilitates cloud management for all aspects of your AWS account. • Finding Services in the AWS Console: there are several ways for you to locate and navigate to the services you need thanks to the AWS Console. • We used AWS IAM, Lambda, S3, Rekognition and Kinesis.
  • 22. AWS IAM • AWS Identity and Access Management (IAM) enables you to manage access securely, because you can create and manage AWS users, groups and permissions to allow and deny their access to any AWS resources. • IAM is a feature of your AWS account offered at no additional charge. You will be charged only for use of other AWS services by your users.
  • 23. AWS LAMBDA AND AMAZON S3 • AWS Lambda is an event-driven, serverless computing platform. It runs code in response to events and automatically manages the computing resources required. • Amazon Simple Storage Service (S3) provides object storage through a web user interface. • We put together Lambda and S3 because the first is hosted by the second.
  • 24. AMAZON REKOGNITION AND AMAZON KINESIS • Amazon Rekognition is a cloud-based Software as a service (SaaS) computer vision platform, it provides several computer vision capabilities. • Amazon Kinesis makes it easy to collect and analyze real-time, streaming data so you can react quickly to new information. • We put together Rekognition and Kinesis because they work in close contact.
  • 25. AWS LAMBDA PRICING TIER • AWS Lambda Prices are clearly declared, but are not easy to understand, at least not as much as Azure does. • While Azure declares a cost of 0.84 EUR / 1000 APIs calls for Cognitive Services, AWS explain costs in a less easy to understand way as the following image shows.
  • 26. AMAZON S3 PRICING TIER • Other than AWS Lambda, you must pay also for both you store in S3 (the Lambda function itself and the video streaming) and for any request or data retrieval. • It follows that the cost is a sum of Lambda and S3 cost, each one is a result of a complex calculation, as shown in the following images.
  • 27. .NET CORE CLI • In a console window (such as cmd, PowerShell, or Bash), the dotnet new command lets you create a new console app with the name face-quickstart. • This command creates a simple "Hello World" C# project with a single source file: Program.cs.
  • 28. USED LIBRARIES • Once we had the Program, we used the following directives, for the AWS and Azure APIs respectively. • In the application's Main method, create variables for your resource’s Azure and AWS endpoints and keys. • Within the application directory, we installed the Face Client Library for .NET, AWS .NET SDK, AWS Toolkit for Visual Studio and OpenCV Sharp in the NuGet. library
  • 29. FROM A SIMPLE APPROACH TO PARALLELIZING API CALLS • The simplest design for a near-real- time analysis system is an infinite loop. • However, when analysis happens in the cloud, the latency involved means that an API call might take several seconds. • The solution to this lag problem is to allow the long-running API calls to execute in parallel with the frame- grabbing. In C#, we could achieve this using Task-Based Parallelism.
  • 30. A PRODUCER-CONSUMER DESIGN • With C# Task-Based Parallelism, Multiple API calls might occur in parallel. • The new problem is that results might get returned in the wrong order. • Final step is to add a "consumer" thread that will raise exceptions, kill long-running tasks and ensure that the results get consumed in the correct order.
  • 31. AWS LAMBDA FUNCTION: TWO CONSTRUCTORS • The first is used when Lambda invokes your function, it determine acceptable confidence levels and creates S3 and Rekognition service clients and gets the AWS credentials for these clients from the IAM. • AWS Region is set to the region your Lambda function is running in. • The second constructor is used for testing purposes and to check if everything is running well.
  • 32. AWS LAMBDA FUNCTIONHANDLER • FunctionHandler is the method Lambda calls after it constructs the instance. • The S3Event contains all the information about the event triggered in Amazon S3. • The function loops through all the S3 objects that were part of the event and tells Rekognition to detect labels. • After the labels are detected, they are added as tags to the S3 object.
  • 33. AWS TOOLKIT AND AWS EXPLORER • The AWS Toolkit for Visual Studio is an extension for Microsoft Visual Studio running on Microsoft Windows that makes it easier for developers to develop, debug, and deploy .NET applications using Amazon Web Services. • With the AWS Toolkit for Visual Studio, you'll be able to get started faster and be more productive when building AWS applications using AWS Explorer.
  • 34. UPLOAD AWS LAMBDA FUNCTION • This launches the deployment process, which builds and packages the Lambda project and then creates the Lambda function. • Once publishing is complete, the Function view in the AWS Explorer window is displayed. From here, you can invoke a test function.
  • 35. OPENCV SHARP • NuGet is a free and open-source package manager, distributed as a Visual Studio extension. • OpenCVSharp is an essential library used in our project with Azure to the cloud providers and the APIs.
  • 36. EXPERIMENTS DATASET • We used Extended Cohn-Kanade Dataset (CK+), which is released under a Creative Commons Attribution license, it contains 123 subjects and 593 image sequences (327 sequences having discrete emotion labels) of both posed and spontaneous smiles, at a resolution of 640*490. • A facial expression database is a collection of images or video clips with facial expressions of a range of emotions. • Well-annotated (emotion-tagged) media content of facial behavior is essential for training, testing, and validation of algorithms for the development of expression recognition systems. • The emotion annotation can be done in discrete emotion labels or on a continuous scale.
  • 37. EXPERIMENTS • AWS lets you upload to S3 an image and to analyse it (with Rekognition), thanks to a Lambda function. • Rekognition send back its results. • We uploaded to our AWS Bucket and Azure Cognitive Services different sets of images from the CK+ Dataset.
  • 38. EXPERIMENT: APIS COMPARISON APIsEmotion Anger Disgust Contempt Fear Sadness Happiness Surprise Neutral Azure 51 83 20 80 45 98 75 134 AWS 43 67 24 68 34 95 70 135 CK+ 49 79 26 75 40 104 77 143 APIsEmotion Anger Disgust Contempt Fear Sadness Happiness Surprise Neutral Azure 104,08 105,06 76,93 106,66 112,25 94,23 97,40 90,90 AWS 87,75 84,81 92,30 90,66 85 91,34 90,90 94,40
  • 39. EXPERIMENT: APIS COMPARISON 0 20 40 60 80 100 120 140 160 Azure AWS CK+ Anger Disgust Contempt Fear Sadness Happiness Surprise Neutral
  • 40. ROC CURVE • Receiver operating characteristic (or ROC) is a plot of the correctly classified labels vs. the incorrectly classified labels for a particular model. ROC False Match Rate GenuineAcceptRate Azure - AWS
  • 41. CMC CURVE • Cumulative Match Characteristic (or CMC) is a plot of the rank at which a true match occurs vs. the identification accuracy. CMC Rank Identificationaccuracy Azure - AWS
  • 42. CONCLUSIONS • By numbers, Microsoft Azure Cognitive Services is quite more accurate than Amazon Rekognition: • Azure has clear over fitting and over confidence problems but… • …overall, AWS even if does not suffer by these problems, has quite bad results • By us, Microsoft Azure provides: • Best User-Friendly experiences (Dashboard is clearer than Management Console and almost all services provides the same UI). • Clearer names (Cognitive, Speech Services, Face, Emotion APIs etc. are speaking names and they are easier to remember while compared with Amazon Rekognition, Polly, Kinesis). • Clearer prices (Azure just says EUR / Calls, while AWS provides very complex tables and calculations to do). • Hybrid cloud approaches, mixing local and web infrastructure, fundamental for Italian Public Administration.
  • 43. FUTURE WORK • It would be very interesting to make more comparison and discover new services: • Compare more services between AWS and Microsoft Azure, such as their respective Amazon Polly and Speech Services. • Compare more Cloud Provider to AWS and Microsoft Azure, such as Google Cloud and IBM Cloud.
  • 44. HOW TO RUN THE CODE We have tried to make it easy to run the project. Get your own Cognitive Services API keys on microsoft.com/cognitive, for video frame analysis the applicable APIs are Computer Vision API and Face API. Open the sample in Visual Studio, build and run the application inserting the API keys in the settings using IIS (Internet Information Services).
  • 46. REFERENCES • OpenCV: https://opencv.org/ • Microsoft Azure Cognitive Services: https://azure.microsoft.com/en- us/services/cognitive-services/ • Computer Vision: https://azure.microsoft.com/en-us/services/cognitive- services/computer-vision/ • Custom Vision API: https://azure.microsoft.com/en-us/services/cognitive- services/custom-vision-service/ • Face API: https://azure.microsoft.com/en-us/services/cognitive-services/face/ • Face Detection: https://docs.microsoft.com/bs-latn-ba/azure/cognitive- services/face/face-api-how-to-topics/howtodetectfacesinimage • Analyze Videos in Real-Time: https://docs.microsoft.com/it-it/azure/cognitive- services/face/face-api-how-to-topics/howtoanalyzevideo_face • Understanding ML automated results: https://docs.microsoft.com/en- us/azure/machine-learning/how-to-understand-automated-ml#roc • AWS Toolkit for Visual Studio: https://aws.amazon.com/visualstudio/ • Creating IAM Users (Console): https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html • Amazon Rekognition Lambda Application: https://docs.aws.amazon.com/toolkit- for-visual-studio/latest/user-guide//lambda-rekognition-example.html • Facial datasets: https://en.wikipedia.org/wiki/Facial_expression_databases • Cohn-Kanade database download: http://www.consortium.ri.cmu.edu/ckagree/
  • 47. THANK YOU Roberto Falconi – 1663546 Chiara Navarra – 1652197 Federico Guidi – 1660655 Stefan Clinciu – 1659871