frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Alert: Beginning Tuesday, June 25th, we will be freezing this site and migrating the content and forums to our new home at https://forums.intel.com/s/topic/0TO0P000000PqZDWA0/intel-neural-compute-sticks. Check it out now!

Steps for installtion for Raspberry Pi 3 new sdk

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

«13

Comments

  • 69 Comments sorted by Votes Date Added
  • edited November 2017 Vote Up2Vote Down

    The issue is that I needed python3-tk installed in order to display. That cleared it up.

    apt-get install python3-tk
    

    Just specifying the plug-in didn't work as it wasn't installed.

    Thanks!

  • Hi @edwios,

    Just FYI, there is a semi-manual way to install only the API on Raspberry Pi (or on any platform.) The instructions to do that are here: https://movidius.github.io/blog/ncs-apps-on-rpi/

    @karl It is possible to run make examples on rpi. But note that right now it will build opencv from source as part of the installation and this can be a very long process on Raspberry Pi.

  • @karl

    When i last ran the make examples on rpi it ran for over 6 hours but did finally finish on my RPi 3. As of the 1.09 version of the ncsdk RPi Stretch is required. I don't think it will install on Jessie.

    Also for the link, I can see how its not entirely clear, but the steps there are actually for API only. For the full installation you clone and make install at the top level directory. The key difference is for the API only installation is:

            cd ~/workspace/ncsdk/api/src
            make
            sudo make install
    

    Which builds the API from source and then installs only the API by running 'sudo make install' from the api/src directory.

    Disclaimer...I haven't done the API only installation myself but I believe that's how it is meant to work.

  • make install has crashed my pi3 twice now. Any chance someone can upload a working SD card image?

  • There is a GREAT video posted on YouTube for this. Look up Movidius Nerual Compute Pi stick or..

  • edited November 2017 Vote Up0Vote Down

    @chicagobob123 there is no ncapi folder in the latest release in github.
    https://github.com/movidius/ncsdk
    Am I missing something?

  • I can confirm what gauravmoon is saying above. there is no such "pi_jessie" or "pi_*" anything in a solid Ubuntu 16.04LTS on x86 under /opt/movidius nor in the ~/workspace/ncsdk... what are we missing here? Thanks Mark D.

  • @mdouglas_95136, @gauravmoon

    The video linked was for pre 1.09.00 releases of the ncsdk.
    For 1.09 and above you can install the ncsdk on the rpi the same as you would on any ubuntu machine with "make install" after cloning

  • edited November 2017 Vote Up0Vote Down

    Wait Im confused the first videos i watched say not to install the sdk direct on the pi

  • @gmonk63
    You are right. For the Pre-1.09.00 releases of the ncsdk you could not install it directly on the rpi. But starting with 1.09.00 the installation was simplified to be the same for all platforms. So for 1.09.00 and after you can install on the rpi directly following the instructions on the github here:
    https://movidius.github.io/ncsdk/install.html

    The 1.09.00 getting started video is here and applies to all platforms:

    Also, as an added bonus, you can clone the ncappzoo directly on the rpi as well:
    http://www.github.com/movidius/ncappzoo

  • @neal_at_intel

    yeah this is not installing on my ARMv8 (not rpi) + Ubuntu 16.04 LTS root filesystem.
    I won't hijack this thread... I need to ask you about how I should proceed with my use-case in another thread you will see me mention you.

    Thanks!
    Mark

  • I successfully assembled the Raspberry pi and connected with Movidius stick, camera, keyboard/mouse and tv monitor. After the downloading the latest version of ncsdk, I run the ‘make install’ command. It took whole night but still the installation has not completed. I tried with two different SD card (64 gb) and ended with same issue. Since I wanted to use for demo purpose, I installed the full SDK in SD card. (I know there is API only option but it require additional laptop, so I did not opt it.). Please suggest me the solution.

    https://ncsforum.movidius.com/discussion/356/steps-for-installtion-for-raspberry-pi-3-new-sdk

  • No issue installing on the Raspberry Pi 3 using SDK 1.10.
    run.py reported 385ms using an inception_v3_2016_08_28 checkpoint.

    The installation was as @neal_at_intel mentioned above, simply make install.
    Don't know why the full SDK now, was pretty neat to install only the APIs.

    Some notes on my installation

    Target: Raspberry Pi 3 Model B
    SD-Card: 32GB SD-HC (60MB/s write, 90MB/s read) --> You really want to use a really fast SD card here
    Environment: Python3 virtual environment (python3 -m venv )
    Note0: Tensorflow is not supported on RPi3, so the installation will not install tensorflow for you. If you need preprocessing using tf like me, you'll have to do it on a supported OS.
    Note1: If you have a previous installed NCS under /opt/movidius, better to remove this first or the installation may failed at the end.
    Note2: ncs-check no longer installed, you have to go into NCSDK-1.10.00.02/tests/api-check and do a make, then copy over to /usr/local/bin
    Note3: Have afternoon tea, fika, coffee, short nap, etc.. It will take some time. Having a really fast SD card does help, though.

    Some results

    The inception_v3_2016_08.ckpt was converted into protobuf binary, then the graph was compiled using mvNCCompile with option -s12, all done on a computer (Ubuntu 16.04LTS on VirtualBox on Mac), then transferred to the RPi3. (You don't have to do this if you just want to use the stock examples, just cd to the examples inside your workspace and do a make run)
    Host konami below is the Raspberry Pi 3

    (opencv33) edwios@konami:~/ml/ncsdk/examples/tensorflow/inception_v3_2016_08 $ make run
    test -f output/inception_v3_2016_08.pb || (./ckpt2pb.py)
    test -f graph || mvNCCompile -s 12 output/inception_v3_2016_08.pb -in=import/input -on=import/multi-predictions
    ./run.py
    Number of categories: 6012
    Number of classes: 19868
    Start download to NCS...
    385.234 ms used
    *******************************************************************************
    inception-v3 on NCS
    *******************************************************************************
    Number of classes: 19868
    3473 /m/04rky Mammal 0.92822
    1261 /m/01yrx Cat 0.91406
    5723 /m/0jbk Animal 0.90918
    4605 /m/09686 Vertebrate 0.89844
    3981 /m/068hy Pet 0.88721
    841 /m/01l7qd Whiskers 0.82568
    2430 /m/0307l Felidae 0.78809
    4349 /m/07k6w8 Small to medium-sized cats 0.77393
    5643 /m/0hjzp Kitten 0.40894
    *******************************************************************************
    Finished
    
  • edited November 2017 Vote Up0Vote Down

    Hey @edwios thanks for that.

    Just to verify, do we not run make examples on the RPi? Since I think that's crashing my Pi.

    All you run is the SDK and then you make run to transfer over to the Movidius on the RPi?

    Can you transfer to the Movidius on the development machine and then plug it in on the RPi and run the API?

    Just to verify, is there a new version of this video? Is it now outdated?

  • edited November 2017 Vote Up0Vote Down

    So it's a long process, but it also never finishes. From what I can tell, at least.

    Either way, thanks.

    Do you know if it works on RPi Stretch, @neal_at_intel ? Or should we be only using Jessie? Also, thanks for the link. How do you install API only mode? It mentions it as one of the two options, but only goes into steps for option 1. (Full SDK)

  • @neal_at_intel, @karl, here's a blog post about installing NCSDK in API-only mode. I have been able to run this on the following platforms, let us know if you try it on a different platform.

    1. RPI Zero (armv6l) running Raspbian Stretch Lite (32-bit kernel & OS)
    2. RPI3 Model B (armv7l) running Raspbian Stretch Desktop & Lite (32-bit kernel & OS)
    3. DargonBoard 410C (aarch64/armv8) running Debian Stretch (64-bit kernel & OS)
  • Thanks @neal_at_intel and @AshwinVijayakumar. I did that "reading" thing and am working through it now.

    @AshwinVijayakumar which blog post?

  • @karl, sorry about that, it probably makes sense I list the blog link. :smile:

    Here's it is - https://movidius.github.io/blog/

  • Thanks!

    When running through the blog, various issues during the setup scripts. It only seems to work on a fresh install of Ubuntu 16.04.

    For this blog specifically:
    https://movidius.github.io/blog/ncs-image-classifier/

    Scripts need to be added to build the caffe models used in the Appzoo.
    I also keep getting the error that there is no plugin for imshow:

    python3 image-classifier.py 
    /usr/local/lib/python3.5/dist-packages/skimage/transform/_warps.py:84: UserWarning: The default mode, 'constant', will be changed to 'reflect' in skimage 0.15.
      warn("The default mode, 'constant', will be changed to 'reflect' in "
    
    ------- predictions --------
    prediction 0 is n02123159 tiger cat
    prediction 1 is n02123045 tabby, tabby cat
    prediction 2 is n02124075 Egyptian cat
    prediction 3 is n02127052 lynx, catamount
    Traceback (most recent call last):
      File "image-classifier.py", line 79, in <module>
        skimage.io.imshow( IMAGE_PATH )
      File "/usr/local/lib/python3.5/dist-packages/skimage/io/_io.py", line 156, in imshow
        return call_plugin('imshow', arr, plugin=plugin, **plugin_args)
      File "/usr/local/lib/python3.5/dist-packages/skimage/io/manage_plugins.py", line 198, in call_plugin
        raise RuntimeError(msg % kind)
    RuntimeError: No suitable plugin registered for imshow.
    
    You may load I/O plugins with the `skimage.io.use_plugin` command.  A list of all available plugins are shown in the `skimage.io` docstring.
    
  • @karl, thanks for pointing out the issues with https://movidius.github.io/blog/ncs-image-classifier/. I presume they were mostly related to image-classifier.py not finding graph file and/or synset_words.txt. I updated the blog to call make run which downloads and builds all dependent files.

    As for the RuntimeError: No suitable plugin registered for imshow., I noticed this issue on a fresh Ubuntu install. This is because skimage couldn't figure out which of the many supported plugins it should use to display the inferred image. This can be easily solved by forcing skimage to use a specific plugin, before calling imshow. Like so:

    skimage.io.imshow( IMAGE_PATH )
    skimage.io.use_plugin( 'matplotlib' )
    skimage.io.show( )

    Try it out and let me know if it does not work for you. You can read more about this skimage related issue over here - http://scikit-image.org/docs/dev/api/skimage.io.html#skimage.io.use_plugin
  • 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

  • @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?

  • @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.

  • @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. :-)

  • @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 <libusb.h>
    ^
    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 $

  • 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.

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

  • @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)

  • 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.

Sign In or Register to comment.