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

Can't get through OpenVINO installation on RBPi + NCS2

acekrystal
Beginner
2,691 Views

I've been trying to get yolo object detection models to run on RBPi 3B+ with NCS2 a week now without any results. I keep hitting dead ends following both official intel guides and community guides.

 

My final goals is to run YOLOv3 (or v4) on a RBPi with a NCS2 using the pi-camera as input.

 

To keep it clean lets focus only on some intel guides I tried. 

A guide I followed was : 
https://docs.openvino.ai/latest/openvino_docs_install_guides_installing_openvino_raspbian.html#run-sample

my Setup is : 

RBPi 3B+ with NCS2, runnin Rasberry Pi OS (32-bit) desktop (2021-05-07 release)

At the end of the guide I have a working example of 

object_detection_sample_ssd

So now I move to intel guides explaining how to use YOLOv? 

One of them is :
https://docs.openvino.ai/2021.4/omz_demos_object_detection_demo_python.html

During this guide I hit onto a dead end that I'm facing in multiple different guides with not clear available solution found somewhere in the webs.

Even if I do : 

Python3 object_detection_demo.py -h (or --help) 

I alway's get stuck on the following error : 

pi@raspberrypi:~/open_model_zoo_2021.4.1/demos/build $ python3 ../object_detection_demo/python/object_detection_demo.py --help
Traceback (most recent call last):
File "../object_detection_demo/python/object_detection_demo.py", line 33, in <module>
import models
File "/home/pi/open_model_zoo_2021.4.1/demos/common/python/models/__init__.py", line 23, in <module>
from .open_pose import OpenPose
File "/home/pi/open_model_zoo_2021.4.1/demos/common/python/models/open_pose.py", line 18, in <module>
import ngraph as ng
ModuleNotFoundError: No module named 'ngraph'

 

I have trained my own YOLOv3 / 4 and 5 models and converted it to IR .xml .bin files sitting ready for running on RBPi +NCS2.

I hope someone can help me progress into this last step. 

 

 

0 Kudos
16 Replies
acekrystal
Beginner
2,676 Views

To give an update,
Another day fully busy getting models and example models to work on RBPi and I just can't get anything else to work except the the one demo face detection used in the guide. Been trying a lot of different models for the model zoo like : 

person-vehicle-bike-detection-2004.xml
person-detection-0203.xml
face-detection-retail-0004.xml

and some more from the model zoo.
I use commands like : 

$ ./object_detection_demo -d MYRIAD -at ssd -i ~/Pictures/facetest1.jpeg -o ~/Pictures/facetest1-ssd.jpeg -m ~/open_model_zoo/tools/downloader/intel/face-detection-retail-0004/FP16/face-detection-retail-0004.xml --no_show

 Every time I hit against errors I can't find good solutions to when browsing the net.

 

As some last effort I did a fresh (latest) openVINO Toolkit install on a WSL CUDA environment I use for training and building AI-models. But even here I could not get any other model from the zoo to work.

 

For me the openVINO environment feels rather complicated to do anything with except for the example demo given in guides. Try to swap anything out often results in errors where answers are not given on internet yet. 
I also get the feeling there isn't a good overview on what demo/model should use what architect type label. And what models do and don't work on the RBPi env. The RBPi env is really limited in usage as you can't run the python versions at all because ngraph is missing as module. I did try a bunch of thing to get it working, like directing it manually : 

export ngraph_DIR=/opt/intel/openvino_2021/deployment_tools/ngraph

but these are more last effort try's.

 

I really hope someone (maybe from intel?) can shed some light on something I might be missing. If I can't even get the model-zoo examples to work on edge devices with MYRIAD I think its a step to far to even try getting our own models to convert and run.

 

for now I will not continue trying to solve any openVINO related issues as I first want to know even what can work on RBPi+NCS2.

 

0 Kudos
Wan_Intel
Moderator
2,670 Views

Hi Acekrystal,

Thank you for reaching out to us and thank you for using OpenVINO™ Toolkit!

 

For your information, the error you encountered: “No module named ‘ngraph” was due to the nGraph module is not included in the OpenVINO™ Toolkit for Raspbian OS package. Hence, you must build Open Source OpenVINO™ Toolkit in order to import the nGraph module.

 

Steps to build Open Source OpenVINO™ toolkit for Raspbian OS and Intel® Neural Compute Stick 2 is available at the following page:

https://www.intel.com/content/www/us/en/support/articles/000057005/boards-and-kits.html

 

From your information, we noticed that you would like to use YOLOv3 (or v4) with Intel® Neural Compute Stick 2 using the Raspberry Pi Camera as input. We are happy to tell you that yolo-v3-tf and yolo-v4-tf are two of the supported models for Object Detection Python Demo and Object Detection C++ Demo using Intel® Neural Compute Stick 2.

 

For Object Detection Python Demo, you can run the application with yolo-v3-tf using Intel® Neural Compute Stick 2 with the following command:

python3 object_detection_demo.py -d MYRIAD -i <path_to_input> -m <path_to_model>/yolo-v3-tf.xml -at yolo

 

For Object Detection C++ Demo, you can run the application with yolo-v3-tf using Intel® Neural Compute Stick 2 with the following command:

./object_detection_demo -d MYRIAD -i <path_to_input> -m <path_to_model>/yolo-v3-tf.xml -at yolo

 

Steps to build the Open Model Zoo Demo applications are available at the following page:

https://github.com/openvinotoolkit/open_model_zoo/tree/master/demos#build-the-demo-applications

 

Supported models for Object Detection Python Demo are available at the following page:

https://github.com/openvinotoolkit/open_model_zoo/tree/master/demos/object_detection_demo/python#supported-models

 

Supported models for Object Detection C++ Demo are available at the following page:

https://github.com/openvinotoolkit/open_model_zoo/tree/master/demos/object_detection_demo/cpp#supported-models

 

Hope it helps.

 

 

Regards,

Wan

 

0 Kudos
acekrystal
Beginner
2,654 Views

Hi Wan,

 

Many thanks for you elaborate response.
I'm sure that I tried (almost?) all the guides and command (in a lot of combinations) that you shared. I documented a big portion of my experiments and it confirms I tested all of them often multiple times

Though I need to say I think I only successfully build openVINO from source once (it failed like 4 times for me by frozen pi's or some package that could not be found).

But your post motivates me enough to try an other openVINO build on a fully clean RBPi OS. Though I'm forced to start this build on a non + RBPi3B. the +'s are building some other projects now. would a non + give problems? I also increased the swap file to hopefully prevent it from freezing.

I will keep this topic updated with the progress made or challenges found. 
I hope acceleration with Intel can become a solution for us.

 

 

 

0 Kudos
acekrystal
Beginner
2,599 Views

I'm following your guide link again to do the source-code build : https://www.intel.com/content/www/us/en/support/articles/000057005/boards-and-kits.html

But I'm hitting against an error already when trying to do the openVINO building. 
Can doing the cmake : 

cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/pi/openvino_dist -DENABLE_MKL_DNN=OFF -DENABLE_CLDNN=OFF -DENABLE_GNA=OFF -DENABLE_SSE42=OFF -DTHREADING=SEQ -DENABLE_OPENCV=OFF -DNGRAPH_PYTHON_BUILD_ENABLE=ON -DNGRAPH_ONNX_IMPORT_ENABLE=ON -DENABLE_PYTHON=ON -DPYTHON_EXECUTABLE=$(which python3.7) -DPYTHON_LIBRARY=/usr/lib/arm-linux-gnueabihf/libpython3.7m.so -DPYTHON_INCLUDE_DIR=/usr/include/python3.7 -DCMAKE_CXX_FLAGS=-latomic ..

 

I get the following error :

fatal: unable to auto-detect email address (got 'pi@raspberrypi.(none)')
Cannot save the current index state
CMake Error at /home/pi/openvino/build/_deps/ext_onnx-subbuild/ext_onnx-populate-prefix/tmp/ext_onnx-populate-gitupdate.cmake:83 (message):
Failed to stash changes


make[2]: *** [CMakeFiles/ext_onnx-populate.dir/build.make:97: ext_onnx-populate-prefix/src/ext_onnx-populate-stamp/ext_onnx-populate-update] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/ext_onnx-populate.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

CMake Error at /usr/local/share/cmake-3.14/Modules/FetchContent.cmake:915 (message):
Build step for ext_onnx failed: 2
Call Stack (most recent call first):
/usr/local/share/cmake-3.14/Modules/FetchContent.cmake:1006 (__FetchContent_directPopulate)
ngraph/cmake/external_onnx.cmake:62 (FetchContent_Populate)
ngraph/CMakeLists.txt:317 (include)


-- Configuring incomplete, errors occurred!
See also "/home/pi/openvino/build/CMakeFiles/CMakeOutput.log".
See also "/home/pi/openvino/build/CMakeFiles/CMakeError.log".

 

Solved this by just setting a random user : 

     git config --global user.name "abc"
     git config --global user.email "abc@example.com"

 

Then the next error : 

CMake Error at /usr/local/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Cython (missing: CYTHON_EXECUTABLE)
Call Stack (most recent call first):
/usr/local/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
inference-engine/ie_bridges/python/cmake/CythonConfig.cmake:48 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
inference-engine/ie_bridges/python/cmake/UseCython.cmake:87 (find_package)
inference-engine/ie_bridges/python/CMakeLists.txt:30 (include)

 

This one I don't know yet how to fix.

0 Kudos
Wan_Intel
Moderator
2,594 Views

Hi Acekrystal,

Thanks for your information.


We are investigating this issue and will update you at the earliest.



Regards,

Wan


0 Kudos
Wan_Intel
Moderator
2,582 Views

Hi Acekrystal,

Thanks for your patience.


The error you encountered: Could NOT find Cython (missing: CYTHON_EXECUTABLE) was due to the installation of Cython package from requirements.txt was removed in the latest OpenVINO branch.


Please add cython>=0.29.17 to the requirements.txt file to resolve this issue. You may refer to this file as a reference.


The location of requirements.txt file was located at the following directory:

<openvino>/inference-engine/ie_bridges/python/requirements.txt


After that, please follows the steps below to re-install the packages:


cd ~/openvino/inference-engine/ie_bridges/python/


pip3 install -r requirements.txt


Then, you can proceed to build OpenVINO with the following guide again.


Hope it helps.



Regards,

Wan


0 Kudos
acekrystal
Beginner
2,543 Views

Thank you Wan,

 

I managed to solve the message by doing : 

sudo apt-get install cython3

 

I was confused by cython, my search "bubble" did not give me a lot of resealts on it to the point that I really thought it was not even an package that could be installed but maybe a typo by someone  :S

 

I will continue testing.

 

Succes with building! 
I managed to do the build and confirmed I can now run python object detection : 

$ python3 object_detection_sample_ssd.py -i ~/Downloads/walk.jpg -m ~/Downloads/person-vehicle-bike-detection-crossroad-0078.xml -d MYRIAD

 

I did notice however that the example 

/home/pi/openvino_dist/deployment_tools/inference_engine/samples/python/object_detection_sample_ssd/object_detection_sample_ssd.py  

script has less options then the one I downloaded from the model zoo. It does not contain parameters like -o for output file, or more important "-at" for selecting what type of model you are giving it. When I do run the python with a .xml file based on yolo I get the error : 

python3 object_detection_sample_ssd.py -i ~/Downloads/walk.jpg -m ~/DataSetPoC1.21-Yolov3-4/IR-LogoPoC1.21/frozen_darknet_yolov4_model.xml -d MYRIAD
[ INFO ] Creating Inference Engine
[ INFO ] Reading the network: /home/pi/DataSetPoC1.21-Yolov3-4/IR-LogoPoC1.21/frozen_darknet_yolov4_model.xml
[ ERROR ] The sample supports models with 1 output or with 2 with the names "boxes" and "labels"

So I thought, I would just fetch the more complete version from my open-model-zoo demo download that has the -at option to tell it its a yolo based model.

 

But when I run that object_detection_demo.py I get the error : 

python3 object_detection_demo.py -h
Traceback (most recent call last):
File "object_detection_demo.py", line 33, in <module>
import models
ModuleNotFoundError: No module named 'models'

 

I will try your link https://github.com/openvinotoolkit/open_model_zoo/tree/master/demos/object_detection_demo/python to see if I can get success with that and report my findings back here.

 

0 Kudos
acekrystal
Beginner
2,538 Views

I downloaded the open_model_zoo from github : 

$ git clone -b 2021.4.1 https://github.com/openvinotoolkit/open_model_zoo.git
$ cd open_model_zoo
$ ./build_demos.sh

but when building it for linux I now hit against this error and have yet to find a solution : 

CMake Error at /usr/local/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find OpenCV (missing: gapi) (found version "4.5.2")
Call Stack (most recent call first):
  /usr/local/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/lib/cmake/opencv4/OpenCVConfig.cmake:354 (find_package_handle_standard_args)
  CMakeLists.txt:139 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/pi/omz_demos_build/CMakeFiles/CMakeOutput.log".
Error on or near line 88; exiting with status 1


 

0 Kudos
acekrystal
Beginner
2,536 Views

I now followed the official intel guide for setting up open_model_zoo on RBPi : 
https://www.intel.com/content/www/us/en/support/articles/000055510/boards-and-kits/neural-compute-sticks.html

 

But I get the same error : 

$ export ngraph_DIR=/home/pi/openvino/build/ngraph
$ export InferenceEngine_DIR=/home/pi/openvino/build
$ export PYTHONPATH=/home/pi/openvino/bin/armv7l/Release/lib/python_api/python3.7
$ export LD_LIBRARY_PATH=/home/pi/openvino/bin/armv7l/Release/lib/
$ export OpenCV_DIR=/usr/local/lib/cmake/opencv4
$ git clone https://github.com/opencv/open_model_zoo.git
$ cd ~/open_model_zoo/demos
$ mkdir build && cd build
$ cmake -DCMAKE_BUILD_TYPE=Release ..
CMake Error at /usr/local/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find OpenCV (missing: gapi) (found version "4.5.2")
Call Stack (most recent call first):
  /usr/local/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/lib/cmake/opencv4/OpenCVConfig.cmake:354 (find_package_handle_standard_args)
  CMakeLists.txt:139 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/pi/open_model_zoo/demos/build/CMakeFiles/CMakeOutput.log".

 

0 Kudos
Wan_Intel
Moderator
2,527 Views

Hi Acekrystal,

Thanks for your information.


We are investigating this issue and will update you at the earliest.



Regards,

Wan


0 Kudos
Wan_Intel
Moderator
2,480 Views

Hi Acekrystal,

Thanks for your patience!

 

Based on your latest reply, we noticed that you would like to build the Open Model Zoo Demo applications on Raspberry Pi.

 

For your information, you can build the Open Model Zoo Demo applications on Raspberry Pi with the following steps:

 

   1.        Download l_openvino_toolkit_runtime_raspbian_p_2021.4.689.tgz

 

   2.        Install the OpenVINO™ Toolkit for Raspbian* OS Package with the following command:

 

cd ~/Downloads/

 

sudo mkdir -p /opt/intel/openvino_2021

 

sudo tar -xf l_openvino_toolkit_runtime_raspbian_p_2021.4.689.tgz --strip 1 -C /opt/intel/openvino_2021

 

   3.        Install external software dependencies with the following command:

 

sudo apt install cmake

 

   4.        Add USB Rules for an Intel® Neural Compute Stick 2 device with the following command:

 

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

 

source /opt/intel/openvino_2021/bin/setupvars.sh

 

sh /opt/intel/openvino_2021/install_dependencies/install_NCS_udev_rules.sh

 

   5.        Download Open Model Zoo with the following command:

 

git clone https://github.com/openvinotoolkit/open_model_zoo.git

 

   6.        Build Object Detection C++ Demo with the following command:

 

mkdir build && cd build

 

cmake -DCMAKE_BUILD_TYPE=Release

<path_to_open_model_zoo>/demos

 

cmake --build . --target object_detection_demo

 

For your information, I have successfully run Object Detection C++ Demo with yolo-v3-tf and yolo-v4-tf on Raspberry Pi 3 Model B+ using Intel® Neural Compute Stick 2. The inference results are shown as follow:

 

Object Detection C++ Demo with yolo-v3-tf model on Raspberry Pi 3 Model B+ using Intel® Neural Compute Stick 2:

raspberrypi_object_detection_demo_yolov3_myriad.png

 

Object Detection C++ Demo with yolo-v4-tf model on Raspberry Pi 3 Model B+ using Intel® Neural Compute Stick 2:

raspberrypi_object_detection_demo_yolov4_myriad.png

 

Hope it helps!

 

 

Regards,

Wan

 

0 Kudos
acekrystal
Beginner
2,440 Views

Hello Wan, and thanks for your response.

 

I noticed in past runs that I could indeed build the open_model_zoo when installing openVINO from package. But then Python does not work, giving the error :

error :  ModuleNotFoundError: No module named 'ngraph'

You pointed me in the direction of building openVINO from source to solve this. After some struggle I successfully build openVINO 4.5.2-openvino" from source.

Only when I now run either 

~/open_model_zoo/demos/build_demos.sh

or

cmake -DCMAKE_BUILD_TYPE=Release ..

precise command set give by intel guide : 

$ export ngraph_DIR=/home/pi/openvino/build/ngraph
$ export InferenceEngine_DIR=/home/pi/openvino/build
$ export PYTHONPATH=/home/pi/openvino/bin/armv7l/Release/lib/python_api/python3.7
$ export LD_LIBRARY_PATH=/home/pi/openvino/bin/armv7l/Release/lib/
$ export OpenCV_DIR=/usr/local/lib/cmake/opencv4
$ git clone https://github.com/opencv/open_model_zoo.git
$ cd ~/open_model_zoo/demos
$ mkdir build && cd build
$ cmake -DCMAKE_BUILD_TYPE=Release ..

I get the error 

 CMake Error at /usr/local/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find OpenCV (missing: gapi) (found version "4.5.2")
Call Stack (most recent call first):
  /usr/local/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/lib/cmake/opencv4/OpenCVConfig.cmake:354 (find_package_handle_standard_args)
  CMakeLists.txt:139 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/pi/open_model_zoo/demos/build/CMakeFiles/CMakeOutput.log".

 

Can you try doing your test on a fresh source-code build? That is where it is not working. I know it works on the packaged version, but that (packaged) version does not seem to have module "ngraph" support.

 

 

 

This is the full step list I do from a new installed RBPi : 

To help building on only <1GB ram, we will directly start with setting swap size to max size : 
$ sudo nano /etc/dphys-swapfile
> CONF_SWAPSIZE=2048
> #CONF_SWAPSIZE=100 (original)
$ sudo /etc/init.d/dphys-swapfile stop
$ sudo /etc/init.d/dphys-swapfile start
Installing CMake* from source
$ cd ~/
$ wget https://github.com/Kitware/CMake/releases/download/v3.14.4/cmake-3.14.4.tar.gz
$ tar xvzf cmake-3.14.4.tar.gz
$ cd ~/cmake-3.14.4
$ ./bootstrap
$ make -j4
$ sudo make install

Installing OpenCV from source

$ sudo apt install git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev libatlas-base-dev python3-scipy
$ cd ~/
$ git clone --depth 1 --branch 4.5.2-openvino https://github.com/opencv/opencv.git
$ cd opencv && mkdir build && cd build
$ cmake –DCMAKE_BUILD_TYPE=Release –DCMAKE_INSTALL_PREFIX=/usr/local ..
$ make -j4
$ sudo make install
Downloading source code and installing dependencies
$ cd ~/cd
$ git clone --depth 1 --branch 2021.4.1 https://github.com/openvinotoolkit/openvino.git
$  cd ~/openvino
$ git submodule update --init --recursive
$ sh ./install_build_dependencies.sh
Building

$ export OpenCV_DIR=/usr/local/lib/cmake/opencv4
$ cd ~/openvino/inference-engine/ie_bridges/python/
$ pip3 install -r requirements.txt
$ cd ~/openvino
$ mkdir build && cd build
$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/pi/openvino_dist -DENABLE_MKL_DNN=OFF -DENABLE_CLDNN=OFF -DENABLE_GNA=OFF -DENABLE_SSE42=OFF -DTHREADING=SEQ -DENABLE_OPENCV=OFF -DNGRAPH_PYTHON_BUILD_ENABLE=ON -DNGRAPH_ONNX_IMPORT_ENABLE=ON -DENABLE_PYTHON=ON -DPYTHON_EXECUTABLE=$(which python3.7) -DPYTHON_LIBRARY=/usr/lib/arm-linux-gnueabihf/libpython3.7m.so -DPYTHON_INCLUDE_DIR=/usr/include/python3.7 -DCMAKE_CXX_FLAGS=-latomic ..

!!! CMake Error at /usr/local/share/cmake-3.14/Modules/FetchContent.cmake:915 (message):
  Build step for ext_onnx failed: 2

Call Stack (most recent call first):
  /usr/local/share/cmake-3.14/Modules/FetchContent.cmake:1006 (__FetchContent_directPopulate)
  ngraph/cmake/external_onnx.cmake:62 (FetchContent_Populate)
  ngraph/CMakeLists.txt:317 (include)
-- Configuring incomplete, errors occurred!
$ git config --global user.name "abc"
$ git config --global user.email "abc@example.com"
!!! CMake Error at /usr/local/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Cython (missing: CYTHON_EXECUTABLE)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  inference-engine/ie_bridges/python/cmake/CythonConfig.cmake:48 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  inference-engine/ie_bridges/python/cmake/UseCython.cmake:87 (find_package)
  inference-engine/ie_bridges/python/CMakeLists.txt:30 (include)
$ sudo apt-get install cython3
$ make -j4
$ sudo make install

Setup and Enable USB NCS2
$ sudo usermod -a -G users "$(whoami)"
$ echo "source /home/pi/openvino_dist/bin/setupvars.sh" >> ~/.bashrc
$ source /home/pi/openvino_dist/bin/setupvars.sh
$ sh /home/pi/openvino_dist/install_dependencies/install_NCS_udev_rules.sh



Following the Intel guide on building the Open Model Zoo Demo’s for RBPi
Guide : https://www.intel.com/content/www/us/en/support/articles/000055510/boards-and-kits/neural-compute-sticks.html
Using commands for the build from open-source :
$ export ngraph_DIR=/home/pi/openvino/build/ngraph
$ export InferenceEngine_DIR=/home/pi/openvino/build
$ export PYTHONPATH=/home/pi/openvino/bin/armv7l/Release/lib/python_api/python3.7
$ export LD_LIBRARY_PATH=/home/pi/openvino/bin/armv7l/Release/lib/
$ export OpenCV_DIR=/usr/local/lib/cmake/opencv4
$ git clone https://github.com/opencv/open_model_zoo.git
$ cd ~/open_model_zoo/demos
$ mkdir build && cd build
$ cmake -DCMAKE_BUILD_TYPE=Release ..
!!! CMake Error at /usr/local/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find OpenCV (missing: gapi) (found version "4.5.2")
Call Stack (most recent call first):
  /usr/local/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/lib/cmake/opencv4/OpenCVConfig.cmake:354 (find_package_handle_standard_args)
  CMakeLists.txt:139 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/pi/open_model_zoo/demos/build/CMakeFiles/CMakeOutput.log".

 

I hope this helps you reproduce the problem and help find a solution.

 

0 Kudos
Wan_Intel
Moderator
2,416 Views

Hi Acekrystal,

Thanks for your information.


We are investigating this issue and will update you at the earliest.



Regards,

Wan


Wan_Intel
Moderator
2,204 Views

Hi Acekrystal,

Thanks for your patience!

 

I have followed the steps you provided from the previous post and I have successfully built the OpenVINO 2021.4.1 from source. When building the Open Model Zoo Demos for Raspberry Pi, I encountered the same error: Could NOT find OpenCV (missing: gapi) (found version “4.5.2”)To solve this issue, you can build OpenCV version 4.5.3-openvino from source and proceed to build the Open Model Zoo Demos for Raspberry Pi.

 

Unfortunately, I encountered an error when running the Object Detection CPP Demo when using the open-source OpenCV version 4.5.3-openvino. I have reported this issue to the development team, and we will update you at the earliest. A workaround for you if you want to run Object Detection CPP Demo is you can build the Open Model Zoo Demo’s for Raspberry Pi by setup the environment using source /opt/intel/openvino_2021/bin/setupvars.sh (provided from runtime package).

On another note, the error: ModuleNotFoundError: No module named 'ngraph' will occur in Object Detection Python Demo when you setup the environment using the setupvars.sh from runtime package. To solve this issue, you must setup the environment using source /home/pi/openvino_dist/bin/setupvars.sh (built from Open Source OpenVINO) and run the Object Detection Python Demo.


Regards,

Wan

 

0 Kudos
acekrystal
Beginner
2,195 Views

Hello Wan,

 

Thank you for your help. I will try out some of your suggestions.

 

I also discovered that the Python object detection works without having to build the open-model-zoo. So I can use with succes : 

python3   ~/open_model_zoo/demos/object_detection_demo/python/object_detection_demo.py -i TestFiles/20210929_151951.jpg -m YOLOv4toIR-test3/frozen_darknet_yolov4_model.xml -at yolo -o YOLOv4toIR-test3/TestonRBPi/testresult-yolo-6-labels.jpg --labels YOLOv4toIR-test3/obj.names -d MYRIAD

First RBPi+NCS2 detection.jpg

 

I just can't build and use the CPP versions without trouble and still hope this gets more accessible.

I will try out your work around, but i'm not sure if I fully understand it what you are doing/changing, as I already set the setupvars.sh using : 

$ echo "source /home/pi/openvino_dist/bin/setupvars.sh" >> ~/.bashrc
$ source /home/pi/openvino_dist/bin/setupvars.sh

I do see your pointing the default location of where openvino is installed, but I need to check out what version ended up where

I had the idea I already tried this without success. I will take a look at it when I can.

 

Anyway, thanks for your help, and please keep me updated if you can on your report to the devs.

Many thanks!

 

 

 

0 Kudos
Wan_Intel
Moderator
1,888 Views

Hi Acekrystal,

Thanks for your question.


Since you are able to run Object Detection Python Demo on Raspberry Pi using NCS2, this thread will no longer be monitored. If you need any additional information from Intel, please submit a new question.



Regards,

Wan


0 Kudos
Reply