Edge Impulse enables developers to create the next generation of intelligent device solutions with embedded Machine Learning. This repository contains the Edge Impulse firmware for the Seeed Studio Grove Vision AI module. This device supports all Edge Impulse features, including ingestion, remote management, and inferencing.
See our tutorial on how to use the module with Edge Impulse Studio
NOTE
If you are using the Grove Vision AI module with Edge Impulse for the first time, upgrade the firmware on the USB-UART BL702 converter.
- Download the following firmware from Edge Impulse CDN server.
- Follow the instruction to flash the BL702 firmware.
-
You can find the main firmware source code here:
Synopsys_PA8535_EM9D_DFSS_SDK_3.3/app/scenario_app/edge_impulse_firmware
-
To build the firmware, use the following makefile:
Synopsys_PA8535_EM9D_DFSS_SDK_3.3/makefile
-
If you want to deploy your model (exported as a
C++ Library
from Studio), extract the exportedzip
file content into:Synopsys_PA8535_EM9D_DFSS_SDK_3.3/app/scenario_app/edge_impulse_firmware/ei-model
This repository is a snapshot of the Edge Impulse internal code base, therefore PRs won't be merged. If you find any bugs or want to contribute use our Developer Forum to submit them.
You can build firmware using the provided Dockerfile
(the most straightforward solution).
Another option is a native local build.
-
Make sure you have Docker installed.
-
Build the container:
docker build -t seeed-vision-ai-build .
-
Run the build script using
docker run --rm --interactive -v $PWD:/app seeed-vision-ai-build /bin/bash build-firmware.sh
-
You can find the resulting firmware in
firmware.uf2
file.
We tested this build method on Ubuntu 20.04 and Fedora 36.
-
Install the required tools
sudo apt install make sudo apt install python3-numpy
-
Download and install the GNU toolchain for ARC processors
cd ~ wget https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2020.09-release/arc_gnu_2020.09_prebuilt_elf32_le_linux_install.tar.gz tar -xvf arc_gnu_2020.09_prebuilt_elf32_le_linux_install.tar.gz export PATH="$HOME/arc_gnu_2020.09_prebuilt_elf32_le_linux_install/bin:$PATH"
-
Build the firmware and convert it into UF2 format
cd firmware-seeed-vision-ai-internal/Synopsys_PA8535_EM9D_DFSS_SDK_3.3 make make flash python3 tools/ufconv/uf2conv.py -t 0 -c tools/image_gen_cstm/output/output.img -o firmware.uf2
Below is the procedure to flash the firmware on the Grove - Vision AI Module.
- Connect Grove - Vision AI Module to the host PC via USB Type-C cable
- Double-click the boot button on Grove - Vision AI Module to enter mass storage mode
- After this, you will see a new storage drive shown on your file explorer as GROVEAI
- Drag and drop the previous firmware.uf2 file to GROVEAI drive
Once the copying is finished, GROVEAI drive will disappear.
-
Install Edge Impulse CLI tools
-
Connect your board to the PC, open the terminal/command line, and run:
edge-impulse-run-impulse --debug
-
You should see an output similar to the one below. Open the link
Edge Impulse impulse runner v1.15.1 [SER] Connecting to /dev/tty.usbmodem21401 [SER] Serial is connected, trying to read config... [SER] Retrieved configuration [SER] Device is running AT command version 1.7.0 Want to see a feed of the camera and live classification in your browser? Go to http://127.0.0.1:4915
Open the displayed link in a browser, and you will see the preview: