The sample code.. I've gathered some

Can we have consolidated sample code for simple inference? Something that runs. From what I can tell, there are no repos for this on the official BPI Github.

I could not find sample code or models in the provided linux images either, but found different pre-compiled images for the 1680 chip. Below is what I found from sl1680_v1.1.0.zip and vs680_SD_2.0.0.zip including the contents of **/usr/share/synap/models**

I consolidated all of these files and put them on Google Drive. Here it is.

Here is the file structure

From what I can determine from the GETTING STARTED GUIDE, you run the images through various synap_cli commands (you have to chmod +x it I’m sure)

Like this command

$ cd /usr/share/synap/models/image_classification/imagenet/model/mobilenet_v2_1.0_224_quant
$ synap_cli_ic -m model.synap ../../sample/goldfish_224x224.jpg

which will output

Loading network: model.synap
Input image: ../../sample/goldfish_224x224.jpg
Classification time: 3.00 ms
Class  Confidence  Description
    1       18.99  goldfish, Carassius auratus
  112        9.30  conch
  927        8.70  trifle
   29        8.21  axolotl, mud puppy, Ambystoma mexicanum
  122        7.71  American lobster, Northern lobster, Maine lobster, Homarus americanus

I would highly recommend using translate on your browser. I’m pretty sure the documentation is in Chinese, but the machine translates very naturally in 2024.

And here are the binaries.

And here is the file structure

The contents of /bin go into /usr/bin and the contents of /lib go into /opt/syna/lib. And libtensorflow-lite.so goes into /usr/lib. There are screenshots in my ZIP file showing the origins and symlinks.

On the Armbian image, /opt/syna/lib already has these files. Overwrite the existing libraries on the Armbian image or you will get this error:

And here is proof of success. Give thanks if this helps you.

1 Like

I got the NPU working through the gstreamer plugin. I compared the pose estimation speed against mediapipe. The SyNAP Inference is much faster. Good news, the board works. Now I can sleep.

Screenshot 2024-11-13 094333

I made a set of tools where all you need to do is burn the BPI Armbian image, download a zip, run sh run.sh and it’ll set everything up for you. Then all you need to do is open a terminal, type sh bodypose.sh and it’ll run this.

As you can see, I’m watching YouTube in HD (lot of dropped frames), but the body pose estimation is largely unaffected. SOC Temp hit 62* with the BPI Heatsink. Good purchase.