Have you ever noticed how your phones always respond when you say 'OK Google' or 'Hey Siri,' even when they aren't connected to the internet? How do they keep listening all the time? The technical explanation is that small neural networks, with only a few bytes in size, are trained to detect these wake words and are deployed locally on digital signal processor (DSP) chips in the device, which require only a few Milliwatts of power to run, rather than the device's CPU, which requires more processing power.
TinyML is an abbreviation for Tiny Machine Learning. TinyML is a new technology that is expected to gain traction in the coming years. It is essentially a branch of research that combines Embedded Systems and Machine Learning and involves running complex models on extremely low-power microcontrollers.
In this article, you will learn about TinyML and see how it is going to be a breakthrough in embedded Machine Learning. You'll find out its advantages, applications, and how to get started.
What is Machine Learning?
Before diving into TinyML, it's crucial to understand the basics of machine learning.
'Machine learning is a branch of artificial intelligence (AI) and computer science which focuses on the use of data and algorithms to imitate the way that humans learn, gradually improving its accuracy'. A machine learning system can learn from its own experience without being explicitly programmed. The purpose of machine learning is to create computer programs that are capable of learning on their own based on data. The process of machine learning is based on observations or data, first-hand experience, or instructions. Based on the examples provided, it searches for patterns in data to draw conclusions. Machine learning aims to enable computers to learn autonomously and adjust their actions based on what they learn.
Traditional computers can't solve problems on their own, but with machine learning, they can learn from past data and results and make better decisions in the future based on a huge number of scenarios at and at incredible speeds. When you shop online with a retailer and receive product recommendations, you may have noticed that the suggestions are frequently remarkably accurate. This is due to machine learning; the retailer's AI is constantly improving at predicting what you're likely to buy, even as your tastes change.
What is TinyML?
Machine learning has become an essential component of the current technology sector. Edge Computing and the Internet of Things (IoT) together present a new opportunity to apply machine learning techniques to resource-constrained embedded devices at the edge of the network.
The embedded machine learning standard - TinyML aims to shift this abundance from traditional high-level systems to low-level clients. Several challenges open up during this transition. TinyML is a rapidly evolving concept of edge computing that connects embedded systems (hardware and software) and machine learning to realize ultra-low power, low cost, efficiency, and privacy systems, bringing inference machine learning to intelligent battery-powered devices.
Machine learning at tiny scales (TinyML) is a type of machine learning that shrinks deep learning networks to run on tiny hardware. Ultra-low-power embedded devices are invading our world, and with new embedded machine learning frameworks they will further enable the proliferation of AI-powered Internet of Things (IoT) devices. As we have seen, machine learning is a concept that has been around for a while, with many useful applications for big data that we need to understand but it is less often associated with hardware. However, machine learning applications on small/mobile devices are nothing new. For a few years now, most of the smartphones have had a number of smart functions implemented with neural network architecture. Examples like music recognition and various advanced features of the built-in camera (e.g., night vision, automatic portrait editing) are just a few examples based on built-in deep learning. However, there are many challenges to embedded AI, some of which are limited computing power and storage space. TinyML comes to provide a solution to these problems.
Developments in the TinyML space are essentially driven by the TensorFlow Lite library and embedded devices such as those produced by the Arduino company, which makes open-source hardware that allows anyone to buy a microcontroller board and build their own digital device. TensorFlow Lite is a machine learning library for embedded devices created by Google and has a subclass specifically designed for microcontrollers. In 2019, in addition to TensorFlow Lite, other frameworks began to focus on making deep learning models smaller, faster and adapted to embedded hardware, including uTensor and Arm's CMSIS-NN. At the same time, numerous YouTube tutorials began to appear on how to use TinyML and similar frameworks on AI-powered microcontrollers to train, validate, and then deploy small neural networks in hardware via inference engines.
Advantages of TinyML
The benefits of using TinyML on embedded devices are as follows:
- Saves Power: Microcontrollers use low power and can run on batteries for a long time. It saves energy and makes it cost-effective.
- No delay in the data path: There is no need to send data to the server every time, and the data sent is not large in volume since the processing is done on the sensor (e.g., the sound is not sent but the event as text).
- No Internet required: Since the data is not sent to the server every now and then, the process takes place with less bandwidth and sometimes without using the internet. So it is not connection-dependent.
- Data Privacy: Since data is not sent to external users or websites, data remains secure, and privacy is protected.
Applications & Use Cases
TinyML has been successful in running on cutting-edge devices and offers many solutions. It can respond to sound commands to perform an action. Google Assistant and Alexa are some examples of TinyML. The devices are always on and analyze our voice to detect the wake word.
Some other applications are:
Manufacture: used in low-power devices to be able to detect errors in a machine in advance continuously. Predictive maintenance is involved. One such example is the introduction of an IoT device by an Australian startup, Ping Services, which monitors wind turbines by attaching itself to the outside of the turbine. Notifies the authorities if it notices any potential problem or malfunction.
Agriculture: TensorFlow Lite's tool allows farmers to detect disease in a plant when they photograph it. Works on any device and no internet connection is required. The process enables the protection of agricultural interests and is a critical requirement for remote farmers.
Hospitals: A project called Solar Scare Mosquito uses TinyML to stop the spread of diseases like dengue fever, malaria, etc. Powered by solar energy, it detects mosquito breeding conditions and signals the water to prevent mosquito breeding.
What the Future Holds For TinyML
TinyML will open up a number of opportunities for applications in the Internet of Things (IoT) devices, including TVs, cars, coffee makers, watches, and other items, so they can have intelligent functionalities that are currently only available on computers and smartphones. In the future, voice interfaces will be used in almost everything. As soon as we can make affordable, appropriate voice interfaces, we will have them on every consumer product, taking the place of buttons on every gadget—especially when you consider gadgets that combine audio and video.
TinyML has the potential to create a whole new range of intelligent consumer and business applications. Even though this field is still new, it is growing quickly. At the moment, TinyML is concentrating on figuring out the performance bounds and trade-offs between a number of crucial components (machine learning algorithms, hardware, and software) of embedded systems with limited resources. In order for TinyML to be widely accepted, benchmarking standards must account for the diversity of hardware and software.
TinyML will open up new research directions with an emphasis on how edge inference impacts other aspects of complex systems, such as connectivity, autonomy, and resilience to cyberattacks. It has a lot of potential to make research and development in machine learning possible from a fresh angle, which can result in ground-breaking solutions in a number of different fields.
At Solwey, we understand technology and can leverage the most suitable tools to help your business grow. Reach out if you have any questions about machine learning and TinyML, and find out how Solwey and our custom-tailored software solutions can cover your needs.