SlideShare una empresa de Scribd logo
1 de 74
Descargar para leer sin conexión
a.k.a. “Puppy or muffin?”
Machine learning with Google APIs
Easily leverage machine learning in your apps
Bret McGowen
@bretmcg
2@bretmcg
Who am I?
Developer Advocate, Google Cloud Platform
Bret McGowen / @bretmcg
● New York, NY
● Aspiring Node.js developer
● College football fan (Gig 'em, Aggies!)
● Lord of the Rings aficionado
What we’ll cover
01
02
03
04
05
A (very) brief overview of machine learning
Machine learning at Google and elsewhere
Vision API
Speech API
Natural Language API
01 A (very) brief overview of machine learning
5@bretmcg 5
Machine learning is learning
from examples and experience.
6@bretmcg
Machine learningArtificial intelligence
Making machines intelligent.
Making machines that learn.
"Programming a computer to learn to be clever is easier
than programming a computer to be clever directly."
7@bretmcg
Google Cloud Platform 8
Why the sudden explosion in machine learning?
9@bretmcg
The bigger, the better
From: Andrew Ng
12@bretmcg
13@bretmcg
DNN requires large training datasets
Large models don't fit into a GPU
Requires try-and-errors to find the best
design, configs and params
↓
Need to spend a few days or
weeks to finish a training
The challenge: computing power
GPUs run at nanoseconds
GPU cluster needs microsec network
02 Machine Learning at Google
(and elsewhere)
17@bretmcg
Enterprise
Google Cloud is
The Datacenter as a Computer
18@bretmcg
Jupiter Network
• 10 GbE x 100 K = 1 Pbps
• Consolidates servers with
microsec latency
19@bretmcg
Tensor Processing Unit
ASIC for TensorFlow
Designed by Google
10x better perf / watt
latency and efficiency
bit quantization
20@bretmcg
TPUs in Production
RankBrain
AlphaGo
Google Photos
Speech
and more
21@bretmcg
22@bretmcg
signal
for Search ranking,
out of hundreds
improvement
to ranking quality
in 2+ years
#3 #1
Search
machine learning for search engines
RankBrain: a deep neural network for search ranking
WaveNet by
Google DeepMind
Combined vision and translation
Smart reply
in Inbox by Gmail
10%
of all responses
sent on mobile
30@bretmcg
Google Photos
Open source Machine
Learning library
Especially useful for
Deep Learning
For research and production
Apache 2.0 license
TensorFlow
powered
Fried Chicken
Nugget Server
From: http://www.rt-net.jp/karaage1/
TensorFlow powered Cucumber Sorter
TensorFlow powered Cucumber Sorter
TensorFlow+
RasPi for
sorting garbages
From:
https://techcrunch.com/2016/09/13/auto-trash-sorts-
garbage-automatically-at-the-techcrunch-disrupt-hacka
thon/
Google Cloud Platform 36
Let's try some human-powered image detection
Puppy
or
muffin?
source: boredpanda.com
source: boredpanda.com
Google Cloud Platform 40
What if I'm not a machine learning expert?
41@bretmcg
The Machine Learning Spectrum
TensorFlow Cloud Machine Learning Machine Learning APIs
BYOML skills (Developers,
Data Scientists)
(Friendly Machine Learning)
Pre-packaged ML
03 The Cloud Vision API
Complex image detection with a simple REST request
Google Cloud Platform 44
Making an API request
Making a request
{
"requests":[
{
"image": {
"content": "base64ImageString"
// Alternatively, you can pass a Google Cloud Storage url here
},
"features": [
{
"type": "LABEL_DETECTION",
"maxResults": 10
},
{
"type": "FACE_DETECTION",
"maxResults": 10
},
// More feature detection types...
]
}
]
Google Cloud Platform 46
Let’s see some JSON responses
47
{
"labelAnnotations" : [
{
"mid" : "/m/01wydv",
"score" : 0.92442685,
"description" : "beignet"
},
{
"mid" : "/m/0270h",
"score" : 0.90845567,
"description" : "dessert"
},
{
"mid" : "/m/033nb2",
"score" : 0.74553984,
"description" : "profiterole"
},
{
"mid" : "/m/01dk8s",
"score" : 0.71415579,
"description" : "powdered sugar"
}
]
}
Label Detection
47
"landmarkAnnotations": [
{
"mid": "/m/0c7ln",
"description": "Navy Pier",
"score": 36,
"boundingPoly": {
"vertices": [
{
"x": 275,
"y": 102
}, //...
]
},
"locations": [
{
"latLng": {
"latitude": 41.888685,
"longitude": -87.601311
}
}
], //...
},
{
"mid": "/m/01_d4",
"description": "Chicago",
"score": 31,
Landmark Detection
48
49
...
"itemListElement": [
{
"@type": "EntitySearchResult",
"result": {
"@id": "kg:/m/0c7ln",
"name": "Navy Pier",
"@type": [
"Thing", "Place", "LandmarksOrHistoricalBuildings",
"TouristAttraction"
],
...
"detailedDescription": {
"articleBody": "Navy Pier is a 3,300-foot-long
pier on the Chicago shoreline of Lake Michigan. It
is located in the Streeterville neighborhood of
the Near North Side community area.",
"url": "http://en.wikipedia.org/wiki/Navy_Pier"
...
Knowledge Graph sidebar
GET https://kgsearch.googleapis.com/v1/entities:search?ids=%2Fm%2F0b__kbm&key={API_KEY}
50
"textAnnotations": [
{
"locale": "en",
"description": "U.S. COAST GUARD AUXILIARYn242039n",
"boundingPoly": {
"vertices": [
{
"x": 429,
"y": 307
},
{
"x": 1178,
"y": 307
},
{
"x": 1178,
"y": 770
},
{
"x": 429,
"y": 770
}
]
}
},
// ...
]
Text Detection
51
"faceAnnotations" : [
{
"headwearLikelihood" : "VERY_LIKELY",
"surpriseLikelihood" : "VERY_UNLIKELY",
"rollAngle" : 2.8030474,
"angerLikelihood" : "VERY_UNLIKELY",
"landmarks" : [
{
"type" : "LEFT_EYE",
"position" : {
"x" : 221.60617,
"y" : 638.263,
"z" : 0.0017568493
}
},
...
],
"boundingPoly" : {
"vertices" : [
{
"x" : 89,
"y" : 436
},
...
Face Detection
"detectionConfidence" : 0.98838496,
"joyLikelihood" : "VERY_LIKELY",
"panAngle" : -1.0822374,
"sorrowLikelihood" : "VERY_UNLIKELY",
"tiltAngle" : -2.5003448,
"underExposedLikelihood" : "VERY_UNLIKELY",
"blurredLikelihood" : "VERY_UNLIKELY"
52
"faceAnnotations" : [
{
"headwearLikelihood" : "VERY_UNLIKELY",
"surpriseLikelihood" : "VERY_UNLIKELY",
rollAngle" : -4.6490049,
"angerLikelihood" : "VERY_UNLIKELY",
"landmarks" : [
{
"type" : "LEFT_EYE",
"position" : {
"x" : 691.97974,
"y" : 373.11096,
"z" : 0.000037421443
}
},
...
],
"boundingPoly" : {
"vertices" : [
{
"x" : 743,
"y" : 449
},
...
Face Detection
"detectionConfidence" : 0.93568963,
"joyLikelihood" : "VERY_LIKELY",
"panAngle" : 4.150538,
"sorrowLikelihood" : "VERY_UNLIKELY",
"tiltAngle" : -19.377356,
"underExposedLikelihood" : "VERY_UNLIKELY",
"blurredLikelihood" : "VERY_UNLIKELY"
53
"labelAnnotations" : [
{
"mid" : "/m/01fklc",
"score" : 0.9337945,
"description" : "pink"
},
{
"mid" : "/m/09g5pq",
"score" : 0.83878618,
"description" : "people"
},
{
"mid" : "/m/017ftj",
"score" : 0.71847415,
"description" : "sunglasses"
},
{
"mid" : "/m/019nj4",
"score" : 0.69381392,
"description" : "smile"
}
]
Putting it all together: face + label + landmark
"landmarkAnnotations" : [
{
"boundingPoly" : {
"vertices" : [
{
"x" : 153,
"y" : 64
},
...
]
},
"mid" : "/m/0c7zy",
"score" : 0.56636304,
"description" : "Petra",
"locations" : [
{
"latLng" : {
"longitude" : 35.449361,
"latitude" : 30.323975
}
}
]
}
]
54
"safeSearchAnnotation" : {
"spoof" : "VERY_UNLIKELY",
"medical" : "VERY_UNLIKELY",
"adult" : "VERY_UNLIKELY",
"violence" : "VERY_UNLIKELY"
}
But wait...is it appropriate?
Live Demo
04 The Speech API
Speech to text transcription in over 80 languages
57@bretmcg
What can I do with the Speech API?
● Speech to text transcription in over 80 languages
● Supports streaming and non-streaming recognition
● Filters inappropriate content
58@bretmcg
Translation Response
"responses": [{
"results": [{
"alternatives": [
{
"transcript": "how old is the Brooklyn Bridge",
"confidence": 0.987629
}],
"isFinal": true
}
]
}]
59@bretmcg
Let’s make a recording!
1. Make a recording using SoX, a command line utility
for audio files
2. Base64 encode the recording
3. Build our API request in a JSON file
4. Send the JSON request to the Speech API
Bash script at https://goo.gl/zgvbWY
05 Cloud Natural Language API
Perform sentiment analysis and entity recognition on text
61@bretmcg
What can I do with the Natural Language API?
Three methods:
1. Analyze entities - The Washington Nationals are an MLB team
from Washington, D.C.
2. Analyze sentiment - The DC metro area is a great place to live
and work.
3. Analyze syntax - Michelle Obama is married to Barack Obama
62@bretmcg
Analyze Entities
There is plenty to do in Washington, D.C. without having to
spend a single dollar. The Smithsonian is totally free, as is
the U.S. Capitol building, along with the White House
tour, the U.S. Supreme Court Building, and many other
monuments. Bring your Android camera and take photos!
-- Bret McGowen's Made-Up Guide to Washington, D.C.
63@bretmcg
Analyze Entities
There is plenty to do in Washington, D.C. without having to
spend a single dollar. The Smithsonian is totally free, as is
the U.S. Capitol building, along with the White House
tour, the U.S. Supreme Court Building, and many other
monuments. Bring your Android camera and take photos!
-- Bret McGowen's Made-Up Guide to Washington, D.C.
64@bretmcg
Analyze Entities
"name": "Bret McGowen",
"type": "PERSON",
"metadata": {},
"salience": 0.0164788,
"mentions": [
{
"text": {
"content": "Bret McGowen",
"beginOffset": -1
}
}
]
There is plenty to do in Washington, D.C. without having to
spend a single dollar. The Smithsonian is totally free, as is
the U.S. Capitol building, along with the White House
tour, the U.S. Supreme Court Building, and many other
monuments. Bring your Android camera and take photos!
-- Bret McGowen's Made-Up Guide to Washington, D.C.
"name": "Washington, D.C.",
"type": "LOCATION",
"metadata": {
"wikipedia_url":
"http://en.wikipedia.org/wiki/Washington,_D.C
."
},
"salience": 0.29157177,
"mentions": [
{
"text": {
"content": "Washington, D.C.",
"beginOffset": -1
}
}
"name": "Android",
"type": "CONSUMER_GOOD",
"metadata": {
"wikipedia_url":
"http://en.wikipedia.org/wiki/Android_(operating_
system)"
}
65@bretmcg
Analyze Sentiment
Texas is the best state in the Union.
{
“documentSentiment”: {
“polarity”: 1,
“magnitude”: 0.8
}
}
66@bretmcg
Analyze Syntax
“My dog Fluffy has been missing ever since Bret brought in that
basket of muffins.”
67@bretmcg
Analyze Syntax
68@bretmcg
Let’s see a demo!
Twitter Streaming NL API BigQuery
bit.ly/nl-olympics
69@bretmcg
APIs we covered
● Vision: cloud.google.com/vision
● Speech: cloud.google.com/speech
● Natural Language: cloud.google.com/natural-language
Related APIs:
● Translate: cloud.google.com/translate
● Prediction: cloud.google.com/prediction
● Knowledge Graph API: developers.google.com/knowledge-graph
70@bretmcg 70
Oh, in case you were wondering...
source: boredpanda.com
"labelAnnotations": [
{
"mid": "/m/02wbm",
"description": "Food",
"score": 96
},
{
"mid": "/m/02q08p0",
"description": "Dish",
"score": 87
},
{
"mid": "/m/0270h",
"description": "Dessert",
"score": 86
},
{
"mid": "/m/0dxb5",
"description": "Berry",
"score": 83
},
{
"mid": "/m/052lwg6",
"description": "Baked Goods",
"score": 78
},
{
"mid": "/m/0hz4q",
"description": "Breakfast",
"score": 76
},
{
"mid": "/m/01tcjp",
"description": "Muffin",
"score": 76
},
source: boredpanda.com
source: boredpanda.com
?
"Baked goods"
"Mammal"
Looking for:
● Dog (or breed)
● Muffin
74@bretmcg 74
Bret McGowen
@bretmcg
Thank You!

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Build, Train & Deploy Machine Learning Models at Scale
Build, Train & Deploy Machine Learning Models at ScaleBuild, Train & Deploy Machine Learning Models at Scale
Build, Train & Deploy Machine Learning Models at Scale
 
GENERATIVE AI, THE FUTURE OF PRODUCTIVITY
GENERATIVE AI, THE FUTURE OF PRODUCTIVITYGENERATIVE AI, THE FUTURE OF PRODUCTIVITY
GENERATIVE AI, THE FUTURE OF PRODUCTIVITY
 
An Introduction to Generative AI - May 18, 2023
An Introduction  to Generative AI - May 18, 2023An Introduction  to Generative AI - May 18, 2023
An Introduction to Generative AI - May 18, 2023
 
leewayhertz.com-Generative AI for enterprises The architecture its implementa...
leewayhertz.com-Generative AI for enterprises The architecture its implementa...leewayhertz.com-Generative AI for enterprises The architecture its implementa...
leewayhertz.com-Generative AI for enterprises The architecture its implementa...
 
List of Generative AI Tools
List of Generative AI Tools List of Generative AI Tools
List of Generative AI Tools
 
Rise of the Machines - AI in the Agile World
Rise of the Machines - AI in the Agile WorldRise of the Machines - AI in the Agile World
Rise of the Machines - AI in the Agile World
 
ML-Ops how to bring your data science to production
ML-Ops  how to bring your data science to productionML-Ops  how to bring your data science to production
ML-Ops how to bring your data science to production
 
Introduction to Artificial Intelligence.pptx
Introduction to Artificial Intelligence.pptxIntroduction to Artificial Intelligence.pptx
Introduction to Artificial Intelligence.pptx
 
The State of Global AI Adoption in 2023
The State of Global AI Adoption in 2023The State of Global AI Adoption in 2023
The State of Global AI Adoption in 2023
 
Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?
 
Generative AI, WiDS 2023.pptx
Generative AI, WiDS 2023.pptxGenerative AI, WiDS 2023.pptx
Generative AI, WiDS 2023.pptx
 
How will development change with LLMs
How will development change with LLMsHow will development change with LLMs
How will development change with LLMs
 
Chatbot ppt
Chatbot pptChatbot ppt
Chatbot ppt
 
LangChain + Docugami Webinar
LangChain + Docugami WebinarLangChain + Docugami Webinar
LangChain + Docugami Webinar
 
Microsoft + OpenAI: Recent Updates (Machine Learning 15minutes! Broadcast #74)
Microsoft + OpenAI: Recent Updates (Machine Learning 15minutes! Broadcast #74)Microsoft + OpenAI: Recent Updates (Machine Learning 15minutes! Broadcast #74)
Microsoft + OpenAI: Recent Updates (Machine Learning 15minutes! Broadcast #74)
 
AI, Machine Learning, and Data Science Concepts
AI, Machine Learning, and Data Science ConceptsAI, Machine Learning, and Data Science Concepts
AI, Machine Learning, and Data Science Concepts
 
Using the power of Generative AI at scale
Using the power of Generative AI at scaleUsing the power of Generative AI at scale
Using the power of Generative AI at scale
 
GitHub Copilot.pptx
GitHub Copilot.pptxGitHub Copilot.pptx
GitHub Copilot.pptx
 
Leveraging Generative AI & Best practices
Leveraging Generative AI & Best practicesLeveraging Generative AI & Best practices
Leveraging Generative AI & Best practices
 
Teaching with ChatGPT-Practical Tips and Strategies
Teaching with ChatGPT-Practical Tips and StrategiesTeaching with ChatGPT-Practical Tips and Strategies
Teaching with ChatGPT-Practical Tips and Strategies
 

Destacado

34th.余凯.机器学习进展及语音图像中的应用
34th.余凯.机器学习进展及语音图像中的应用34th.余凯.机器学习进展及语音图像中的应用
34th.余凯.机器学习进展及语音图像中的应用
komunling
 
DUMP-2012 - Только хардкор! - "Архитектура и запуск облачного сервиса в Amazo...
DUMP-2012 - Только хардкор! - "Архитектура и запуск облачного сервиса в Amazo...DUMP-2012 - Только хардкор! - "Архитектура и запуск облачного сервиса в Amazo...
DUMP-2012 - Только хардкор! - "Архитектура и запуск облачного сервиса в Amazo...
it-people
 

Destacado (20)

Google Machine Learning APIs - puppies or muffins?
Google Machine Learning APIs - puppies or muffins?Google Machine Learning APIs - puppies or muffins?
Google Machine Learning APIs - puppies or muffins?
 
Google Cloud Vision API
Google Cloud Vision APIGoogle Cloud Vision API
Google Cloud Vision API
 
Google Cloud Platform Empowers TensorFlow and Machine Learning
Google Cloud Platform Empowers TensorFlow and Machine LearningGoogle Cloud Platform Empowers TensorFlow and Machine Learning
Google Cloud Platform Empowers TensorFlow and Machine Learning
 
Google Cloud Machine Learning
 Google Cloud Machine Learning  Google Cloud Machine Learning
Google Cloud Machine Learning
 
Google Vision Api
Google Vision ApiGoogle Vision Api
Google Vision Api
 
Diving into Machine Learning with Rob Craft, Group Product Manager at Google!
Diving into Machine Learning with Rob Craft, Group Product Manager at Google!Diving into Machine Learning with Rob Craft, Group Product Manager at Google!
Diving into Machine Learning with Rob Craft, Group Product Manager at Google!
 
Big data app meetup 2016-06-15
Big data app meetup 2016-06-15Big data app meetup 2016-06-15
Big data app meetup 2016-06-15
 
Emotional design presentation
Emotional design presentationEmotional design presentation
Emotional design presentation
 
34th.余凯.机器学习进展及语音图像中的应用
34th.余凯.机器学习进展及语音图像中的应用34th.余凯.机器学习进展及语音图像中的应用
34th.余凯.机器学习进展及语音图像中的应用
 
“From Eliza to Siri and beyond: Promise and challenges of intelligent, langua...
“From Eliza to Siri and beyond: Promise and challenges of intelligent, langua...“From Eliza to Siri and beyond: Promise and challenges of intelligent, langua...
“From Eliza to Siri and beyond: Promise and challenges of intelligent, langua...
 
Google Cloud vision
Google Cloud visionGoogle Cloud vision
Google Cloud vision
 
Car accident repairshops
Car accident repairshopsCar accident repairshops
Car accident repairshops
 
Siri vs Alexa, Which is Better?
Siri vs Alexa, Which is Better?Siri vs Alexa, Which is Better?
Siri vs Alexa, Which is Better?
 
2015 Sport Analysis for March Madness
2015 Sport Analysis for March Madness2015 Sport Analysis for March Madness
2015 Sport Analysis for March Madness
 
机器学习概述
机器学习概述机器学习概述
机器学习概述
 
Kubernetes 101 Workshop
Kubernetes 101 WorkshopKubernetes 101 Workshop
Kubernetes 101 Workshop
 
Send Balls Into Orbit with Python3, AsyncIO, WebSockets and React
Send Balls Into Orbit with Python3, AsyncIO, WebSockets and ReactSend Balls Into Orbit with Python3, AsyncIO, WebSockets and React
Send Balls Into Orbit with Python3, AsyncIO, WebSockets and React
 
Прямая выгода BigData для бизнеса
Прямая выгода BigData для бизнесаПрямая выгода BigData для бизнеса
Прямая выгода BigData для бизнеса
 
DUMP-2012 - Только хардкор! - "Архитектура и запуск облачного сервиса в Amazo...
DUMP-2012 - Только хардкор! - "Архитектура и запуск облачного сервиса в Amazo...DUMP-2012 - Только хардкор! - "Архитектура и запуск облачного сервиса в Amazo...
DUMP-2012 - Только хардкор! - "Архитектура и запуск облачного сервиса в Amazo...
 
Behind the Scenes at Coolblue - Feb 2017
Behind the Scenes at Coolblue - Feb 2017Behind the Scenes at Coolblue - Feb 2017
Behind the Scenes at Coolblue - Feb 2017
 

Similar a Machine learning with Google machine learning APIs - Puppy or Muffin?

What’s New and Exciting in Library Makerspaces
What’s New and Exciting in Library MakerspacesWhat’s New and Exciting in Library Makerspaces
What’s New and Exciting in Library Makerspaces
St. Petersburg College
 
InfoSec World 2013 – W4 – Using Google to Find Vulnerabilities in Your IT Env...
InfoSec World 2013 – W4 – Using Google to Find Vulnerabilities in Your IT Env...InfoSec World 2013 – W4 – Using Google to Find Vulnerabilities in Your IT Env...
InfoSec World 2013 – W4 – Using Google to Find Vulnerabilities in Your IT Env...
Bishop Fox
 

Similar a Machine learning with Google machine learning APIs - Puppy or Muffin? (20)

Making sense out of things on the web
Making sense out of things on the webMaking sense out of things on the web
Making sense out of things on the web
 
CloudML talk at DevFest Madurai 2016
CloudML talk at DevFest Madurai 2016 CloudML talk at DevFest Madurai 2016
CloudML talk at DevFest Madurai 2016
 
Trip Report from Meeting C++ 2017: It's Way More Than C++
Trip Report from Meeting C++ 2017: It's Way More Than C++Trip Report from Meeting C++ 2017: It's Way More Than C++
Trip Report from Meeting C++ 2017: It's Way More Than C++
 
Main principles of Data Science and Machine Learning
Main principles of Data Science and Machine LearningMain principles of Data Science and Machine Learning
Main principles of Data Science and Machine Learning
 
Get connected with python
Get connected with pythonGet connected with python
Get connected with python
 
Suit up, bring extra oxygen Internet space explorers needed.
Suit up, bring extra oxygen Internet space explorers needed.Suit up, bring extra oxygen Internet space explorers needed.
Suit up, bring extra oxygen Internet space explorers needed.
 
Welcome-to-AI-Focused-CourseLast.pptx
Welcome-to-AI-Focused-CourseLast.pptxWelcome-to-AI-Focused-CourseLast.pptx
Welcome-to-AI-Focused-CourseLast.pptx
 
A search engine in a world of events and microservices - SF Pot @Meetic
A search engine in a world of events and microservices - SF Pot @MeeticA search engine in a world of events and microservices - SF Pot @Meetic
A search engine in a world of events and microservices - SF Pot @Meetic
 
What’s New and Exciting in Library Makerspaces
What’s New and Exciting in Library MakerspacesWhat’s New and Exciting in Library Makerspaces
What’s New and Exciting in Library Makerspaces
 
Structured Data & Schema.org - SMX Milan 2014
Structured Data & Schema.org - SMX Milan 2014Structured Data & Schema.org - SMX Milan 2014
Structured Data & Schema.org - SMX Milan 2014
 
Open APIs - concepts. applications. visualizations.
Open APIs - concepts. applications. visualizations.Open APIs - concepts. applications. visualizations.
Open APIs - concepts. applications. visualizations.
 
The Road to Data Science - Joel Grus, June 2015
The Road to Data Science - Joel Grus, June 2015The Road to Data Science - Joel Grus, June 2015
The Road to Data Science - Joel Grus, June 2015
 
Industry of Things World - Berlin 19-09-16
Industry of Things World - Berlin 19-09-16Industry of Things World - Berlin 19-09-16
Industry of Things World - Berlin 19-09-16
 
Graphing Grifters: Identify & Display Patterns of Corruption With Oracle Graph
Graphing Grifters: Identify & Display Patterns of Corruption With Oracle GraphGraphing Grifters: Identify & Display Patterns of Corruption With Oracle Graph
Graphing Grifters: Identify & Display Patterns of Corruption With Oracle Graph
 
Christian heilmann an-open-web-for-all
Christian heilmann   an-open-web-for-allChristian heilmann   an-open-web-for-all
Christian heilmann an-open-web-for-all
 
Hacking with Skynet - How AI is Empowering Adversaries
Hacking with Skynet - How AI is Empowering AdversariesHacking with Skynet - How AI is Empowering Adversaries
Hacking with Skynet - How AI is Empowering Adversaries
 
Google Cloud - Google's vision on AI
Google Cloud - Google's vision on AIGoogle Cloud - Google's vision on AI
Google Cloud - Google's vision on AI
 
InfoSec World 2013 – W4 – Using Google to Find Vulnerabilities in Your IT Env...
InfoSec World 2013 – W4 – Using Google to Find Vulnerabilities in Your IT Env...InfoSec World 2013 – W4 – Using Google to Find Vulnerabilities in Your IT Env...
InfoSec World 2013 – W4 – Using Google to Find Vulnerabilities in Your IT Env...
 
Mongo at Sailthru (MongoNYC 2011)
Mongo at Sailthru (MongoNYC 2011)Mongo at Sailthru (MongoNYC 2011)
Mongo at Sailthru (MongoNYC 2011)
 
AI Basics for Professionals to Help Begin Their AI Journey
AI Basics for Professionals to Help Begin Their AI JourneyAI Basics for Professionals to Help Begin Their AI Journey
AI Basics for Professionals to Help Begin Their AI Journey
 

Más de Bret McGowen - NYC Google Developer Advocate

Más de Bret McGowen - NYC Google Developer Advocate (9)

Knative and Kubernetes - bringing serverless to more developers
Knative and Kubernetes - bringing serverless to more developersKnative and Kubernetes - bringing serverless to more developers
Knative and Kubernetes - bringing serverless to more developers
 
Firebase Codelab - 2018 Milano
Firebase Codelab - 2018 MilanoFirebase Codelab - 2018 Milano
Firebase Codelab - 2018 Milano
 
Deep dive into serverless on Google Cloud
Deep dive into serverless on Google CloudDeep dive into serverless on Google Cloud
Deep dive into serverless on Google Cloud
 
Where should I run my code? Serverless, Containers, Virtual Machines and more
Where should I run my code? Serverless, Containers, Virtual Machines and moreWhere should I run my code? Serverless, Containers, Virtual Machines and more
Where should I run my code? Serverless, Containers, Virtual Machines and more
 
Supercharge your app with Cloud Functions for Firebase
Supercharge your app with Cloud Functions for FirebaseSupercharge your app with Cloud Functions for Firebase
Supercharge your app with Cloud Functions for Firebase
 
Serverless with Google Cloud
Serverless with Google CloudServerless with Google Cloud
Serverless with Google Cloud
 
Google Home and Google Assistant Workshop: Build your own serverless Action o...
Google Home and Google Assistant Workshop: Build your own serverless Action o...Google Home and Google Assistant Workshop: Build your own serverless Action o...
Google Home and Google Assistant Workshop: Build your own serverless Action o...
 
Cloud Spin - building a photo booth with the Google Cloud Platform
Cloud Spin - building a photo booth with the Google Cloud PlatformCloud Spin - building a photo booth with the Google Cloud Platform
Cloud Spin - building a photo booth with the Google Cloud Platform
 
Firebase Code Lab - 2015 GDG Buffalo DevFest
Firebase Code Lab - 2015 GDG Buffalo DevFestFirebase Code Lab - 2015 GDG Buffalo DevFest
Firebase Code Lab - 2015 GDG Buffalo DevFest
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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
 
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
 
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
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 

Machine learning with Google machine learning APIs - Puppy or Muffin?

  • 1. a.k.a. “Puppy or muffin?” Machine learning with Google APIs Easily leverage machine learning in your apps Bret McGowen @bretmcg
  • 2. 2@bretmcg Who am I? Developer Advocate, Google Cloud Platform Bret McGowen / @bretmcg ● New York, NY ● Aspiring Node.js developer ● College football fan (Gig 'em, Aggies!) ● Lord of the Rings aficionado
  • 3. What we’ll cover 01 02 03 04 05 A (very) brief overview of machine learning Machine learning at Google and elsewhere Vision API Speech API Natural Language API
  • 4. 01 A (very) brief overview of machine learning
  • 5. 5@bretmcg 5 Machine learning is learning from examples and experience.
  • 6. 6@bretmcg Machine learningArtificial intelligence Making machines intelligent. Making machines that learn. "Programming a computer to learn to be clever is easier than programming a computer to be clever directly."
  • 8. Google Cloud Platform 8 Why the sudden explosion in machine learning?
  • 10. The bigger, the better From: Andrew Ng
  • 11.
  • 14. DNN requires large training datasets Large models don't fit into a GPU Requires try-and-errors to find the best design, configs and params ↓ Need to spend a few days or weeks to finish a training The challenge: computing power
  • 15. GPUs run at nanoseconds GPU cluster needs microsec network
  • 16. 02 Machine Learning at Google (and elsewhere)
  • 17. 17@bretmcg Enterprise Google Cloud is The Datacenter as a Computer
  • 18. 18@bretmcg Jupiter Network • 10 GbE x 100 K = 1 Pbps • Consolidates servers with microsec latency
  • 19. 19@bretmcg Tensor Processing Unit ASIC for TensorFlow Designed by Google 10x better perf / watt latency and efficiency bit quantization
  • 22. 22@bretmcg signal for Search ranking, out of hundreds improvement to ranking quality in 2+ years #3 #1 Search machine learning for search engines RankBrain: a deep neural network for search ranking
  • 23.
  • 24.
  • 26.
  • 27. Combined vision and translation
  • 28. Smart reply in Inbox by Gmail 10% of all responses sent on mobile
  • 29.
  • 31. Open source Machine Learning library Especially useful for Deep Learning For research and production Apache 2.0 license
  • 36. Google Cloud Platform 36 Let's try some human-powered image detection
  • 37.
  • 40. Google Cloud Platform 40 What if I'm not a machine learning expert?
  • 41. 41@bretmcg The Machine Learning Spectrum TensorFlow Cloud Machine Learning Machine Learning APIs BYOML skills (Developers, Data Scientists) (Friendly Machine Learning) Pre-packaged ML
  • 42. 03 The Cloud Vision API Complex image detection with a simple REST request
  • 43.
  • 44. Google Cloud Platform 44 Making an API request
  • 45. Making a request { "requests":[ { "image": { "content": "base64ImageString" // Alternatively, you can pass a Google Cloud Storage url here }, "features": [ { "type": "LABEL_DETECTION", "maxResults": 10 }, { "type": "FACE_DETECTION", "maxResults": 10 }, // More feature detection types... ] } ]
  • 46. Google Cloud Platform 46 Let’s see some JSON responses
  • 47. 47 { "labelAnnotations" : [ { "mid" : "/m/01wydv", "score" : 0.92442685, "description" : "beignet" }, { "mid" : "/m/0270h", "score" : 0.90845567, "description" : "dessert" }, { "mid" : "/m/033nb2", "score" : 0.74553984, "description" : "profiterole" }, { "mid" : "/m/01dk8s", "score" : 0.71415579, "description" : "powdered sugar" } ] } Label Detection 47
  • 48. "landmarkAnnotations": [ { "mid": "/m/0c7ln", "description": "Navy Pier", "score": 36, "boundingPoly": { "vertices": [ { "x": 275, "y": 102 }, //... ] }, "locations": [ { "latLng": { "latitude": 41.888685, "longitude": -87.601311 } } ], //... }, { "mid": "/m/01_d4", "description": "Chicago", "score": 31, Landmark Detection 48
  • 49. 49 ... "itemListElement": [ { "@type": "EntitySearchResult", "result": { "@id": "kg:/m/0c7ln", "name": "Navy Pier", "@type": [ "Thing", "Place", "LandmarksOrHistoricalBuildings", "TouristAttraction" ], ... "detailedDescription": { "articleBody": "Navy Pier is a 3,300-foot-long pier on the Chicago shoreline of Lake Michigan. It is located in the Streeterville neighborhood of the Near North Side community area.", "url": "http://en.wikipedia.org/wiki/Navy_Pier" ... Knowledge Graph sidebar GET https://kgsearch.googleapis.com/v1/entities:search?ids=%2Fm%2F0b__kbm&key={API_KEY}
  • 50. 50 "textAnnotations": [ { "locale": "en", "description": "U.S. COAST GUARD AUXILIARYn242039n", "boundingPoly": { "vertices": [ { "x": 429, "y": 307 }, { "x": 1178, "y": 307 }, { "x": 1178, "y": 770 }, { "x": 429, "y": 770 } ] } }, // ... ] Text Detection
  • 51. 51 "faceAnnotations" : [ { "headwearLikelihood" : "VERY_LIKELY", "surpriseLikelihood" : "VERY_UNLIKELY", "rollAngle" : 2.8030474, "angerLikelihood" : "VERY_UNLIKELY", "landmarks" : [ { "type" : "LEFT_EYE", "position" : { "x" : 221.60617, "y" : 638.263, "z" : 0.0017568493 } }, ... ], "boundingPoly" : { "vertices" : [ { "x" : 89, "y" : 436 }, ... Face Detection "detectionConfidence" : 0.98838496, "joyLikelihood" : "VERY_LIKELY", "panAngle" : -1.0822374, "sorrowLikelihood" : "VERY_UNLIKELY", "tiltAngle" : -2.5003448, "underExposedLikelihood" : "VERY_UNLIKELY", "blurredLikelihood" : "VERY_UNLIKELY"
  • 52. 52 "faceAnnotations" : [ { "headwearLikelihood" : "VERY_UNLIKELY", "surpriseLikelihood" : "VERY_UNLIKELY", rollAngle" : -4.6490049, "angerLikelihood" : "VERY_UNLIKELY", "landmarks" : [ { "type" : "LEFT_EYE", "position" : { "x" : 691.97974, "y" : 373.11096, "z" : 0.000037421443 } }, ... ], "boundingPoly" : { "vertices" : [ { "x" : 743, "y" : 449 }, ... Face Detection "detectionConfidence" : 0.93568963, "joyLikelihood" : "VERY_LIKELY", "panAngle" : 4.150538, "sorrowLikelihood" : "VERY_UNLIKELY", "tiltAngle" : -19.377356, "underExposedLikelihood" : "VERY_UNLIKELY", "blurredLikelihood" : "VERY_UNLIKELY"
  • 53. 53 "labelAnnotations" : [ { "mid" : "/m/01fklc", "score" : 0.9337945, "description" : "pink" }, { "mid" : "/m/09g5pq", "score" : 0.83878618, "description" : "people" }, { "mid" : "/m/017ftj", "score" : 0.71847415, "description" : "sunglasses" }, { "mid" : "/m/019nj4", "score" : 0.69381392, "description" : "smile" } ] Putting it all together: face + label + landmark "landmarkAnnotations" : [ { "boundingPoly" : { "vertices" : [ { "x" : 153, "y" : 64 }, ... ] }, "mid" : "/m/0c7zy", "score" : 0.56636304, "description" : "Petra", "locations" : [ { "latLng" : { "longitude" : 35.449361, "latitude" : 30.323975 } } ] } ]
  • 54. 54 "safeSearchAnnotation" : { "spoof" : "VERY_UNLIKELY", "medical" : "VERY_UNLIKELY", "adult" : "VERY_UNLIKELY", "violence" : "VERY_UNLIKELY" } But wait...is it appropriate?
  • 56. 04 The Speech API Speech to text transcription in over 80 languages
  • 57. 57@bretmcg What can I do with the Speech API? ● Speech to text transcription in over 80 languages ● Supports streaming and non-streaming recognition ● Filters inappropriate content
  • 58. 58@bretmcg Translation Response "responses": [{ "results": [{ "alternatives": [ { "transcript": "how old is the Brooklyn Bridge", "confidence": 0.987629 }], "isFinal": true } ] }]
  • 59. 59@bretmcg Let’s make a recording! 1. Make a recording using SoX, a command line utility for audio files 2. Base64 encode the recording 3. Build our API request in a JSON file 4. Send the JSON request to the Speech API Bash script at https://goo.gl/zgvbWY
  • 60. 05 Cloud Natural Language API Perform sentiment analysis and entity recognition on text
  • 61. 61@bretmcg What can I do with the Natural Language API? Three methods: 1. Analyze entities - The Washington Nationals are an MLB team from Washington, D.C. 2. Analyze sentiment - The DC metro area is a great place to live and work. 3. Analyze syntax - Michelle Obama is married to Barack Obama
  • 62. 62@bretmcg Analyze Entities There is plenty to do in Washington, D.C. without having to spend a single dollar. The Smithsonian is totally free, as is the U.S. Capitol building, along with the White House tour, the U.S. Supreme Court Building, and many other monuments. Bring your Android camera and take photos! -- Bret McGowen's Made-Up Guide to Washington, D.C.
  • 63. 63@bretmcg Analyze Entities There is plenty to do in Washington, D.C. without having to spend a single dollar. The Smithsonian is totally free, as is the U.S. Capitol building, along with the White House tour, the U.S. Supreme Court Building, and many other monuments. Bring your Android camera and take photos! -- Bret McGowen's Made-Up Guide to Washington, D.C.
  • 64. 64@bretmcg Analyze Entities "name": "Bret McGowen", "type": "PERSON", "metadata": {}, "salience": 0.0164788, "mentions": [ { "text": { "content": "Bret McGowen", "beginOffset": -1 } } ] There is plenty to do in Washington, D.C. without having to spend a single dollar. The Smithsonian is totally free, as is the U.S. Capitol building, along with the White House tour, the U.S. Supreme Court Building, and many other monuments. Bring your Android camera and take photos! -- Bret McGowen's Made-Up Guide to Washington, D.C. "name": "Washington, D.C.", "type": "LOCATION", "metadata": { "wikipedia_url": "http://en.wikipedia.org/wiki/Washington,_D.C ." }, "salience": 0.29157177, "mentions": [ { "text": { "content": "Washington, D.C.", "beginOffset": -1 } } "name": "Android", "type": "CONSUMER_GOOD", "metadata": { "wikipedia_url": "http://en.wikipedia.org/wiki/Android_(operating_ system)" }
  • 65. 65@bretmcg Analyze Sentiment Texas is the best state in the Union. { “documentSentiment”: { “polarity”: 1, “magnitude”: 0.8 } }
  • 66. 66@bretmcg Analyze Syntax “My dog Fluffy has been missing ever since Bret brought in that basket of muffins.”
  • 68. 68@bretmcg Let’s see a demo! Twitter Streaming NL API BigQuery bit.ly/nl-olympics
  • 69. 69@bretmcg APIs we covered ● Vision: cloud.google.com/vision ● Speech: cloud.google.com/speech ● Natural Language: cloud.google.com/natural-language Related APIs: ● Translate: cloud.google.com/translate ● Prediction: cloud.google.com/prediction ● Knowledge Graph API: developers.google.com/knowledge-graph
  • 70. 70@bretmcg 70 Oh, in case you were wondering...
  • 71. source: boredpanda.com "labelAnnotations": [ { "mid": "/m/02wbm", "description": "Food", "score": 96 }, { "mid": "/m/02q08p0", "description": "Dish", "score": 87 }, { "mid": "/m/0270h", "description": "Dessert", "score": 86 }, { "mid": "/m/0dxb5", "description": "Berry", "score": 83 }, { "mid": "/m/052lwg6", "description": "Baked Goods", "score": 78 }, { "mid": "/m/0hz4q", "description": "Breakfast", "score": 76 }, { "mid": "/m/01tcjp", "description": "Muffin", "score": 76 },
  • 73. source: boredpanda.com ? "Baked goods" "Mammal" Looking for: ● Dog (or breed) ● Muffin