SlideShare une entreprise Scribd logo
1  sur  64
Using
Azure
Cognitive
Services
with {N}
@Sherrrylst
Hello!
I’m Sherry List
Azure Developer Technical Lead, Microsoft
You can find me at @SherrryLst
Scan the code
@Sherrrylst
AI, ML, DL, ANN?
@Sherrrylst
Artificial Intelligence
AI is the simulation of human intelligence
processes by machines. These
processes include, reasoning,
remembering, learning and self-
correction.
@Sherrrylst
Machine Learning
@Sherrrylst
Machine learning is a field of computer
science that gives computers the ability
to learn without being explicitly
programmed.
Arthur Samuel, 1959
Machine learning techniques
@Sherrrylst
• Artificial Neural Networks
• Deep Learning
• Bayesian Networks
• Clustering
Artificial Intelligence (AI)
The bigger picture
Machine
Learning
Artificial Neural Networks
Deep Learning
Bayesian Networks
Clustering
@Sherrrylst
Machine
Learning 101
@Sherrrylst
Machine Learning 101
@Sherrrylst
Data
@Sherrrylst
Data
Patterns
Machine Learning 101
@Sherrrylst
Data
Patterns
Algorithm
(Deep learning, clustering, …)
Machine Learning 101
@Sherrrylst
Data
Patterns
Algorithm
(Deep learning, clustering, …)
Find patterns
Machine Learning 101
@Sherrrylst
Data
Patterns
Model
Algorithm
(Deep learning, clustering, …)
Find patterns
Machine Learning 101
@Sherrrylst
Data
Patterns
Model
Algorithm
(Deep learning, clustering, …)
Find patterns Recognizes patterns
Machine Learning 101
@Sherrrylst
Data
Patterns
Model
Algorithm
(Deep learning, clustering, …)
Find patterns Recognizes patterns
Training
Machine Learning 101
@Sherrrylst
Data
Patterns
Model
Algorithm
(Deep learning, clustering, …)
Find patterns Recognizes patterns Application
Training
Machine Learning 101
@Sherrrylst
Data
Patterns
Model
Algorithm
(Deep learning, clustering, …)
Find patterns Recognizes patterns Application
Challenges
Data preparation
@Sherrrylst
Data
Patterns
Model
Algorithm
(Deep learning, clustering, …)
Find patterns Recognizes patterns Application
Challenges
Data preparation Create and test algorithms
@Sherrrylst
Algorithm
(Deep learning, clustering, …)
Find patterns
Challenges
Create and test algorithms
Chihuahua or muffin?
@Sherrrylst
Data
Patterns
Model
Algorithm
(Deep learning, clustering, …)
Find patterns Recognizes patterns Application
Challenges
Data preparation Create and test algorithms Expose the model to app
Is there a better
way?
@Sherrrylst
Azure
Cognitive
Services
@Sherrrylst
@Sherrrylst
Application
The easier way
Azure Cognitive
Services
REST API
Azure Cognitive Services === machine-learning-as-a-service
@Sherrrylst
@Sherrrylst
Application
The easier way
Azure Cognitive
Services
REST API
Azure Cognitive Services
Vision Speech Language Knowledge Search
@Sherrrylst
Azure Cognitive Services
Vision Speech Language Knowledge Search
@Sherrrylst
Cognitive Services Labs
• Computer vision
@Sherrrylst
Cognitive Services - Vision
• Computer vision
• Video Indexer
@Sherrrylst
Cognitive Services - Vision
• Computer vision
• Video Indexer
• Face
@Sherrrylst
Cognitive Services - Vision
• Computer vision
• Video Indexer
• Face
• Content Moderator
@Sherrrylst
Cognitive Services - Vision
• Computer vision
• Video Indexer
• Face
• Content Moderator
• Custom Vision
@Sherrrylst
Cognitive Services - Vision
• Speech to Text
• Text to Speech
• Speaker recognition (Preview)
• Speech Translation
@Sherrrylst
Cognitive Services - Speech
• Speech to Text
• Text to Speech
• Speaker recognition (Preview)
• Speech Translation
@Sherrrylst
Cognitive Services - Speech
• Language Understanding
• Bing Spell Check
• Translator Text
• Content Moderator
• Text Analytics
@Sherrrylst
Cognitive Services - Language
• Language Understanding
• Bing Spell Check
• Translator Text
• Content Moderator
• Text Analytics
@Sherrrylst
Cognitive Services - Language
@Sherrrylst
• QnA Maker
Cognitive Services - Knowledge
Cognitive Services - Search
@Sherrrylst
• Bing Custom Search
• Bing Web Search
• Bing Video Search
• Bing Image Search
• Bing Local Business Search (Preview)
• Bing Visual Search
• Bing Entity Search
• Bing News Search
• Bing Auto Suggest
Cognitive Services Labs
@Sherrrylst
Labs provides developers with an early
look at emerging Cognitive Services
technologies.
How to use it?
@Sherrrylst
How to use Cognitive Services?
@Sherrrylst
1. Create service in Azure Portal
(https://portal.azure.com/)
How to use Cognitive Services?
@Sherrrylst
1. Create service in Azure Portal
(https://portal.azure.com/)
2. Customize and train model in the
portal (Optional)
How to use Cognitive Services?
@Sherrrylst
1. Create service in Azure Portal
(https://portal.azure.com/)
2. Customize and train model in the
portal (Optional)
3. Call the REST API from your app
How to use Cognitive Services?
@Sherrrylst
1. Create service in Azure Portal
(https://portal.azure.com/)
2. Customize and train model in the
portal (Optional)
3. Call the REST API from your app
4. Parse the JSON response
Let’s do it!
@Sherrrylst
Create a Cognitive Services account in the
Azure portal
@Sherrrylst
@Sherrrylst
Cognitive Services account - Face
Face API
@Sherrrylst
Cognitive Services account
@Sherrrylst
• URL : {Endpoint}/face/v1.0/detect
• URI Parameters
• Location
• returnFaceLandmarks (Boolean)
• returnFaceAttributes
• age,gender,smile,glasses,emotion,facialHair
• Headers
• Content-Type: application/octet-stream | application/json
• Ocp-Apim-Subscription-Key
Face API - Detect
Face API Documentation
@Sherrrylst
Face API - Detect
Face API Documentation
<code />
@Sherrrylst
@Sherrrylst
Face API – Mood Analyzer
Source code
async runFaceDetect() {
this.dataSource = [];
const imageAsset = await takePicture(
{
width: 300,
height: 500,
keepAspectRatio: true,
saveToGallery: false
});
const filePath = await this.getFilePath(imageAsset);
const imageFile = File.fromPath(filePath);
this.pictureFromCamera = imageAsset;
this.result = await this.sendRequest(imageFile);
this.dataSource = getEmotionData(this.result);
}
@Sherrrylst
Face API – Posting data (Part 1)
Source code
sendRequest(file: File): Promise<any> {
return new Promise((resolve, reject) => {
const ses = session('image-upload');
const request = {
url: this.faceUrl,
method: 'POST',
headers: {
'Content-Type': 'application/octet-stream',
'Ocp-Apim-Subscription-Key': '7d30f6357121430e91b3f8439b8205c6',
},
description: 'Uploading ' + file.name
};
const task = ses.uploadFile(file.path, request);
...
});
}
@Sherrrylst
Face API – Posting data (Part 2)
Source code
sendRequest(file: File): Promise<any> {
return new Promise((resolve, reject) => {
...
task.on('error',
e => reject('error ' + e.responseCode + ' code.')
)
task.on('responded',
e => {
const data = JSON.parse(e.data);
return resolve(data);
}
);
});
}
@Sherrrylst
Face API – Posting data
Source code
async runFaceDetect() {
this.dataSource = [];
const imageAsset = await takePicture(
{
width: 300,
height: 500,
keepAspectRatio: true,
saveToGallery: false
});
const filePath = await this.getFilePath(imageAsset);
const imageFile = File.fromPath(filePath);
this.pictureFromCamera = imageAsset;
this.result = await this.sendRequest(imageFile);
this.dataSource = getEmotionData(this.result);
}
Try again!
@Sherrrylst
AI.lab@Sherrrylst
Azure Cognitive Services re-cap
@Sherrrylst
• Easy to use (REST API)
• Easy to provision
• Provide pre-trained models
• Possibility to use custom data
• Free training resources
• Detailed documentation
• Create account for free
@sebawita
Thank you!
@Sherrrylst
Thank you!
https://aka.ms/nativescriptday-amsterdam
Resources
• Microsoft Azure Cognitive Services: The Big Picture
• The Mojifier (MS Learn)
• The Mojifier (Github)
• Azure Cognitive Services API — I need your clothes, boots and your motorcycle
• Add conversational intelligence to your apps by using LUIS (MS Learn)
• Discover sentiment in text with the Text Analytics API (MS Learn)
• Create Intelligent Bots with the Azure Bot Service (MS Learn)
• Getting started with Azure Cognitive Services
AI Services
Cognitive Services Bot Service Azure ML, Databricks, HDInsight
Pre-build AI Conversational AI Custom AI
Azure Infrastructure
CPU, FPGA, GPU
Cosmos
DB
SQL DB Data Lake IOT EdgeDSVMSparkBatch AISQL DW
Deep learning Frameworks
Cognitive Toolkits Tensorflow Azure ML, Databricks, HDInsight
Pre-build AI Conversational AI Custom AI
Deep learning Frameworks
CPU, FPGA, GPU
Cosmos
DB
SQL DB Data Lake IOT EdgeDSVMSparkBatch AISQL DW

Contenu connexe

Similaire à Using Azure Cognitive Services with NativeScript

12 core technologies you should learn, love, and hate to be a 'real' technocrat
12 core technologies you should learn, love, and hate to be a 'real' technocrat12 core technologies you should learn, love, and hate to be a 'real' technocrat
12 core technologies you should learn, love, and hate to be a 'real' technocrat
Jonathan Linowes
 

Similaire à Using Azure Cognitive Services with NativeScript (20)

Mood analyzer-virtual-dev-conf
Mood analyzer-virtual-dev-confMood analyzer-virtual-dev-conf
Mood analyzer-virtual-dev-conf
 
Mood analyzer-ng poland
Mood analyzer-ng polandMood analyzer-ng poland
Mood analyzer-ng poland
 
Dataminds - ML in Production
Dataminds - ML in ProductionDataminds - ML in Production
Dataminds - ML in Production
 
Demystifying Machine Learning on AWS
Demystifying Machine Learning on AWSDemystifying Machine Learning on AWS
Demystifying Machine Learning on AWS
 
AI @ Microsoft, How we do it and how you can too!
AI @ Microsoft, How we do it and how you can too!AI @ Microsoft, How we do it and how you can too!
AI @ Microsoft, How we do it and how you can too!
 
Google Cloud: Data Analysis and Machine Learningn Technologies
Google Cloud: Data Analysis and Machine Learningn Technologies Google Cloud: Data Analysis and Machine Learningn Technologies
Google Cloud: Data Analysis and Machine Learningn Technologies
 
Beyond Internet Scanning
Beyond Internet ScanningBeyond Internet Scanning
Beyond Internet Scanning
 
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...
 
Microsoft AI Platform - AETHER Introduction
Microsoft AI Platform - AETHER IntroductionMicrosoft AI Platform - AETHER Introduction
Microsoft AI Platform - AETHER Introduction
 
DF1 - ML - Petukhov - Azure Ml Machine Learning as a Service
DF1 - ML - Petukhov - Azure Ml Machine Learning as a ServiceDF1 - ML - Petukhov - Azure Ml Machine Learning as a Service
DF1 - ML - Petukhov - Azure Ml Machine Learning as a Service
 
MCL204_How Washington County Sherriff’s Office is using Amazon AI to Identify...
MCL204_How Washington County Sherriff’s Office is using Amazon AI to Identify...MCL204_How Washington County Sherriff’s Office is using Amazon AI to Identify...
MCL204_How Washington County Sherriff’s Office is using Amazon AI to Identify...
 
The Unusual Suspect: How Washington County Sheriff’s Office is using Amazon A...
The Unusual Suspect: How Washington County Sheriff’s Office is using Amazon A...The Unusual Suspect: How Washington County Sheriff’s Office is using Amazon A...
The Unusual Suspect: How Washington County Sheriff’s Office is using Amazon A...
 
12 core technologies you should learn, love, and hate to be a 'real' technocrat
12 core technologies you should learn, love, and hate to be a 'real' technocrat12 core technologies you should learn, love, and hate to be a 'real' technocrat
12 core technologies you should learn, love, and hate to be a 'real' technocrat
 
Build and deploy PyTorch models with Azure Machine Learning - Henk - CCDays
Build and deploy PyTorch models with Azure Machine Learning - Henk - CCDaysBuild and deploy PyTorch models with Azure Machine Learning - Henk - CCDays
Build and deploy PyTorch models with Azure Machine Learning - Henk - CCDays
 
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...
 
AI on a PI
AI on a PIAI on a PI
AI on a PI
 
Get started with building native mobile apps interacting with SharePoint
Get started with building native mobile apps interacting with SharePointGet started with building native mobile apps interacting with SharePoint
Get started with building native mobile apps interacting with SharePoint
 
In search of: A meetup about Liferay and Search 2016-04-20
In search of: A meetup about Liferay and Search   2016-04-20In search of: A meetup about Liferay and Search   2016-04-20
In search of: A meetup about Liferay and Search 2016-04-20
 
Integrating Deep Learning into your Enterprise
Integrating Deep Learning into your EnterpriseIntegrating Deep Learning into your Enterprise
Integrating Deep Learning into your Enterprise
 
2020 10 22 AI Fundamentals - Azure Machine Learning
2020 10 22 AI Fundamentals - Azure Machine Learning2020 10 22 AI Fundamentals - Azure Machine Learning
2020 10 22 AI Fundamentals - Azure Machine Learning
 

Dernier

Dernier (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
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 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 

Using Azure Cognitive Services with NativeScript

Notes de l'éditeur

  1. Devices that can remember, learn, understand and recognize things
  2. ML is all about the ability to learn. Applications that can learn without hardcoding different scenarios.
  3. ML is used in many applications to detect the patterns, Is this a cat or a dog. In order to detect these patterns, you need to use different techniques. ANN: Mimics the way that human brain works DL: Learn from many layers of analysis where each layer has the input from the previous layer
  4. AI is the overall concept to make computers intelligent
  5. You use Machine learning to analyze the data
  6. You use Machine learning to analyze the data
  7. This data contains patterns. How a cat looks like or How a dog looks like
  8. You analyze this data with Machine learning algorithm
  9. To find patterns
  10. With those we create a Model, which is the outcome of this process
  11. Model is the thing to recognizes the patterns
  12. This process is also called training a model
  13. Now application can enter data to see if it can recognize a pattern.
  14. Preparing a set of data with diversity and covers the edge cases
  15. Creating the algorithms and choosing the techniques can be challenging. Also testing the outcome and making sure we get the right result is also super challenging.
  16. This is not the most difficult way, but still it’s challenging to find a secure way with having the performance in mind
  17. Cognitive Services are RESTful APIs that exposes ML models to the outside world.
  18. Azure makes sure that the Cognitive Services are available, secured and perform well. We just need to communicate with the API
  19. You can use either available data or upload your own data
  20. You can use either available data or upload your own data
  21. Computer vision -> Analyze the data and return information like 4 storm troopers standing and sky is blue Video Indexer -> Analyze the video and extract the text and recognizes things that are in the video Face -> Detect faces and extract information about the face Content Moderator -> Video, images or text contains unacceptable content Custom Vision -> Upload different pictures of Princess Lea for training, so it can recognizes princess Lea
  22. Computer vision -> Analyze the data and return information like 4 storm troopers standing and sky is blue Video Indexer -> Analyze the video and extract the text and recognizes things that are in the video Face -> Detect faces and extract information about the face Content Moderator -> Video, images or text contains unacceptable content Custom Vision -> Upload different pictures of Princess Lea for training, so it can recognizes princess Lea
  23. Computer vision -> Analyze the data and return information like 4 storm troopers standing and sky is blue Video Indexer -> Analyze the video and extract the text and recognizes things that are in the video Face -> Detect faces and extract information about the face Content Moderator -> Video, images or text contains unacceptable content Custom Vision -> Upload different pictures of Princess Lea for training, so it can recognizes princess Lea
  24. Computer vision -> Analyze the data and return information like 4 storm troopers standing and sky is blue Video Indexer -> Analyze the video and extract the text and recognizes things that are in the video Face -> Detect faces and extract information about the face Content Moderator -> Video, images or text contains unacceptable content Custom Vision -> Upload different pictures of Princess Lea for training, so it can recognizes princess Lea
  25. Computer vision -> Analyze the data and return information like 4 storm troopers standing and sky is blue Video Indexer -> Analyze the video and extract the text and recognizes things that are in the video Face -> Detect faces and extract information about the face Content Moderator -> Video, images or text contains unacceptable content Custom Vision -> Upload different pictures of Princess Lea for training, so it can recognizes princess Lea
  26. Speaker recognition -> Identify people based on their speech Speech Translation -> Listen and translate to text
  27. Speaker recognition -> Identify people based on their speech Speech Translation -> Listen and translate to text
  28. Language Understanding -> You feeding it with the command and train it to what it means and after that it understands Text Analytics: Analyze a text in order to get the sentiment of a text (Positive/Negative), detect the language, extract the key phrase from a piece of text and retrieve the topics
  29. Language Understanding -> You feeding it with the command and train it to what it means and after that it understands Text Analytics: Analyze a text in order to get the sentiment of a text (Positive/Negative), detect the language, extract the key phrase from a piece of text and retrieve the topics
  30. Turns text to questions and answers. It uses in bots.
  31. Bing Custom Search -> Corporate search engine Bing Entity Search -> Detects pictures or persons to enrich the result
  32. You can even create a guest account to try it without providing Credit card info and no data will be saved after trial is over (7 days)
  33. Posting image to Face API (Part 1)
  34. Posting image to Face API (Part 1)
  35. Posting image to Face API (Part 2)
  36. Posting image to Face API (Part 1)