[Blog] [Tool] Yet another ESP32-CAM Server for image data collection 🎉

ScreenRecording2025-02-25at23.09.52

This educational tool helps reduce the time needed for capturing and labeling ESP32 camera images for TinyML training in edgeimpulse. It’s more efficient than the standard method of capturing and uploading single images through the edgeimpulse data forwarder firmware.

Instead, it creates an MJPEG stream directly from the camera and displays it on a camera-hosted frontend. This allows you to capture, label, and bulk upload images to the EdgeImpulse studio—making the process more efficient than sitting there for a long time doing it manually.

What triggered this development?

In a nutshell

  1. The method to upload images via edge-impulse-data-forwarder requires an intermediary computer. While collecting and sending accelerometer and audio data is straightforward, there’s no simple example showing how to convert image data into a byte stream array. Though it’s possible to do this manually (by capturing an image and converting it into a serializable byte stream), this functionality isn’t readily available and requires significant programming effort, depending on your embedded systems expertise.
  2. The Edge Impulse data uploader firmware’s image upload method uses WebSerial API and can be seen directly in the studio. But the process to capture each single image is slow. While it offers a good browser-based experience and eliminates the need for a data forwarding middleware, compiling the latest firmware (for custom board other than “ESP-EYE”) remains challenging for beginners.
  3. EloquentEsp32cam is nice and closer to what I was looking for as it hosts the web ui in packed binary format so everything is in c, finally and “one upload” functions flashes everything. But the trade off is that the Web UI modification is not straight forward (since it is gzipped) and the image transfer is also a multi step process requiring one to download labelled images first and then upload to edge impulse manually.

Some other things to know?

Although every details necessary is there in the repo

  1. Out of the box, currently this firmware supports 3 popular esp32 based camera boards.
  2. WiFi configuration is flexible - and is via captive portal. No need to look into the code
  3. Comes with an online firmware flasher and so to start no need to even open Arduino IDE (ofc you would need it later) and it makes sense to get things up and running to collect images
    And many more things…

I can certainly optimize the code further especially to improve the streaming quality and optimizing the gzipping and the file hosting side of things (such a grey box it is —), but for now I will stop here…

Please enjoy and if you use it, I would be happy to hear your thoughts and probably incorporate some feedback.