19. Confidential & ProprietaryGoogle Cloud Platform 19
So…. Why APIs?
{ Google Cloud Platform }
1. We want to offer businesses the tools to differentiate by offering a powerful set of APIs
that enable apps to see, hear and understand the world
2. Reduce your Time to Market (TMM) when launching your next-generation app
3. Provide you easy access to machine learning technology to give any developer the
freedom to work in the language and tools they want
4. Provide virtually limitless scalability to your application without needing to manage
back-end servers running deep learning
20. Pre-Trained Machine Learning Models
Fully trained ML models from Google Cloud that allow a general developer to
take advantage of rich machine learning capabilities with simple REST based
services.
21. Confidential & ProprietaryGoogle Cloud Platform 21
Introducing
Cloud Natural Language API
Sentiment analysis and entity
recognition for text
22. Confidential & ProprietaryGoogle Cloud Platform 22
Features
Extract sentence, identify parts of
speech and create dependency parse
trees for each sentence
Identify entities and label by types such
as person, organization, location, events,
products and media
Understand the overall sentiment of a
block of text
Access via REST API. Text can be
uploaded in the request or integrated
with Google Cloud Storage
Syntax Analysis Entity Recognition
Sentiment Analysis Integrated REST API
24. Confidential & ProprietaryGoogle Cloud Platform 24
Faces: Faces, facial landmarks,
emotions
OCR: Read and extract text, with
support for > 10 languages
Photo credit Getty Images
Label: Detect entities from furniture to
transportation
Logos: Identify product logos
Landmarks & Image Properties
Detect landmarks & dominant
color of image
Safe Search: Detect explicit content -
adult, violent, medical and spoof
Cloud Vision API
Call API from anywhere, with support for embeddable images, and Google Cloud Storage
34. Main shellplus_contacts = get_plus_contacts()
print "Processing %d contacts" % len(plus_contacts)
for plus_id in plus_contacts:
plus_profile = get_plus_profile(plus_id)
image_uri = plus_profile['image']['url'].replace("?sz=50","?sz=250")
image_data = analyze_img(image_uri)
if image_data is not None:
print(image_uri)
if 'labelAnnotations' in image_data['responses'][0]:
for label in image_data['responses'][0]['labelAnnotations']:
print label['description']; label['score']; image_uri
35. get_plus_contacts: oAuth
storage = Storage('/home/almo/dev/keys/ex1/oAuth_credentials.dat')
credentials = storage.get()
if credentials is None or credentials.invalid:
PEOPLE_API='https://www.googleapis.com/auth/contacts.readonly'
flow = flow_from_clientsecrets('/home/almo/dev/keys/ex1/oAuth_key.json',
scope=[PEOPLE_API])
credentials = run_flow(flow, storage)
http = credentials.authorize(httplib2.Http())
service = build('people','v1',http=http)
request = service.people().connections().list(resourceName='people/me',
pageSize=500)
53. Curating Online Content with
Google ML APIs
Andres L. Martinez a.k.a almo
Google Developer Relations Manager
@davilagrau
Editor's Notes
TensorFlow
Open sourced in November 2015
Make clear that it's not only for Neural Nets, but rather it's a generalized ML lib for all sorts of machine learning problems (decision trees, support vector machines, reinforcement learning, and more)
Goal is to emulate the neural networks inside your brain using a data flow framework
A tensor is a multidimensional array, and TF is a data flow framework for tensors. With TF you can represent and perform computations on multi-dimensional data flowing through a graph. Developers + researchers can build and train their own models
Input => algorithms => output
Runs on many platforms: data centers, CPUs and GPUs, mobile phones
Get started with the MNIST example, basically the “Hello World” of machine learning. It uses a dataset of bitmap images of handwritten numbers - you use this to train a model to recognize numbers from handwritten images
Needs more background, understanding of ML and math, more code
Cloud ML
Fully managed service
Train using a custom TensorFlow graph
Batch and online predictions, at scale
Integrated Datalab experience
Regression and classification tasks
Great use case if you have a pile of data, a custom classification, and you don't want to hire (or become) a machine learning expert (aka get a PhD)
When you’d want to use TF vs. Cloud ML: the largest challenge for NN users now is the scalability for distributed training. It's so hard to build a GPU cluster. Cloud ML solves that.
The cool thing about the vision + speech APIs is that you don’t need to be an ML expert to use them. You just need to be able to make a REST request!
Machine Learning APIs, meant for people building applications
Access fully-trained models...as a service
Black box the ML part, and let you move on with your life: If you can make a REST API call, you can use it.
Examples include vision api, speech api, and translate api. More to come!
<CLICK> Vision API = Friendly Machine Learning, not the acronym (FML?)
faces photo is from our mobile vision website: https://developers.google.com/vision/
People pictured above are Google employees, from the London developer relations team.
ship photo is from Getty Images
Receipt Photo is from istock photos
Logo Image: New Google Logo 2015 - YouTube - www.youtube.com1270 × 720Search by image
Let me walk you through what Vision API can really do:
Label Detection: The API can detect broad sets of categories within an image, ranging from modes of transportation to animals.
Face Detection: The API can detect multiple faces within an image, along with the associated key facial attributes like emotional state or wearing headwear.
OCR: The API can detect and extract text within an image, with support for a broad range of languages.
Explicit Content Detection: We can detect explicit content like adult content or violent content within an image.
Landmark Detection: The APi can detect popular natural and manmade structures within an image.
Logo Detection: We can detect popular product logos within an image.