This is the C++ version of OpenCV Zoo, which currently provides a demo and benchmark on YuNet.
The Allwinner D1 development board [CN] [EN] is equiped with the Xuantie C906 CPU. Xuantie C906 is a RISC-V architecture CPU with RVV intrinsic v0.7.1 support, which is developed by T-Head (平头哥半导体有限公司).
Steps to build OpenCV Zoo for Xuantie C906 CPU (Allwinner D1 board):
- Follow this wiki on OpenCV to build OpenCV with RVV support. If you have trouble downloading toolchains, visit and download from T-Head: https://occ.t-head.cn/community/download?id=3927429448189939712 (toolchain of version 1.12.0 is recommanded).
- Cross compile this repo using the downloaded toolchain:
cd $opencv_zoo_cpp mkdir build && cd build cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_PREFIX_PATH=/path/to/opencv_riscv_install \ -D CMAKE_TOOLCHAIN_FILE=/path/to/opencv/platforms/linux/riscv64-071-gcc.toolchain.cmake .. make # After this you will get two binary files: detect, benchmark
- Download YuNet from OpenCV Zoo.
- Send
detect
,benchmark
, the modelface_detection_yunet_2021sep.onnx
and some test images to the board using adb:adb push detect /root/ adb push benchmark /root/ adb push face_detection_yunet_2021sep.onnx /root/ adb push /path/to/image /root/
- Run
detect
andbenchmark
on the board:# Shell on the board cd /root/ ./detect -i=<image_name> -m=face_detection_yunet_2021sep.onnx # Run ./detect to get help ./benchmark -i=<image_name> -m=face_detection_yunet_2021sep.onnx # Run ./benchmark to get help