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.
6480 Discussions

Segmentation fault and Python3.9 directory missing in the OpenVino toolkit

CamilleBzd
Beginner
2,449 Views

Hello,

 

I'm actually trying to test the Neural Compute Stick 2 on my raspberry pi 4 B :

- Linux raspberrypi 5.10.63-v7l+ #1459 SMP Wed Oct 6 16:41:57 BST 2021 armv7l GNU/Linux

- Python 2.7.18

- Python 3.9.2

 

I followed this guide: https://docs.openvino.ai/2021.4/openvino_docs_install_guides_installing_openvino_raspbian.html. My first problem is during the "Set the environment variables" process I got the error :

"[setupvars.sh] WARNING: Can not find OpenVINO Python module for python3.9 by path /opt/intel/openvino_2021/python/python3.9
[setupvars.sh] WARNING: OpenVINO Python environment does not set properly
[setupvars.sh] OpenVINO environment initialized"

This is normal because in the "/opt/intel/openvino_2021/python/" there are only a python and python3.7 directories. Is this normal ? What can I do to correct this ?

 

I tried to trix the problem by just copying the python3.7 into python3.9 and when I used the command nothing explosed. So I continued to follow the guide and at the end when I used the command :

"./armv7l/Release/object_detection_sample_ssd -m open_model_zoo/tools/model_tools/intel/face-detection-adas-0001/FP16/face-detection-adas-0001.xml -d MYRIAD -i ~/Downloads/face_test.jpg"

I got the following output :

"[ INFO ] InferenceEngine:
IE version ......... 2021.4.2
Build ........... 2021.4.2-3974-e2a469a3450-releases/2021/4
Parsing input parameters
[ INFO ] Files were added: 1
[ INFO ] /home/pi/Downloads/face_test.jpg
[ INFO ] Loading Inference Engine
[ INFO ] Device info:
MYRIAD
myriadPlugin version ......... 2021.4.2
Build ........... 2021.4.2-3974-e2a469a3450-releases/2021/4

[ INFO ] Loading network files:
[ INFO ] open_model_zoo/tools/model_tools/intel/face-detection-adas-0001/FP16/face-detection-adas-0001.xml
[ INFO ] Preparing input blobs
[ INFO ] Batch size is 1
[ INFO ] Preparing output blobs
[ INFO ] Loading model to the device
Segmentation fault"

 

I checked if the NCS2 is well see by my raspberry PI by using the dmesg | grep Movidius command and I can see it. My second problem is this segfault. Is it because I have an environment variables problem or because my device is not see ? 

 

Thanks in advance for your answers.

0 Kudos
1 Solution
Peh_Intel
Moderator
2,350 Views

Hi Camille,

 

Yes, OpenVINO™ Toolkit for the Raspbian OS Package is not validated for Raspbian 11 (Bullseye).

 

On a separate note, I would like to share this discussion with you. Someone has shared his works on compiling OpenVINO™ on Raspberry Pi 4 with the RPi foundation Bullseye 32Bit distribution. His sharing is much appreciated.

 

From our side, we only officially supported till Raspbian Buster 32-bit currently.

 

Have a good day too.

 

 

Regards,

Peh


View solution in original post

8 Replies
Peh_Intel
Moderator
2,408 Views

Hi Camille,

 

Thanks for reaching out to us.

 

I’ve validated that the latest OpenVINO™ toolkit for Raspbian OS is working fine.

 

My setup:

·      Raspberry pi 4B

·      Linux raspberrypi 5.10.63-v7

·      Python 3.7.3

 

In  /opt/intel/openvino_2021/python/ directory, there are only Python 3 and Python 3.7 directories. This is because OpenVINO™ Toolkit for Raspbian OS Package only supported and validated on Python 3.7. And copying Python 3.7 into Python 3.9 only get rid of the warning when updating environment variables: source /opt/intel/openvino_2021/bin/setupvars.sh but then it leads to the segmentation fault.

 

For your second question, your NCS2 is detected as you can see that Inference Engine for MYRIAD Plugin has been loaded.

 

As such, I would suggest you download and use Python 3.7.3.


 

Regards,

Peh


0 Kudos
CamilleBzd
Beginner
2,389 Views

Hello Peh,

 

Thank you for you clear answer ! I downloaded Python3.7.3 on my Raspberry but when I try to set the env variables, it's still gives me the "Python3.9 error" which means that the script use by default the last version of Python3. How can I tell it  to use the Python3.7.3 version ?

 

Have a good day,

Camille

0 Kudos
CamilleBzd
Beginner
2,385 Views

I found this tutorial : https://raspberrytips.com/install-latest-python-raspberry-pi/ which explain how to setup the link in order to use a specific version of python. I uninstalled everything and reinstalled following the guide but when I reach the "[ INFO ] Loading model to the device" I still have the Segmentation Fault when I specify the "open_model_zoo/tools/model_tools/intel/face-detection-adas-0001/FP16/face-detection-adas-0001.xml". I tried with the "open_model_zoo/tools/model_tools/intel/face-detection-adas-0001/FP32/face-detection-adas-0001.xml" and I got :

"E: [ncAPI] [ 844955] [object_detectio] ncDeviceOpen:1017 Failed to find booted device after boot

[ ERROR ] Can not init Myriad device: NC_ERROR" the first time I used the FP32/face-detection-adas-0001.xml. What is the difference between the FP32 and the FP16 file ?

Something weird is that when I used the command again, it gives me the Segmentation Fault on FP32 too.

 

What should I do now ?

 

Thanks in advance,

Camille

0 Kudos
Peh_Intel
Moderator
2,365 Views

Hi Camille,

 

Just to confirm that you’re using Raspbian Buster, 32-bit in your Raspberry Pi 4B and also install OpenVINO™ Toolkit from this Raspbian OS Package: l_openvino_toolkit_runtime_raspbian_p_2021.4.752.tgz


NCS2 (VPU) supported FP16 precision model. However, I was able to build and run Object Detection Sample in my Raspberry Pi 3 and 4B with FP16 and FP32 models also.


You may refer to this article for more information.


The reason of getting the error: “Can not init Myriad device: NC_ERROR” might be due to you run the demo again instantly as NCS2 requires some time to unload network before loading a new network.


Regarding the segmentation fault, do you have any chance to try connecting NCS2 to Raspberry Pi with USB Hub 3.0 and also try using another powered cable to power the Raspberry Pi?



Regards,

Peh


0 Kudos
CamilleBzd
Beginner
2,356 Views

Hello Peh,

 

Thanks for the doc and explanations. 

Here is my os release :

PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Does the NCS2 only work on the Bluster version ? If it's the case, the segfault migth come from that.

 

I tried to change the USB port but no changes. I can't test with another powered cable at the moment.

 

One the doc, it's written that compatibles os are Buster 32-bit and Stretch 32-bit but I'm actually on Bullseye 32-bit and the problem should come from that. Can you confirm that the os release can be the source of the problem ?

 

Have a good day,

Camille

0 Kudos
Peh_Intel
Moderator
2,351 Views

Hi Camille,

 

Yes, OpenVINO™ Toolkit for the Raspbian OS Package is not validated for Raspbian 11 (Bullseye).

 

On a separate note, I would like to share this discussion with you. Someone has shared his works on compiling OpenVINO™ on Raspberry Pi 4 with the RPi foundation Bullseye 32Bit distribution. His sharing is much appreciated.

 

From our side, we only officially supported till Raspbian Buster 32-bit currently.

 

Have a good day too.

 

 

Regards,

Peh


CamilleBzd
Beginner
2,340 Views

Thank you very much for your clear answers and all the information that you shared ! I will try with the Buster 32-bit os.

 

Thanks again.

Regards,

Camille

0 Kudos
Peh_Intel
Moderator
2,301 Views

Hi Camille,


Not a problem.


This thread will no longer be monitored since we have provided suggestions. If you need any additional information from Intel, please submit a new question. 



Regards,

Peh


0 Kudos
Reply