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.
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.
Having just purchased a BPi-M6, I wanted to try out these examples. But the cloud drive file you shared is no longer accessible. Can you share it again?
Sorry, I removed all of my contributions after criticism by one of the admins who apparently doesn’t appreciate contributions that are not “universal”. I mean, what if someone working on a completely different platform wants to use code specifically made for the M6’s VS680 chip?
I wouldn’t want to contaminate the open source community by providing such “low quality” contributions. So, you can thank @igorpec for that.
Thank you for your contributions to the community!
Your work, especially the development tailored for the M6’s VS680 chip, could be incredibly valuable to certain users. The criticism was likely intended to ensure contributions benefit a broader audience, but it should not diminish the value of your efforts.
We hope you’ll continue to participate, as your expertise is truly invaluable to the community!
Here’s some pizza. Make sure you’re connected to internet when you [sudo] run it.
I’m running the Astra Machina sl1680 now, everything I have compiled for it so far has run on the M6 no problem. Synaptics also informs me they are working on a python wrapper.
Thank you for being willing to provide the file again, it’s a great help to me!
I will find time to try out the demo file you’ve shared.
2 weeks have passed. I hope it was enough time to get on your feet. If not, it was just time wasted. Absolutely wasted.
Sorry for the delayed response.
My BPi-M6 encountered an issue and could not start. I had to send it back to the place of purchase for inspection to confirm that the malfunction was not caused by human error before they could replace it for me.
This process will take about a month, so I am temporarily unable to test the sample code you provided.