Machine Learning APIs Comm mmon n appli pplications cations - - PowerPoint PPT Presentation
Machine Learning APIs Comm mmon n appli pplications cations - - PowerPoint PPT Presentation
Machine Learning APIs Comm mmon n appli pplications cations Autonomous vehicles Optical character recognition Automatic image tagging Language translation Speech to text Video recommendations Portland State University CS 430P/530
Optical character recognition Language translation Automatic image tagging Autonomous vehicles Video recommendations Speech to text
Comm mmon n appli pplications cations
Portland State University CS 430P/530 Internet, Web & Cloud Systems
AI/ML: /ML: an en enormou rmous s sp space ce
Many different models and approaches
Expert systems / decision trees / knowledge engineering (medical
diagnosis)
Supervised learning (Bayesian filters for spam detection) Unsupervised learning (Clustering algorithms for Google News) Combinatorial search (Chess) Reinforcement learning (NPC in games) Evolutionary/genetic algorithms (Smart fuzzing)
Often combined with each other But recently…neural networks with supervised learning
Convolutional neural networks (CNNs)
Portland State University CS 430P/530 Internet, Web & Cloud Systems
Neu eural ral netw etwor
- rks
ks app pproach
- ach
Model the way the brain works via large collections of simulated
neurons
Formation and pruning of selected connections encodes information
Portland State University CS 430P/530 Internet, Web & Cloud Systems
Simu mulat lated ed in comput puter ers
Selected weights within a simulated network of neurons encodes
information
Portland State University CS 430P/530 Internet, Web & Cloud Systems
Everything old…
Neural Networks circa 1950s-1960s (perceptrons) Multi-layer neural networks 1970s-1980s
Ran on original Macintosh!
Why the renaissance?
Video cards with massive numbers of processing units (thanks to
gaming)
Massive storage capacities for data Crowd-sourced platforms to provide labeling (to learn by example)
Portland State University CS 430P/530 Internet, Web & Cloud Systems
Ima mageNe geNet t (2009) 09)
Pioneered "Deep Learning"
Use convolutional neural networks with massive sets of labeled data to
solve the computer vision problem
Approach
Ignore academic skeptics and take risk on ancient algorithm Collect image data from the Internet Hire humans to label it via Mechanical Turk Send through enormous neural network Profit?
Fei Fei Li https://youtu.be/40riCqvRoMs?t=2m46s
Portland State University CS 430P/530 Internet, Web & Cloud Systems
Now…“The of x”
But, not all sunshine and rainbows…
Portland State University CS 430P/530 Internet, Web & Cloud Systems
SpaceNet
DigitalGlobe, CosmiQ Works, NVIDIA
ShapeNet
A.Chang et al, 2015
MusicNet
- J. Thickstun et al, 2017
EventNet
- G. Ye et al, 2015
Medical ImageNet
Stanford Radiology, 2017
ActivityNet
- F. Heilbron et al, 2015
Corpus rpus can n have e iss ssues ues
US vs. Russian tanks in 1980s with early NN
US images crisp marketing shots on sunny days Russian images grainy and on cloudy days ML trains on wrong feature (crisp/sunny vs. grainy/cloudy)
Portland State University CS 430P/530 Internet, Web & Cloud Systems
SE Asian workers used to label ideal vacation photos
Label conference reception photos in hotels as the ideal vacation!
Perhaps the beach is hard work if they fish for a living? Labeling is a relative task!
What happens when one uses ImageNet photos taken by humans on
high-quality cameras for drone applications with poor imaging hardware and no human?
Portland State University CS 430P/530 Internet, Web & Cloud Systems
Bi Bias as in labeli eling ng
Institutionalize bias behind facade of
an "objective" algorithm
Racial, socio-economic bias in data
being labeled and used
TED talk GCP podcast #114 (2/2018) FAT* conference
Example: ML for domestic violence
Most common way is via neighbor
complaint
ML incorrectly learns that only those
who live in row-homes and apartments commit domestic violence!
Hard problem
"It’s not always so obvious ahead of time
what the bad outcomes might be"
Portland State University CS 430P/530 Internet, Web & Cloud Systems
MM's NY Times article (11/2018) and book…
Portland State University CS 430P/530 Internet, Web & Cloud Systems
Rare e pr problematic blematic cases ses
Example: Self-driving cars
Kangaroos, white trucks against a white sky Need millions of miles trained to get enough anomalous conditions Must also train in winter/spring, in snow/rain/clear conditions
Portland State University CS 430P/530 Internet, Web & Cloud Systems
Res esistance stance to adver ersaries saries
Both in training and in
inference
Small changes fool
classifier
Portland State University CS 430P/530 Internet, Web & Cloud Systems
2010
35 29 81 123 157 172
2011 2012 2013 2014 2015 2016
Number of Entries Classification Errors (top-5)
0.28 0.03 0.23 0.66
Average Precision For Object Detection
Requi uires res la large-scale scale particip icipat ation/da ion/data ta
In thousands of entries
Portland State University CS 430P/530 Internet, Web & Cloud Systems
“Datasets—not algorithms—might be the key limiting factor to development of human-level artificial intelligence.”
A L E X A N D E R W I S S N E R - G R O S S Edge.org, 2016
Portland State University CS 430P/530 Internet, Web & Cloud Systems
Towar ards ds crowd wd-sour sourced ced ML
Portland State University CS 430P/530 Internet, Web & Cloud Systems
We’re passing the baton to Kaggle: a community of more than 1M data scientists. Why? democratizing data is vital to democratizing AI. image-net.org remains live at Stanford.
An Ex Expl plosion
- sion of Da
Datase tasets ts
Portland State University CS 430P/530 Internet, Web & Cloud Systems
1627
Hosted Datasets
276
Commercial Competitions
1MM
Data Scientists
4MM
ML Models Submitted
1919
Student Competitions
Qu Ques estio tion
Who on this planet has the largest, most interesting, data-sets?
Monetize data via ML models
Portland State University CS 430P/530 Internet, Web & Cloud Systems
Softw tware's are's new w ap applic lication ation bu buildin lding bl blocks cks
Don't build your own when you can use pre-trained models done
by experts on massive datasets
Part of an emerging API development platform Accessed via REST APIs with results sent back in JSON Abstraction raised, “Hello world” will never be the same
Portland State University CS 430P/530 Internet, Web & Cloud Systems
Cloud ud Visi sion
- n API
Image recognition
Image labeling on thousands of labels Face detection Sentiment analysis (Emotobooth) Text detection (optical character recognition) SafeSearch content identification (adult/violent content) Logo identification Landmark identification
Portland State University CS 430P/530 Internet, Web & Cloud Systems
Cloud ud Spe peech ech APIs Is
Speech-to-Text
Word recognition Context-aware transcription Automated punctuation Offensive content detection
Text-to-Speech (speech synthesis) Both in 120 languages
Portland State University CS 430P/530 Internet, Web & Cloud Systems
Cloud ud Translation anslation API
Language detection and translation
100+ languages Python, Java, Ruby, Objective-C bindings via Google API client
libraries
Portland State University CS 430P/530 Internet, Web & Cloud Systems
Cloud ud Natural tural Lang nguage uage API
Language analysis Syntax analysis Semantic analysis, entity recognition Sentiment analysis Common e-mail responses
Cloud ud Video eo Intelligence elligence API
Summary and information extraction from video
Autotag objects in video to enable searching Scene detection for thumbnail generation Automated highlights (RedZone!) Trained on massive set of labeled
YouTube videos
Portland State University CS 430P/530 Internet, Web & Cloud Systems
Cloud ud Video eo Intelligence elligence API
Demo code similar to image blurring lab
Flow chart triggered when new video placed in bucket
Portland State University CS 430P/530 Internet, Web & Cloud Systems
ML as s a se service ice
Use ML to generate custom ML models so regular users can build
their own ML models
AmazonML
http://cloudacademy.com/blog/aws-machine-learning/
AzureML
http://cloudacademy.com/blog/azure-machine-learning/
Watson Analytics
http://www.ibm.com/analytics/watson-analytics/
Google AutoML
Portland State University CS 430P/530 Internet, Web & Cloud Systems
Cloud ud Aut utoML ML for Visi sion
- n (2018)
8)
ML services trained on general datasets, but custom
images and domain labels often needed
AutoML
Apply transfer learning to re-use trained models to quickly
learn new domains
Custom models via
Labeled data (done by user) Unlabeled data (done by humans at Google)
Evaluate many different ML models and pick best one (> 13)
Example: Custom models to recognize machine parts Democratizes ML for the masses
All that is required is for you to upload your data with labels
- r exemplars for Google to label
Portland State University CS 430P/530 Internet, Web & Cloud Systems
Aut utoML ML Visi sion
- n exa
xample ple
https://www.blog.google/topics/machine-learning/noodle-
machine-learning-can-identify-ramen-shop/
Portland State University CS 430P/530 Internet, Web & Cloud Systems
Aut utoML ML Natural tural Lang anguage uage Proce
- cessing
ssing exa xample ple
Portland State University CS 430P/530 Internet, Web & Cloud Systems
Put uttin ting g APIs Is toget gether er (Un Univision ivision)
Univision live video broadcasts
“YouTube infrastructure” as a service YouTube code for video capture, encoding, transcoding, close-
captioning, ad insertion, and re-distribution
Portland State University CS 430P/530 Internet, Web & Cloud Systems
Real-time close-captioning (Speech API for transcription, Translate API for multiple languages) Transcode to different resolutions (Compute Engine VMs) Insert ads based on video content and user (Video Intelligence and Vision for object detection, Natural Language for video context, AdSense) Distribution to global users (CDN)
Portland State University CS 430P/530 Internet, Web & Cloud Systems
Digitize in full res Upload to Cloud Storage Trigger Cloud Pub/Sub Transcode via GKE & Compute Engine Analyze via Cloud Vision Store metadata in CloudSQL Store images in Cloud Storage
Put uttin ting g APIs Is toget gether er (NY Times mes 11/2 /2018) 8)
Portland State University CS 430P/530 Internet, Web & Cloud Systems