What is TinyML, and why does it matter?
Learn the basic concept, the benefits, and where to start in this tiny revolution.
Tiny Machine Learning (or TinyML) is a machine learning technique that integrates reduced and optimized machine learning applications that require "full-stack" (hardware, system, software, and applications) solutions, including machine learning architectures, techniques, tools, and approaches capable of performing on-device analytics at the very edge of the cloud.
TinyML can be implemented in low-energy systems, such as sensors or microcontrollers to perform automated tasks.
With TinyML, we can do more with less. The technique is still ML, but with less energy and costs and without an internet connection.
A small device for a tremendous impact.
This could summarize Tiny Machine Learning (or TinyML), emerging breakthroughs within artificial intelligence, without exaggeration.
If we consider that, according to a forecast by ABI Research, by 2030, it is likely that around 2.5 billion devices will reach the market through TinyML techniques, having as the primary benefit the creation of smart IoT devices and, more than that, popularize them through a possible reduction in costs.
The Silent Intelligence consultancy survey reinforces the previous forecast: TinyML can reach more than $ 70 billion in economic value in the next five years. You can't go unnoticed by these figures. Several companies are already organizing themselves to create chips for TinyML implementation.
Also, different ML professionals have been organizing themselves to define this segment's best practices, which are likely to be strengthened quickly.
Most IoT devices perform a specific task. For example, they receive input via a sensor, perform calculations, send data or perform an action.
The usual IoT approach is to collect data and send it to a centralized registration server, and then you can use machine learning to conclude.
But why don't we make these devices smart at the embedded system level? Then, we can build solutions like smart traffic signs based on traffic density, send an alert when your refrigerator runs out of stock, or even predict rain based on weather data.
The challenge with embedded systems is that they are tiny. And most of them run on battery. ML models consume a lot of processing power, and machine learning tools like Tensorflow are not suitable for creating models on IoT devices.
Cracking the small ML
In TinyML, the same ML architecture and approach is used, but on smaller devices capable of performing different functions, from answering audio commands to executing actions through chemical interactions.
But how do we get TinyML? Many tools can help us to run machine learning models on IoT devices.
The most famous is Tensorflow Lite. With Tensorflow Lite, you can group your Tensorflow models to run on embedded systems. In addition, TensorFlow Lite offers small binaries capable of running on low-power embedded systems.
One example is the use of TinyML in environmental sensors. Imagine that the device is trained to identify temperature and gas quality in a forest. This device can be essential for risk assessment and identification of fire principles.
Some of the main differentials of the technology are:
- Data Security: As there is no need to transfer information to external environments, data privacy is more guaranteed.
- Energy savings: Transferring information requires an extensive server infrastructure. When there is no data transmission, energy and resources are saved, consequently in costs.
- No connection dependency: If the device depends on the Internet to work and goes down, it will be impossible to send the data to the server. You try to use a voice assistant, and it does not respond because it is disconnected from the Internet.
- Latency: Data Transfer takes time and often brings in a delay. When it does not involve this process, the result is instantaneous.
Python is generally the preferred language for building ML models, but with TensorFlow Lite, you can use C, C ++, or Java to create machine learning models.
Connecting to the network is an energy-consuming operation. Using Tensorflow Lite, you can deploy machine learning models without connecting to the Internet. This also solves security issues since embedded systems are relatively easier to exploit.
Tensorflow Lite offers pre-trained machine learning models for everyday use cases. These include:
- Object detection recognizes multiple objects in an image, supporting up to 80 different items.
- Smart responses — Generates intelligent responses, similar to what you get when interacting with a conversational A.I. or a chatbot.
- Recommendations — It offers customized recommendation systems based on user behavior.
There are some valid alternatives to Tensorflow Lite. Two strong competitors are:
- CoreML — Apple library for building machine learning models on iOS devices.
- PyTorch Mobile — mobile version of Facebook's PyTorch deep learning library.
TinyML is still in its early stages. However, improvements are being made to Tensorflow Lite and other TinyML frameworks to support complex machine learning models.
It may take some time before we definitively start to see the dominant adoption of TinyML. But make no mistake, smart devices are coming.
Where can you learn more about TinyML?
The leading community is around the tinyML Foundation, which aims to build a global community of researchers, engineers, and product managers to develop cutting-edge technology, promoting and stimulating knowledge on the subject.
But I would like to recommend a fascinating book (I'm reading it at this moment, and probably I will write a review about it very soon..) called Tiny ML: Machine Learning with Tensorflow Lite on Arduino and Ultra-Low-Power Microcontrollers, by Pete Warden and Daniel Situnayake, that is an introductory work to the TinyML universe.
The book aims to help understand how we can train small models who understand audio, image, and data to perform some tasks. According to the book's description, no previous ML or microcontrollers' experience is necessary to accompany the work. Nevertheless, I think it is worth having a look.
Conclusion
TinyML will open up a series of possibilities for applications in IoT devices, such as T.V.s, cars, coffee machines, watches, and other devices, so that they have intelligent functionalities that today are restricted in computers and smartphones.
We will see voice interfaces in almost everything in the future. As soon as we can create suitable voice interfaces at a low cost, we will have them on any consumer item, replacing buttons on any device, especially if you think of devices combining audio and video.
I want to be ready for that, what about you?
References
- Google Scholar — TinyML — https://scholar.google.com/scholar?hl=en&as_sdt=0%2C5&q=tinyML&btnG=
- MicroNets: Neural Network Architectures for Deploying TinyML Applications on Commodity Microcontrollers — https://arxiv.org/abs/2010.11267
- TensorFlow Lite Micro: Embedded Machine Learning on TinyML Systems — https://arxiv.org/abs/2010.08678
- Why the Future of Machine Learning is Tiny — https://petewarden.com/2018/06/11/why-the-future-of-machine-learning-is-tiny/
- How Engineers Are Using TinyML to Build Smarter Edge Devices — https://new.engineering.com/story/how-engineers-are-using-tinyml-to-build-smarter-edge-device
- tinyml如何使用TensorFlow Lite构建智能物联网设备_weixin_26750481的博客-CSDN博客. https://blog.csdn.net/weixin_26750481/article/details/108499905
- Why TinyML is a giant opportunity — https://venturebeat.com/2020/01/11/why-tinyml-is-a-giant-opportunity/
Other Articles you may want to read.
- These 9 Research Papers are changing how I see Artificial Intelligence this year.
- The most impressive Youtube Channels for you to Learn A.I., Machine Learning, and Data Science.
- These are some of the best Youtube channels where you can learn PowerBI and Data Analytics for free.
- What is the MIT MicroMasters Program?
- 5 companies that are revolutionizing recruiting using Artificial Intelligence.
- 5 amazing books about A.I. that you must read.
- The Best MIT Online Resources for You to Learn A.I. and Machine Learning for Free.
My books about Artificial Intelligence
Also, I've just published other interesting ebooks on Amazon, and I'm sure some of them may be interesting for you… let's keep in touch, follow me and do it together.
A.I. in 2020: A Year writing about Artificial Intelligence
A.I., Robotics and Coding (for Parents): A practical guide for analog parents with digital kids
Would you like to support me?
To get access to unlimited stories, you can also consider signing up to become a Medium member for just $5. In addition, if you sign up using my link, I'll receive a small commission (at no extra cost to you).






