Check rknpu is installed (it should be on official Radxa images.
dmesg | grep -i rknpu
[ 5.130935] [drm] Initialized rknpu 0.8.2 20220829 for fdab0000.npu on minor 1
Install tools for compiling software.
apt install build-essential
Bookworm backports is already installed so to install newer golang version use.
apt install golang -t bookworm-backports
To compile OpenCV/GoCV.
Install dependencies.
apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
Checkout gocv in ~/devel
directory
cd ~/devel
git clone https://github.com/hybridgroup/gocv.git
cd gocv
Edit Makefile for build_raspi and add on building of gstreamer with
-D WITH_GSTREAMER=ON
Compile
make install_raspi
Checkout project code into ~/devel
cd ~/devel
git clone https://github.com/swdee/go-rknnlite.git
cd go-rknnlite/example
git clone https://github.com/swdee/go-rknnlite-data.git data
Run the examples