A Brief Guide to Intel Movidius Neural Compute Stick with Raspberry Pi 3
Today, low-power consumption is indispensable for autonomous/unmanned vehicles and IoT (Internet of Things) devices. In order to develop deep learning inference application at the edge, we can use Intel’s both energy efficient and low cost Movidius USB stick!
Movidius Neural Compute Stick (NCS) is produced by Intel and it can be run without any need of Intenet. This software development kit enables rapid prototyping, validation, and deployment of deep neural networks. Profiling, tuning, and compiling a DNN on a development computer with the tools are provided in the Intel Movidius Neural Compute SDK. The Movidius NCS’ compute capability comes from Myriad 2 VPU (Vision Processing Unit.
Running Deep Learning models efficiently on low capacity graph processors is very painful. Movidius allows us to optimize the operation of large models such as GoogLeNet (thanks to Yann LeCun) with multi-use support. It is an easy-to-use kit that allows you to design and implement applications such as classification and object recognition as physical products.
We can simply think of Movidius NCS as a GPU running on USB (Graphics Processing Unit). However, training of the model is not performed on this unit, the trained model works optimally on the unit and is intended to be used in physical environments for testing purposes.
- We can use with Ubuntu 16.04 or Raspberry Pi 3 Raspbian Stretch.
- It supports two DNN frameworks (TensorFlow and Caffe).
- Movidius Myriad 2 VPU works with Caffe based convolutional neural networks.
- We can run complex deep learning models like SqueezeNet, GoogLeNetand AlexNet on your computer with low processing capability.
APPLICATION
It is so simple to run a image classification demo. Now we can use NC App Zoo repo for classifying an image. We need to take graph file to activate application of Movidius NCS. It has compiled GoogLeNet model for ready to run. This application needs some files.
make
command is used for creating the files that Movidius needs as graph file. Graph file is a demo of image-classifier.View the steps below for a quick applicaiton:
- For using property of NCSDK API add (import) mvnc library
- You can access to Movidius NCS using API like any other USB Devices. Also you can use parallel Movidius devices at ones if you need more capacity to compute your model. For now, one kit is enough for this application. Select and open process:
- Pretrained GoogLeNet model for using compiled graph file:
- Need to do some pre-processing before loading the image in Movidius NCS:
- Use
LoadTensor()
for loading the image to Movidius NCS:
- Give the input image to pretrained model than getting output using by
GetResult()
:
- Printing prediction of model output and corresponding labels. Also displaying the input image at the same time.
- At the last step, clear and shutdown to Movidius NCS device for use it again:
THANKS
I‘d like to thank Intel Türkiye and Mustafa Aldemir for kindly and immediate donate a Movidius Neural Compute Stick to support my Deep Learning Research.
References:
- https://developer.movidius.com/
- https://www.movidius.com/news/movidius-and-dji-bring-vision-based-autonomy-to-dji-phantom-4
- https://github.com/movidius/ncappzoo
- https://software.intel.com/en-us/articles/build-an-image-classifier-in-5-steps-on-the-intel-movidius-neural-compute-stick
- https://towardsdatascience.com/getting-started-with-intel-movidius-d8ba13e7d3ae
留言
張貼留言