Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Kulecz__Walter
New Contributor I
108 Views

Raspbian C++ example build fails on Pi3B+ works on Pi3B

I'm using 2019R1: l_openvino_toolkit_raspbi_p_2019.1.094.tgz

I modified setupvars.sh to fix the PYTHONPATH problem discovered/mentioned in another thread here.

 

It completed with some warning on my Pi3B, but repeating the installation on my Pi3B+ fails:

cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-march=armv7-a" ~/inference_engine_vpu_arm/deployment_tools/inference_engine/samples

make -j2 object_detection_sample_ssd

results in:

/home/pi/inference_engine_vpu_arm/deployment_tools/inference_engine/src/extension/ext_spatial_transformer.cpp:74:39: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
                     for (int t = 0; t < output_W_; ++t) {
                                     ~~^~~~~~~~~~~
/home/pi/inference_engine_vpu_arm/deployment_tools/inference_engine/src/extension/ext_spatial_transformer.cpp:39:16: error: unused variable ‘data_size’ [-Werror=unused-variable]
         size_t data_size = inputs[0]->size();
                ^~~~~~~~~
cc1plus: all warnings being treated as errors
ie_cpu_extension/CMakeFiles/ie_cpu_extension.dir/build.make:806: recipe for target 'ie_cpu_extension/CMakeFiles/ie_cpu_extension.dir/ext_spatial_transformer.cpp.o' failed
make[3]: *** [ie_cpu_extension/CMakeFiles/ie_cpu_extension.dir/ext_spatial_transformer.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:195: recipe for target 'ie_cpu_extension/CMakeFiles/ie_cpu_extension.dir/all' failed
make[2]: *** [ie_cpu_extension/CMakeFiles/ie_cpu_extension.dir/all] Error 2
CMakeFiles/Makefile2:1537: recipe for target 'object_detection_sample_ssd/CMakeFiles/object_detection_sample_ssd.dir/rule' failed
make[1]: *** [object_detection_sample_ssd/CMakeFiles/object_detection_sample_ssd.dir/rule] Error 2
Makefile:487: recipe for target 'object_detection_sample_ssd' failed
make: *** [object_detection_sample_ssd] Error 2
 

 

I just repeated the installation on another one of my Pi3B and the c++ build completed fine, although it threw multiple screens of  warnings:

[ 96%] Building CXX object object_detection_sample_ssd/CMakeFiles/object_detection_sample_ssd.dir/main.cpp.o
In file included from /usr/include/c++/6/algorithm:62:0,
                 from /home/pi/inference_engine_vpu_arm/deployment_tools/inference_engine/samples/object_detection_sample_ssd/main.cpp:16:
/usr/include/c++/6/bits/stl_algo.h: In function ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char>, InferenceEngine::InferenceEngineProfileInfo>*, std::vector<std::pair<std::__cxx11::basic_string<char>, InferenceEngine::InferenceEngineProfileInfo> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<perfCountersSorted(std::map<std::__cxx11::basic_string<char>, InferenceEngine::InferenceEngineProfileInfo>)::<lambda(const perfItem&, const perfItem&)> >]’:
/usr/include/c++/6/bits/stl_algo.h:1837:5: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char>, InferenceEngine::InferenceEngineProfileInfo>*, std::vector<std::pair<std::__cxx11::basic_string<char>, InferenceEngine::InferenceEngineProfileInfo> > >’ will change in GCC 7.1
     __insertion_sort(_RandomAccessIterator __first,
     ^~~~~~~~~~~~~~~~
/usr/include/c++/6/bits/stl_algo.h:1837:5: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char>, InferenceEngine::InferenceEngineProfileInfo>*, std::vector<std::pair<std::__cxx11::basic_string<char>, InferenceEngine::InferenceEngineProfileInfo> > >’ will change in GCC 7.1
/usr/include/c++/6/bits/stl_algo.h: In function ‘void std::__merge_sort_with_buffer(_RandomAccessIterator, _RandomAccessIterator, _Pointer, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char>, InferenceEngine::InferenceEngineProfileInfo>*, std::vector<std::pair<std::__cxx11::basic_string<char>, InferenceEngine::InferenceEngineProfileInfo> > >; _Pointer = std::pair<std::__cxx11::basic_string<char>, InferenceEngine::InferenceEngineProfileInfo>*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<perfCountersSorted(std::map<std::__cxx11::basic_string<char>, InferenceEngine::InferenceEngineProfileInfo>)::<lambda(const perfItem&, const perfItem&)> >]’:
/usr/include/c++/6/bits/stl_algo.h:2702:5: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char>, InferenceEngine::InferenceEngineProfileInfo>*, std::vector<std::pair<std::__cxx11::basic_string<char>, InferenceEngine::InferenceEngineProfileInfo> > >’ will change in GCC 7.1
     __merge_sort_with_buffer(_RandomAccessIterator __first,
     ^~~~~~~~~~~~~~~~~~~~~~~~
....

 InferenceEngine::InferenceEngineProfileInfo> > >’ will change in GCC 7.1
  std::__inplace_stable_sort(__first, __last, __comp);
  ^~~
/usr/include/c++/6/bits/stl_algo.h:4879:2: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char>, InferenceEngine::InferenceEngineProfileInfo>*, std::vector<std::pair<std::__cxx11::basic_string<char>, InferenceEngine::InferenceEngineProfileInfo> > >’ will change in GCC 7.1
  std::__stable_sort_adaptive(__first, __last, __buf.begin(),
  ^~~
[100%] Linking CXX executable ../armv7l/Release/object_detection_sample_ssd
[100%] Built target object_detection_sample_ssd
 

It apparently ran correctly, producing the out_0.bmp file with a box drawn around the face in my test image:

[ INFO ] Image out_0.bmp created!

total inference time: 141.663
Average running time of one iteration: 141.663 ms

Throughput: 7.05898 FPS

[ INFO ] Execution successful
 

 

I'm mystified as to why it works on the Pi3 and not the Pi3B+  Both ssytems are apt-get update, apt-get upgrade current (within a day or two).

 

 

 

 

0 Kudos
3 Replies
Kulecz__Walter
New Contributor I
108 Views

Extra info:

I hacked on setupvars.sh and got the .094 Raspbian OpenVINO installed on an Odroid XU-4 running Ubuntu-Mate16.  The UX-4 is a Pi-like computer with 8 cores, USB3, and GigE, about 40% more expensive than the Pi3B+

The C++  sample compiled without warnings and the binary ran successfully.

I was also able to get it installed on a new XU-4 that shipped with Ubuntu-Mate18, although I had to "sideload" Python 3.5 since Ubuntu18 comes with 3.6, and install in a Python virtual environment.

The C++ example compiled with what looks to be the same warnings I got on the P3B build, but in any event the build completed and the binary ran fine.

 

I'll share my hacked setupvars.sh if anyone is interested.

It wouldn't be hard for Intel to "officially" support this board when it runs Mate16.  Looking through setupvars.sh it looks like Ubuntu 18 support is being worked on, Python 3.6 seems to be the issue.  I thought odd numbered releases were supposed to be "stable" so I'm not understaning why Ubuntu18 went with 3.6 if 3.7 isn't ready.

But there appears to be performance issues with Mate18.

Using an NCS2 I only got 8.36 fts "througput" with the C++ example compared to 11.5 running it on Mate16 and I got  8.22 fps on Mate16 with the original NCS.

Kulecz__Walter
New Contributor I
108 Views

If I fix all the warning lines:

/home/pi/inference_engine_vpu_arm/deployment_tools/inference_engine/src/extension/ext_spatial_transformer.cpp:53:27: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         for (int i = 0; i < output_H_ * output_W_; ++i) {
                         ~~^~~~~~~~~~~~~~~~~~~~~~~
to:     for (unsigned int i =0;

It compiles and runs.  But its not the end of the warnings, although things like:

/usr/include/c++/6/bits/stl_algo.h:1837:5: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char>, InferenceEngine::InferenceEngineProfileInfo>*, std::vector<std::pair<std::__cxx11::basic_string<char>, InferenceEngine::InferenceEngineProfileInfo> > >’ will change in GCC 7.1
     __insertion_sort(_RandomAccessIterator __first,
     ^~~~~~~~~~~~~~~~
Don't break the build.

 

Words cannot express how much I've always despised cmake.  This just adds to the reasons.  Why does it work on the Pi3B, and Ubuntu-Mate Odroids but not the Pi3B+ ??

I think all the warnings that don't break the build should be an embarrassment to the OpenVINO team.  But I guess that is just me.  Its hard enough to learn this stuff, and when the demos/samples throw multiple screens of warnings it sure don't help!

 

 

Alawami__Ahmed
Beginner
108 Views

 

I have it working on Pi3B+ with Raspbian scratch following the directions here (https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_raspbian.html) .

I did have the following error when running inference using the openCV API:

 

Traceback (most recent call last):
  File "openvino_fd_myraid.py", line 14, in <module>
    blob = cv.dnn.blobFromImage(frame, size=(672, 384), ddepth=cv.CV_8U)
cv2.error: OpenCV(4.1.0-openvino) /home/jenkins/workspace/OpenCV/OpenVINO/build/opencv/modules/imgproc/src/resize.cpp:3718: error: (-215:Assertion failed) !ssize.empty() in function 'resize'
 

 

Reply