Live Object Detection with XIAO ESP32S3?

Question/Issue:
Is live object detection with video feed possible with the XIAO ESP32S3?

Project ID:
289900

Context/Use case:
I am trying to run an object detection algorithm on an XIAO ESP32S3. I am using Arduino IDE. I used the esp32_camera example code but switched out the camera model for my camera model, using “#define CAMERA_MODEL_XIAO_ESP32S3”. Every time I run the code, it doesn’t error, but instead never gives me any predictions or coordinates, it just keeps refreshing saying “Edge Impulse Inferencing Demo”. Does this code not work for the microcontroller, or am I doing something wrong?

Hi @DainyBoi,

What object detection model are you attempting to run? What is your project ID? The constant refreshing makes me think that the ESP32 is running out of memory and restarting (e.g. kernel panic). Do you see any other messages being printed out over the Serial terminal?

Hi, I put my project ID in the post, but the object detection model I use is “FOMO (Faster Objects, More Objects) MobileNetV2 0.35”. No other messages are being printed, as far as I know, and it just seems to keep repeating. I am out currently but I can check again to see if anything else is being printed when I return.

Apologies, as I missed the project ID. When I run the static_buffer example, I get the following:

ERR: Failed to run classifier (-6)
ERR: failed to allocate tensor arena
Failed to allocate TFLite arena (error code 1)

which indicates that you’re running out of memory on the ESP32. To fix that, I recommend trying FOMO (Faster Objects, More Objects) MobileNetV2 0.1.

Additionally, please note that we do not have support for the Xiao ESP32S3 camera right now. Simply changing the #define will not work–you will need to write the camera driver to capture photos from the camera, scale/crop as needed, and pass the raw image bytes to the run_classifier() function. We only officially support the ESP-EYE right now.