Getting started with Edge Impulse
The birth of Tiny ML
Malladi Naga Subhash
- The birth of TinyML
- Getting Started
- Introduction to Edge Impulse
- Platform Setup
- Hardware Introduction and Setup
This blog post is the first part of the getting started with edge impulse series
Let's get started now
Have you ever wondered how a voice assistant works, how it gets activates by just utterance of a single keyword, and ever thought about how is it able to recognize that keyword, Now let us find answers to these questions?
First of all, to make a voice assistant do something we need to wake it up with a particular keyword, it would be constantly listening to the surrounding sounds, and as soon as it detects its wake up word it gets activated,
This is possible because of an ML(Machine Learning) model running in the background on the hardware, the size of such a model is as small as 14kb which makes the hands free access of the assistant possible. Now let us understand how it is possible to have an ML model of that small size and run it on resource-constrained microcontrollers like the Arduino.
The birth of Tiny ML
This thought of running the neural nets on embedded devices gave birth to Tiny ML, whose main goal is to run neural networks models at an energy cost of just 1mW(It is less than the 5 mW light power emitted by a laser pointer), which could lead to the opening of an entirely new world of possibilities.
This will lead to devices that can be running in a coin battery and deployed in the surroundings and run and give us meaningful output without any human intervention
Over the years, the microcontrollers have evolved to a level where they were used to perform a single task to being used for processing and analyzing their surroundings with the help of the sensors and get an output that adds value to the applications it’s being used in.
As mentioned above, TinyML opens up doors to many new applications. One of many use cases is as follows, let us consider an embedded system deployed in a factory used to analyze the sound coming from the machines, and this embedded system is used to predict its condition and prevent it from complete breakdown, this reduces the downtime.
Another example is in wildlife protection where the embedded system can be developed in a collar form and attached to the animal, In case of emergency, the collar understand the state of the animal with the sensor and predicts the danger, and notified the nearest forest authority,
In this way the microcontroller can be used to run neural networks and get a meaningful insight into the surroundings they are deployed in.
The major advantage of running Tiny ML on these embedded devices is that there is no need for these devices to be connected to the internet, to analyze the data and get an insight. The analysis can be performed on the device itself which saves a lot of energy So, these devices can run on a very small battery and get the required work done.
This is the reason why understanding Tiny ML is useful
2.3 Getting Started
The process of getting started with ML on any device is pretty intimidating in the beginning, but once you get used to the process it becomes interesting to do. The way of running an ML model in a PC and a Microcontroller is pretty different, though the logic remains the same (i.e
The way of performing object detection is the same in any device) the way of implementation and execution changes. While developing the code for performing object detection tasks on the microcontroller, the resources constraints need to be considered to get a better model that can satisfy our requirements
In the initial days of Tiny ML, The process of data collection, data cleaning, model selection, model training, validation, and testing and finally converting into the format to upload it to the microcontroller was done manually. It's a pretty tiring and error-prone task.
But in the year 2019, a platform called Edge Impulse was created which has automated most of the tasks, like model selection, and the training of it, validation, and testing could be done with just a click of a button. This made hobbyists and creators think of solutions to problems with Tiny ML, rather than reinventing the wheel.
Now, let us start our journey in Tiny ML
Introduction to Edge Impulse
According to Google, Edge Impulse is the leading development platform for machine learning on edge devices, free for developers, and trusted by enterprises. Now the platform setup
3.1 Platform Setup
This is the home page of the edge impulse
Create an account by clicking on the signup button, Once signed up and logging in you will be redirected to a page as follows
Now click on the button To build your first ML model
This is the page you will be redirected to, This is where the building of the ML model begins
We will deep dive into each of the menus in the next blog while creating a project. Now let setup the hardware.
3.2 Hardware setup
For this blog series, we will be using Arduino Nano 33 BLE sense, it is not mandatory to use it, as whatever is being performed on this can be done with the mobile phone also
Arduino Nano 33 BLE sense
To get started with this board, first, it needs to be linked to your project. Initially few dependencies need to be installed: Which are
- Edge Impulse CLI
- Arduino CLI
Once these dependencies are installed. The next step is to connect the board to Edge Impulse. This can be done by following the below video
Connecting Arduino Nano 33 BLE Sense to Edge ImpulseFollow this article for more understanding: docs.edgeimpulse.com/docs/arduino-nano-33-b..
- If there is an Arduino board not being connected to the Edge impulse on running the Edge-impulse-daemon.
- To resolve it, disable your antivirus and try to run it again.
with this, the setup will be done. Now we are ready to develop our first project with edge impulse. Harry Potter - Magic Wand, which will be developed in the next part
That is all for this blog. See you for the next one.
 In the year 2014, the ok Google team was working on the neural network model of the14kb in size
Malladi Naga Subhash