I built the OpenCV from the source to access GPU inference on Cuda using this great tutorial on windows. I tested the yolov3 inference (using cv2.dnn
method) on GPU and it worked fine.
but after I installed another package named mediapipe
using pip, the cv2 throw an error DLL load failed error when importing cv2
, which of course is because of the fact that mediapipe installation also includes the opencv-python-contrib
package.
Now I was wondering if there is any probable solution to fix this problem that avoids building OpenCV again from the source and does the things all over again.
I would appreciate it if you could specify solutions in detail.
OK, I fixed the problem using these steps:
opencv-python
and opencv-python-contrib
using pip
. please note that mediapipe
was not removed.So I did not find any shortcut to this issue, and we should run all the building process again.