'module' has no 'readNet'
See original GitHub issuehi,
i’m trying to use yolo but when i use the command
$ python yolo_opencv.py --image dog.jpg --config yolov3.cfg --weights yolov3.weights --classes yolov3.txt
i get the following error
Traceback (most recent call last):
File "yolo_opencv.py", line 57, in <module>
net = cv2.dnn.readNet(args.weights, args.config)
AttributeError: 'module' object has no attribute 'readNet'
i’m using python 2.7.12
if I use python 3
$ python3 yolo_opencv.py --image dog.jpg --config yolov3.cfg --weights yolov3.weights --classes yolov3.txt
i get this error
Traceback (most recent call last):
File "yolo_opencv.py", line 8, in <module>
import cv2
ImportError: /opt/ros/kinetic/lib/python2.7/dist-packages/cv2.so: undefined symbol: PyCObject_Type
how can i solve this error? (both would be nice, i would like to use python3 if it’s possible)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:33 (4 by maintainers)
Top Results From Across the Web
cv2.dnn' has no attribute 'readNet' using python 3.6 and ...
So, I tried pip uninstall opencv-python then pip install opencv-python and now I have the newest one (4.x) and cv2.dnn.readNet is now recognized ......
Read more >dnn, python3.6, cv3.4.1 object_detection error edit
readNet (args.model, args.config, args.framework) AttributeError: module 'cv2.dnn' has no attribute 'readNet' I can solve this by replacing ...
Read more >'module' object has no attribute 'readNet' Code Example
Answers related to “'module' object has no attribute 'readNet'”. AttributeError: module 'tensorflow' has no attribute 'GraphDef' ...
Read more >openvivo 2022.1 (pip install) run cv.dnn.readNet error
Download and install this OpenCV: Win pack with dnn module accelerated by ... OpenVINO from pip does not include OpenCV built with OpenVINO...
Read more >Sumolib - SUMO Documentation
sumolib is a set of python modules for working with sumo networks, ... The following named arguments may be given to the readNet...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
modify cv2.dnn.readNet to cv2.dnn.readNetFromDarknet
Use pip install opencv-python==4.0.0.21 should resolve your issue