Library - Refresh Model File only after feature/setting change

I am using edgeimpuls Arduino Library on an ESP32 (Wemos D32 Pro) for an audio project based on your microphone_continuous example.

After changing any model-parameter or feature I have to download the full library and manually replace the folders model-parameters, tflite-model, rapid_mode_inference. I assume, not the sdk files

Is this correct?
Long term, that is not very efficient - would there be a way to just download/refresh the changed files?

Correct. The Arduino library (and this goes for all export options) is a complete package, where both the model-parameters, tflite-model and edge-impulse-sdk folders are closely knit together. E.g. DSP parameters and options are in model-parameters and the implementation is in edge-impulse-sdk. And the neural network invocations are in tflite-model, but the runtime is in edge-impulse-sdk. Thus you should treat this as a single deployment and not mix and match the folders.

Long term, that is not very efficient - would there be a way to just download/refresh the changed files?

My suggestion would be to just add the new library through the Arduino IDE, and the IDE will take care of versioning etc. The ‘Arduino library’ export is already versioned in a way that the Arduino tools understand it. (Only downside is longer compilation times on Arduino because the build cache does not work properly).

Hi, I am nearly off-line for the next days - so my replies may take a while :slight_smile:

I am using Jetbrains CLION as IDE and Platformio for the handling of cmake, debugging…that together is quite powerful and automated, as you can develop easily on several devices without much change or config.

For a model-update with EdgeImpulse its kind of breaking the flow, download the file, unzip and delete the old files - and copy/paste the new files in the folder. Would it be possible to somehow integrate with GitHub - just create a new model and pull the new version?

@Christian42, you can pull in through the API. I know one of our partners does it that way.

https://docs.edgeimpulse.com/reference#downloadbuild with type zip gets you the latest C++ Library and you could start a new job via https://docs.edgeimpulse.com/reference#buildondevicemodeljob. The first is easy to add in your CMake scripts.

We now ship a CMakeLists.txt file with the C++ Library export as well, so you can treat it as a CMake library now.