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

Make error trying to compile opencv from source using openvino

Paul32
Novice
4,080 Views

I previously had a successful compile for raspberry pi, but now I would like to compile for a board with arm 64 (and Debian Bullseye).  My prior thread is Re: Where are the pre-built openvino-opencv packages for raspberry pi? - Intel Community

I was able to modify the setup to use arm 64 and Debian Bullseye for opencv by itself, and that worked fine.  I first tried to compile OpenVINO from source, eventually getting something.  When I did the opencv compile from that, the CMAKE showed it had openvino support, but the make failed with an error.  I later found a pre-built OpenVINO for arm 64.  https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3/linux/l_openvino_toolkit_debian9_2022.3.0.9052.9752fafe8eb_arm64.tgz

I wasn't sure what opencv version to use, so I just used the latest (4.9.0).  This gave me the same error in make, so I don't think my compile of OpenVINO was the issue.

First, my CMAKE output:

 

 

-- General configuration for OpenCV 4.9.0 =====================================                                                                                    
--   Version control:               unknown                                                                                                                        
--                                                                                                                                                                 
--   Extra modules:                                                                                                                                                
--     Location (extra):            /opencv/opencv_contrib/modules                                                                                                 
--     Version control (extra):     unknown                                                                                                                        
--                                                                                                                                                                 
--   Platform:                                                                                                                                                     
--     Timestamp:                   2024-01-28T22:11:56Z                                                                                                           
--     Host:                        Linux 5.10.102.1-microsoft-standard-WSL2 x86_64                                                                                
--     Target:                      Linux 1 aarch64                                                                                                                
--     CMake:                       3.18.4                                                                                                                         
--     CMake generator:             Unix Makefiles                                                                                                                 
--     CMake build tool:            /usr/bin/gmake                                                                                                                 
--     Configuration:               Release                                                                                                                        
--                                                                                                                                                                 
--   CPU/HW features:                                                                                                                                              
--     Baseline:                    NEON                                                                                                                           
--       required:                  NEON                                                                                                                           
--       disabled:                  VFPV3                                                                                                                          
--     Dispatched code generation:  NEON_DOTPROD NEON_FP16 NEON_BF16                                                                                               
--       requested:                 NEON_FP16 NEON_BF16 NEON_DOTPROD                                                                                               
--       NEON_DOTPROD (1 files):    + NEON_DOTPROD                                                                                                                 
--       NEON_FP16 (2 files):       + NEON_FP16                                                                                                                    
--       NEON_BF16 (0 files):       + NEON_BF16                                                                                                                    
--                                                                                                                                                                 
--   C/C++:                                                                                                                                                        
--     Built as dynamic libs?:      YES                                                                                                                            
--     C++ standard:                11                                                                                                                             
--     C++ Compiler:                /usr/bin/aarch64-linux-gnu-g++  (ver 10.2.1)                                                                                   
--     C++ flags (Release):         -fdata-sections -Wa,--noexecstack -fsigned-char -Wno-psabi   -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections   -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG                                                                             
--     C++ flags (Debug):           -fdata-sections -Wa,--noexecstack -fsigned-char -Wno-psabi   -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections   -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG                                                                           
--     C Compiler:                  /usr/bin/aarch64-linux-gnu-gcc                                                                                                 
--     C flags (Release):           -fdata-sections -Wa,--noexecstack -fsigned-char -Wno-psabi   -fsigned-char -W -Wall -Wreturn-type -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections   -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG                                                                                                                                                
--     C flags (Debug):             -fdata-sections -Wa,--noexecstack -fsigned-char -Wno-psabi   -fsigned-char -W -Wall -Wreturn-type -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections   -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG                                                                                                                                              
--     Linker flags (Release):      -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now   -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined                                                                                                                                                            
--     Linker flags (Debug):        -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now   -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined                                                                                                                                                            
--     ccache:                      NO                                                                                                                             
--     Precompiled headers:         NO                                                                                                                             
--     Extra dependencies:          dl m pthread rt                                                                                                                
--     3rdparty dependencies:                                                                                                                                      
--                                                                                                                                                                 
--   OpenCV modules:                                                                                                                                               
--     To be built:                 aruco bgsegm bioinspired calib3d ccalib core datasets dnn dnn_objdetect dnn_superres dpm face features2d flann freetype fuzzy gapi hfs highgui img_hash imgcodecs imgproc intensity_transform line_descriptor mcc ml objdetect optflow phase_unwrapping photo plot python3 quality rapid reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking video videoio videostab wechat_qrcode xfeatures2d ximgproc xobjdetect xphoto                                                                                                                                                                 
--     Disabled:                    world                                                                                                                          
--     Disabled by dependency:      -                                                                                                                              
--     Unavailable:                 alphamat cannops cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv hdf java julia matlab ovis python2 sfm ts viz                                                                                       
--     Applications:                apps                                                                                                                           
--     Documentation:               NO                                                                                                                             
--     Non-free algorithms:         YES                                                                                                                            
--                                                                                                                                                                 
--   GUI:                           GTK2                                                                                                                           
--     GTK+:                        YES (ver 2.24.33)                                                                                                              
--       GThread :                  YES (ver 2.66.8)                                                                                                               
--       GtkGlExt:                  NO                                                                                                                             
--                                                                                                                                                                 
--   Media I/O:                                                                                                                                                    
--     ZLib:                        zlib (ver 1.3)                                                                                                                 
--     JPEG:                        libjpeg-turbo (ver 2.1.3-62)                                                                                                   
--     WEBP:                        build (ver encoder: 0x020f)                                                                                                    
--     PNG:                         build (ver 1.6.37)                                                                                                             
--     TIFF:                        build (ver 42 - 4.2.0)                                                                                                         
--     JPEG 2000:                   build (ver 2.5.0)                                                                                                              
--     HDR:                         YES                                                                                                                            
--     SUNRASTER:                   YES                                                                                                                            
--     PXM:                         YES                                                                                                                            
--     PFM:                         YES                                                                                                                            
--                                                                                                                                                                 
--   Video I/O:                                                                                                                                                    
--     DC1394:                      NO                                                                                                                             
--     FFMPEG:                      YES                                                                                                                            
--       avcodec:                   YES (58.91.100)                                                                                                                
--       avformat:                  YES (58.45.100)                                                                                                                
--       avutil:                    YES (56.51.100)                                                                                                                
--       swscale:                   YES (5.7.100)                                                                                                                  
--       avresample:                NO                                                                                                                             
--     GStreamer:                   YES (1.18.4)                                                                                                                   
--     v4l/v4l2:                    YES (linux/videodev2.h)                                                                                                        
--                                                                                                                                                                 
--   Parallel framework:            pthreads                                                                                                                       
--                                                                                                                                                                 
--   Trace:                         YES (with Intel ITT)                                                                                                           
--                                                                                                                                                                 
--   Other third-party libraries:                                                                                                                                  
--     Lapack:                      NO                                                                                                                             
--     Inference Engine:            YES (2022030000 / 2022.3.1)                                                                                                    
--         * libs:                  /openvino/runtime/lib/aarch64/libopenvino.so.2022.3.1                                                                          
--         * includes:              /openvino/runtime/include /openvino/runtime/include/ie                                                                         
--     nGraph:                      YES (2022.3.1)                                                                                                                 
--         * libs:                  /openvino/runtime/lib/aarch64/libopenvino.so.2022.3.1                                                                          
--         * includes:              /openvino/runtime/include /openvino/runtime/include/ie                                                                         
--     Custom HAL:                  YES (carotene (ver 0.0.1, Auto detected))                                                                                      
--     Protobuf:                    build (3.19.1)                                                                                                                 
--     Flatbuffers:                 builtin/3rdparty (23.5.9)                                                                                                      
--                                                                                                                                                                 
--   OpenCL:                        YES (no extra features)                                                                                                        
--     Include path:                /opencv/3rdparty/include/opencl/1.2                                                                                            
--     Link libraries:              Dynamic load                                                                                                                   
--                                                                                                                                                                 
--   Python 3:                                                                                                                                                     
--     Interpreter:                 /usr/bin/python3 (ver 3.9.2)                                                                                                   
--     Libraries:                   /usr/lib (ver 3.9.2)                                                                                                           
--     numpy:                       /usr/local/lib/python3.9/dist-packages/numpy/core/include (ver undefined - cannot be probed because of the cross-compilation)  
--     install path:                lib/python3.9/site-packages/cv2/python-3.9                                                                                     
--                                                                                                                                                                 
--   Python (for build):            /usr/bin/python3                                                                                                               
--                                                                                                                                                                 
--   Install to:                    /opencv/opencv_install                                                                                                         
-- -----------------------------------------------------------------  

 

 


This is the error:

 

 

[ 67%] Linking CXX executable ../../bin/opencv_model_diagnostics                                                                                                   
/usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: warning: libopenvino.so.2231, needed by ../../lib/libopencv_dnn.so.4.9.0, not found (try using -rpath or -rpath-link)                                                                                                                                   
/usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: ../../lib/libopencv_dnn.so.4.9.0: undefined reference to `ov::Shape::Shape()'        
/usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: ../../lib/libopencv_dnn.so.4.9.0: undefined reference to `ov::Any::Base::to_string[abi:cxx11]()'                                                                                                                                                        
/usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: ../../lib/libopencv_dnn.so.4.9.0: undefined reference to `ov::Node::evaluate_lower(std::vector<std::shared_ptr<ngraph::runtime::HostTensor>, std::allocator<std::shared_ptr<ngraph::runtime::HostTensor> > > const&) const'                             
/usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: ../../lib/libopencv_dnn.so.4.9.0: undefined reference to `ov::Node::get_default_output_index() const'                                                                                                                                                   
/usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: ../../lib/libopencv_dnn.so.4.9.0: undefined reference to `ov::pass::ModelPass::~ModelPass()'                                                                                                                                                            /usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: ../../lib/libopencv_dnn.so.4.9.0: undefined reference to `ov::Shape::Shape(std::vector<unsigned long, std::allocator<unsigned long> > const&)'                                                                                                          
/usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: ../../lib/libopencv_dnn.so.4.9.0: undefined reference to `ov::op::v0::FakeQuantize::FakeQuantize(ov::Output<ov::Node> const&, ov::Output<ov::Node> const&, ov::Output<ov::Node> const&, ov::Output<ov::Node> const&, ov::Output<ov::Node> const&, unsigned long, ov::op::AutoBroadcastSpec const&)'                                                                                                                        
/usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: ../../lib/libopencv_dnn.so.4.9.0: undefined reference to `vtable for ov::Any::Base'  
/usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: ../../lib/libopencv_dnn.so.4.9.0: undefined reference to `ov::op::v1::Reverse::Reverse(ov::Output<ov::Node> const&, ov::Output<ov::Node> const&, ov::op::v1::Reverse::Mode)'                                                                            
/usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/bin/ld: ../../lib/libopencv_dnn.so.4.9.0: undefined reference to `ov::Model::output(unsigned long)'        

(lots more removed)
                                                                                                                                collect2: error: ld returned 1 exit status                                                                                                                         
make[2]: *** [apps/model-diagnostics/CMakeFiles/opencv_model_diagnostics.dir/build.make:106: bin/opencv_model_diagnostics] Error 1                                 
make[1]: *** [CMakeFiles/Makefile2:6269: apps/model-diagnostics/CMakeFiles/opencv_model_diagnostics.dir/all] Error 2                                               
make[1]: *** Waiting for unfinished jobs....                                                      

Then at the very end:
[ 76%] Built target opencv_gapi                                                                                                                                    
make: *** [Makefile:182: all] Error 2      

 

 

So it says it can't find libopenvino.so.2231, but I can see that file exists.  I copied the errors from the compile with your pre-built OpenVINO.  If you can give me a pre-built arm 64 for 2021.4 like I had for raspberry pi (that works with opencv 4.5.5), I'm fine with that.  I don't care which version I have.  Like previously, I just need to use opencv dnn with OpenVINO backend to access my NCS2.

This is the dockerfile I used:

 

 

FROM debian:bullseye

USER root

RUN dpkg --add-architecture arm64 && \
    apt-get update && \
    apt-get install -y --no-install-recommends \
    crossbuild-essential-arm64 \
    cmake \
    pkg-config \
    wget \
    xz-utils \
    libgtk2.0-dev:arm64 \
    libpython3-dev:arm64 \
    python3-numpy \
    libgstreamer1.0-dev:arm64 \
    libgstreamer-plugins-base1.0-dev:arm64

RUN dpkg --add-architecture arm64 && \
    apt-get update && \
    apt-get install -y \
        libjpeg-dev:arm64 libtiff5-dev:arm64 libpng-dev:arm64 \
        libavcodec-dev:arm64 libavformat-dev:arm64 libswscale-dev:arm64 libv4l-dev:arm64 \
        libxvidcore-dev:arm64 libx264-dev:arm64 \
        libatlas-base-dev:arm64

# Install Inference Engine
RUN wget --no-check-certificate https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3.1/linux/l_openvino_toolkit_debian9_2022.3.1.9227.cf2c7da5689_arm64.tgz && \
    tar -xf l_openvino_toolkit_debian9_2022.3.1.9227.cf2c7da5689_arm64.tgz

 

 

And this is my cmake command:

 

 

cmake -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX="../opencv_install" \
    -DOPENCV_CONFIG_INSTALL_PATH="cmake" \
    -DCMAKE_TOOLCHAIN_FILE="../platforms/linux/aarch64-gnu.toolchain.cmake" \
    -DWITH_IPP=OFF \
    -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules \
    -DOPENCV_ENABLE_NONFREE=ON \
    -DBUILD_TESTS=OFF \
    -DBUILD_PERF_TESTS=OFF \
    -DOPENCV_ENABLE_PKG_CONFIG=ON \
    -DPKG_CONFIG_EXECUTABLE="/usr/bin/aarch64-linux-gnu-pkg-config" \
    -DPYTHON3_INCLUDE_PATH="/usr/include/python3.9" \
    -DPYTHON3_INCLUDE_DIR="/usr/include/python3.9" \
    -DPYTHON3_LIBRARY="/usr/lib" \
    -DPYTHON3_NUMPY_INCLUDE_DIRS="/usr/local/lib/python3.9/dist-packages/numpy/core/include" \
    -DPYTHON3_CVPY_SUFFIX=".cpython-39-aarch64-linux-gnu.so" \
    -DENABLE_NEON=ON \
    -DCPU_BASELINE="NEON" \
    -D WITH_INF_ENGINE=ON \
    -D InferenceEngine_DIR=/openvino/runtime/cmake \
    -D ngraph_DIR=/openvino/runtime/cmake \
    -D INF_ENGINE_RELEASE=2022030000 \
    -DENABLE_CXX11=ON ..

 

 

Thanks in advance for any help.

0 Kudos
15 Replies
Peh_Intel
Moderator
4,006 Views

Hi Paul32,


I was able to reproduce the issue as well. We will investigate it further and get back to you at the earliest.



Regards,

Peh


0 Kudos
Paul32
Novice
3,989 Views
0 Kudos
Paul32
Novice
3,789 Views

Hi Peh,

It's been a month.  Have you not had the time to look at this, or is it more complicated?  Do you have an ETA or outlook?

Thanks much!

0 Kudos
Peh_Intel
Moderator
3,745 Views

Hi Paul,


Sorry for taking too much time. 


However, I am still waiting for the updates from our engineering team as well. I will follow up with the team again. I will get back to you as soon as possible.



Regards,

Peh


0 Kudos
Peh_Intel
Moderator
3,571 Views

Hi Paul,

 

We have received the updates from our engineering team.

 

As the alternative, please cross-compile OpenVINO™ from source instead of using the pre-built OpenVINO for arm. Next, cross-compile OpenCV with the built OpenVINO™ and the resulting package will contain all the required files to use DNN module with Intermediate Representation (IR) files and MYRIAD device.

 

Please note that after downloading OpenCV files from GitHub repository, you have to manually modify ie_ngraph.cpp (https://github.com/opencv/opencv/blob/4.6.0/modules/dnn/src/ie_ngraph.cpp#L83) file locally.

 

Changes need to modify in ie_ngraph.cpp (Line 83):

static constexpr ngraph::NodeTypeInfo type_info{kOpenCVLayersType, static_cast<uint64_t>(0)};

 

Steps to cross-compile OpenVINO™ from source and OpenCV with the built OpenVINO™:

$ docker image build -t arm-plugin -f Dockerfile .

$ mkdir build

$ docker container run --rm -ti -v $PWD/build:/arm_cpu_plugin arm-plugin

# modify ie_ngraph.cpp file locally after OpenCV is downloaded from GitHub repository, the ie_ngraph.cpp file is located in build/opencv/modules/dnn/src/)

 

I attached an archive file that containing Dockerfile file, arm_cpu_plugin_build.sh file and OV_ARM_package.tar.gz package.

 

 

Regards,

Peh

 

0 Kudos
Paul32
Novice
3,549 Views

Hi Peh,

Thanks for getting back to me.  Just looking at the files led to two questions.  How am I supposed to edit the file when the build script downloads the opencv and compiles it?  You included the package tar file, but that isn't used by the docker instructions, so not obvious what it is for.

So far I just tried the dockerfile as is.  It fails with the following:

-- Found PythonInterp: /opt/python3.9_arm/bin/python3.9 (found suitable version "3.9.2", minimum required is "3")
CMake Error at /usr/local/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
 Could NOT find PythonLibs: Found unsuitable version "3.9.18", but required 
 is exact version "3.9.2" (found /opt/python3.9_arm/lib/libpython3.9.so) 
Call Stack (most recent call first):                                                                                                                        
  /usr/local/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:592 (_FPHSA_FAILURE_MESSAGE)                                                      
  /usr/local/share/cmake-3.20/Modules/FindPythonLibs.cmake:310 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)                                                          
  CMakeLists.txt:57 (find_package)                                                                                                                          
  CMakeLists.txt:111 (ov_check_python_build_conditions)   


-- Configuring incomplete, errors occurred!                                                                                                               
See also "/arm_cpu_plugin/openvino/pbuild/CMakeFiles/CMakeOutput.log".                                                                                    
See also "/arm_cpu_plugin/openvino/pbuild/CMakeFiles/CMakeError.log".                                                                                     
+ fail 13 OpenVINO python bindings build failed. Stopping                                                                                                 
+ [ 2 -lt 2 ]                                                                                                                                             
+ retval=13                                                                                                                                               
+ shift                                                                                                                                                   
+ echo OpenVINO python bindings build failed. Stopping                                                                                                    
OpenVINO python bindings build failed. Stopping                                                                                                           
+ exit 13      

My next step might be to try removing this python part (I don't think it's needed).

But looking at the tar package, it looks to have the compiled output.  So maybe I don't need your dockerfile/script and just use the package as input to the opencv compile I tried before.  I'll try that this weekend also.

0 Kudos
Paul32
Novice
3,545 Views

Another question.  Your post for the changing that line show version 4.6.0 of opencv, but the script is using 4.5.5, so which one is really needed?

0 Kudos
Peh_Intel
Moderator
3,537 Views

Hi Paul,

 

The package tar file is the output package after cross-compiling OpenVINO and OpenCV, which means that you need Dockerfile file and arm_cpu_plugin_build.sh file for cross-compiling in order to obtain OV_ARM_package.tar.gz package. On the other hand, you can directly untar OV_ARM_package.tar.gz package to your Raspberry Pi and start to use OpenCV DNN module.

 

I am cloning OpenCV branch 4.5.-openvino-2022.1.0. If you didn’t modify the ie_ngraph.cpp file, it will lead to failure when building OpenCV.

 

Initial (Line 83):

static constexpr ngraph::NodeTypeInfo type_info{kOpenCVLayersType, 0};

 

Changes need to make (Line 83):

static constexpr ngraph::NodeTypeInfo type_info{kOpenCVLayersType, static_cast<uint64_t>(0)};

 

 

According to the instructions, it will download OpenCV, OpenCV contrib and OpenVINO. Next, it will start building OpenVINO first before building OpenCV. During building OpenVINO, you can take the time to manually modify the ie_ngraph.cpp file.

 

 


Regards,

Peh

 


0 Kudos
Paul32
Novice
3,417 Views

Peh,

All I've had time to try so far is using the included tar file as input to an opencv compile.  It fails with the same problem that started this thread.  I guess I don't see how that line edit would fix that problem.

On the dockerfile, does it work as is for you?  I would think it should be the same regardless of the platform.

0 Kudos
Peh_Intel
Moderator
3,345 Views

Hi Paul,


Yes, the dockerfile works from my end. I build the docker on the host machine with Ubuntu 20.04. I didn't encountered the Python issue. 


Have you try directly untar OV_ARM_package.tar.gz package to your Raspberry Pi as the pre-built openvino-opencv packages for Raspberry Pi?



Regards,

Peh


0 Kudos
Paul32
Novice
3,228 Views

I rebuilt the image to get a shell instead of running the script (not thinking I could maybe override it in docker run) and it didn't get stuff from cache.  So I wonder if something changed that causes it to fail for me.  If that's the case, if you rebuild it might fail for you now.  But on the other hand, the dockerfile specifically installs 3.9.18 so why does the script expect an older version?

Anyway, trying the opencv compile after the python fails does work.  I also changed the Cmake to use my stuff (like getting the contrib installed), and that also worked.  So still don't really know what caused my original make fail.

I also earlier tried your package.tar and noticed two odd things.  This morning it had a false detect that I've never seen on this yolo (which I've run for a couple years).  It only failed on the NCS2 (using the opencv backend it didn't falsely detect).  I also tried it on my raspberry pi and it also detected it (I had saved a jpg to test it) with the NCS2.   Then I restarted the main script running both the opencv backend and the NCS (which I previously was running on the PI and comparing the results) and the first positive thing was detected by the NCS and not the opencv one.  Also very strange.  I had been running the opencv version for several months with no problem.  Later I'll try to get an image to test this miss and see if it is just your version or not (no more time this weekend).

0 Kudos
Paul32
Novice
3,228 Views

One more thing I forgot to post.  Your version generates this error when I start up (that never occurred on the raspberry pi version):
(python3:1126): dbind-WARNING **: 22:32:36.480: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files

0 Kudos
Peh_Intel
Moderator
3,173 Views

Hi Paul,


It seems that the provided OV_ARM_package.tar.gz package does not help much. 


How's about your own compile package file as you mentioned you get it work in the end?



Regards,

Peh


0 Kudos
Paul32
Novice
2,858 Views

Hi Peh,

I've run this more, and see no difference in detection between your package, my compile, and the Raspberry pi version.  The difference from my previous runs (on the pi) is the 4K images (my reason to get the new arm64 board) to detect smaller images (that didn't look proper in a 640x480 image).  If I crop an image that doesn't work with the opencv backend, I can get it to detect it, so the missing detects are more too small an object.  The false detect gives a result that is way  too big, so there is an easy way to filter that out.  The last thing, about that minor warning I was getting, a web search on that error found a package to install to get rid of that, which also worked.

So the net is this is working.  Thanks again for all your help on this.

 

0 Kudos
Peh_Intel
Moderator
2,762 Views

Hi Paul32,


Thanks for confirming it is working. I'm glad that I was able to help.


This thread will no longer be monitored since this issue has been resolved. If you need any additional information from Intel, please submit a new question.



Regards,

Yu Chern


0 Kudos
Reply