Neural compute stick 2 linux

Configurations for Intel® Neural Compute Stick 2¶

Once you have OpenVINO™ Runtime installed, follow these steps to be able to work on NCS2:

    Add the current Linux user to the users group:

sudo usermod -a -G users "$(whoami)"
cd INSTALL_DIR>/install_dependencies/
sudo cp 97-myriad-usbboot.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules sudo udevadm trigger sudo ldconfig

You’ve completed all required configuration steps to perform inference on Intel® Neural Compute Stick 2.

macOS¶

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:

You’ve completed all required configuration steps to perform inference on your Intel® Neural Compute Stick 2.

What’s Next?¶

Now you are ready to try out OpenVINO™. You can use the following tutorials to write your applications using Python and C++.

Источник

How to run OpenVINO™ with Neural Compute Stick 2 on Linux

Note: This article was created with OpenVINO 2021.4. If you want to know how to use the new API of OpenVINO 2022.1 please check this notebook. Firstly, plug your Neural Compute Stick 2 (NCS2) into a USB port. Then, in the terminal, run:

Bus 003 Device 009: ID 03e7:2485 Intel Movidius MyriadX 

where 03e7 is a vendor ID and 2485 is a product ID (you can see also different product IDs). It means your device is properly detected by your operating system. If you run the following python code:

import openvino.inference_engine as ie engine = ie.IECore() print(engine.available_devices) 

Although your device (MYRIAD) is visible for the Inference Engine it won’t run. You still need to do some things. The next step is to create udev rules. Go to /etc/udev/rules.d and create file 97-myriad-usbboot.rules with following content:

SUBSYSTEM=="usb", ATTRS=="2150", ATTRS=="03e7", GROUP="users", MODE="0660", ENV="1" SUBSYSTEM=="usb", ATTRS=="2485", ATTRS=="03e7", GROUP="users", MODE="0660", ENV="1" SUBSYSTEM=="usb", ATTRS=="f63b", ATTRS=="03e7", GROUP="users", MODE="0660", ENV="1" 

If your product ID is different from 2150, 2485, or f63b you should add a new line containing your product ID. After that, run in your terminal:

sudo udevadm control --reload-rules sudo udevadm trigger sudo ldconfig 

There is one additional step you should do now. Add your user to ‘users’ group and reboot the computer (sometimes log out is enough).

sudo usermod -a -G users "$(whoami)" sudo reboot 

After restarting, verify that your user is in the ‘users’ group. Finally, you can load your network into NCS2!

net = ie_core.read_network(model="model_path") exec_net = ie_core.load_network(network=net, device_name="MYRIAD")) 

And it works! You can try it yourself with this demo. Even if you don’t have Neural Compute Stick, you can run the demo with Intel’s CPU or integrated GPU.

Источник

Читайте также:  Linux get date and time
Оцените статью
Adblock
detector