Teachable Machine: Teach a Machine Using Your Camera in Your Browser

| by Roland Meertens Follow 5 Followers on Oct 05, 2017. Estimated reading time: 1 minute |

A note to our readers: You asked so we have developed a set of features that allow you to reduce the noise: you can get email and web notifications for topics you are interested in. Learn more about our new features.

Teachable Machine is a browser application that you can train with your webcam to recognize objects or expressions.

In the demo you use your webcam to recognize three different classes of objects or expressions. Based on your camera input, the site shows different gifs, plays prerecorded sounds, or plays speech. No coding of the user is required, and no hyper-parameters or network architecture has to be programmed. The only feedback from the machine the user has, is the confidence the machine has in each of the predicted classes. Based on the recognized class, the machine shows one of three different gifs: a cat, a dog, or a cute bunny. Users can also program several sounds or words, but can't mix the output modalities. A great explanation of how to use the Teachable Machine can be found on Youtube

All training is done in the browser using the deeplearn.js library. It is a hardware-accelerated javascript library built by the Google Brain PAIR team, that is freely available. The library was announced in August 2017 on the Google blog, and several applications that use the library are available on the deeplearn.js website.

Users only have to take pictures of a few instances of objects they want to recognize. Training is accelerated by downloading the pre-trained neural network called "squeezenet". According to the research paper a squeezenet has 50 times less trainable parameters than comparable neural networks. This means it can be downloaded as a file smaller than half a megabyte. Although the network has less parameters, the output is on par with larger neural networks, and good enough for this simple browser application. The application uses the output of this pretrained network to learn what you are showing to the webcam.

The source code for teachable machine can is available on Github. Instructions to get started with deeplearn.js, and the source code for this library, are also available on Github.

Rate this Article

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread


Login to InfoQ to interact with what matters most to you.

Recover your password...


Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.


More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.


Stay up-to-date

Set up your notifications and don't miss out on content that matters to you