Building and training machine-learning models using a web-scripting language might seem ambitious, but in 2019 it’s perfectly feasible.
In a talk at the Google I/O conference last week Sandeep Gupta, product manager at Google, said TensorFlow.js could be used by developers to create new machine-learning models, as well as to run or retrain pre-trained models.
“We see a ton of use cases in the browser and it has a lot of advantages because the browser is super interactive, you have easy access to sensors, such as webcams and microphones, which you can then bring into your machine-learning models,” he said.
“Also we use WebGL-based acceleration, so if you have a GPU in your system you can take advantage of that and get really good performance.”
That said, not every developer is won over by TensorFlow.js, with some arguing the library still has significant limitations.
So what exactly is possible using TensorFlow.js? While the framework is still relatively new, only hitting 1.0 this year, Gupta said there has been “really good adoption and usage by the community”, and used his talk to demo some of the most interesting uses of TensorFlow.js.
You might not be crying out for a new way to play Pacman, but TensorFlow.js has made a novel spin on the classic arcade game possible.
After a quick calibration step, Gupta was able to control Pacman using head gestures, tracked by his phone’s camera, looking left to move left, right to move right, and so on.
“It’s a really fun way of interacting with the device, and the nice thing is that you can do a variety of things using web cams, using text, using speech, and have a very convenient way of sharing these applications without having to install anything,” he said.
Gupta looks to the left to move Pacman around the maze. Image: Google
The taxi and delivery company Uber uses machine learning to tackle a wide variety of problems at a very large scale.
Helping it achieve that is Manifold, a browser-based application that Uber uses to visualize and debug their machine-learning models and data pipelines.
AirBnB Identity Document Detection
Online property rental service AirBnB uses machine learning in the browser to stop people from inadvertently uploading sensitive information when adding a picture to their profile.
“When a user is trying to upload a profile picture to the AirBnB website, sometimes people accidentally use a driver’s license picture or a passport picture, which may end up containing personal sensitive information,” said Gupta.
“So AirBnB runs a machine-learning model client-side in the browser or on device, so that if you were to choose a picture which may have such sensitive information it will alert you before you upload that picture.”
Clinic.js provides a tool for sys admins and software engineers to profile server-side performance in a Node.js environment.
“This is a node.js-based application which is used for profiling node jobs or node processes and they’re using TensorFlow.js to look for anomalies, or spikes in CPU usage or memory consumption of these node applications,” said Gupta.
One of the main destinations for showing what is possible using TensorFlow.js is Creatability, Google’s creative labs team’s showcase for experiments using machine learning.
Gupta showed a machine-learning powered demo that allows a person to play a piano keyboard using head gestures.
Competitors to TensorFlow
TensorFlow isn’t alone in the deep learning field; in fact, there are a number of other companies with machine learning frameworks, including the following.
How do I start using TensorFlow?
The first thing any developer should do is read the TensorFlow Getting Started guide, which includes a TensorFlow Core Tutorial. If you’re new to machine learning, make sure to check out the following guides:
Developers can install TensorFlow on Linux, Mac, and Windows (or even install from source), or check out their various tools from the official TensorFlow GitHub page.
Finally, developers can take advantage of all the TensorFlow guides:
Facebook’s chief AI scientist: Deep learning may need a new programming language(Opens in a new browser tab)
Deep learning neural network could reveal why the world works the way it does(Opens in a new browser tab)
I accidently closed my browser, how do I restore the contact form I spent lots of time filling out?(Opens in a new browser tab)
Google has created a maths AI that has already proved 1200 theorems(Opens in a new browser tab)
RobbinHood ransomware takes down Baltimore City government networks(Opens in a new browser tab)
Microsoft is building the full Linux kernel into Windows 10 as a way to pry developers away from their Apple MacBooks(Opens in a new browser tab)
AI and Machine Learning Exploit, Deepfake Videos, Now Harder to Detect(Opens in a new browser tab)
Addressing the Biases Plaguing AI Algorithms(Opens in a new browser tab)
The Amazing Ways The Ford Motor Company Uses Artificial Intelligence And Machine Learning(Opens in a new browser tab)
GoogleBot Runs Latest Chrome – This Is Big News(Opens in a new browser tab)
College graduates not learning a programming language that’s vital for top tech jobs.(Opens in a new browser tab)
AI machine learning and deep learning: Everything you need to know(Opens in a new browser tab)
Why Quantum Computing’s Time Is Now(Opens in a new browser tab)
Freedom Mobile hit by data breach,15,000 customers affected(Opens in a new browser tab)
Fake Google reCAPTCHA used to hide Android banking malware(Opens in a new browser tab)
B0r0nt0K Ransomware Wants $75,000 Ransom, Infects Linux Servers(Opens in a new browser tab)
$25 Raspberry Pi add-on gets you started with edge computing AI(Opens in a new browser tab)
Grand theft consciousness: How quantum algorithms will backdoor human-level AI(Opens in a new browser tab)
AI is the future: Microsoft wants to usher it in responsibly(Opens in a new browser tab)
Edmonton doctors, AI scientists team up with drug giant in health software project(Opens in a new browser tab)
Java, PHP or .NET Which programming languages will earn you the most?(Opens in a new browser tab)
How to open and use the Terminal app on a Mac computer, with a few basic commands(Opens in a new browser tab)