I am just starting with computer vision. While running code I got the following error.
[INFO] loading model... Traceback (most recent call last): File "detect_faces_video.py", line 24, in net = cv2.dnn.readNetFromCaffe(args["prototxt"], args["model"]) AttributeError: module 'cv2' has no attribute 'dnn'
I believe that the error is because my opencv version is 3.1.0 and for this tutorial to work I need at least the 3.3.0 version.
So the better question would be, How can I upgrade my opencv to 3.3.0 from 3.1.0. Do I need to delete the 3.1.0 version first?
I have installed my opencv in a virtual environment.
Thanks
I got it to work by making another virtual environment. Then Installing the latest version of opencv.
$ mkvirtualenv cv
$ sudo pip3 install opencv-contrib-python
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With