TinyML is giving hardware new life

The latest embedded software technology moves hardware into an almost magical realm

Aluminum and iconography are no longer enough for a product to get noticed in the marketplace. Today, great products need to be useful and deliver an almost magical experience, something that becomes an extension of life. Tiny Machine Learning (TinyML) is the latest embedded software technology that moves hardware into that almost magical realm, where machines can automatically learn and grow through use, like a primitive human brain.

Until now building machine learning (ML) algorithms for hardware meant complex mathematical modes based on sample data, known as “training data,” in order to make predictions or decisions without being explicitly programmed to do so. And if this sounds complex and expensive to build, it is. On top of that, traditionally ML-related tasks were translated to the cloud, creating latency, consuming scarce power and putting machines at the mercy of connection speeds. Combined, these constraints made computing at the edge slower, more expensive and less predictable.

But thanks to recent advances, companies are turning to TinyML as the latest trend in building product intelligence. Arduino, the company best known for open-source hardware is making TinyML available for millions of developers. Together with Edge Impulse, they are turning the ubiquitous Arduino board into a powerful embedded ML platform, like the Arduino Nano 33 BLE Sense and other 32-bit boards. With this partnership you can run powerful learning models based on artificial neural networks (ANN) reaching and sampling tiny sensors along with low-powered microcontrollers.

Over the past year great strides were made in making deep learning models smaller, faster and runnable on embedded hardware through projects like TensorFlow Lite for Microcontrollers, uTensor and Arm’s CMSIS-NN. But building a quality dataset, extracting the right features, training and deploying these models is still complicated. TinyML was the missing link between edge hardware and device intelligence now coming to fruition.

Tiny devices with not-so-tiny brains

The implications of TinyML accessibility are very important in today’s world. For example, a typical drug development trial takes about five years as there are potentially millions of design decisions that need to be made en route to FDA approval. Using the power of TinyML and hardware, not animals, for testing models can speed up the process and take just 12 months.

Another example of this game-changing technology in terms of building neural networks is the ability to fix problems and create new solutions for things we couldn’t dream of doing before. For example, TinyML can listen to beehives and detect anomalies and distress caused by things as small as wasps. A tiny sensor can trigger an alert based on a sound model that identifies a hive under attack, allowing farmers to secure and assist the hive in real time.

Why TinyML matters IRL

The huge need for inexpensive, easily deployable solutions for COVID-19 and other viruses is present for all of us and early detection of symptoms could have an immediate impact on millions of lives around the world. Today, using TinyML and a simple Arduino board, you can detect and be alerted to unusual coughing as a first defense mechanism for COVID-19 containment. In a recent showcase, Edge Impulse and Arduino published a project that had the power and simplicity of running TinyML on an Arduino Nano BLE Sense that could detect the presence of specific coughing sounds in real-time audio, including a dataset of coughing and background noise samples. It could then apply a highly optimized TinyML model to build a cough detection system that runs in under 20 KB of RAM on the Nano BLE Sense. The project and the dataset were originally started by Kartik Thakore to help in the COVID-19 effort and was made available as an open-source repository on Hackster.io.

This same approach applies to many other embedded audio pattern matching applications. For example, childcare, elderly care, safety and machine monitoring.

TinyML is going to be everywhere

With 250 billion microcontrollers in the world today, and growing by 30 billion annually, TinyML is the best technology for performing on-device data analytics for vision, audio, motion and more. TinyML gives small devices the ability to make smart decisions without needing to send data to the cloud. Unlike the general ML monsters used by data scientists, TinyML models are small enough to fit into any environment — and that’s why they will be everywhere.

The accessibility of TinyML for software developers and engineers is another key factor as to why this technology will be so pervasive. For example, software developers who want to build embedded systems using ML can build a model by tapping their iPhone as the edge device, using its sensors to capture the data. All you need to do in order to build your first model is sign into the data acquisition tab on Edge Impulse Studio, select your phone as the edge device, choose the accelerometer sensor, for example, and then click “Start sampling” while moving your phone up and down to generate the data and see it in a graph. It is that easy.

Take it from another interesting company, Syntiant, who have figured that low power, less cloud and better results rely on their new embedded hardware technology in a tiny form factor. This Silicon Valley startup is building a new processor for deep learning, dramatically different from traditional computing methods. By focusing on memory access and parallel processing, their Neural Decision Processors operate at efficiency levels that are orders of magnitude higher than any other technology. The company claims its processors can make devices approximately 200x more efficient by providing 20x the throughput over current low-power MCU solutions, and subsequently, enabling larger networks at significantly lower power. Be it Edge Impulse or Syntiant, the end result is the same – a better user and developer experience, otherwise known as “Wow” and “How did it do that?”

Back in the 1970s, there were predictions that by 2020 there would be generalized AI by now. We are not there with artificial intelligence, but the progress in solving concrete problems with ML has been amazing. Soon, embedded systems trained by TinyML will be everywhere you are, and will progressively get smaller, running at an extremely low power, measured in mW or even uW. It’s becoming so popular that over 100 of the top leading technology companies, from Google to Microsoft, are adopting TinyML as the wave of the future.

Today and going forward, billions of tiny devices will act as an extension of our brains, feelings and emotions as a natural extension of everyday life. And with that, TinyML will impact every industry: retail, healthcare, transportation, wellness, agriculture, fitness and manufacturing.