This Is How I Created An Object Detection Model In Less Than 5 Minutes

At the end of 2019, tech giant Google released a web-based tool known as Teachable Machine. The goal of this machine is to create machine learning models faster, easier, and more accessible to everyone. One best thing about this tool is that you can teach this machine using your camera and understand how the machine learning model works.

In this article, I will show you how I created an object detection model with the help of Google’s Teachable Machine in less than 5 minutes. Before going hands-on let us first understand the core, i.e. how the tool makes machine learning models accessible, and finally, what are its pros and cons. 

Behind Teachable Machine

As mentioned earlier, Teachable Machine is a web-based tool created by Google to make machine learning models faster and more accessible. The tool can be used by anyone including educators, students, innovators, artists, among others, who have a keen interest to explore and understand how machine learning models work.

AIM Daily XO

Join our editors every weekday evening as they steer you through the most significant news of the day, introduce you to fresh perspectives, and provide unexpected moments of joy
Your newsletter subscriptions are subject to AIM Privacy Policy and Terms and Conditions.

Teachable Machine uses Tensorflow.js, which is one of the popular libraries for machine learning in Javascript, to train and run the models you make in your web browser. The models use a technique called transfer learning, and there is a pre-trained neural network. So, whenever you create your classes, you can picture that your classes are becoming the last layer or step of the neural net

More specifically, both the image and pose models are learning off of pre-trained MobileNet models, while the sound model is built on Speech Commands. MobileNet is an efficient network architecture and a set of two hyper-parameters to build very small, low latency models that can be easily matched to the design requirements for mobile and embedded vision applications. It is trained using the popular image dataset ImageNet.

Download our Mobile App

How It Works

In this tool, there are three kinds of projects from which you can choose – images, audios and poses. You can train the tool with images that are pulled from your webcam or image files, audios in one-second snippets from your mic, and poses where the computer guesses the position of your arms, legs, etc. from an image. 

So basically, you will be training your computer to recognise images, audios and poses without writing any complex machine learning code. This does not stop here. After training the model, you can also export it in three formats, which are TensorFlow.js, TensorFlow and TensorFlow Lite, and use your model in your projects, sites, apps, and much more. 

In Teachable Machine, I have chosen to deploy an image detection project among the three project options. Here, I used three classes – a toy, a TT racket and a bottle – each of around 200 samples. Further, I have used 50 epochs and a batch size of 16. If your data is larger, then you can increase the number of epochs to get good predictive results from your model. Also, while training the model, it is strictly prohibited to leave the tab as it may discontinue the training process. 

Below you can see that the model shows more than 90% accurate results for each of the classes. 

Pros of Teachable Machine

Some of the pros of this web-based tool are mentioned below:

  • This tool can help anyone understand how machine learning works
  • It is fast and easy to access machine learning tools which do not require an in-depth knowledge of complex machine learning codes
  • With the help of this tool, a developer can focus more on finding the actual solution, rather than stressing on building ML models, thus increasing productivity

Cons of This Machine

In the above image, you can notice that the model is confused between the toy and the book, as well as the bottle and the set of pens. This is because, in case of the toy and the book, the model is capturing the popped up colours of the ball in the book, the toy, and in the case of the bottle and the pen, it is capturing the vertical sizes of the objects. This shows that not all situations in real-world can be predicted accurately by this web-based tool.

Wrapping Up 

Teachable Machine is one of the many initiatives by tech giant Google to help us experience the magic of machine learning. If you haven’t tried it yet, I must say try it once and it is so much fun. However, if you really want to pursue a career in machine learning, you need to understand how to create machine learning models from scratch and how the algorithms work. 

Sign up for The Deep Learning Podcast

by Vijayalakshmi Anandan

The Deep Learning Curve is a technology-based podcast hosted by Vijayalakshmi Anandan - Video Presenter and Podcaster at Analytics India Magazine. This podcast is the narrator's journey of curiosity and discovery in the world of technology.

Ambika Choudhury
A Technical Journalist who loves writing about Machine Learning and Artificial Intelligence. A lover of music, writing and learning something out of the box.

Our Upcoming Events

24th Mar, 2023 | Webinar
Women-in-Tech: Are you ready for the Techade

27-28th Apr, 2023 I Bangalore
Data Engineering Summit (DES) 2023

23 Jun, 2023 | Bangalore
MachineCon India 2023 [AI100 Awards]

21 Jul, 2023 | New York
MachineCon USA 2023 [AI100 Awards]

3 Ways to Join our Community

Telegram group

Discover special offers, top stories, upcoming events, and more.

Discord Server

Stay Connected with a larger ecosystem of data science and ML Professionals

Subscribe to our Daily newsletter

Get our daily awesome stories & videos in your inbox

Council Post: From Promise to Peril: The Pros and Cons of Generative AI

Most people associate ‘Generative AI’ with some type of end-of-the-world scenario. In actuality, generative AI exists to facilitate your work rather than to replace it. Its applications are showing up more frequently in daily life. There is probably a method to incorporate generative AI into your work, regardless of whether you operate as a marketer, programmer, designer, or business owner.

Meet the Tech Fanatic, Deedy

Debarghya Das or Deedy is the founding engineer of internal enterprise search space Glean, a company that strives to solve workplace search queries