This is a repository which step by step teaches you how to build your own examples and run on Seeed Grove Vision AI Module V2. Finally, teach you how to restore to the original factory settings and run SenseCraft AI from Seeed Studio.
scenario_app | project name |
---|---|
face mesh | tflm_fd_fm |
yolov8n object detection | tflm_yolov8_od |
yolov8n pose | tflm_yolov8_pose |
pdm mic record | pdm_record |
KeyWord Spotting using Transformers | kws_pdm_record |
imu read | imu_read |
peoplenet from TAO | tflm_peoplenet |
How to use CMSIS-CV at the project?
git clone --recursive https://github.com/HimaxWiseEyePlus/Seeed_Grove_Vision_AI_Module_V2.git
How to run Edge Impulse Example: standalone inferencing using Grove Vision AI Module V2 (Himax WiseEye2)?
This part explains how you can build the firmware for Grove Vision AI Module V2.
Note: The following has been tested to work on Ubuntu 20.04 PC
sudo apt install make
cd ~
wget https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
tar -xvf arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
export PATH="$HOME/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/:$PATH"
git clone --recursive https://github.com/HimaxWiseEyePlus/Seeed_Grove_Vision_AI_Module_V2.git
cd Seeed_Grove_Vision_AI_Module_V2
cd EPII_CM55M_APP_S
make clean
make
./obj_epii_evb_icv30_bdv10/gnu_epii_evb_WLCSP65/EPII_CM55M_gnu_epii_evb_WLCSP65_s.elf
cd ../we2_image_gen_local/
cp ../EPII_CM55M_APP_S/obj_epii_evb_icv30_bdv10/gnu_epii_evb_WLCSP65/EPII_CM55M_gnu_epii_evb_WLCSP65_s.elf input_case1_secboot/
./we2_local_image_gen project_case1_blp_wlcsp.json
./output_case1_sec_wlcsp/output.img
Note: The steps are almost the same as the Linux environment except Step 1
and Step 7
.
make
is using GNU version make
not BSD version make
.
make --version
GNU make
, you should download it by following command.
brew install make
gmake
alias make='gmake'
./we2_local_image_gen_macOS_arm64
for MacOS)
cd ../we2_image_gen_local/
cp ../EPII_CM55M_APP_S/obj_epii_evb_icv30_bdv10/gnu_epii_evb_WLCSP65/EPII_CM55M_gnu_epii_evb_WLCSP65_s.elf input_case1_secboot/
./we2_local_image_gen_macOS_arm64 project_case1_blp_wlcsp.json
make
command for prerequisites , you can reference heretar -xvf arm-gnu-toolchain-13.2.rel1-mingw-w64-i686-arm-none-eabi.zip
setx PATH "%PATH%;[location of your gnu-toolchain-13.2 ROOT]\arm-gnu-toolchain-13.2.rel1-mingw-w64-i686-arm-none-eabi\bin"
git clone --recursive https://github.com/HimaxWiseEyePlus/Seeed_Grove_Vision_AI_Module_V2.git
cd Seeed_Grove_Vision_AI_Module_V2
cd EPII_CM55M_APP_S
make clean
make
./obj_epii_evb_icv30_bdv10/gnu_epii_evb_WLCSP65/EPII_CM55M_gnu_epii_evb_WLCSP65_s.elf
cd ../we2_image_gen_local/
cp ../EPII_CM55M_APP_S/obj_epii_evb_icv30_bdv10/gnu_epii_evb_WLCSP65/EPII_CM55M_gnu_epii_evb_WLCSP65_s.elf input_case1_secboot/
we2_local_image_gen project_case1_blp_wlcsp.json
./output_case1_sec_wlcsp/output.img
This part explains how you can flash the firmware to Grove Vision AI Module V2.
TeraTerm
and Minicom
will be used.
sudo apt-get install minicom
sudo apt-get install lrzsz #(to support xmodem protocol)
sudo setfacl -m u:[USERNAME]:rw /dev/ttyUSB0
# in my case
# sudo setfacl -m u:kris:rw /dev/ttyACM0
sudo minicom -s
Grove Vision(V2)
and press Connect
.
pip install -r xmodem/requirements.txt
Minicom
Seeed Grove Vision AI Module V2
is connect to PC.sudo setfacl -m u:[USERNAME]:rw /dev/ttyUSB0
# in my case
# sudo setfacl -m u:kris:rw /dev/ttyACM0
Terminal
and key-in following commandSeeed Grove Vision AI Module V2
, for example,/dev/ttyACM0
file: your firmware image [maximum size is 1MB]
python3 xmodem/xmodem_send.py --port=[your COM number] --baudrate=921600 --protocol=xmodem --file=we2_image_gen_local/output_case1_sec_wlcsp/output.img
# example:
# python3 xmodem/xmodem_send.py --port=/dev/ttyACM0 --baudrate=921600 --protocol=xmodem --file=we2_image_gen_local/output_case1_sec_wlcsp/output.img
reset
buttun on Seeed Grove Vision AI Module V2
.
pip install -r xmodem/requirements.txt
Tera Term
Seeed Grove Vision AI Module V2
is connect to PC.CMD
and key-in following commandSeeed Grove Vision AI Module V2
python xmodem\xmodem_send.py --port=[your COM number] --baudrate=921600 --protocol=xmodem --file=we2_image_gen_local\output_case1_sec_wlcsp\output.img
# example:
# python xmodem\xmodem_send.py --port=COM123 --baudrate=921600 --protocol=xmodem --file=we2_image_gen_local\output_case1_sec_wlcsp\output.img
reset
buttun on Seeed Grove Vision AI Module V2
.
Following steps update application in the flash.
Minicom
, setup serial port and COM Port name-> connect to Grove Vision AI Module V2. (Please reference the minicom part of System Requirement)
Ctrl+A
on keyboard to enter minicom menu, and then press s
on keyboard to upload file and select xmodem
.
Seeed_Grove_Vision_AI_Module_V2\we2_image_gen_local\output_case1_sec_wlcsp\output.img
and press enter
to burn.
y
to restart.
minicom
which is runing your algorithm.
Following steps update application in the flash.
TeraTerm
and select File -> New connection, connect to Grove Vision AI Module V2.
y
to restart.
TeraTerm
which is runing your algorithm.
This method works on all supported operating systems (Windows/Linux/MacOS...)
himax-flash-tool -d WiseEye2 -f <path_to_four_firmware_img_file>
[HMX] Press **RESET** to start the application...
[HMX] Firmware update completed
Note: if the flashing process hangs, just cancel it (Ctrl+C) and start once again.
Update the flash image Seeed_SenseCraft_AI*.img
to Grove Vision AI Module V2 and press reset
buttun.
Disconnect the Minicom
:
Ctrl+A
on keyboard and press z
on keyboard to go to the menu of minicom
.
q
on keyboard to quit with no reset minicom
, and press yes
to leave.
Open the permissions to acceess the deivce
sudo setfacl -m u:[USERNAME]:rw /dev/ttyUSB0
# in my case
# sudo setfacl -m u:kris:rw /dev/ttyACM0
After doing the above steps, you can run the SenseCraft AI on Grove Vision AI Module V2.
Seeed_SenseCraft AI*.img
to Grove Vision AI Module V2 and press reset
buttun.
TeraTerm
.
You can reference the scenario app allon_sensor_tflm , allon_sensor_tflm_freertos and tflm_fd_fm. Take allon_sensor_tflm for example, you should only modify the allon_sensor_tflm.mk from cis_ov5647 to cis_imx219 or cis_imx477.
#CIS_SUPPORT_INAPP_MODEL = cis_ov5647
CIS_SUPPORT_INAPP_MODEL = cis_imx219
#CIS_SUPPORT_INAPP_MODEL = cis_imx477
So that, it can support cis_imx219 or cis_imx477 camera.
LIB_CMSIS_NN_ENALBE
to build CMSIS-NN library
LIB_CMSIS_NN_ENALBE = 1
APP_TYPE
to allon_sensor_tflm_cmsis_nn
at the makefile
APP_TYPE = allon_sensor_tflm_cmsis_nn