Adding opencv from openvino

asked 2019-05-07 06:16:54 -0600

So I have been trying to run some dnn code but I get this error:

Build OpenCV with Inference Engine to enable loading models from Model Optimizer. in function 'readFromModelOptimizer'

When I run:

pip freeze

I get this:

opencv-contrib-python-headless==4.0.0.21
opencv-python==4.0.0.21

However if I run next lines of code:

import cv2
cv2.__version__

I get next result:

'3.4.6-dev'

I believe opencv was already compiled while compiling openvino and i also believe that it's not in some kind of environment and set globally, also in folder with openvino I have folder opencv, in there I have a file called setupvars.sh which contains:

#!/usr/bin/env bash
export PYTHONPATH=:/opt/intel/computer_vision_sdk_2018.5.445/opencv/cmake
export LD_LIBRARY_PATH=/opt/intel/computer_vision_sdk_2018.5.445/opencv/lib:$LD_LIBRARY_PATH
echo ${PYTHONPATH}

but I still get the same result when I run my dnn code. And also for some reason it points to a folder with cmake files

My question is : what exactly am I doing wrong.

System info

  • Ubuntu 16.04
  • OpenCV 4.0
  • Device name: upsquared
edit retag flag offensive close merge delete