Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6404 Discussions

Steps for installtion for Raspberry Pi 3 new sdk

idata
Employee
5,088 Views

Can any one please guide me in installing/setting up movidius for raspberry pi 3 jessie? Existing tutorials are based on earlier sdk.

 

Thank you
0 Kudos
69 Replies
idata
Employee
807 Views

Hi AshwinVijayakumar,

 

I still got the same error image after have try your solution by add skimage.io.use_plugin( 'matplotlib' ).

 

Could you help give me suggestion about the skimage related issue? Thanks.

 

regards,

 

Samhsieh
0 Kudos
idata
Employee
807 Views

@AshwinVijayakumar the blog https://movidius.github.io/blog/ncs-apps-on-rpi/ seems great, do you know if the posted instructions will work for the 1.09 release version?

0 Kudos
idata
Employee
807 Views

@wheatgrinder, if I recall properly I wrote the article based on v1.09.00 release, so you shouldn't have any issues following the instructions for v1.09.00 & greater. Please let me know if you get stuck somewhere.

0 Kudos
idata
Employee
807 Views

@samhsieh, please to install python3-tk like @karl recommended - https://ncsforum.movidius.com/discussion/comment/1069/#Comment_1069

0 Kudos
idata
Employee
807 Views

@AshwinVijayakumar Great news! Yeah I saw that post about python3-tk as well as the imshow issues. I'm very excited, my NCS is out of delivery as I type this. I will get little sleep tonight. :-)

0 Kudos
idata
Employee
807 Views

@AshwinVijayakumar Success following the blog so far. Pretty easy. Just took a few minutes. Noticed this issue: when installing all the packages in the first step

 

Reading package lists… Done

 

Building dependency tree

 

Reading state information… Done

 

Note, selecting 'libxslt1-dev' instead of 'libxslt-dev'

 

Note, selecting 'python3-pil' instead of 'python3-pillow'

 

E: Unable to locate package python3-pygraphviz

 

E: Unable to locate package python3-protobuf

 

_and.. missing dependency in make install.._

 

(dk) pi@d2-ncs:~/workspace/ncsdk/api/src $ sudo make install

 

cc -O2 -Wall -pthread -fPIC -MMD -MP -I. -I../include -I/usr/include/libusb-1.0 -c usb_boot.c -o obj-armv7l/usb_boot.o

 

usb_boot.c:33:20: fatal error: libusb.h: No such file or directory

 

#include

 

^

 

compilation terminated.

 

Makefile:35: recipe for target 'obj-armv7l/usb_boot.o' failed

 

make: *** [obj-armv7l/usb_boot.o] Error 1

 

(dk) pi@d2-ncs:~/workspace/ncsdk/api/src $

 

*A quick google and installed the missing stuff.. *

 

sudo apt-get install ibusb-1.0-0-dev

 

_… and…_

 

make run

 

making run

 

python3 hello_ncs.py;

 

Hello NCS! Device opened normally.

 

Goodbye NCS! Device closed normally.

 

NCS device working.

 

(dk) pi@d2-ncs:~/workspace/ncsdk/examples/apps/hello_ncs_py $

 

!!!! NCS WORKING !!!!! SIGNS OF LIFE

 

EDIT: Follow up: GoogleNet on PI just like that

 

(dk) pi@d2-ncs:~/workspace/ncsdk/examples/caffe/GoogLeNet $ python run.py

 

Found stale device, resetting

 

Device 0 Address: 1.3 - VID/PID 03e7:2150

 

Starting wait for connect with 2000ms timeout

 

Found Address: 1.3 - VID/PID 03e7:2150

 

Found EP 0x81 : max packet size is 512 bytes

 

Found EP 0x01 : max packet size is 512 bytes

 

Found and opened device

 

Performing bulk write of 865212 bytes…

 

Successfully sent 865212 bytes of data in 164.785946 ms (5.007287 MB/s)

 

Boot successful, device address 1.3

 

Found Address: 1.3 - VID/PID 03e7:f63b

 

done

 

Booted 1.3 -> VSC

 

------- predictions --------

 

prediction 0 (probability 0.99609) is n03272010 electric guitar label index is: 546

 

prediction 1 (probability 0.0035095) is n02676566 acoustic guitar label index i s: 402

 

prediction 2 (probability 0.0) is n02396427 wild boar, boar, Sus scrofa label i ndex is: 342

 

prediction 3 (probability 0.0) is n02391049 zebra label index is: 340

 

prediction 4 (probability 0.0) is n02389026 sorrel label index is: 339

 

(dk) pi@d2-ncs:~/workspace/ncsdk/examples/caffe/GoogLeNet $
0 Kudos
idata
Employee
807 Views

Having a hard time with the Raspberry Pi installation on the latest version.

 

Everything seems to go OK. When I try the Hello app, it works fine:

 

pi@raspberrypi:~/movidius/ncsdk/examples/apps/hello_ncs_py $ make run

 

making run

 

python3 hello_ncs.py;

 

Hello NCS! Device opened normally.

 

Goodbye NCS! Device closed normally.

 

NCS device working.

 

However, when I go to a Caffe model (such as GoogLeNet), no joy at all:

 

pi@raspberrypi:~/movidius/ncsdk/examples/caffe/GoogLeNet $ make run

 

making prereqs

 

(cd ../../data/ilsvrc12; make)

 

make[1]: Entering directory '/home/pi/movidius/ncsdk/examples/data/ilsvrc12'

 

make[1]: Leaving directory '/home/pi/movidius/ncsdk/examples/data/ilsvrc12'

 

making prototxt

 

Prototxt file already exists

 

making caffemodel

 

caffemodel file already exists

 

making compile

 

mvNCCompile -w bvlc_googlenet.caffemodel -s 12 deploy.prototxt

 

mvNCCompile v02.00, Copyright @ Movidius Ltd 2016

 

Layer inception_3b/1x1 forced to im2col_v2, because its output is used in concat

 

Layer inception_3b/pool_proj forced to im2col_v2, because its output is used in concat

 

Layer inception_4a/1x1 forced to im2col_v2, because its output is used in concat

 

Layer inception_4a/pool_proj forced to im2col_v2, because its output is used in concat

 

Layer inception_4b/1x1 forced to im2col_v2, because its output is used in concat

 

Layer inception_4b/pool_proj forced to im2col_v2, because its output is used in concat

 

Layer inception_4c/1x1 forced to im2col_v2, because its output is used in concat

 

Layer inception_4c/pool_proj forced to im2col_v2, because its output is used in concat

 

Layer inception_4d/1x1 forced to im2col_v2, because its output is used in concat

 

Layer inception_4d/pool_proj forced to im2col_v2, because its output is used in concat

 

Layer inception_4e/1x1 forced to im2col_v2, because its output is used in concat

 

Layer inception_4e/pool_proj forced to im2col_v2, because its output is used in concat

 

Layer inception_5a/1x1 forced to im2col_v2, because its output is used in concat

 

Layer inception_5a/pool_proj forced to im2col_v2, because its output is used in concat

 

Layer inception_5b/1x1 forced to im2col_v2, because its output is used in concat

 

Layer inception_5b/pool_proj forced to im2col_v2, because its output is used in concat

 

/usr/local/bin/ncsdk/Controllers/FileIO.py:52: UserWarning: You are using a large type. Consider reducing your data sizes for best performance

 

"Consider reducing your data sizes for best performance\033[0m")

 

making run

 

./run.py

 

Device 0 Address: 1.3 - VID/PID 03e7:2150

 

Starting wait for connect with 2000ms timeout

 

Found Address: 1.3 - VID/PID 03e7:2150

 

Found EP 0x81 : max packet size is 512 bytes

 

Found EP 0x01 : max packet size is 512 bytes

 

Found and opened device

 

Performing bulk write of 865212 bytes…

 

Successfully sent 865212 bytes of data in 109.929749 ms (7.505980 MB/s)

 

Boot successful, device address 1.3

 

Found Address: 1.3 - VID/PID 03e7:f63b

 

done

 

Booted 1.3 -> VSC

 

Traceback (most recent call last):

 

File "./run.py", line 87, in

 

output, userobj = graph.GetResult()

 

File "/usr/local/lib/python3.5/dist-packages/mvnc/mvncapi.py", line 262, in GetResult

 

raise Exception(Status(status))

 

Exception: mvncStatus.TIMEOUT

 

Makefile:91: recipe for target 'run' failed

 

make: *** [run] Error 1

 

Any advice on how to get it to run?

 

As an aside, I look fondly at the now obsolete video which seems to show real time object recognition using the R-Pi. How great would that be to have that working as a proof of concept! Why on earth did you abandon that for what you are shipping today?

 

Thanks,

 

-Kal.
0 Kudos
idata
Employee
807 Views

Hello @AshwinVijayakumar (or anyone else) - any thoughts on the above? Thanks.

0 Kudos
idata
Employee
807 Views

@kalkrishnan , looks like you are able to enumerate the device & load the graph, but the program breaks while trying to get results from the stick. Can you perform these steps and give us the console log? Please use the code tag while pasting source code or debug logs - https://docs.vanillaforums.com/help/addons/advanced-editor/#headings-and-special-text-formatting

 

Test case 1:

 

cd examples/caffe/AlexNet make profile

 

Test case 2:

 

cd examples/caffe/GoogLeNet make profile

 

Test case 3:

 

cd examples/tensorflow/inception_v3 make profile

 

Repeat these steps on different USB ports of the RPI and also on an x86_64 system (laptop/desktop)

0 Kudos
idata
Employee
807 Views

Just for sanity check, I tried installing on Ubuntu in a VirtualBox, and everything ran fine there. So, the NCS is working OK. It just appears that the R-Pi support is still shaky.

0 Kudos
idata
Employee
807 Views

@kalkrishnan, except for profiler and compiler support for TF, NC SDK is validated to run well on RPI 3 (Stretch OS). I'd be happy to help debug the issue on your RPI setup.

0 Kudos
idata
Employee
807 Views

Thanks for the reply @AshwinVijayakumar. What additional information can I provide you with, in addition to that error listing I included in the last message?

0 Kudos
idata
Employee
807 Views

I just wanted to report back that I have been very successful at getting the NCS running on my PI. I have googlenet inference and tinyyolo examples working. I am integrating this into my autonomous RC car. (donkeycar)

 

Here is the google net https://www.youtube.com/watch?v=mxBc8qEopEo

 

Here is tinyyolo https://www.youtube.com/watch?v=aZebjXaS1mU&t=64s

 

My issue is with powering the Pi with the NCS plugged in. Its very sensitive. I frequently end up with the pi throttling due to low voltage. Any suggestions for powering the NCS on a mobile platform via battery?

 

FYI: I'm using the 'vcgencmd get_throttled' command to check.

 

In this video you can see the throttling when connected to battery power.

 

https://www.youtube.com/watch?v=-xLSnuHUNd4

 

Here is plugged into wall power adapter, no throttling

 

https://www.youtube.com/watch?v=lAkrtntAe5E
0 Kudos
idata
Employee
807 Views

@wheatgrinder, really cool UI! What battery solution are you using? I've noticed throttling issues when using off the shelf battery packs. Most of these packs have built-in current limiting circuits to prevent overdraw, so when the CPU and/or the NCS cranks up, the battery pack won't be able to cater to the spike.

 

I've always relied on good old LiPo packs designed for RC cars/planes/drones for my portable projects. I usually get a 2S 800mAh LiPo pack with 25C rating for smaller projects, and 2S 2400mAh pack with 35C rating for projects that need to be ON for a long time (months). You'll need a good voltage regulator to step down the 7.4V down to 5V.

 

I get my LiPo packs from HobbyKing and build my own regulators, but you can find a couple good regulators on eBay.

0 Kudos
idata
Employee
807 Views

yeah, Im using off the shelf USB battery packs. I find that it mostly works when I run very short cables from the battery to the pi, but even then I get a few throttling events.

 

I would like to go lipo for the whole platform.. Is there an off the shelf regulator\charging pi HAT or other add on that will let me run both off one battery? I imagine spikes in current draw from motors etc are an issue.

0 Kudos
idata
Employee
807 Views

@AshwinVijayakumar @wheatgrinder - Have either of you been able to get any of the STOCK caffe examples that are downloaded as part of the installation to work? Did you see my output from the last post? What's the trick to get it to work?

 

Thanks,

 

-Kal.
0 Kudos
idata
Employee
807 Views

@wheatgrinder I noticed you did try the built in GoogLeNet example, and it worked for you. I looked at your output versus mine:

 

pi@raspberrypi:~/movidius/ncsdk/examples/caffe/GoogLeNet $ python run.py

 

Device 0 Address: 1.3 - VID/PID 03e7:2150

 

Starting wait for connect with 2000ms timeout

 

Found Address: 1.3 - VID/PID 03e7:2150

 

Found EP 0x81 : max packet size is 512 bytes

 

Found EP 0x01 : max packet size is 512 bytes

 

Found and opened device

 

Performing bulk write of 865212 bytes…

 

Successfully sent 865212 bytes of data in 108.872862 ms (7.578844 MB/s)

 

Boot successful, device address 1.3

 

Found Address: 1.3 - VID/PID 03e7:f63b

 

done

 

Booted 1.3 -> VSC

 

Traceback (most recent call last):

 

File "run.py", line 87, in

 

output, userobj = graph.GetResult()

 

File "/usr/local/lib/python2.7/dist-packages/mvnc/mvncapi.py", line 262, in GetResult

 

raise Exception(Status(status))

 

Exception: mvncStatus.TIMEOUT

 

There is a "found stale device, resetting" message at the top of your output, which I don't get (what stale device?). But I am assuming that is irrelevant. Other than that, our outputs appear identical, until the point where it is waiting for the results from the NCS. In my case, it waits about 15 seconds, and gives the TIMEOUT error. In your case, it gives back the correct expected results.

 

Are you able to get your GoogLeNet example to run consistently? Did you have to do anything to make that work? I am at my wit's end here!

 

-Kal.

0 Kudos
idata
Employee
807 Views

@wheatgrinder, I've used LM2596 based dc-dc buck convertor modules from eBay in a couple of my projects - https://m.ebay.com/itm/Lot-10x-LM2596S-DC-DC-3A-Buck-Adjustable-Step-down-Power-Supply-Converter-Module/391892156266

 

DonkeyCar has been on my list for a while now, but haven't started looking into it. If it has BLDC motors, then I'd recommend using off the shelf ESCs (from HobbyKing) with built in regulators.

0 Kudos
idata
Employee
807 Views

@AshwinVijayakumar I am using a standard RC battery and ESC to drive the motors and servos of the donkeycar, but Im using an external USB battery to power the pi and consequently the NCS. I've read many times that trying to power a micro controller from the same battery being used to drive your motors is a problem due to peak loads and RF feedback.

0 Kudos
idata
Employee
796 Views

@kalkrishnan I currently have everything working on the RPi except the USB webcam. I am also getting the wrong results for tensorflow/mobilenets, but this is on the PC as well.

 

I did notice incorrect results on the RPi for inception_v1-4 from using python over python3.

 

Using the latest release?

 

Try "python3 run.py"? (but using python in this example work fine for me?)

 

Maybe you need to reboot? I have had to reboot from time to time, but I don't remember the exact error.

0 Kudos
idata
Employee
796 Views

I am getting error No module named 'caffe'. I have followed the advice on https://ncsforum.movidius.com/discussion/99/technical-faq# without success - every attempt to add to pythonpath fails

0 Kudos
Reply