MITB Banner

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

Share

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.

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.

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. 

Share
Picture of Ambika Choudhury

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.
Related Posts

CORPORATE TRAINING PROGRAMS ON GENERATIVE AI

Generative AI Skilling for Enterprises

Our customized corporate training program on Generative AI provides a unique opportunity to empower, retain, and advance your talent.

Upcoming Large format Conference

May 30 and 31, 2024 | 📍 Bangalore, India

Download the easiest way to
stay informed

Subscribe to The Belamy: Our Weekly Newsletter

Biggest AI stories, delivered to your inbox every week.

AI Courses & Careers

Become a Certified Generative AI Engineer

AI Forum for India

Our Discord Community for AI Ecosystem, In collaboration with NVIDIA. 

Flagship Events

Rising 2024 | DE&I in Tech Summit

April 4 and 5, 2024 | 📍 Hilton Convention Center, Manyata Tech Park, Bangalore

MachineCon GCC Summit 2024

June 28 2024 | 📍Bangalore, India

MachineCon USA 2024

26 July 2024 | 583 Park Avenue, New York

Cypher India 2024

September 25-27, 2024 | 📍Bangalore, India

Cypher USA 2024

Nov 21-22 2024 | 📍Santa Clara Convention Center, California, USA

Data Engineering Summit 2024

May 30 and 31, 2024 | 📍 Bangalore, India

Subscribe to Our Newsletter

The Belamy, our weekly Newsletter is a rage. Just enter your email below.