Google Teachable Machine – AI for Literally Everyone

Whether you’re an expert or not even familiar with Artificial Intelligence at all, if you’re interested in Machine Learning then Teachable Machine is for you to experiment with!

Teachable Machine is Google’s web-based tool that makes creating Machine Learning models fast, easy, and accessible to everyone. Even children can create their own Machine Learning model and test/play with it right away. And for developers, they can implement the model without having to understand all the steps to generate a result from a machine learning algorithm that can take a long time.

 

What Can Teachable Machine Do?

With Teachable Machine, we can create simple and effective algorithms in the browser that can:

・Identify patterns on images – Image Project

・Identify patterns on audio – Audio Project

・Identify poses or gestures – Pose Project

Let’s Get started

From the Teachable Machine home page, click Get Started and create the project that we’re interested in. In this tutorial, let’s create a Fruits Detection Project which is an Image Project.

 

Image Project – Fruits Detection

We are going to show how to identify different images or objects, so we will create an image project. Let’s train our machine to be able to identify different kinds of fruits.

Creating Classes

We first have to create different categories or classes to teach our machine.

Since we want our machine to differentiate some fruits, we name the classes as follows.

We can also add an additional class named ‘No Fruits’ to teach our model to not recognize other objects as Banana, Pear, Apple, or Orange. 

Preparing Image Samples

We have two options to generate the image dataset – record from webcam or upload image from computer.

From our experience, using the Webcam option to generate images gives more accuracy to the model, so in this tutorial we choose the Webcam option.

 

Show the object in front of the webcam and click and hold to record. While recording, try to move the object to different positions to increase the accuracy of our model.

 

It is also helpful to change distance from the webcam such as holding the object further and bringing it close to the webcam.

Training Model

Now that we have all image samples for all classes ready, let’s train our model by simply clicking Train Model and wait. Note that training time might diver depending on the samples or dataset size and complexity. 

Warning: do not close or switch the browser tab until the training process is done.

Ta-daaa.. Preview Model and Play Around

Once the training process is done, let’s turn on our webcam and try showing different fruits in front of our webcam.

Exporting Model

Once we are happy with the result we can export our model for further use in our application.

Teachable Machine Model is available in Tensor.js, Tensorflow, and Tensorflow Lite – code snippets for Javascript, ps.js, keras, etc are also available.

We can either download the model to our computer or upload our model to the cloud and simply copy the link to implement into our own source code.

What Can We Do with This Model?

Many interesting projects can be done by implementing the Teachable Machine model to our source code, such as:

・Mask detection program

・AI scavenger hunt game

・AI posing game

Tiny things sorter

・Automatic on/off light or buzzer with Arduino

And more!

Here’s a fruits version of Scavenger Hunt game demo with our fruits model we just built using Teachable Machine. Click here to access p5.js demo. 

 

We can try it out by pressing the run button underneath ‘p5*’ logo and once the program starts try to show a banana in front of the webcam to get the check mark. 

Feel free to copy or modify the code to make your own version!

Other Teachable Machine Projects to Experiment

Pose Project

Using human gestures as a training dataset, we can create projects such as posing game for parties or family gatherings.

 

Sound Project

Sound Project is also an interesting one to experiment. We can create programs such as music genre recognition or automatic light switch when clapping sound is detected.

この記事が気に入ったら
いいね ! しよう

Twitter で
The following two tabs change content below.
アバター
Esar Suwandi
Software engineer based in Tokyo focused on Web Development. 4x AWS Certified: CLF, SAA, SAP, DOP. Let's build something awesome! ― Web開発に特化したソフトウェアエンジニアです。 4x AWS認定者です。素晴らしいものを作りましょう!

【採用情報】一緒に働く仲間を募集しています

採用情報
ページトップへ