• Stars
    star
    239
  • Rank 168,763 (Top 4 %)
  • Language
    Jupyter Notebook
  • License
    Apache License 2.0
  • Created over 2 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Code for MobiCom paper 'TinyML-CAM: 80 FPS Image Recognition in 1 Kb RAM'

TinyML-CAM - Image Recognition System that Runs at 80 FPS in 1 Kb RAM

Demo - HOG and Random Forest based Image Recognition on ESP32

ESP32 classifying Raspberry Pi Pico, Portenta H7, Wio Terminal from image frames

ESP32-image-object-classification-live-demo.mp4

Results

Following can be observed from the video:

  • Time. For image frames, the digital signal processing (DSP) based features extraction time is β‰ˆ 12 ms, while classification time is β‰ˆ < 20 πœ‡π‘  (1/1000th of DSP).

  • FPS. It is 1000/12 ms = 83.3 FPS, which is the time taken by the TinyML-CAM system for HOG features extraction (using DSP) plus classification. Since the ESP32 has a 30 FPS frame rate, just to capture frames, it takes 1000/30 = 33 ms. Since the DSP plus classification time is only β‰ˆ 12 ms, the image recognition happens in real-time between two consecutive frames, thus not altering the ESP32 camera's FPS.

  • Accuracy. As expected during Pairplot analysis, Portenta and Pi (features overlapped) are mislabelled quite often, which can be rectified by improving dataset quality.

  • Memory. Consumes only 1 kB of RAM - difference between the RAM calculated by Arduino IDE before and after adding the TinyML-CAM image recognition system.

Paper

https://dl.acm.org/doi/pdf/10.1145/3495243.3558264

Requirements

  • To capture images from the ESP32 with ease, install Eloquent library via Arduino IDE library manager.
  • To collect images on a PC and train an ML classifier, install EverywhereML Python package.
  • To test the TinyML-CAM pipeline, users only require an ESP32 of any variant:

Code

Future Work

To lower the DSP time (currently 12 ms) by implementing mathematical approximation methods, which will boost the frame rate - i.e., if reduced to 6 ms, then 1000/6 ms = 166.6 FPS.

Similar to the TinyML benchmark, we plan to test the pipeline on a range of datasets, ML algorithms, and IoT boards.

More Repositories

1

ML-MCU

Code for IoT Journal paper 'ML-MCU: A Framework to Train ML Classifiers on MCU-based IoT Edge Devices'
C
42
star
2

TinyML-Benchmark-NNs-on-MCUs

Code for WF-IoT paper 'TinyML Benchmark: Executing Fully Connected Neural Networks on Commodity Microcontrollers'
Python
31
star
3

CNN_on_MCU

Code for paper 'Multi-Component Optimization and Efficient Deployment of Neural-Networks on Resource-Constrained IoT Hardware'
Jupyter Notebook
24
star
4

Train_plus_plus

Code for paper 'Train++: An Incremental ML Model Training Algorithm to Create Self-Learning IoT Devices'
C
20
star
5

OTA-TinyML

Code for IEEE Internet Computing Journal paper 'OTA-TinyML: Over the Air Deployment of TinyML Models and Execution on IoT Devices'
C++
18
star
6

COVID-away

Code for paper 'Avoid touching your face: A hand-to-face 3d motion dataset (covid-away) and trained models for smartwatches'
Python
18
star
7

Edge2Guard

Code for PerCom paper 'Edge2Guard: Botnet Attacks Detecting Offline Models for Resource-Constrained IoT Devices'
Jupyter Notebook
16
star
8

ML-Classifiers-on-MCUs

Supplementary material for IEEE Services Computing paper 'An SRAM Optimized Approach for Constant Memory Consumption and Ultra-fast Execution of ML Classifiers on TinyML Hardware'
Jupyter Notebook
12
star
9

profile

Link: https://bharathsudharsan.github.io/profile/
HTML
10
star
10

Alexa-Smart-Speaker

A modern Smart-speaker with an advanced microphone array, camera module interfaced with Pi capable of performing AI-based tasks
Python
10
star
11

AVRGait

Python
9
star
12

Optimized-One-vs-One-Algorithm

Code for AAAI poster 'Training up to 50 Class ML Models on 3 $ IoT Hardware via Optimizing One-vs-One Algorithm'
C
6
star
13

Edge2Train

Code for IoT paper 'Edge2Train: a framework to train machine learning models (SVMs) on resource-constrained IoT edge devices'
C
2
star
14

ML-Model-Combining

Code for BigData paper 'Ensemble Methods for Collective Intelligence: Combining Ubiquitous ML Models in IoT'
Python
2
star
15

Tiny-Impute

On-device Hybrid Anomaly Detection and Data Imputation
Jupyter Notebook
1
star
16

Air-Quality-IoT-Analytics

Repo and code of the UbiComp-ISWC 2021 paper: 'Air Quality Sensor Network Data Acquisition, Cleaning, Visualization, and Analytics: A Real-world IoT Use Case'
Jupyter Notebook
1
star
17

ECML-Tutorial-ML-Meets-IoT

Repository of the ECML PKDD 2021 tutorial title 'Machine Learning Meets Internet of Things: From Theory to Practice'
Jupyter Notebook
1
star
18

Reducing-Overprocessing-of-DNNs

1
star