Code Monkey home page Code Monkey logo

tinyml-cam's Introduction

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.

tinyml-cam's People

Contributors

bharathsudharsan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.