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.
-
ESP32-CAM module
-
FTDI programmer (or similar) for flashing firmware
-
USB cable
-
Breadboard and jumper wires (optional for wiring setup)
-
Edge Impulse Studio account
-
Arduino IDE (with ESP32 board package installed)
-
Required libraries:
ESP32,Edge Impulse Inferencing SDK
-
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
-
Connect FTDI to ESP32-CAM:
- GND → GND, 5V → 5V, RX → TX, TX → RX
- IO0 → GND (for flashing)
-
Insert a formatted microSD card (optional for saving images).
-
Open Arduino IDE, go to
File > Preferences. -
Add this URL in "Additional Board Manager URLs":
https://dl.espressif.com/dl/package_esp32_index.json -
Go to
Tools > Board > Boards Manager, search "ESP32," and install. -
Open
File > Examples > ESP32 > Camera > CameraWebServer. -
Update:
- Wi-Fi Credentials:
const char* ssid = "YourWiFiSSID"; const char* password = "YourWiFiPassword";
- Uncomment
#define CAMERA_MODEL_AI_THINKER.
- Wi-Fi Credentials:
-
Select:
-
Press Reset Button on the ESP32-CAM.
-
Click Upload in Arduino IDE.
-
Disconnect IO0 → GND, then reset ESP32-CAM.
-
Open the Serial Monitor (
115200baud) to get the IP address. -
Enter the IP address in a browser to access the camera interface.

-
take pictures of your object and save them
1- go to https://studio.edgeimpulse.com/signup and creat an acout
- go to data acqusition and upload the data :

- 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
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.
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

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

- Include the exported Edge Impulse library in your Arduino project.







