This runs an exported impulse on most Zephyr development boards using Edge Impulse SDK Zephyr module and the Zephyr model deployment.
This project differs from example-standalone-inferencing-zephyr because it uses the Edge Impulse SDK Zepyhr module and the Zephyr library deployment for the model instead of copying the C++ library export.
To initialize this repo, run:
west init -m https://github.com/edgeimpulse/example-standalone-inferencing-zephyr-module
cd example-standalone-inferencing-zephyr-module
west update
zephyr and the latest available Edge Impulse SDK will be pulled.
There are different ways to import the Edge Impulse SDK Zepyhr module to be used with this project:
- Update the
west.ymlof your Zephyr repo adding the lines below for the SDK then callwest updateto downlaod the SDK into your Zepyr repo.
Here's the lines to add the EI-SDK:
- name: edge-impulse-sdk-zephyr
path: modules/edge-impulse-sdk-zephyr
revision: ${SDK_VERSION}
url: https://github.com/edgeimpulse/edge-impulse-sdk-zephyr
- Use this project as a manifest repository, running from this project folder:
west init --local .
cd ..
west update
to pull or update the modules needed.
Check the Zephyr module documentation for best practice.
Go to the deployment page of your project and choose the Zephyr library option and extract the .zip in the parent folder of this project.
Then update the sample you want to test in main.cpp :
static const float features[] = {
// copy raw features here (for example from the 'Live classification' page)
// see https://docs.edgeimpulse.com/docs/running-your-impulse-locally-zephyr
};
The extracted model should be placed here model see CMakeLists.txt
list(APPEND ZEPHYR_EXTRA_MODULES ${CMAKE_CURRENT_SOURCE_DIR}/model)
Build the project running
west build -p
Then flash it
west flash
You can specify the board you want to test by modifying the .west/config or by calling west build -b <your board> -p