Skip to content

Instantly share code, notes, and snippets.

@swdee
Created November 12, 2024 07:47
Show Gist options
  • Save swdee/2fc512bde9312bccfef113c6960c196a to your computer and use it in GitHub Desktop.
Save swdee/2fc512bde9312bccfef113c6960c196a to your computer and use it in GitHub Desktop.
go-rknnlite setup on Debian Bookworm 6.1 (Radxa official OS)

Notes on setting up go-rknnlite on Debian Bookworm v6.1 (Radxa Official OS) on Rock 5B/5C.

Check rknpu

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 OS Tools

Install tools for compiling software.

apt install build-essential

Install Go

Bookworm backports is already installed so to install newer golang version use.

apt install golang -t bookworm-backports

Install GoCV

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

Install go-rknnlite

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment