SlideShare a Scribd company logo
1 of 99
1
ML in the Browser
Victor Dibia, PhD
Cloudera Fast Forward Labs
@vykthur
Interactive Experiences with Tensorflow.js
InfoQ.com: News & Community Site
• Over 1,000,000 software developers, architects and CTOs read the site world-
wide every month
• 250,000 senior developers subscribe to our weekly newsletter
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• 2 dedicated podcast channels: The InfoQ Podcast, with a focus on
Architecture and The Engineering Culture Podcast, with a focus on building
• 96 deep dives on innovative topics packed as downloadable emags and
minibooks
• Over 40 new content items per week
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
ml-browser-tensorflow-js/
Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
Presented at QCon San Francisco
www.qconsf.com
2
- Background in CS, Human
Computer Interaction (HCI),
Applied AI.
- Previously Research Scientist at
IBM Research New York.
- Community Contributions - GDE
for Machine Learning
- Research Engineer (ML) at
Cloudera Fast Forward Labs
Research Engineer
Cloudera Fast Forward Labs, Brooklyn.
@vykthur | @victordibia
4
5
6
experiments.fastforwardlabs.com
7
Agenda
• Why Machine Learning in the Browser?
• Overview of the Tensorflow.js library API with examples
• The Ops API
• The Layers API
• Building Handtrack.js - a javascript library for prototyping gesture
based interactions in the browser.
•
8
Why Machine Learning in the
Browser?
Artificial Intelligence
Machine Learning
Deep Learning
The broad field that
describes efforts to
make machines
intelligent.
Algorithms that enable
machines
independently learn
from data and make
predictions.
Decision trees, random
forests, reinforcement
learning, neural
networks,
Neural Networks (NN): a
set of stacked computation
units.
- High accuracy, scales with
data
- Advances in NN
algorithms
- Amenable to GPU
computation
But What is Machine
Learning?
Let's review some terminology ..
Artificial Intelligence
Machine Learning
Deep Learning
The broad field that
describes efforts to
make machines
intelligent.
Algorithms that enable
machines
independently learn
from data and make
predictions.
Decision trees, random
forests, reinforcement
learning, neural
networks,
Neural Networks (NN): a
set of stacked computation
units.
- High accuracy, scales with
data
- Advances in NN
algorithms
- Amenable to GPU
computation
Artificial Intelligence
Machine Learning
Deep Learning
The broad field that
describes efforts to
make machines
intelligent.
Algorithms that enable
machines
independently learn
from data and make
predictions.
Decision trees, random
forests, reinforcement
learning, neural
networks,
Neural Networks (NN): a
set of stacked computation
units.
- High accuracy, scales with
data
- Advances in NN
algorithms
- Amenable to GPU
computation
For today, each time I refer to Machine Learning
or AI, what I am referring to is
Deep Learning
Fast Forward Labs
Perceptron
Dense layer (nodes in one layer connected to all
nodes in the following layer).
Fast Forward Labs
Multilayer Perceptron
14
The Languages of Machine Learning
15
The Languages of Machine Learning
16
The Languages of Machine Learning
17
The Languages of Machine Learning
Backend programming languages
.. and they work well!
.. but ..
18
• Cloudera Fast Forward Labs
• Intro to Transfer Learning for NLP
• Applications
• Appendix: Positioning & FAQ (internal audience only)
2019 Stackoverflow survey of 90k developers
What programming
language do developers
use?
19
2019 Stackoverflow survey of 90k developers
What programming language
do developers want to learn?
20
Github 2018 Top
Programming
languages between
2008 and 2018.
21
dev.to
Anthony Delgado
22
Backend
Node.js
+
Front End
Vanilla js, Frameworks
23
• Wait .. thats a bad idea
Tenor
Bad Idea
24
Can I really train a
neural network in
Javascript?
Orienta
Boy thinking
25
Yes!!
Tensorflow.js - a library for
building/training ML models in
Javascript.
26
Will it meet my
speed
requirements?
27
Yes!!
Tensorflow.js, is accelerated in
the browser using WebGL (CPU
+ GPU) and in Node.js using
Tensorflow C API (CPU + GPU).
28
How much effort is
this? Can I re-use
my existing
models/pipelines?
29
Not much!
- Tensorflowjs API is Similar to
Keras
- Tensorflow.js converter allows
you import pretrained Keras (hd5,
savedModel), Tensorflow
SavedModel, Tensorflow Hub
Module
30
Oprah
“You get a car”
31
Why Machine Learning in the Browser?
• Privacy
• Distribution
• Latency
• Interactivity
32
Why Machine Learning in the Browser?
• Privacy
• Distribution
• Latency
• Interactivity
• Strong Notion of Privacy
We do not see your data, it never gets to
our servers.
• Example use case: sensitive documents
identication, domain specic text
autocomplete for chat systems etc
33
Why Machine Learning in the Browser?
• Privacy
• Distribution
• Latency
• Interactivity
• No installs, drivers and
dependency issues.
• Navigate to a URL and your application
is available to end users.
• Free model asset
hosting/versioning/distribution
(NPM/jsdelvr), excellent for end user
applications.
34
Why Machine Learning in the Browser?
• Privacy
• Distribution
• Latency
• Interactivity
• ML models can be optimized
for speed and can run fast on
mobile and in the browser
• In some cases, it is faster to run your
model in the browser, rather than send
make round trip requests to a server.
• Avoid reliability issues with intermittent
connectivity environments
35
Why Machine Learning in the Browser?
• Privacy
• Distribution
• Latency
• Interactivity
• The Browser is designed for
interactive experiences. ML
can supercharge this!
• Build models on the fly using rich user
data available in the browser (camera, le
uploads), run inference, retrain existing models, enable
dynamic behaviour.
• ML education, retail, advertising, arts, entertainment,
gaming.
36
Privacy Preserving
Sensitive Content
Detection.
37
Example Use Cases
Client-side indecent
content checking
nsfw.js.com
38
Handtrack.js
39
40
Tensorflow.js
A library for machine
learning in JavaScript
41
What can you do with Tensorflow.js
• Author models
• Import pre-trained models for inference
• Re-train imported models
Online Flow
• Design/Train/Test/
Inference, all in
your javascript
code.
42
What can you do with Tensorflow.js
• Author models
• Import pre-trained models for inference
• Re-train imported models
Offline Flow
• Design/Train/Test
model on your
preferred hardware
(GPU, TPU clusters)
• Import into
javascript for
inference
43
What can you do with Tensorflow.js
• Author models
• Import pre-trained models for inference
• Re-train imported models
Hybrid Flow
• Design/Train/Test
model on your
preferred hardware
(GPU, TPU clusters)
• Import into javascript
application
• Retrain/Run inference
44
Tensorflow.js - Backend and Frontend
Browser
(Front end)
Server
(Back end, Node.js)
45
Tensorflow.js - Backend and Frontend
Browser
(Front end)
• Usage
• Vanilla js script tag import (like jquery)
• Import - NPM install ( build tools,
frameworks such as React, Vue, etc).
• Acceleration
• WebGL
• Tensors implemented as Shader
programs (will use GPUs where
available)
46
Tensorflow.js - Backend and Frontend
Server
(Back end, Node.js)
• Usage
• NPM install
• (tfjs-node, tfjs-node-gpu)
• Acceleration
• Tensorflow C binary
WebGL
Browser
TF CPUTF GPU
Node.js
Runtime
API
Ops API (Eager)
Layers API
TF TPU
Keras Model
TensorFlow
SavedModel
48
Ops API (Eager)
Layers API
Fit data to a polynomial
function
Build and train a two layer
autoencoder in the
browser
Import a trained model for
inference in the browser
(Handtrack.js)
API
49
Tensorflow.js OPS API
Use with caution
50
The Ops API - Fit a Polynomial
f(x) = ax2
+ bx + c
51
import * as tf from '@tensorflow/tfjs';
52
import * as tf from '@tensorflow/tfjs';
const a = tf.tensor(0.1).variable();
const b = tf.tensor(0.1).variable();
const c = tf.tensor(0.1).variable();
53
import * as tf from '@tensorflow/tfjs';
const a = tf.tensor(0.1).variable();
const b = tf.tensor(0.1).variable();
const c = tf.tensor(0.1).variable();
// f(x) = a*x^2 + b^x + c
const f = x => a.mul(x.square()).add(b.mul(x)).add(c);
// ...
54
// ...
// Mean-squared error
const loss = (preds, label) =>
preds.sub(label).square().mean();
55
// ...
// Mean-squared error
const loss = (preds, label) =>
preds.sub(label).square().mean();
const optimizer = tf.train.sgd(learningRate);
56
// ...
// Mean-squared error
const loss = (preds, label) =>
preds.sub(label).square().mean();
const optimizer = tf.train.sgd(learningRate);
for (let i = 0; i < EPOCHS; i++) {
optimizer.minimize(() => loss(f(data.xs), data.ys));
}
57
Tensorflow.js Layers API
Very much like keras
58
The Layers API
• Recommended API for neural networks
• Similar in spirit to the Keras Library.
Keras is a well designed api standard for
composing and training neural networks.
59
An Autoencoder
Dimensionality reduction
• Neural Network with two
parts.
• Given some high dimension
data (e.g. tabular data with
many elds), nd a smaller
representation.
• This representation should
support reconstruction.15
7 2
15
7
60
An Autoencoder
Encoder
• Take a high dimensional
input.
• Learn to compress it to
a meaningful smaller
representation
(bottleneck)
15
7 2
15
7
61
An Autoencoder
Decoder
• Takes a bottleneck
vector
• Learn to reconstruct
original input from z.
15
7 2
15
7
62
An Autoencoder for Detecting Anomalies
Anomaly Detection
• Train on Normal Data
• Learns a bottleneck vector
suitable for reconstructing
normal signals
• High reconstruction error
(MSE) for abnormal images.
Flag high error as
anomalies.
15
7 2
15
7
63
An Autoencoder for Detecting Anomalies
Example, ECG data
15
7 2
15
7
0.8
0.2
Error
64
# Keras, Python
# Encoder
inputs =
Input(shape=(num_feature
s,))
# define hidden layers
// Tensorflow JS
// Encoder
const input = tf.input({
shape: [numFeatures] })
# define hidden layers
65
# Keras, Python
# define hidden layers
enc_hidden = Dense(15,
activation='relu')(inpu
ts)
// Tensorflow JS
# define hidden layers
let encHidden =
tf.layers.dense({ units: 15,
activation: "relu"
}).apply(input);
66
# Keras, Python
# define hidden layers
enc_hidden = Dense(7,
activation='relu')
(enc_hidden)
// Tensorflow JS
# define hidden layers
let encHidden =
encHidden =
tf.layers.dense({ units: 7,
activation: "relu"
}).apply(encHidden);
67
# Keras, Python
# Encoder
z_ =
Dense(latent_dim)(enc_hidden)
encoder = Model(inputs, z_,
name='encoder')
// Tensorflow JS
// Encoder
const z_ = tf.layers.dense({
units: latentDim
}).apply(encHidden);
const encoder = tf.model({
inputs: input, outputs: z_,
name:"encoder" })
69
Train - Data
70
Test - Data
71
Test - Data
72
Interactive Visualizations of Predictions
73
Interactive Visualizations of Bottleneck Predictions
74
Interactive Visualizations of Bottleneck Predictions
2600 data points
75
Interactive Visualizations of Bottleneck Predictions
76
Building Handtrack.js,
https://github.com/victordibia/handtrack.js/
A library for prototyping hand gestures in the
browser
77
Handtrack.js
• Given an image, predict the
location (bounding box) of all
hands.
• Uses a Convolutional Neural
Network (Object Detection)
• Bundled into a JS library to enable
developers prototype interactive.
• Open source.
78
// Load the model.
handTrack.load().then(model => {
// detect objects in the image.
model.detect(img).then(predictions => {
console.log('Predictions: ', predictions);
});
});
<script
src="https://cdn.jsdelivr.net/npm/handtrackjs/dist/handtrack.min.js">
</script>
79
[{
bbox: [x, y, width, height],
class: "hand",
score: 0.8380282521247864
},
{ bbox: [x, y, width, height],
class: "hand",
score: 0.74644153267145157
}]
80
How was this built?
81
How was this built?
82
Data Assembly (Egohands Dataset)
83
Model Training
• Convert images to Tensorflow Records format
– For each image, list of bbox coordinates, and labels.
• Train using Tensorflow Object Detection API (python)
– Framework and sample code for training various object detection
models.
– Mobilenet, SSD (fast, optimized for mobile).
• Export Trained Model as savedModel from checkpoints.
•
84
Model Conversion
• Use tensorflow.js converter
• Identify model output node
variable name
• Specify model format
• Specify input/output
directories
• Supports
• savedModel (default for Tensorflow)
• Keras Model
• Tensorflow Hub
$ pip install tensorflowjs
$ tensorflowjs_converter 
--input_format tf_saved_model 
--output_node_names
'Predictions/Reshape_1' 
path/to/tf_saved_model 
path/to/tfjs_model
Exported model can be imported in javascript.
85
Exported Model
• 18.5mb .. final model size
• Sharded into 5 files with a maximum size of 4.2mb
•
• Bundled into an NPM library, hosted on NPM (with benefits!)
• Model artifact versioning
• CDN serving (jsdelivr)
•
86
87
88
89
Demo!
• So .. does it work live?
• https://victordibia.github.io/handtrack.js/#/
90
Some Challenges
• Manual Memory Management
• Tensorflow.js implements tensors using WebGLTextures.
• Copied to GPU and cached to enable fast computation
• Need to be explicitly deleted using the tensor.dispose().
• Use tf.memory() to see how many tensors your application is
holding onto
91
Some Challenges
• General limitations of the Browser.
• The browser is single threaded
• Compute heavy operations will block the UI thread.
92
Some Challenges
• Device Fragmentation
• Differences in devices can lead to wildly varying performance
• CPU (Mobile, Desktop, Embedded)
• GPU availability
• Device power mode
93
Some Good Practices
• Optimize Your Model
• Replace full Convolutional Operations with Depthwise separable
convolutions (less parameters).
• Remove optional post processing from model graph during
model export.
• Explore model compression methods (quantization, distillation,
pruning).
• Explore NAS/AutoML.
.
94
Some Good Practices
• Design and Test Considerations
• Asynchronous methods (async await, promises) to avoid
blocking the UI thread.
• Visually communicate model load/inference latency.
• Communicate model uncertainty where possible.
• Test and benchmark across multiple devices!!
• Chrome Profiler is your friend!
• See Google PAIR (People + AI Guidebook) document on how to
design human-centered AI products.
95
Conclusion
• ML in the browser is valuable when your objectives are focused on
privacy, ease of distribution, low latency and interactivity.
• Tensorflow.js provides an API for ML in Javascript (online, offline,
hybrid workflow). Fast, expressive, integrated with the rest of the
TF ecosystem.
• Research advances in ML (compression, distillation, pruning) +
Advances in acceleration in the browser (WebAssembly, WebGPU),
positions ML in the browser for faster and wider integration.
96
Thank you!
Research Engineer
Cloudera Fast Forward Labs, Brooklyn.
@vykthur | @victordibia
Source Code: Handtrack.js
https://github.com/victordibia/handtrack.js
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
ml-browser-tensorflow-js/

More Related Content

What's hot

Craigslist Code Words: Do You Know What They Really Mean?
Craigslist Code Words: Do You Know What They Really Mean?Craigslist Code Words: Do You Know What They Really Mean?
Craigslist Code Words: Do You Know What They Really Mean?Instant Checkmate
 
ChatGPT, Midjourney, la dĂŠferlante des IA gĂŠnĂŠratives dans l'enseignement
ChatGPT, Midjourney, la dĂŠferlante des IA gĂŠnĂŠratives dans l'enseignementChatGPT, Midjourney, la dĂŠferlante des IA gĂŠnĂŠratives dans l'enseignement
ChatGPT, Midjourney, la dĂŠferlante des IA gĂŠnĂŠratives dans l'enseignementAlain Goudey
 
[DSC Europe 23] Marcel Tkacik - Augmented Retrieval Products with GAI models
[DSC Europe 23] Marcel Tkacik - Augmented Retrieval Products with GAI models[DSC Europe 23] Marcel Tkacik - Augmented Retrieval Products with GAI models
[DSC Europe 23] Marcel Tkacik - Augmented Retrieval Products with GAI modelsDataScienceConferenc1
 
Design thinking: an overview
Design thinking: an overviewDesign thinking: an overview
Design thinking: an overviewPriscila Mendoza
 
Large Language Models - Chat AI.pdf
Large Language Models - Chat AI.pdfLarge Language Models - Chat AI.pdf
Large Language Models - Chat AI.pdfDavid Rostcheck
 
The Future is in Responsible Generative AI
The Future is in Responsible Generative AIThe Future is in Responsible Generative AI
The Future is in Responsible Generative AISaeed Al Dhaheri
 
Large Language Models Bootcamp
Large Language Models BootcampLarge Language Models Bootcamp
Large Language Models BootcampData Science Dojo
 
Using Generative AI in the Classroom .pptx
Using Generative AI in the Classroom .pptxUsing Generative AI in the Classroom .pptx
Using Generative AI in the Classroom .pptxJonathanDietz3
 
presentation.pdf
presentation.pdfpresentation.pdf
presentation.pdfcaa28steve
 
The Next Big Thing in AI - Causality
The Next Big Thing in AI - CausalityThe Next Big Thing in AI - Causality
The Next Big Thing in AI - CausalityVaticle
 
The perfect innovation toolkit for $100 per month
The perfect innovation toolkit for $100 per monthThe perfect innovation toolkit for $100 per month
The perfect innovation toolkit for $100 per monthBoard of Innovation
 
ChatGPT-the-revolution-is-coming.pdf
ChatGPT-the-revolution-is-coming.pdfChatGPT-the-revolution-is-coming.pdf
ChatGPT-the-revolution-is-coming.pdfLiang Yan
 
Smarter Fraud Detection With Graph Data Science
Smarter Fraud Detection With Graph Data ScienceSmarter Fraud Detection With Graph Data Science
Smarter Fraud Detection With Graph Data ScienceNeo4j
 
CrĂŠativitĂŠ et design tninking
CrĂŠativitĂŠ et design tninkingCrĂŠativitĂŠ et design tninking
CrĂŠativitĂŠ et design tninkingZohra Kaafar
 
An Introduction to Generative AI
An Introduction  to Generative AIAn Introduction  to Generative AI
An Introduction to Generative AICori Faklaris
 

What's hot (20)

Craigslist Code Words: Do You Know What They Really Mean?
Craigslist Code Words: Do You Know What They Really Mean?Craigslist Code Words: Do You Know What They Really Mean?
Craigslist Code Words: Do You Know What They Really Mean?
 
ChatGPT, Midjourney, la dĂŠferlante des IA gĂŠnĂŠratives dans l'enseignement
ChatGPT, Midjourney, la dĂŠferlante des IA gĂŠnĂŠratives dans l'enseignementChatGPT, Midjourney, la dĂŠferlante des IA gĂŠnĂŠratives dans l'enseignement
ChatGPT, Midjourney, la dĂŠferlante des IA gĂŠnĂŠratives dans l'enseignement
 
Design thinking
Design thinkingDesign thinking
Design thinking
 
[DSC Europe 23] Marcel Tkacik - Augmented Retrieval Products with GAI models
[DSC Europe 23] Marcel Tkacik - Augmented Retrieval Products with GAI models[DSC Europe 23] Marcel Tkacik - Augmented Retrieval Products with GAI models
[DSC Europe 23] Marcel Tkacik - Augmented Retrieval Products with GAI models
 
Design thinking: an overview
Design thinking: an overviewDesign thinking: an overview
Design thinking: an overview
 
Large Language Models - Chat AI.pdf
Large Language Models - Chat AI.pdfLarge Language Models - Chat AI.pdf
Large Language Models - Chat AI.pdf
 
The Future is in Responsible Generative AI
The Future is in Responsible Generative AIThe Future is in Responsible Generative AI
The Future is in Responsible Generative AI
 
Optimizing GenAI apps, by N. El Mawass and Maria Knorps
Optimizing GenAI apps, by N. El Mawass and Maria KnorpsOptimizing GenAI apps, by N. El Mawass and Maria Knorps
Optimizing GenAI apps, by N. El Mawass and Maria Knorps
 
OpenAI-Copilot-ChatGPT.pptx
OpenAI-Copilot-ChatGPT.pptxOpenAI-Copilot-ChatGPT.pptx
OpenAI-Copilot-ChatGPT.pptx
 
Large Language Models Bootcamp
Large Language Models BootcampLarge Language Models Bootcamp
Large Language Models Bootcamp
 
Design Thinking
Design ThinkingDesign Thinking
Design Thinking
 
Design-Thinking
Design-ThinkingDesign-Thinking
Design-Thinking
 
Using Generative AI in the Classroom .pptx
Using Generative AI in the Classroom .pptxUsing Generative AI in the Classroom .pptx
Using Generative AI in the Classroom .pptx
 
presentation.pdf
presentation.pdfpresentation.pdf
presentation.pdf
 
The Next Big Thing in AI - Causality
The Next Big Thing in AI - CausalityThe Next Big Thing in AI - Causality
The Next Big Thing in AI - Causality
 
The perfect innovation toolkit for $100 per month
The perfect innovation toolkit for $100 per monthThe perfect innovation toolkit for $100 per month
The perfect innovation toolkit for $100 per month
 
ChatGPT-the-revolution-is-coming.pdf
ChatGPT-the-revolution-is-coming.pdfChatGPT-the-revolution-is-coming.pdf
ChatGPT-the-revolution-is-coming.pdf
 
Smarter Fraud Detection With Graph Data Science
Smarter Fraud Detection With Graph Data ScienceSmarter Fraud Detection With Graph Data Science
Smarter Fraud Detection With Graph Data Science
 
CrĂŠativitĂŠ et design tninking
CrĂŠativitĂŠ et design tninkingCrĂŠativitĂŠ et design tninking
CrĂŠativitĂŠ et design tninking
 
An Introduction to Generative AI
An Introduction  to Generative AIAn Introduction  to Generative AI
An Introduction to Generative AI
 

Similar to ML in the Browser: Interactive Experiences with Tensorflow.js

Going deep (learning) with tensor flow and quarkus
Going deep (learning) with tensor flow and quarkusGoing deep (learning) with tensor flow and quarkus
Going deep (learning) with tensor flow and quarkusRed Hat Developers
 
Autonomous Machines with Project Bonsai
Autonomous Machines with Project BonsaiAutonomous Machines with Project Bonsai
Autonomous Machines with Project BonsaiIvo Andreev
 
Deep Learning Frameworks 2019 | Which Deep Learning Framework To Use | Deep L...
Deep Learning Frameworks 2019 | Which Deep Learning Framework To Use | Deep L...Deep Learning Frameworks 2019 | Which Deep Learning Framework To Use | Deep L...
Deep Learning Frameworks 2019 | Which Deep Learning Framework To Use | Deep L...Simplilearn
 
TensorFlow meetup: Keras - Pytorch - TensorFlow.js
TensorFlow meetup: Keras - Pytorch - TensorFlow.jsTensorFlow meetup: Keras - Pytorch - TensorFlow.js
TensorFlow meetup: Keras - Pytorch - TensorFlow.jsStijn Decubber
 
Deep learning with TensorFlow
Deep learning with TensorFlowDeep learning with TensorFlow
Deep learning with TensorFlowNdjido Ardo BAR
 
Designing Artificial Intelligence
Designing Artificial IntelligenceDesigning Artificial Intelligence
Designing Artificial IntelligenceDavid Chou
 
Dog Breed Classification using PyTorch on Azure Machine Learning
Dog Breed Classification using PyTorch on Azure Machine LearningDog Breed Classification using PyTorch on Azure Machine Learning
Dog Breed Classification using PyTorch on Azure Machine LearningHeather Spetalnick
 
Machine learning and Deep learning on edge devices using TensorFlow
Machine learning and Deep learning on edge devices using TensorFlowMachine learning and Deep learning on edge devices using TensorFlow
Machine learning and Deep learning on edge devices using TensorFlowAditya Bhattacharya
 
2014 01-ticosa
2014 01-ticosa2014 01-ticosa
2014 01-ticosaPharo
 
OpenPOWER Workshop in Silicon Valley
OpenPOWER Workshop in Silicon ValleyOpenPOWER Workshop in Silicon Valley
OpenPOWER Workshop in Silicon ValleyGanesan Narayanasamy
 
2017 arab wic marwa ayad machine learning
2017 arab wic marwa ayad machine learning2017 arab wic marwa ayad machine learning
2017 arab wic marwa ayad machine learningmarwa Ayad Mohamed
 
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!Microsoft Tech Community
 
Democratizing machine learning on kubernetes
Democratizing machine learning on kubernetesDemocratizing machine learning on kubernetes
Democratizing machine learning on kubernetesDocker, Inc.
 
RISC-V & SoC Architectural Exploration for AI and ML Accelerators
RISC-V & SoC Architectural Exploration for AI and ML AcceleratorsRISC-V & SoC Architectural Exploration for AI and ML Accelerators
RISC-V & SoC Architectural Exploration for AI and ML AcceleratorsRISC-V International
 
Large Scale Deep Learning with TensorFlow
Large Scale Deep Learning with TensorFlow Large Scale Deep Learning with TensorFlow
Large Scale Deep Learning with TensorFlow Jen Aman
 
Introduction to Tensorflow.js
Introduction to Tensorflow.jsIntroduction to Tensorflow.js
Introduction to Tensorflow.jsRiza Fahmi
 
2018 11 14 Artificial Intelligence and Machine Learning in Azure
2018 11 14 Artificial Intelligence and Machine Learning in Azure2018 11 14 Artificial Intelligence and Machine Learning in Azure
2018 11 14 Artificial Intelligence and Machine Learning in AzureBruno Capuano
 
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 LearningBruno Capuano
 
Microsoft AI Platform - AETHER Introduction
Microsoft AI Platform - AETHER IntroductionMicrosoft AI Platform - AETHER Introduction
Microsoft AI Platform - AETHER IntroductionKarthik Murugesan
 
Deep Dive on Deep Learning (June 2018)
Deep Dive on Deep Learning (June 2018)Deep Dive on Deep Learning (June 2018)
Deep Dive on Deep Learning (June 2018)Julien SIMON
 

Similar to ML in the Browser: Interactive Experiences with Tensorflow.js (20)

Going deep (learning) with tensor flow and quarkus
Going deep (learning) with tensor flow and quarkusGoing deep (learning) with tensor flow and quarkus
Going deep (learning) with tensor flow and quarkus
 
Autonomous Machines with Project Bonsai
Autonomous Machines with Project BonsaiAutonomous Machines with Project Bonsai
Autonomous Machines with Project Bonsai
 
Deep Learning Frameworks 2019 | Which Deep Learning Framework To Use | Deep L...
Deep Learning Frameworks 2019 | Which Deep Learning Framework To Use | Deep L...Deep Learning Frameworks 2019 | Which Deep Learning Framework To Use | Deep L...
Deep Learning Frameworks 2019 | Which Deep Learning Framework To Use | Deep L...
 
TensorFlow meetup: Keras - Pytorch - TensorFlow.js
TensorFlow meetup: Keras - Pytorch - TensorFlow.jsTensorFlow meetup: Keras - Pytorch - TensorFlow.js
TensorFlow meetup: Keras - Pytorch - TensorFlow.js
 
Deep learning with TensorFlow
Deep learning with TensorFlowDeep learning with TensorFlow
Deep learning with TensorFlow
 
Designing Artificial Intelligence
Designing Artificial IntelligenceDesigning Artificial Intelligence
Designing Artificial Intelligence
 
Dog Breed Classification using PyTorch on Azure Machine Learning
Dog Breed Classification using PyTorch on Azure Machine LearningDog Breed Classification using PyTorch on Azure Machine Learning
Dog Breed Classification using PyTorch on Azure Machine Learning
 
Machine learning and Deep learning on edge devices using TensorFlow
Machine learning and Deep learning on edge devices using TensorFlowMachine learning and Deep learning on edge devices using TensorFlow
Machine learning and Deep learning on edge devices using TensorFlow
 
2014 01-ticosa
2014 01-ticosa2014 01-ticosa
2014 01-ticosa
 
OpenPOWER Workshop in Silicon Valley
OpenPOWER Workshop in Silicon ValleyOpenPOWER Workshop in Silicon Valley
OpenPOWER Workshop in Silicon Valley
 
2017 arab wic marwa ayad machine learning
2017 arab wic marwa ayad machine learning2017 arab wic marwa ayad machine learning
2017 arab wic marwa ayad machine learning
 
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!
 
Democratizing machine learning on kubernetes
Democratizing machine learning on kubernetesDemocratizing machine learning on kubernetes
Democratizing machine learning on kubernetes
 
RISC-V & SoC Architectural Exploration for AI and ML Accelerators
RISC-V & SoC Architectural Exploration for AI and ML AcceleratorsRISC-V & SoC Architectural Exploration for AI and ML Accelerators
RISC-V & SoC Architectural Exploration for AI and ML Accelerators
 
Large Scale Deep Learning with TensorFlow
Large Scale Deep Learning with TensorFlow Large Scale Deep Learning with TensorFlow
Large Scale Deep Learning with TensorFlow
 
Introduction to Tensorflow.js
Introduction to Tensorflow.jsIntroduction to Tensorflow.js
Introduction to Tensorflow.js
 
2018 11 14 Artificial Intelligence and Machine Learning in Azure
2018 11 14 Artificial Intelligence and Machine Learning in Azure2018 11 14 Artificial Intelligence and Machine Learning in Azure
2018 11 14 Artificial Intelligence and Machine Learning in Azure
 
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
 
Microsoft AI Platform - AETHER Introduction
Microsoft AI Platform - AETHER IntroductionMicrosoft AI Platform - AETHER Introduction
Microsoft AI Platform - AETHER Introduction
 
Deep Dive on Deep Learning (June 2018)
Deep Dive on Deep Learning (June 2018)Deep Dive on Deep Learning (June 2018)
Deep Dive on Deep Learning (June 2018)
 

More from C4Media

Streaming a Million Likes/Second: Real-Time Interactions on Live Video
Streaming a Million Likes/Second: Real-Time Interactions on Live VideoStreaming a Million Likes/Second: Real-Time Interactions on Live Video
Streaming a Million Likes/Second: Real-Time Interactions on Live VideoC4Media
 
Next Generation Client APIs in Envoy Mobile
Next Generation Client APIs in Envoy MobileNext Generation Client APIs in Envoy Mobile
Next Generation Client APIs in Envoy MobileC4Media
 
Software Teams and Teamwork Trends Report Q1 2020
Software Teams and Teamwork Trends Report Q1 2020Software Teams and Teamwork Trends Report Q1 2020
Software Teams and Teamwork Trends Report Q1 2020C4Media
 
Understand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsUnderstand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsC4Media
 
Kafka Needs No Keeper
Kafka Needs No KeeperKafka Needs No Keeper
Kafka Needs No KeeperC4Media
 
High Performing Teams Act Like Owners
High Performing Teams Act Like OwnersHigh Performing Teams Act Like Owners
High Performing Teams Act Like OwnersC4Media
 
Does Java Need Inline Types? What Project Valhalla Can Bring to Java
Does Java Need Inline Types? What Project Valhalla Can Bring to JavaDoes Java Need Inline Types? What Project Valhalla Can Bring to Java
Does Java Need Inline Types? What Project Valhalla Can Bring to JavaC4Media
 
Service Meshes- The Ultimate Guide
Service Meshes- The Ultimate GuideService Meshes- The Ultimate Guide
Service Meshes- The Ultimate GuideC4Media
 
Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDC4Media
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine LearningC4Media
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at SpeedC4Media
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsC4Media
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerC4Media
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleC4Media
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeC4Media
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereC4Media
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing ForC4Media
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data EngineeringC4Media
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreC4Media
 
Navigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsNavigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsC4Media
 

More from C4Media (20)

Streaming a Million Likes/Second: Real-Time Interactions on Live Video
Streaming a Million Likes/Second: Real-Time Interactions on Live VideoStreaming a Million Likes/Second: Real-Time Interactions on Live Video
Streaming a Million Likes/Second: Real-Time Interactions on Live Video
 
Next Generation Client APIs in Envoy Mobile
Next Generation Client APIs in Envoy MobileNext Generation Client APIs in Envoy Mobile
Next Generation Client APIs in Envoy Mobile
 
Software Teams and Teamwork Trends Report Q1 2020
Software Teams and Teamwork Trends Report Q1 2020Software Teams and Teamwork Trends Report Q1 2020
Software Teams and Teamwork Trends Report Q1 2020
 
Understand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsUnderstand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java Applications
 
Kafka Needs No Keeper
Kafka Needs No KeeperKafka Needs No Keeper
Kafka Needs No Keeper
 
High Performing Teams Act Like Owners
High Performing Teams Act Like OwnersHigh Performing Teams Act Like Owners
High Performing Teams Act Like Owners
 
Does Java Need Inline Types? What Project Valhalla Can Bring to Java
Does Java Need Inline Types? What Project Valhalla Can Bring to JavaDoes Java Need Inline Types? What Project Valhalla Can Bring to Java
Does Java Need Inline Types? What Project Valhalla Can Bring to Java
 
Service Meshes- The Ultimate Guide
Service Meshes- The Ultimate GuideService Meshes- The Ultimate Guide
Service Meshes- The Ultimate Guide
 
Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CD
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine Learning
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at Speed
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep Systems
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly Compiler
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix Scale
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's Edge
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing For
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data Engineering
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
 
Navigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsNavigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery Teams
 

Recently uploaded

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
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...Miguel AraĂşjo
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
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.pptxHampshireHUG
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 

Recently uploaded (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 

ML in the Browser: Interactive Experiences with Tensorflow.js

  • 1. 1 ML in the Browser Victor Dibia, PhD Cloudera Fast Forward Labs @vykthur Interactive Experiences with Tensorflow.js
  • 2. InfoQ.com: News & Community Site • Over 1,000,000 software developers, architects and CTOs read the site world- wide every month • 250,000 senior developers subscribe to our weekly newsletter • Published in 4 languages (English, Chinese, Japanese and Brazilian Portuguese) • Post content from our QCon conferences • 2 dedicated podcast channels: The InfoQ Podcast, with a focus on Architecture and The Engineering Culture Podcast, with a focus on building • 96 deep dives on innovative topics packed as downloadable emags and minibooks • Over 40 new content items per week Watch the video with slide synchronization on InfoQ.com! https://www.infoq.com/presentations/ ml-browser-tensorflow-js/
  • 3. Purpose of QCon - to empower software development by facilitating the spread of knowledge and innovation Strategy - practitioner-driven conference designed for YOU: influencers of change and innovation in your teams - speakers and topics driving the evolution and innovation - connecting and catalyzing the influencers and innovators Highlights - attended by more than 12,000 delegates since 2007 - held in 9 cities worldwide Presented at QCon San Francisco www.qconsf.com
  • 4. 2 - Background in CS, Human Computer Interaction (HCI), Applied AI. - Previously Research Scientist at IBM Research New York. - Community Contributions - GDE for Machine Learning - Research Engineer (ML) at Cloudera Fast Forward Labs Research Engineer Cloudera Fast Forward Labs, Brooklyn. @vykthur | @victordibia
  • 5.
  • 6. 4
  • 7. 5
  • 9. 7 Agenda • Why Machine Learning in the Browser? • Overview of the Tensorflow.js library API with examples • The Ops API • The Layers API • Building Handtrack.js - a javascript library for prototyping gesture based interactions in the browser. •
  • 10. 8 Why Machine Learning in the Browser?
  • 11. Artificial Intelligence Machine Learning Deep Learning The broad field that describes efforts to make machines intelligent. Algorithms that enable machines independently learn from data and make predictions. Decision trees, random forests, reinforcement learning, neural networks, Neural Networks (NN): a set of stacked computation units. - High accuracy, scales with data - Advances in NN algorithms - Amenable to GPU computation But What is Machine Learning? Let's review some terminology ..
  • 12. Artificial Intelligence Machine Learning Deep Learning The broad field that describes efforts to make machines intelligent. Algorithms that enable machines independently learn from data and make predictions. Decision trees, random forests, reinforcement learning, neural networks, Neural Networks (NN): a set of stacked computation units. - High accuracy, scales with data - Advances in NN algorithms - Amenable to GPU computation
  • 13. Artificial Intelligence Machine Learning Deep Learning The broad field that describes efforts to make machines intelligent. Algorithms that enable machines independently learn from data and make predictions. Decision trees, random forests, reinforcement learning, neural networks, Neural Networks (NN): a set of stacked computation units. - High accuracy, scales with data - Advances in NN algorithms - Amenable to GPU computation For today, each time I refer to Machine Learning or AI, what I am referring to is Deep Learning
  • 15. Dense layer (nodes in one layer connected to all nodes in the following layer). Fast Forward Labs Multilayer Perceptron
  • 16. 14 The Languages of Machine Learning
  • 17. 15 The Languages of Machine Learning
  • 18. 16 The Languages of Machine Learning
  • 19. 17 The Languages of Machine Learning Backend programming languages .. and they work well! .. but ..
  • 20. 18 • Cloudera Fast Forward Labs • Intro to Transfer Learning for NLP • Applications • Appendix: Positioning & FAQ (internal audience only) 2019 Stackoverflow survey of 90k developers What programming language do developers use?
  • 21. 19 2019 Stackoverflow survey of 90k developers What programming language do developers want to learn?
  • 25. 23 • Wait .. thats a bad idea Tenor Bad Idea
  • 26. 24 Can I really train a neural network in Javascript? Orienta Boy thinking
  • 27. 25 Yes!! Tensorflow.js - a library for building/training ML models in Javascript.
  • 28. 26 Will it meet my speed requirements?
  • 29. 27 Yes!! Tensorflow.js, is accelerated in the browser using WebGL (CPU + GPU) and in Node.js using Tensorflow C API (CPU + GPU).
  • 30. 28 How much effort is this? Can I re-use my existing models/pipelines?
  • 31. 29 Not much! - Tensorflowjs API is Similar to Keras - Tensorflow.js converter allows you import pretrained Keras (hd5, savedModel), Tensorflow SavedModel, Tensorflow Hub Module
  • 33. 31 Why Machine Learning in the Browser? • Privacy • Distribution • Latency • Interactivity
  • 34. 32 Why Machine Learning in the Browser? • Privacy • Distribution • Latency • Interactivity • Strong Notion of Privacy We do not see your data, it never gets to our servers. • Example use case: sensitive documents identication, domain specic text autocomplete for chat systems etc
  • 35. 33 Why Machine Learning in the Browser? • Privacy • Distribution • Latency • Interactivity • No installs, drivers and dependency issues. • Navigate to a URL and your application is available to end users. • Free model asset hosting/versioning/distribution (NPM/jsdelvr), excellent for end user applications.
  • 36. 34 Why Machine Learning in the Browser? • Privacy • Distribution • Latency • Interactivity • ML models can be optimized for speed and can run fast on mobile and in the browser • In some cases, it is faster to run your model in the browser, rather than send make round trip requests to a server. • Avoid reliability issues with intermittent connectivity environments
  • 37. 35 Why Machine Learning in the Browser? • Privacy • Distribution • Latency • Interactivity • The Browser is designed for interactive experiences. ML can supercharge this! • Build models on the fly using rich user data available in the browser (camera, le uploads), run inference, retrain existing models, enable dynamic behaviour. • ML education, retail, advertising, arts, entertainment, gaming.
  • 39. 37 Example Use Cases Client-side indecent content checking nsfw.js.com
  • 41. 39
  • 42. 40 Tensorflow.js A library for machine learning in JavaScript
  • 43. 41 What can you do with Tensorflow.js • Author models • Import pre-trained models for inference • Re-train imported models Online Flow • Design/Train/Test/ Inference, all in your javascript code.
  • 44. 42 What can you do with Tensorflow.js • Author models • Import pre-trained models for inference • Re-train imported models Offline Flow • Design/Train/Test model on your preferred hardware (GPU, TPU clusters) • Import into javascript for inference
  • 45. 43 What can you do with Tensorflow.js • Author models • Import pre-trained models for inference • Re-train imported models Hybrid Flow • Design/Train/Test model on your preferred hardware (GPU, TPU clusters) • Import into javascript application • Retrain/Run inference
  • 46. 44 Tensorflow.js - Backend and Frontend Browser (Front end) Server (Back end, Node.js)
  • 47. 45 Tensorflow.js - Backend and Frontend Browser (Front end) • Usage • Vanilla js script tag import (like jquery) • Import - NPM install ( build tools, frameworks such as React, Vue, etc). • Acceleration • WebGL • Tensors implemented as Shader programs (will use GPUs where available)
  • 48. 46 Tensorflow.js - Backend and Frontend Server (Back end, Node.js) • Usage • NPM install • (tfjs-node, tfjs-node-gpu) • Acceleration • Tensorflow C binary
  • 49. WebGL Browser TF CPUTF GPU Node.js Runtime API Ops API (Eager) Layers API TF TPU Keras Model TensorFlow SavedModel
  • 50. 48 Ops API (Eager) Layers API Fit data to a polynomial function Build and train a two layer autoencoder in the browser Import a trained model for inference in the browser (Handtrack.js) API
  • 52. 50 The Ops API - Fit a Polynomial f(x) = ax2 + bx + c
  • 53. 51 import * as tf from '@tensorflow/tfjs';
  • 54. 52 import * as tf from '@tensorflow/tfjs'; const a = tf.tensor(0.1).variable(); const b = tf.tensor(0.1).variable(); const c = tf.tensor(0.1).variable();
  • 55. 53 import * as tf from '@tensorflow/tfjs'; const a = tf.tensor(0.1).variable(); const b = tf.tensor(0.1).variable(); const c = tf.tensor(0.1).variable(); // f(x) = a*x^2 + b^x + c const f = x => a.mul(x.square()).add(b.mul(x)).add(c); // ...
  • 56. 54 // ... // Mean-squared error const loss = (preds, label) => preds.sub(label).square().mean();
  • 57. 55 // ... // Mean-squared error const loss = (preds, label) => preds.sub(label).square().mean(); const optimizer = tf.train.sgd(learningRate);
  • 58. 56 // ... // Mean-squared error const loss = (preds, label) => preds.sub(label).square().mean(); const optimizer = tf.train.sgd(learningRate); for (let i = 0; i < EPOCHS; i++) { optimizer.minimize(() => loss(f(data.xs), data.ys)); }
  • 60. 58 The Layers API • Recommended API for neural networks • Similar in spirit to the Keras Library. Keras is a well designed api standard for composing and training neural networks.
  • 61. 59 An Autoencoder Dimensionality reduction • Neural Network with two parts. • Given some high dimension data (e.g. tabular data with many elds), nd a smaller representation. • This representation should support reconstruction.15 7 2 15 7
  • 62. 60 An Autoencoder Encoder • Take a high dimensional input. • Learn to compress it to a meaningful smaller representation (bottleneck) 15 7 2 15 7
  • 63. 61 An Autoencoder Decoder • Takes a bottleneck vector • Learn to reconstruct original input from z. 15 7 2 15 7
  • 64. 62 An Autoencoder for Detecting Anomalies Anomaly Detection • Train on Normal Data • Learns a bottleneck vector suitable for reconstructing normal signals • High reconstruction error (MSE) for abnormal images. Flag high error as anomalies. 15 7 2 15 7
  • 65. 63 An Autoencoder for Detecting Anomalies Example, ECG data 15 7 2 15 7 0.8 0.2 Error
  • 66. 64 # Keras, Python # Encoder inputs = Input(shape=(num_feature s,)) # define hidden layers // Tensorflow JS // Encoder const input = tf.input({ shape: [numFeatures] }) # define hidden layers
  • 67. 65 # Keras, Python # define hidden layers enc_hidden = Dense(15, activation='relu')(inpu ts) // Tensorflow JS # define hidden layers let encHidden = tf.layers.dense({ units: 15, activation: "relu" }).apply(input);
  • 68. 66 # Keras, Python # define hidden layers enc_hidden = Dense(7, activation='relu') (enc_hidden) // Tensorflow JS # define hidden layers let encHidden = encHidden = tf.layers.dense({ units: 7, activation: "relu" }).apply(encHidden);
  • 69. 67 # Keras, Python # Encoder z_ = Dense(latent_dim)(enc_hidden) encoder = Model(inputs, z_, name='encoder') // Tensorflow JS // Encoder const z_ = tf.layers.dense({ units: latentDim }).apply(encHidden); const encoder = tf.model({ inputs: input, outputs: z_, name:"encoder" })
  • 70.
  • 75. 73 Interactive Visualizations of Bottleneck Predictions
  • 76. 74 Interactive Visualizations of Bottleneck Predictions 2600 data points
  • 77. 75 Interactive Visualizations of Bottleneck Predictions
  • 79. 77 Handtrack.js • Given an image, predict the location (bounding box) of all hands. • Uses a Convolutional Neural Network (Object Detection) • Bundled into a JS library to enable developers prototype interactive. • Open source.
  • 80. 78 // Load the model. handTrack.load().then(model => { // detect objects in the image. model.detect(img).then(predictions => { console.log('Predictions: ', predictions); }); }); <script src="https://cdn.jsdelivr.net/npm/handtrackjs/dist/handtrack.min.js"> </script>
  • 81. 79 [{ bbox: [x, y, width, height], class: "hand", score: 0.8380282521247864 }, { bbox: [x, y, width, height], class: "hand", score: 0.74644153267145157 }]
  • 82. 80 How was this built?
  • 83. 81 How was this built?
  • 85. 83 Model Training • Convert images to Tensorflow Records format – For each image, list of bbox coordinates, and labels. • Train using Tensorflow Object Detection API (python) – Framework and sample code for training various object detection models. – Mobilenet, SSD (fast, optimized for mobile). • Export Trained Model as savedModel from checkpoints. •
  • 86. 84 Model Conversion • Use tensorflow.js converter • Identify model output node variable name • Specify model format • Specify input/output directories • Supports • savedModel (default for Tensorflow) • Keras Model • Tensorflow Hub $ pip install tensorflowjs $ tensorflowjs_converter --input_format tf_saved_model --output_node_names 'Predictions/Reshape_1' path/to/tf_saved_model path/to/tfjs_model Exported model can be imported in javascript.
  • 87. 85 Exported Model • 18.5mb .. nal model size • Sharded into 5 les with a maximum size of 4.2mb • • Bundled into an NPM library, hosted on NPM (with benets!) • Model artifact versioning • CDN serving (jsdelivr) •
  • 88. 86
  • 89. 87
  • 90. 88
  • 91. 89 Demo! • So .. does it work live? • https://victordibia.github.io/handtrack.js/#/
  • 92. 90 Some Challenges • Manual Memory Management • Tensorflow.js implements tensors using WebGLTextures. • Copied to GPU and cached to enable fast computation • Need to be explicitly deleted using the tensor.dispose(). • Use tf.memory() to see how many tensors your application is holding onto
  • 93. 91 Some Challenges • General limitations of the Browser. • The browser is single threaded • Compute heavy operations will block the UI thread.
  • 94. 92 Some Challenges • Device Fragmentation • Differences in devices can lead to wildly varying performance • CPU (Mobile, Desktop, Embedded) • GPU availability • Device power mode
  • 95. 93 Some Good Practices • Optimize Your Model • Replace full Convolutional Operations with Depthwise separable convolutions (less parameters). • Remove optional post processing from model graph during model export. • Explore model compression methods (quantization, distillation, pruning). • Explore NAS/AutoML. .
  • 96. 94 Some Good Practices • Design and Test Considerations • Asynchronous methods (async await, promises) to avoid blocking the UI thread. • Visually communicate model load/inference latency. • Communicate model uncertainty where possible. • Test and benchmark across multiple devices!! • Chrome Proler is your friend! • See Google PAIR (People + AI Guidebook) document on how to design human-centered AI products.
  • 97. 95 Conclusion • ML in the browser is valuable when your objectives are focused on privacy, ease of distribution, low latency and interactivity. • Tensorflow.js provides an API for ML in Javascript (online, offline, hybrid workflow). Fast, expressive, integrated with the rest of the TF ecosystem. • Research advances in ML (compression, distillation, pruning) + Advances in acceleration in the browser (WebAssembly, WebGPU), positions ML in the browser for faster and wider integration.
  • 98. 96 Thank you! Research Engineer Cloudera Fast Forward Labs, Brooklyn. @vykthur | @victordibia Source Code: Handtrack.js https://github.com/victordibia/handtrack.js
  • 99. Watch the video with slide synchronization on InfoQ.com! https://www.infoq.com/presentations/ ml-browser-tensorflow-js/