Configurations for Intel® Neural Compute Stick 2¶
Once you have your Intel® Distribution of OpenVINO™ toolkit installed, follow the steps to be able to work on NCS2:
Go to the install_dependencies directory:
You may need to reboot your machine for this to take effect.
You’ve completed all required configuration steps to perform inference on Intel® Neural Compute Stick 2. Proceed to the Get Started Guide section to learn the basic OpenVINO™ toolkit workflow and run code samples and demo applications.
Add the current Linux user to the
sudo usermod -a -G users "$(whoami)"
Log out and log in for it to take effect.
If you didn’t modify
.bashrcto permanently set the environment variables, run
setupvars.shagain after logging in:
To perform inference on the Intel® Neural Compute Stick 2, install the USB rules running the
Plug in your Intel® Neural Compute Stick 2.
(Optional) If you want to compile and run the Image Classification sample to verify the OpenVINO™ toolkit installation follow the next steps.
Navigate to a directory that you have write access to and create a samples build directory. This example uses a directory named
mkdir build && cd build
Build the Hello Classification Sample:
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-march=armv7-a" /opt/intel/openvino_2022/samples/cpp
make -j2 hello_classification
Download the pre-trained squeezenet1.1 image classification model with the Model Downloader or copy it from the host machine:
git clone --depth 1 https://github.com/openvinotoolkit/open_model_zoo cd open_model_zoo/tools/model_tools python3 -m pip install --upgrade pip python3 -m pip install -r requirements.in python3 downloader.py --name squeezenet1.1
Run the sample specifying the model, a path to the input image, and the VPU required to run with the Raspbian OS:
./armv7l/Release/hello_classification <path_to_model>/squeezenet1.1.xml <path_to_image> MYRIAD
The application outputs to console window top 10 classification results.
These steps are required only if you want to perform inference on Intel® Neural Compute Stick 2 powered by the Intel® Movidius™ Myriad™ X VPU.
To perform inference on Intel® Neural Compute Stick 2, the
libusb library is required. You can build it from the source code or install using the macOS package manager you prefer: Homebrew*, MacPorts* or other.
For example, to install the
libusb library using Homebrew*, use the following command:
brew install libusb
You’ve completed all required configuration steps to perform inference on your Intel® Neural Compute Stick 2. Proceed to the Start Using the Toolkit section to learn the basic OpenVINO™ toolkit workflow and run code samples and demo applications.