Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6404 Discussions

Error in Linux Movidius VPU "run a sample application" instructions web-page

Kulecz__Walter
New Contributor I
430 Views

After eventually getting all my Raspberry Pi synced up with 2019R1 I decided to try a "fresh" install on an i3 Ubuntu 16.04 system.

Everything seemed to work fine until I got to the "Run A Sample Application" for the Movidius VPU.

There is an error in the Linux instructions to setup a test for the Movidius NCS.

The webpage says:

sudo cp /opt/intel/openvino/deployment_tools/demo/car.png  ~/inference_engine_samples/intel64/Release

But the previous verification created ~/inference_engine_samples_build/intel64/Release instead of ~/inference_engine_samples/intel64/Release

Obviously I've a 50-50 chance to fix it by editing the command to match the directory created in the previous step or rename the previously created directory to match the command.

 

Instead of trying to be clairvoyant, I thought I'd look ahead at the command to actually run the test code, surprise, the trail ends with:

Once your neural network setup is complete, you're ready to run a sample application.

 

Problem is I still need to be clairvoyant to run the sample application I allegedly just finished finished setting up!  The section ends with "Hello World Face Detection Tutorial" section.

 

0 Kudos
5 Replies
Luis_at_Intel
Moderator
430 Views

Hello,

Thanks for contacting us. There is an error in the documentation as you have pointed out. If you ran the Image Classification demo, the samples build directory was created in ~/inference_engine_samples_build/ not ~/inference_engine_samples. We will submit a request shortly to have the documentation corrected.

If you are using the Intel® Neural Compute Stick 2, I'd strongly suggest you to take a look at the Get Started with Intel® Neural Compute Stick 2 (Intel® NCS 2) guide. It seems like you completed the "Run a Sample Application" section but you haven't actually run an application. Under that section, there is a reference to visit the "Inference Engine Samples Overview" and see the samples available to you.

Something you can do to run a sample application is to try the "Image Classification C++ Sample" (or if you prefer Python*, there are several C++ samples with simplified equivalents in Python* included in your OpenVINO™ Toolkit installation files under <INSTALL_DIR>/intel/openvino/deployment_tools/inference_engine/samples/python_samples). Assuming you have completed successfully all the prior steps, you can test with C++ or Python* like shown below. Please let me know if the issue persists or you have any other questions, hope this helps.

For C++

cd ~/inference_engine_samples_build/classification_sample
make
~/./inference_engine_samples_build/intel64/Release/classification_sample -m ~/squeezenet1.1_FP16/squeezenet1.1.xml -i ~/squeezenet1.1_FP16/car.png -d MYRIAD

For Python*

python3 <INSTALL_DIR>/intel/openvino/deployment_tools/inference_engine/samples/python_samples/classification_sample/classification_sample.py -m ~/squeezenet1.1_FP16/squeezenet1.1.xml --l ~/squeezenet1.1_FP16/squeezenet1.1.labels -i ~/squeezenet1.1_FP16/car.png -d MYRIAD

 

Note: If you get an error "Import Error: No module named 'cv2'", you may have missed to initialize the environment variables, execute "source <INSTALL_DIR>/intel/openvino/bin/setupvars.sh" and try running the example again

Best Regards,

@Luis_at_Intel

0 Kudos
Kulecz__Walter
New Contributor I
430 Views

I just tried the instructions here:

https://software.intel.com/en-us/articles/get-started-with-neural-compute-stick

There are still errors in the documentation and the scripts.  the demo is still looking for fp32 models when running the demo script so it errors on line 241 trying to load fp32 model into fp16 Myriad plugin.  I make the edit to change line 146 from  "or" to "-o" mentined in another thread here, but seems its not the only error.

My installation seems to  be OK, my python code decoding multiple rtsp streams is running fine as I type this, getting ~9,4 fps for four 1080p rtsp streams with an NCS on an old i3-4025U (virgin 2019R1,01 install),  the NCS2 is what is I'm testing now.

The website, instructions, scripts and installation directory trees are out of sync.  I started with 2018R4 and its seems to be getting more fubar with each release.   Its a mess the way it has scattered directories all over my home directory trying to follow the "verification" and demo/tutorial scripts.

0 Kudos
Shubha_R_Intel
Employee
430 Views

Dear Kulecz, Walter,

I wonder if you're having issues outlined here:

https://software.intel.com/en-us/forums/computer-vision/topic/807560#comment-1937618

The setupvars.sh  is broken (for Raspberry PI). It should be fixed in the next upcoming release. The key discussion is below:

Okay, looks like it's a simple PYTHONPATH problem after all, the following, 

${PYTHONPATH}:/home/pi/inference_engine_vpu_arm/python/python3.5/armv7l

directory needs to get added to your PYTHONPATH, it has gone missing between 2018R5 and 2019R1 and will cause the modules to not be found.

Can you kindly check your PYTHONPATH ?

Thanks,

Shubha

0 Kudos
Kulecz__Walter
New Contributor I
430 Views

Shubha R. (Intel) wrote:

Dear Kulecz, Walter,

I wonder if you're having issues outlined here:

https://software.intel.com/en-us/forums/computer-vision/topic/807560#comment-1937618

The setupvars.sh  is broken (for Raspberry PI). It should be fixed in the next upcoming release. The key discussion is below:

Okay, looks like it's a simple PYTHONPATH problem after all, the following, 

${PYTHONPATH}:/home/pi/inference_engine_vpu_arm/python/python3.5/armv7l

directory needs to get added to your PYTHONPATH, it has gone missing between 2018R5 and 2019R1 and will cause the modules to not be found.

Can you kindly check your PYTHONPATH ?

Thanks,

Shubha

The problem is in the C++ demo/sample.  I was aware of the Python issue with the Pi3B+ install.

Here are my notes for the solution:

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

# Unfortunately the above fails do to a bug int he script :(
nano demo_squeezenet_download_convert_run.sh
change: or to -o at about line 53  if [ "$target" = "MYRIAD"
and exit.

# if this runs OpenVINO should be installed correctly.

# a more interesting example:
# it as the same bug as above, but on line 146 need to make the edit
cd ~/intel/openvino/deployment_tools/demo
./demo_security_barrier_camera.sh -d MYRIAD
# CPU only inference with:
./demo_security_barrier_camera.sh -d CPU
 

 

0 Kudos
Shubha_R_Intel
Employee
430 Views

Dearest Kulecz, Walter,

Thanks for clarifying and I'm deeply sorry for the troubles you've had with OpenVino. This bug has been fixed in OpenVino 2019 R1.1. Please download it and give it a try !

Thanks for your patience !

Shubha

0 Kudos
Reply