ESP32 classifier memory overflow issue with 32 or more output classes

Hello, I have made a classifier for classifying 9axis IMU data. I am running it as a generic C++ library on an ESP32-C2-DEVKIT (I have also confirmed the same problem on ESP32-S3), via arduino framework for on VScode.

I have 34 output classes I would like to classify however, the ESP32 encounters a memory issue when calling the run_classifier() function. I dug into the library a little, and it seems to be an issue with a matrix being indexed out of bounds, the device actually returns the classification scores correctly and then crashes.

If I manually disable some data in the edge impulse editor to only have 30 classes, the library works fine, which is very strange.

For reference, the error message I receive over serial com is:
Guru Meditation Error: Core 0 panic’ed (Load access fault). Exception was unhandled.

I have 34 output classes I would like to classify
Project ID:
Context/Use case:
classifying 9axis IMU data

Hello @Matthew-Welcome-SB,

I am not sure what could cause the issue.
I’m asking our Embedded Team, they might have a better idea.

I’ll let you know as soon as I have more info.



Hi Louis,

Any updates?


Hi @Matthew-Welcome-SB

We have it capped to 25 to give real world device estimations.

You can change the MAX Labels count from 25 to 35 etc, but this will impact the memory consumption.

// Redefine the EI_CLASSIFIER_MAX_LABELS_COUNT macro before the Edge Impulse SDK