Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: AttributeError: module 'cv2' has no attribute 'dnn' #1

Closed
nullbyte91 opened this issue Aug 4, 2018 · 5 comments
Closed

Error: AttributeError: module 'cv2' has no attribute 'dnn' #1

nullbyte91 opened this issue Aug 4, 2018 · 5 comments

Comments

@nullbyte91
Copy link

When I execute the below command on Python openCV virtual environment, I am getting an error.

$ python yolo_opencv.py --image dog.jpg --config yolov3.cfg --weights yolov3.weights --classes yolov3.txt

Error Logs:
Traceback (most recent call last):
File "yolo_opencv.py", line 59, in
net = cv2.dnn.readNet(args.weights, args.config)
AttributeError: module 'cv2' has no attribute 'dnn'

@arunponnusamy
Copy link
Owner

Hello @nullbyte91,

May I know how did you install OpenCV Python bindings ? Did you compile it from source from the OpenCV master branch ?

@nullbyte91
Copy link
Author

Yes. I compile it from source. But, I'm using the OpenCV 3.1.0 Version which doesn't have dnn module. Now I'm moving to 3.4.

@nullbyte91
Copy link
Author

Yes. deep neural network available from OpenCV 3.3 V. So, I could able to this with the latest version.

@muskanpriya15
Copy link

When I run my program I got this error(AttributeError: module 'cv2' has no attribute 'Dnn'). My opencv version is 4.5.4 still I got error.

@idrismerdefi
Copy link

i have same issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants