Giter Club home page Giter Club logo

esp32-cam-edge-impulse's Introduction

Official repository is now located here: https://github.com/edgeimpulse/example-esp32-cam

ESP32 Cam and Edge Impulse

How to run custom inference on a ESP32 cam using Edge Impulse.

Note: I've used these tutorials to get started:

Material

esp32-cam

I have been testing the code using the AI Thinker ESP32 Cam module. It should work the same with the Wrover board. To use this board, please select your board in the Arduino code the following lines:

// Select camera model

#define CAMERA_MODEL_WROVER_KIT // Has PSRAM
//#define CAMERA_MODEL_ESP_EYE // Has PSRAM
//#define CAMERA_MODEL_M5STACK_PSRAM // Has PSRAM
//#define CAMERA_MODEL_M5STACK_V2_PSRAM // M5Camera version B Has PSRAM
//#define CAMERA_MODEL_M5STACK_WIDE // Has PSRAM
//#define CAMERA_MODEL_M5STACK_ESP32CAM // No PSRAM
//#define CAMERA_MODEL_AI_THINKER // Has PSRAM
//#define CAMERA_MODEL_TTGO_T_JOURNAL // No PSRAM

Steps

  • Create your model using Edge Impulse
  • Download the Arduino library under the Deployment tab in the Edge Impulse studio dl-arduino-lib

Basic Image Classification

Note: This project does not do a proper resize of the image capture but cutout the data

  • Open the Basic-Image-Classification.ino file under the /Basic-Image-Classification folder.
  • Import the .zip library you have downloaded from Edge Impulse Studio import-zip
  • Change the #include <esp32-cam_image-classification_inference.h> line according to your project name.
  • Compile and deploy the code to your board
  • Open the serial monitor and use the provided IP to capture an image and run the inference: serial-monitor inference

Advanced Image Classification

*Note: Here we use the ESP SDK to resize the image in RGB888 format using the bilinear interpolation technique. You can see the funtion declaration on Espressif's Github repository.

  • Open the Basic-Image-Classification.ino file under the /Advanced-Image-Classification folder.
  • Set your WIFI credentials
  • Navigate to the app_httpd.cpp tab.
  • Import the .zip library you have downloaded from Edge Impulse Studio like on the previous example: import-zip
  • Change the #include <euros_coins_classification_inference.h> line according to your project name.
  • Compile and deploy the code to your board
  • Open the serial monitor and use the provided IP to capture an image and run the inference: serial-monitor
  • On your brower navigate to the IP provided by your Serial Console
  • Use the toggle button to activate the Edge Impulse Inference (you need to select an image resolution lower or equal to QVGA).
  • Click on Run inference: inference-50c inference-1e

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.