FarmIntel is a real-time fruit and insect detection system developed using the XIAO ESP32S3 microcontroller with camera support. The project uses a custom-trained machine learning model built on Edge Impulse and runs it directly on the microcontroller using the Arduino IDE.
This project demonstrates how low-power embedded devices can use Edge AI for smart agriculture — even without internet access.
- Collected a dataset of fruits and bugs
- Used the Edge Impulse platform to train an image classification model
- Exported the model as a ZIP Arduino Library from Edge Impulse
- Configured my ESP32S3 device on Edge Impulse (including device ID and connection)
- Imported the Arduino library into Arduino IDE and wrote code to classify camera input
- Connected a compatible camera module to the ESP32S3
- Displayed classification results via Serial Monitor
- XIAO ESP32S3 microcontroller (with onboard camera support)
- Edge Impulse (for training the ML model)
- Arduino IDE (for programming the ESP32S3)
- Custom camera module (OV2640 or similar)
- Serial monitor for output (or OLED display optionally)
-
Train the model
- Collected images of bugs and fruits
- Labeled them using Edge Impulse's data labeling tools
- Trained the model using their vision/image classification pipeline
- Follow the example Object detection model documenation attached here to create and train a model.
-
Download model as Arduino library
- Exported as
.zipfile directly from Edge Impulse
- Exported as
-
Program the ESP32S3
- Imported the ZIP library into Arduino IDE
- Wrote a sketch to initialize the camera, capture frames, and run the model
- Viewed classification results in the Serial Monitor
-
Edge device performs prediction
- No internet required
- Works offline directly on the ESP32S3 board

