Promo spesial Pengeluaran SGP 2020 – 2021. Jackpot mingguan lainnya hadir diperhatikan dengan terprogram lewat informasi yang kami tempatkan dalam website itu, serta juga siap dichat kepada operator LiveChat pendukung kita yg stanby 24 jam Online dapat mengservis segala keperluan antara visitor. Mari cepetan daftar, & dapatkan hadiah Lotto dan Live Casino Online terbaik yang nyata di tempat kami.
TinyML is one of the hottest trends in the embedded computing field right now, with 2.5 billion TinyML-enabled devices estimated to reach the market in the next decade and a projected market value exceeding $70 billion in just five years. If you want to get in on what all the excitement is about but aren’t sure where to start, this one-stop guide is specifically for you. Learn about what TinyML is, the opportunities it offers, and how anybody can get themselves started in this exciting field!
What is TinyML?
Tiny Machine Learning (TinyML) is a field of machine learning that focuses on the development and deployment of ML models on low power, low-footprint microcontroller devices like an Arduino, for example.
Machine learning is a field of computer systems that aims to develop self-improving algorithms and statistical models. This is done with massive amounts of data, which a model analyses and extracts patterns from in order to learn and improve on a given task. This seemingly simple paradigm has led to groundbreaking advancements in complex tasks like forecasting, anomaly detection, and computer vision!
The Benefits & Importance of TinyML
Why is TinyML so important, you ask? Simple – because it’s tiny!
The microcontrollers that TinyML models are designed for are small and power efficient; capable of running on battery power for years at a time! Furthermore, these microcontrollers are far more affordable than full sized computers or servers, which makes their use far more accessible and practical for small businesses or even individuals. This unique combination of power efficiency and affordability also means that TinyML is perfectly poised for large-scale applications in embedded computing applications, like IoT!
At the same time, TinyML is a subset of what is known as Edge AI, or edge artificial intelligence. It leverages the advantages of edge computing – computing in the local space as opposed to in the cloud – to deliver several key advantages, namely:
- Low latency of local compute for real time applications
- Reduced bandwidth costs from lower requirements for remote communication
- Excellent reliability that persists even when network connectivity is lost
- Improved security with fewer transmissions and local data storage
Edge AI, similar to TinyML, is about deploying machine learning models at the edge. However, more powerful hardware might be used, which range from single board computers (SBCs) to even edge servers. If you want to learn more about Edge AI, I’ve written extensively about it in a previous article, as well as how it holds the potential to change IoT – click here for the full read!
Limitations of TinyML
Microcontrollers have kilobytes of RAM and megabytes of memory, which is many times smaller than even the lowest performing SBCs. Thus, it’s natural that there are limitations in the types of models that can be run with TinyML on microcontrollers in comparison to regular edge ML on more powerful devices like a Raspberry Pi or Jetson Nano. Some examples are shown in the table below:
|ML Applications||TinyML on Microcontrollers||Edge ML on SBCs / Servers|
|Forecasting & Anomaly Detection||Yes, with limited model size||Yes|
|Image Recognition||Yes, with lower-resolution and speed||Yes, real time processing with high-end hardware|
|Audio Recognition||Keyword / wake word detection only||Full natural language processing (NLP)|
As you can see, there are caveats to even the most common TinyML applications which you should be aware of, especially in terms of model size and processing speed. Natural language processing which uses deep neural networks with many layers, for example, is currently out of the reach of TinyML. Nonetheless, the accessibility and power efficiency offered by TinyML remains extremely valuable to various applications, which I will share more about shortly!
Clarifying TinyML for Beginners – Learning vs Inference
Conventionally, machine learning occurs in two stages – learning and inferencing. At present, TinyML only handles inferencing.
During learning, the ML model adjusts its internal configurations based on the data that it receives in order to achieve a better result on its given task. To achieve this, the data is passed forwards through the model, where a loss is calculated. The feedback from this loss is then passed backwards through the model for the adjustments to be made. This is repeated for multiple inputs, up to billions or even trillions of times! As you can imagine, this is extremely resource intensive and difficult to perform effectively even on some laptops, let alone microcontrollers with drastic limitations in computing resources.
Note: Loss in machine learning refers to a penalty for a bad output like an incorrect classification. During training, machine learning models make adjustments to reduce this loss as much as possible. In this way, their performance improves over time.
Inference, on the other hand, refers to using the model to make some conclusions on input data. For example, we might provide a weather predictor with some temperature or humidity values to receive a prediction for whether it will rain. While state of the art machine learning models still require a significant amount of hardware to run effectively, it’s possible to optimise models for lightweight inferencing on the edge – this is precisely where TinyML comes in!
For a clearer picture, have a look at the following infographic:
To summarise, TinyML in its current state is only capable of using lightweight models to perform ML inferencing on microcontrollers. So, we aren’t doing any kind of training in TinyML, though this might be possible in the distant future – who knows!
“If you can run a neural network model at an energy cost of below 1 mW, it makes a lot of entirely new applications possible. This might seem like a somewhat arbitrary number, but if you translate it into concrete terms, it means a device running on a coin battery has a lifetime of a year. That results in a product that’s small enough to fit into any environment and able to run for a useful amount of time without any human intervention.” – Pete Warden, TensorFlow Mobile Technical Lead
TinyML applications excel in embedded applications with size and power constraints. With microcontrollers as small as the tip of your thumb and consuming limited power in spite of prolonged operation, TinyML can be easily applied in numerous scenarios to create always-on smart applications that make predictions, process complex data, and administer solutions!
By retrofitting industrial machinery with TinyML, we can monitor the performance characteristics of a machine and deliver maintenance ahead of failure. This minimises equipment downtime and repair costs, which improves both business revenue and workplace safety.
For example, some mining companies are using TinyML to predict faults in the wheels, bearings and axles on their rail cars in order to streamline their material transport operations. With a comfortable timeframe of at least a week to resolve operational issues before incurring damages, unscheduled maintenance events have been reduced by 50% – representing savings of ~$34 million over five years.
TinyML serves to improve the performance of smart agriculture techniques by providing real time analysis of environmental factors to improve crop growth in precision agriculture. With the rise of autonomous greenhouses, TinyML is also helping agricultural experts in making decisions that maximise crop yield by learning from past data. On the other hand, we can even use TinyML devices to analyse the conditions and behaviour of individual livestock to make intelligent conclusions about their state of health in real time.
TinyML will also play a critical role in developing smart cities with small, low-power devices that can be deployed virtually everywhere. These smart devices might be used to monitor and optimise traffic, analyse carbon footprints, or even develop vision-based security systems. For example, the addition of TinyML to traffic junctions could enable road traffic optimisation in real time. By further leveraging the interconnectivity of IoT, such benefits could be multiplied manifold through a network effect in these cities!
TinyML finally has an important role to play in providing persistent, on-demand healthcare. For example, motion-based fall detectors can recognise instances of falls in children or elderly, while keyword detection can pick up cries for help. Furthermore, TinyML is now enabling affordable solutions in on-demand medical diagnostics, which can be used in rural areas to supplement limited healthcare facilities.
Software for TinyML – Frameworks & Platforms
While specialised hardware for TinyML is playing catch up, most implementations currently rely heavily on software to optimise machine learning models while retaining their effectiveness. Here are some frameworks and platforms that you should definitely know about!
TensorFlow Lite Micro
TensorFlow is Google’s open-source machine learning framework which helps in developing machine learning models quickly. For TinyML, there is TensorFlow Lite Micro, which is a specialised version of TensorFlow for microcontrollers. TFLite Micro is written in C++ 11 and requires a 32-bit platform, and is mostly compatible with Arm Cortex-M Series processors. An ESP32 port is available as well.
TFLite Micro allows you to easily compress regular TensorFlow models into just a few kilobytes, and comes with numerous example models like the Hello World or Magic Wand to demonstrate various TinyML basics and capabilities. In addition, it supports a good number of popular microcontrollers, such as the Arduino Nano BLE 33 Sense and our very own Wio Terminal.
While the field of TinyML is still relatively new and experimental, TensorFlow Lite Micro is one of the most popular frameworks being used, which means you’ll be able to leverage a substantial amount of community experience and support in your own projects.
Edge Impulse is a platform that specifically targets the development of TinyML applications. With an easy-to-use web-based interface, Edge Impulse is arguably the easiest solution for anyone to collect data, train a model, and finally deploy it on a microcontroller. Best of all, it’s free for developers, albeit with some limits on the number of projects you can create and compute time.
Developing TinyML with Edge Impulse also allows you to take advantage of their Edge Optimised Neural (EON) compiler, which can run a neural network with 25-55% less RAM and 35% less storage compared to TFLite for Microcontrollers – a significant point to consider!
Like TFLite Micro, Edge Impulse supports a substantial list of microcontrollers and development boards, also including the Arduino Nano 33 BLE Sense and Wio Terminal. Supported devices can easily record and upload datasets in a matter of minutes, but other devices can also use their Data forwarder to do the same with just a little more effort.
OpenMV is another TinyML development platform, this time specialising in computer vision applications. This includes machine learning applied onto any kind of image or video like object recognition or image classification. The platform is built around their OpenMV Cam H7, which is a microcontroller board that runs on the ARM Cortex M7 processor and is Micropython programmable.
In addition, OpenMV offers a cross-platform IDE that features a powerful code editor, debug terminal, and framebuffer viewer with histogram display – all of which are key components of developing computer vision applications in TinyML! We’ve previously shared extensively about OpenMV in a previous article, so I won’t go into more detail here. If you’re interested, click here to learn more!
Hardware for TinyML
When it comes to hardware for TinyML, the Arduino Nano 33 BLE Sense is considered by many to be the de facto standard. Along with considerable compute from a 32-bit ARM Cortex-M4F microcontroller with 1MB flash and 256KB RAM, it houses a number of on-board sensors, microphone, and bluetooth that can be use to tackle various applications.
Depending on your specific requirements, however, you might be better off considering some of the following products. Let’s go!
Arduino Nano RP2040 Connect
The latest Nano RP2040 Connect from Arduino takes on the familiar Nano form factor, and is built around Raspberry Pi’s RP2040 microcontroller with an additional suite of connectivity and sensor peripherals like a microphone for voice-enabled projects!
It most excitingly carries an AI-enabled 6-axis IMU that can be incredibly versatile for applications requiring motion sensing, such as pedometry, free fall detection, tap detection, 6D orientation and more! You can also easily integrate the Nano RP2040 Connect in IoT projects, thanks to the onboard u-blox NINA-W102 radio module that gives both WiFi and BLE connectivity!
Additional features include:
- 13 Built-in LEDs, 20 Digital I/O Pins, 8 Analog Input Pins, 20 PWM Pins, 20 External Interrupts
- 5V Board Power Supply, 3.3V Circuit Operating Voltage
- Support for UART, I2C, SPI communication protocols
- Secure encryption with ATECC608A-MAHDA-T Crypto IC
- Free OpenMV License for Machine Vision Projects
Click here to learn more about the Arduino Nano RP2040 Connect on the Seeed Online Store!
Wio Terminal is your complete AI platform to get started with TinyML and IoT – Built around the ATSAMD51P19 and ARM Cortex-M4F at 120MHz for high compatibility with various ML frameworks for microcontrollers. In addition to integrated WiFi & Bluetooth, it has an onboard 2.4” LCD Display, IMU, microphone, buzzer, microSD card slot, light sensor & infrared emitter to tackle any kind of application.
The Wio Terminal is officially supported by Edge Impulse and TensorFlow Lite, which means that you can easily design and deploy ML applications with it! We’re also excited to announce the launch of our Hello World of AI page, where you can explore the endless possibilities with hardware, software, and learning resources – like our TinyML with Wio Terminal course, which is free for everyone to use!
- Powerful MCU: Microchip ATSAMD51P19 with ARM Cortex-M4F core running at 120MHz
- Reliable Wireless Connectivity: Equipped with Realtek RTL8720DN, dual-band 2.4GHz / 5GHz Wi-Fi (supported only by Arduino)
- Integrated Design: 2.4” LCD Screen, IMU and more practical add-ons in a compact enclosure with magnets & mounting holes
- Supports Arduino, CircuitPython, Micropython, ArduPy, AT Firmware, Visual Studio Code
- Compatible with over 300 plug-&-play Grove modules to explore with IoT
- Raspberry Pi 40-pin Compatible GPIO, USB OTG Support, TELEC Certified
Click here to learn more about the Wio Terminal on the Seeed Online Store!
What are the limits of TinyML? How small can we really go? Well, the Seeeduino XIAO’s answer to that is: pretty small! It’s the smallest Arduino compatible board in the Seeeduino Family, coming in at just about the size of a thumb tip. Nonetheless, the Seeeduino XIAO is equipped with the powerful SAMD21 microchip and a variety of hardware interfaces, truly putting the tiny in TinyML!
- ARM Cortex-M0+ 32bit 48MHz microcontroller (SAMD21G18) with 256KB Flash, 32KB SRAM
- Compatible with Arduino IDE & MicroPython
- Easy Project Operation: Breadboard-friendly
- Small Size: As small as a thumb(20×17.5mm) for wearable devices and small projects.
- Multiple development interfaces: 11 digital/analog Pins, 10 PWM Pins, 1 DAC output, 1 SWD Bonding pad, 1 I2C, 1 UART, 1 SPI interface.
Click here to learn more about the Seeeduino XIAO on the Seeed Online Store!
Learn TinyML – Textbooks & Resources
There are countless resources that can help you learn TinyML, ranging from textbooks to courses.
Did you know that the term “TinyML” was first coined by Pete Warden in TinyML: Machine Learning with TensorFlow Lite on Arduino and Ultra-Low-Power Microcontrollers, a book written by him and Daniel Situnayake? While the book unfortunately isn’t free, it goes all the way from the conceptual origins of TinyML to practical steps for implementation, and is a both comprehensive and insightful guide to getting started. You can learn more about the book through this link!
Harvard’s TinyML Series on edX
Another really popular set of materials is none other than Harvard University’s series of TinyML courses, which takes you through the fundamentals, applications, and finally deployment of TinyML models. The best part? These courses are absolutely free for any keen learner – though you can choose to pay and receive a certificate upon completing the course. Now anyone can be a TinyML expert!
Have a look at the full course details on edX by clicking here!
Learn TinyML with Wio Terminal!
Last but not least, I’m excited to share our very own free course, Learn TinyML with Wio Terminal! Here at Seeed, we’re highly committed to becoming the most integrated platform for accelerating IoT integration, industrial solutions and edge AI applications. Learn to explore the Wio Terminal as an integrated TinyML platform, with step-by-step lessons and 5 complete projects that you can reference!
You can also access each of these 5 projects in the Learn TinyML using Wio Terminal and Arduino IDE series, listed below, which already have their individual blog posts up on our website. Now, you can really get started learning easily!
TinyML in the Community
While relatively young, the field of TinyML has attracted many passionate developers around the world. For example, the tinyML Summit is an annual gathering of senior level technical experts and decision makers in the global tinyML community, who come together to share leading-edge TinyML technologies and solutions! While this year’s Summit took place back in March, the presentation slides and (some) recordings are available and free for any interested individuals to enjoy – visit the event page here to access them!
Apart from the tinyML Summit, the Inaugural tinyML EMEA Technical Forum for experts from the Europe, Middle East, and Africa (EMEA) region also took place in early June, and while there are also regular tinyML talks from experts on specific topics! To be up to date with the latest news, check out all the official details from the TinyML foundation here.
Of course, the TinyML community doesn’t just consist of professionals – countless makers around the world, even those with little to no experience, are already having fun with TinyML to create interesting and creative projects! Below are just two examples to give you a gist of what’s available; If you’d like to see more community projects, be sure to visit the wide range of contributions on platforms like Hackster!
Artificial Nose that Detects Scents
It’s fairly straightforward to detect specific gasses with the help of specialised sensors, but different combinations of gasses often indicate different conclusions in the real world. Since it’s too complicated to account for all the possibilities with hard-programming, Benjamin Cabe decided to create a TinyML powered artificial nose that can recognise different scents, including coffee, whisky and more!
Keen to explore further? Get tinkering with this project by having a look at Benjamin’s GitHub repo for the project here!
Build Handwriting Recognition with Wio Terminal & Edge Impulse
Do you think it’s possible to perform handwriting recognition with just a single distance sensor? The answer to that is, well, sort of! This project uses machine learning on time series data from just one ToF sensor to recognise handwriting gesture patterns! While it’s very much a proof of concept project and far from actual implementation, I hope this inspires you to think of crazy ideas for your own project!
If you’d like to try this for yourself, feel free to follow the full step-by-step tutorial here!
Summary & More Resources
In this one-stop guide to TinyML, we’ve covered the basics of what TinyML is, its benefits, applications, and various resources that can help you achieve your next smart application! Be it hardware, software or learning resources, I hope that you’ve now gotten a clearer idea of where to start and are excited to enter the exciting world of TinyML! Got any more questions? Feel free to let me know down below!
To wrap up, I strongly encourage you to visit the following resources to learn more!
Learn TinyML with Wio Terminal Series
Please follow and like us: