Skip to content

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Table of Contents

Deploy-Edge-Impulse-Object-Detection-Model-on-ESPCAM

This project demonstrates how to deploy an object (egg) detection model trained using Edge Impulse on an ESPCAM module.

Edge Impulse simplifies the process of creating machine learning models for edge devices. This project focuses on deploying an object detection model to detect eggs using the ESPCAM.

Requirements

Hardware

  • ESP32-CAM module

  • FTDI programmer (or similar) for flashing firmware

  • USB cable

  • Breadboard and jumper wires (optional for wiring setup)

  • Software

  • Edge Impulse Studio account

  • Arduino IDE (with ESP32 board package installed)

  • Required libraries: ESP32, Edge Impulse Inferencing SDK

Project Setup

1. collect images

  1. take suffucion amount of images with deffrent angles of your object (in my case egg) with your phone or with your ESP-CAM for more efficient result

    to take a pic with esp-cam follow this steps:

    . Hardware Setup

  2. Connect FTDI to ESP32-CAM:

    • GND → GND, 5V → 5V, RX → TX, TX → RX
    • IO0 → GND (for flashing)
  3. Insert a formatted microSD card (optional for saving images).

    . Install ESP32 Board

  4. Open Arduino IDE, go to File > Preferences.

  5. Add this URL in "Additional Board Manager URLs":

    https://dl.espressif.com/dl/package_esp32_index.json
    
  6. Go to Tools > Board > Boards Manager, search "ESP32," and install.

    . Upload Code

  7. Open File > Examples > ESP32 > Camera > CameraWebServer.

  8. Update:

    • Wi-Fi Credentials:
      const char* ssid = "YourWiFiSSID";
      const char* password = "YourWiFiPassword";
    • Uncomment #define CAMERA_MODEL_AI_THINKER.
  9. Select:

    • Board: AI Thinker ESP32-CAM
    • Port: Correct COM port. image
  10. Press Reset Button on the ESP32-CAM.

  11. Click Upload in Arduino IDE.

    . Run the Web Server

  12. Disconnect IO0 → GND, then reset ESP32-CAM.

  13. Open the Serial Monitor (115200 baud) to get the IP address.

  14. Enter the IP address in a browser to access the camera interface. image

  15. take pictures of your object and save them

2. train the maodel

1- go to https://studio.edgeimpulse.com/signup and creat an acout

  • go to data acqusition and upload the data : image
  • it would be split by default to 80% training and 20% for testing

2- label the data : go to the labeling and draw a box on the object you want to detect on all the images and name the label on what the object is (egg in my case) 3- configure your model: go to creat impulse and configure your model image 4- create features : where the images are transformed into a set of meaningful numerical representations. These features are used as inputs to train machine learning models.

  • go to images and click create feature image image

5- set up the neural network : the model for object detection in edge impulse is FOMO (Faster Objects, More Objects) MobileNetV2 0.35 , set up the Number of training cycles and train the model image

6- deploy the model : go to deployment and download the arduino library, it would be downlad as zip file image

4. Deploy the Model

  1. Include the exported Edge Impulse library in your Arduino project.
  • go to sketch - inculde library - manage library - add zip - then add the zip file you uplad from the edge impulse image
  1. go to exemples and choose the library you include - esp32 - camera image
  2. in our case we are using ESP-CAM uncomment CAMERA_MODEL_AI_THINKER image
  3. upload to your ESP-CAM IMG_20241213_202820 1
  4. take off the IO0 → GND and open the terminal and observe the result image

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages