openvinotoolkit / openvino

OpenVINO™ is an open-source toolkit for optimizing and deploying AI inference
https://docs.openvino.ai
Apache License 2.0
7.06k stars 2.22k forks source link

How can I specify VPU as my device to use ? #13485

Closed jiapei100 closed 1 year ago

jiapei100 commented 1 year ago

I started by testing hello_classification.py as follows, it seems I've got to specify a device_name.

➜  python git:(master) ✗ python hello_classification/hello_classification.py 
[ INFO ] Usage: hello_classification/hello_classification.py <path_to_model> <path_to_image> <device_name>

Then, I'd invest how to specify my Movidius MyriadX ? ➜ python git:(master) ✗ lsusb ...... Bus 001 Device 003: ID 03e7:2485 Intel Movidius MyriadX ......

Then, I checked the following README.md from sample hello_query_device.py, Devices

Meanwhile, the following command gave me NOTHING,

➜  python git:(master) ✗ python hello_query_device/hello_query_device.py 
[ INFO ] Available devices:

My question: how to specify my device Movidius MyriadX ?

brmarkus commented 1 year ago

Which environment are you working in, under MS-Windows, under which Linux environment (assuming it's Linux, as you mentioned lsusb)? Operating directly on the host, or e.g. within a Docker container?

Which version of OpenVINO are you using, how have you installed it?

For Myriad-X (NCS2) it's ideal to use the offline or online installer (via https://software.intel.com/en-us/openvino-toolkit/choose-download).

When you have installed OpenVINO via pip, then required libraries needed for Myriad-X are missing (but can be copied manually, e.g. from an OpenVINO Docker container).

jiapei100 commented 1 year ago

@brmarkus

Finally, thank you for your response...

I'm actually using OpenVINO under both

➜  ~ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:    22.04
Codename:   jammy

and

➜  ~ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 11 (bullseye)
Release:    11
Codename:   bullseye

And, I successfully built OpenVINO for both systems from source, instead of installing via pip.

It looks I can specify MYRIAD as the device????

In addition, can you please also take a look at my question https://github.com/openvinotoolkit/open_model_zoo/issues/3566 .

brmarkus commented 1 year ago

Thanks for the update - that's why it's important to provide information about the environment.

When building OpenVINO from publicly available source-code, then support for Myriad-X is not contained... as this is not open-source. (other developers just copied some files from online/offline/Docker-installations, like see "https://github.com/openvinotoolkit/openvino/issues/12429")

Iffa-Intel commented 1 year ago

@jiapei100 hope the explanation from @brmarkus regarding MYRIAD for OpenVINO (build from source) is clear for you. (Myriad-X ("Movidius 2") ("NCS2") is still supported - but not in open-source version of OpenVINO)

If you are considering to use OV packages installed using pip with MYRIAD, here's what you can do to make it works:

  1. Copy both libopenvino_intel_myriad_plugin.so and usb-ma2x8x.mvcmd from a working OV environment
  2. Paste them into yourpath/lib/python3.8/site-packages/openvino/libs

You should be able to infer with MYRIAD.

Screenshot from 2022-10-17 12-15-47

Iffa-Intel commented 1 year ago

Closing issue, feel free to re-open or start a new issue if additional assistance is needed.

bouachalazhar commented 1 year ago

Fermeture du problème, n’hésitez pas à rouvrir ou à commencer un nouveau problème si une assistance supplémentaire est nécessaire.

I can't detect NCS2 when I test on my notebook in VS Code. I'm in Windows 11 and I installed OpenVINO with pip.