I'm trying to use OpenVINO and NCS2 in my Raspberry Pi4 machine.
I successfully built the OpenVINO for Python3.7 environment as following:
However, when I tried to import openvino.inference in Python, I faced the "Segmentation fault (core dumped)" and crash Python in my console.
Actually, when I import openvino only, I didn't face crash, but the case of "openvino.inference_engine" is crashing my Python ("from openvino import inference_engine" is also crashing).
How can I do that?
My environment as below.
Machine: Raspberry Pi4 8GB
OS: Ubuntu18.04 and Ubuntu Mate
Python: Python3.7.4 (virtualenv)
Thank you in advance.
There is an OpenVINO distribution for the Raspberry Pi with NCS2 but it is for Raspberry Pi OS.
Is there a need for you to use Ubuntu as the OS?
If not I would recommend you to use Raspberry Pi OS/Raspbian.
I have managed to compile and load openvino.inference_engine in python without throwing segmentation fault.
However my environment is a little bit different.
I ran it on
Machine: Pi 4 (4GB RAM)
OS : Ubuntu Desktop 20.10 for ARM .
Python : 3.7.9 (I had some trouble using apt-get so I compiled from source. I did NOT run this in virtual env).
Thank you for replying, actually I have the restriction of using Ubuntu 18.04 OS in my project.
I'm still struggling to build OpenVINO library for python.
I tried to use other branch like 2020.3 and 2020.4, however it give me another error, then I cannot reach to built python library...
I didn't try out of virtualenv, so I will try to build in original environment.
Could you help share the website or download link to the exact image of the OS you are using?
The current Ubuntu distribution I found for ARM are mostly Ubuntu version 20.
Yes, you are right.
Currently only ubuntu20.04 LTS is distributed in https://ubuntu.com/download/raspberry-pi
I installed 18.04LTS in this link previously. Sorry I can't share the answer which you are looking for.
Hi Rizal, thank you for your support.
I changed plan to use Ubuntu20.04 LTS Server and Ubuntu Mate, however I still got segmentation fault even if I didn't use virtualenv.
Could you check it by using Ubuntu20.04LTS Server?
And also my make option is as following:
sudo cmake -DCMAKE_BUILD_TYPE=Release \
I am able to avoid the segmentation error by using the following arguments when building the Python wrappers for the OpenVINO.
-DPYTHON_EXECUTABLE=`which python3.x` \
-DPYTHON_LIBRARY=<path to downloaded python source>/Lib \
-DPYTHON_INCLUDE_DIR=<path to downloaded python source>/Include \
I needed to copy pyconfig.h inside the source into the Include folder in order for it to work.
I followed some instruction similar to this guide for compiling Python.
I have tested importing and initiating IECore class without error, but have yet to test the full functionality.
Could you try compiling using the arguments mentioned to see if it works on your machine?