Code: https://github.com/AmbiqAI/neuralSPOT
Documentation: https://ambiqai.github.io/neuralSPOT
NeuralSPOT is a full-featured AI SDK and toolkit optimized for Ambiqs's Apollo family of ultra-low-power SoCs. It is open-source, real-time, and OS-agnostic. It was designed with Tensorflow Lite for Microcontrollers in mind, but works with any AI runtime.
NeuralSPOT is designed to help embedded AI developers in 3 important ways:
NeuralSPOT wraps an AI-centric API around AmbiqSuite SDK (Ambiq's hardware abstraction layer) to ease common tasks such as sensing, computing features from the sensor data, performance profiling, and controlling Ambiq's many on-board peripherals.
NOTE for detailed compatibility notes, see the features document.
NeuralSPOT makes it easy to build and deploy your first AI model on Ambiq's EVBs. Before deploying, connect an Ambiq EVB (the following example defaults to Apollo4 Plus).
git clone git@github.com:AmbiqAI/neuralSPOT.git
cd neuralSPOT
make clean
make -j # makes everything
make deploy # flashes the default example to EVB
make view # connects to the Jlink SWO interface to show printf output from EVB
The make
systems is highly configurable and flexible - see our makefile options document for more details.
See our Windows application note for Windows-specific considerations.
NeuralSPOT includes tools to automatically analyze, build, characterize, and package TFLite models. Autodeploy makes use of RPC, so it needs both USB ports to be connected (one for Jlink and one for RPC).
Two caveats:
--tty <your port>
to use that instead.cd .../neuralSPOT # neuralSPOT's root directory
python setup.py install
cd tools
python -m ns_autodeploy --tflite-filename=mymodel.tflite --model-name mymodel # add --tty COMx for Windows
This one invocation will:
Autodeploy is highly configurable and also capable of automatically measuring the power used by inference (if a joulescope is available) - see the reference guide and application note for more details.
NeuralSPOT consists of the neuralspot libraries, required external components, tools, and examples.
The directory structure reflects the code structure:
/neuralspot - contains all code for NeuralSPOT libraries
/neuralspot # Sensor, communications, and helper libraries
/extern # External dependencies, including TF and AmbiqSuite
/examples # Example applications, each of which can be compiled to a deployable binary
/projects # Examples of how to integrate external projects such as EdgeImpulse models
/make # Makefile helpers, including neuralspot-config.mk and local_overrides.mk
/tools # AutoDeploy and RPC python-based tools
/tests # Simple compatibility tests
/docs # introductory documents, guides, and release notes