12/29/2023 0 Comments Tiny decisions githubEspecially for IoT applications which are not latency sensitive. It's might not be as performant as C or C++ but provides plenty to make prototyping enjoyable. "MicroPython is a lean and efficient implementation of the Python 3 programming language that includes a small subset of the Python standard library and is optimized to run on microcontrollers and in constrained environments." If you haven't yet heard about MicroPython - it's Python for microcontrollers. Plus breadboard and jumper wires to connect it all together. The IMU used for this project was an MPU6500 with 6 degrees of freedom (DoF) - 3 accelerometers (X,Y,Z) and 3 angular velocities (X,Y,Z). The core of the system is an ESP32 - a microcontroller produced by Espressif with 240MHz clock speed, built-in WiFi+BLE and ability to handle MicroPython□ (I used MicroPython 1.14). Let's go to the edge and see the hardware. If you are interested in the full code you can find the links to the repositories at the end of this article. This article will be about machine learning and some parts of the implementation on ESP32. While there are more components to this project. The system has a static webpage hosted on S3 buckets, DynamoDB, a Golang Microservices, and obviously the edge device with a TinyML application. I set out to build a TinyML system that detects 3 types of gestures (I will be using gestures/movements interchangeably throughout this article.) from a time-series, stores results, and visualizes them on a webpage. I might write an article on the current landscape, use cases, and business behind case behind TinyML. TinyML use cases can range from predictive maintenance all the way to virtual assistants. Privacy - TinyML processes data on-device and is not sent through network.Reliability - Revisiting the bandwidth example, in case of high-frequency sampling, it might be hard to ensure that data arrives to a target in the same order as it was produced by an edge device.It still costs money to ingest large amounts of data, especially if it must happen in real-time. Economics - Cloud is cheap but not so cheap.This increases the time in which an edge device can take action as it waits for the response. In case of conventional ML deployment data must be first sent to an ML application. Latency - " time between when a system takes in a sensory input and responds to it".It get's even trickier with images and video. Now imagine the amount of data produced by a fleet of these devices. Bandwidth - As an example, a device at 100Hz sampling rate produces 360,000 data points each hour.Other names for TinyML are AIoT, Edge Analytics, Edge AI, far-edge computing. For the purpose of this article, TinyML applications are applications running on microcontrollers with MHz of clock speed up to more powerful ones like the Nvidia Jetson Family. There's still ambiguity about what is considered TinyML. TinyML is a fairly new concept, first mentions are dating back to 2018(?). And run them on low-power device at the edge. The idea is simple - for complex use-cases where rule-based logic is insufficient apply ML algorithms. It gives more "intelligence" to power advanced applications using machine. TinyML is the overlap between Machine Learning and embedded (IoT) devices. For the first iteration of this project I skipped neural networks and explored what's possible with standard machine learning algorithms.īefore jumping into code, let's clear the basics. Although, There's a growing number of C/C++ TinyML projects using Tensorflow Lite Micro in combination with neural networks. I looked into machine learning projects that use MicroPython on ESP32 but could not find any (let me know if I am missing something □). I wanted to build a TinyML application that uses time-series data and could be deployed to edge devices - ESP32 microcontroller in this case. Detecting gestures from time-series data with ESP32, accelerometer, and MicroPython in near real-time.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |