Get Started

Step 1: Gather Your Equipment

Before you start, make sure you have the following:

  • An x86_64 computer with the Ubuntu* 16.04 operating system (desktop edition) installed
  • Intel® Neural Compute Stick 2 (Intel® NCS 2)
    Buy Now
  • An internet connection to download and install the Intel® Distribution of OpenVINO™ toolkit

Step 2: Install the Toolkit

Download the Intel® Distribution of OpenVINO™ toolkit, and then return to this page.

Run these commands in a terminal window to extract the downloaded tarball, install dependencies, and then install the toolkit:

cd ~/Downloads
tar xvf l_openvino_toolkit_<VERSION>.tgz
cd l_openvino_toolkit_<VERSION>
./install_cv_sdk_dependencies.sh
./install_GUI.sh

Follow the on-screen instructions to continue the installation process. When done, return to this page.

On the Installation Summary page, select Customize to choose your installation options. Select the image on the right to view the recommended options for the Intel® Neural Compute Stick 2.

Step 3: Configure the Neural Compute Stick USB Driver

Update udev rules1 so that the toolkit can communicate with your neural compute stick. To do this, run the following commands in a terminal window:

cd ~/Downloads

The below code block (starting with cat) is one single command. Enter the entire block of code into your terminal window. This creates a file named 97-usbboot.rules inside~/Downloads.

cat <<EOF > 97-usbboot.rules
SUBSYSTEM=="usb", ATTRS{idProduct}=="2150", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
SUBSYSTEM=="usb", ATTRS{idProduct}=="2485", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
SUBSYSTEM=="usb", ATTRS{idProduct}=="f63b", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
EOF
sudo cp 97-usbboot.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules
sudo udevadm trigger
sudo ldconfig
rm 97-usbboot.rules

Step 4: Test the Installation

Plug the neural compute stick into the USB port on your computer, and then run the following commands in a new terminal window:

When you run these examples for the first time, it might take a while because the scripts are installing software dependencies and compiling all the sample codes.

Select the image on the right to see the expected results.

Image Classification Example

cd ~/intel/computer_vision_sdk/deployment_tools/model_optimizer/install_prerequisites/
./install_prerequisites.sh

cd ~/intel/computer_vision_sdk/deployment_tools/demo
./demo_squeezenet_download_convert_run.sh -d MYRIAD

Congratulations, you have successfully set up a development environment for the Intel® Neural Compute Stick 2.

Next Steps: Explore Additional Examples

Run each of the following commands in the same terminal window:

Traffic Camera (Object Detection)

cd ~/intel/computer_vision_sdk/deployment_tools/demo
./demo_security_barrier_camera.sh -d MYRIAD

This example runs multiple neural networks, such as vehicle attribute and license plate detection and recognition. The script runs a command with multiple options. To run these manually, enter the two commands below in a terminal window.

cd ~/inference_engine_samples/intel64/Release

./security_barrier_camera_demo -i ~/intel/computer_vision_sdk/deployment_tools/demo/car_1.bmp -d MYRIAD -m ~/intel/computer_vision_sdk/deployment_tools/intel_models/vehicle-license-plate-detection-barrier-0106/FP16/vehicle-license-plate-detection-barrier-0106.xml -d_va MYRIAD -m_va ~/intel/computer_vision_sdk/deployment_tools/intel_models/vehicle-attributes-recognition-barrier-0039/FP16/vehicle-attributes-recognition-barrier-0039.xml -d_lpr MYRIAD -m_lpr ~/intel/computer_vision_sdk/deployment_tools/intel_models/license-plate-recognition-barrier-0001/FP16/license-plate-recognition-barrier-0001.xml

Face, Emotion, Age, Gender, and Pose Detection

This example requires a webcam.

cd ~/inference_engine_samples/intel64/Release

./interactive_face_detection_demo -d MYRIAD -m ~/intel/computer_vision_sdk/deployment_tools/intel_models/face-detection-retail-0004/FP16/face-detection-retail-0004.xml -d_ag MYRIAD -m_ag ~/intel/computer_vision_sdk/deployment_tools/intel_models/age-gender-recognition-retail-0013/FP16/age-gender-recognition-retail-0013.xml -d_em MYRIAD -m_em ~/intel/computer_vision_sdk/deployment_tools/intel_models/emotions-recognition-retail-0003/FP16/emotions-recognition-retail-0003.xml -d_hp MYRIAD -m_hp ~/intel/computer_vision_sdk/deployment_tools/intel_models/head-pose-estimation-adas-0001/FP16/head-pose-estimation-adas-0001.xml

More About Inference Engine Samples

Troubleshooting

When performing step 3 (above), if you see [ ERROR ] Can not init USB device: NC_DEVICE_NOT_FOUND, take the following actions to resolve the error. 

  1. Make sure the neural compute stick is properly plugged into the USB port on your computer.
  2. If the problem persists, run Step 3 again.
  3. If the problem still persists, run sudo udevadm test /dev/sda and ensure there are no invalid key/value pair errors. This would indicate an issue with the udev rules. If so, for further support, consult our community forum.

¹Step 3 updates your computer’s udev rules to identify the neural compute stick based on its vendor ID and device ID. You can read more about udev in this Debian* wiki.