EI preprocessing block + Bring your own model

Hello,

I’m a university student currently working on a keyword spotting project targeted for microcontrollers.

I really like the Edge Impulse. It handles the audio preprocessing blocks (like MFE/MFCC) and highly optimizes the final C++ library. However, we realized our research goals require us to have more control and train models on university resources.
I tried using the BYOM workflow, but uploading a custom model seems to strip away the preprocessing block from the pipeline on EI (Our model was, however, trained on MFE spectrogram data downloaded from EI). From my understanding, using EI’s interface as well as the Python SDK with my own model generates a deployment that does not have the preprocessing step included.

Essentially, we would still like to use the preprocessing block, quantization, and deployment from EI, but simply substitute models that are too large to train on EI’s cloud. Is there a nice way to set up such a pipeline or include MFCC/MFE functionality in deployment?

Thanks in advance for any guidance!

Hi @ystetsko - thanks for posting and welcome to the community!

I’m curious to learn more about why you were not able to train your model directly in Edge Impulse. Did you run into job length limits when trying to train your model?

As for a workaround, there is a section in our BYOM document that shows how to extract features using an Edge Impulse processing block and pass them to your model. The example is the C++ for using the MFCC processing block.

If you want to use MFE, the struct definition for the config (ei_dsp_config_mfe_t) is found in model_metadata.h and you would call extract_mfe_features instead of extract_mfcc_features.

Hope this helps!