== Example: Intel Movidius - Neural Computer == This tutorial will show how to get started with the Movidius NCS in the orbit environment. We'll go through downloading and installing the SDK, and then running a couple of the sample examples. This should provide a simple baseline for working with the Intel Movidius stick and SDK without getting into the details of neural networks. === Hardware / Software Utilized === * Nodes with the Movidius Neural Compute Stick - use the [https://www.orbit-lab.org/cPanel/status/template/index.html Inventory/Status page] find nodes with this device. * Node image with ubuntu 64-bit version 16.04 - for this example we'll use ubuntu-16-04-64bit-rzraven.ndz since it already has many of the prerequisites installed. * Intel Movidius Neural Network SDK - provides a set of tools to create and run applications on the NCS device from the node. Development can be done in C/C++ or Python. [https://movidius.github.io/ncsdk/install.html Click here for more info.] === Set up === To get started, please follow the instructions for creating a reservation and loading images on orbit-lab nodes under [wiki:Tutorials/a0Basic/Tutorial1 ORBIT Tutorial -> Basic Tutorials -> testbed operations] and use the [https://www.orbit-lab.org/cPanel/status/template/index.html Inventory/Status page] to find nodes with Movidius NCS. In the example we'll use node1-1 on Sandbox1 imaged with ubuntu-16-04-64bit-rzraven.ndz. * Once the node1-1 is imaged and turned on let's verify the system detected the device. Grep for "Movidius" in the driver messages. {{{ root@node1-1:~# dmesg | grep Movidius [ 1.103633] usb 3-3: Product: Movidius MA2X5X [ 1.103634] usb 3-3: Manufacturer: Movidius Ltd. }}} * Install the SDK - download the SDK & examples from the git repository. {{{ root@node1-1:~# git clone https://github.com/movidius/ncsdk.git root@node1-1:~# cd ncsdk root@node1-1:~# make install }}} At the end of the install you should see a message stating "Setup is complete" and Python environment variables updated in the .bashrc file, so make sure to source your .bashrc file before proceeding in the same terminal otherwise just open a new terminal. {{{ root@node1-1:~# source ~/.bashrc }}} === Run a simple example === * Let's run the ''hello_ncs'' example to check that the Neural Compute API is able to access the NCS device. This example will just open and close the device. There are two version of this example - one in Python and the other in C++. The source for both are very short and easy to match the output with the source code. Move to the directory ''ncsdk/examples/apps/hello_ncs_py'' and type ''make help'' for a list of possible options. Run the python example {{{ root@node1-1:~# cd ~/ncsdk/examples/apps/hello_ncs_py/ root@node1-1:~# make all : : : root@node1-1:~# make run python3 hello_ncs.py; Hello NCS! Device opened normally. Goodbye NCS! Device closed normally. NCS device working. }}} To run the C++ example, move to the ''ncsdk/examples/apps/hello_ncs_cpp'' directory and do ''make all && make run''. The output should be similar to the Python version. * Similarly we can run the other examples in ''ncsdk/examples''. The AlexNet example (image classification) is provided in ''ncsdk/examples/caffe/AlexNet''. Doing a ''make help'' will display all the options available. The makefile is used to download, profile, compile, check and run the network. The [https://github.com/movidius/ncsdk/tree/master/examples/caffe/AlexNet git repo has an outline] of all the make options, please refer to this before executing this example.