Openwrt and Neural Compute Stick 2 NCS2

do not think there are too many people who might be interested in this. but if you want to get these Neural Compute sticks to work on an intel openwrt it is possible.

first you heed to install chroot environment (opkg install debootstrap )
then once you installed

debootstrap --arch=amd64 focal /root/focal http://archive.ubuntu.com/ubuntu/

setup your dev

mount -o bind /dev /root/focal/dev

then you will need to update your source list
chroot into focal

chroot /root/focal /bin/bash
mount -t proc proc /proc
mount -t sysfs sys /sys

install nano and curl

apt install nano curl

now nano into sources.list

nano /etc/apt/sources.list

add these sources:

 deb http://security.ubuntu.com/ubuntu focal-security universe
 deb http://security.ubuntu.com/ubuntu focal-security main restricted
 deb http://ca.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
 deb http://ca.archive.ubuntu.com/ubuntu/ focal-updates multiverse
 deb http://ca.archive.ubuntu.com/ubuntu/ focal multiverse
 deb http://ca.archive.ubuntu.com/ubuntu/ focal-updates universe
 deb http://ca.archive.ubuntu.com/ubuntu/ focal universe
 deb http://ca.archive.ubuntu.com/ubuntu/ focal-updates main restricted
 deb http://ca.archive.ubuntu.com/ubuntu/ focal main restricted

then apt update

now to install openvino.
first create dir

mkdir /opt/intel

now download openvino

curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3.2/linux/l_openvino_toolkit_ubuntu20_2022.3.2.9279.e2c7e4d7b4d_x86_64.tgz --output openvino_2022.3.2.tgz
tar -xf openvino_2022.3.2.tgz
mv l_openvino_toolkit_ubuntu20_2022.3.2.9279.e2c7e4d7b4d_x86_64 /opt/intel/openvino_2022.3.2

now go to openvino folder

cd /opt/intel/openvino_2022.3.2
./install_dependencies/install_openvino_dependencies.sh

now simplify folder

cd /opt/intel
ln -s openvino_2022.3.2 openvino_2022
usermod -a -G users "$(whoami)"
cd /opt/intel/openvino_2022/install_dependencies/
cp 97-myriad-usbboot.rules /etc/udev/rules.d/

now start the environment you need to do this every time the computer restarts

source /opt/intel/openvino_2022/setupvars.sh

C++ environment is not functional.

to install python environment

python3 -m venv openvino_env

activate

source openvino_env/bin/activate

install package

pip install openvino==2022.3.2

then install openvino-dev

pip install openvino-dev==2022.3.2

you also need to install opencv - you can either install manually ( smaller) or install from repository

 apt install python3-opencv

after this you can run benchmark_app

benchmark_app -h

if everything installs properly it will display what type of acceleration you have
Screenshot_20250202_093151

in my case i can do inferece on the CPU GNA and MYRAID
for sample model just go to open_model_zoo and download the older version from 2022 and then you can do speech or video/image processing using you MYRAID device

https://github.com/openvinotoolkit/open_model_zoo/tree/releases/2022/3