Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

RaspberryPI & OpenCV + Yolo: AttributeError: module 'cv2' has no attribute 'dnn'

Hi,

i want to use object detection with my raspberry pi 3 and zero with rasp_pi cam. i've followed the following: - OPENCV installed: https://www.youtube.com/watch?v=xlmJsTeZL3w - DARKNET installed: https://github.com/AlexeyAB/darknet

Everything is working if i pass an image (jpg).

i want the real time video streaming, so i use this code (part1 is working, it's not working part2/3): - CODE (part2): https://hills.ccsf.edu/~cluk1/cs231/project/code.html

i got this errors: pi@raspberrypi:~/darknet $ python3 test.py [INFO] loading YOLO from disk... Traceback (most recent call last): File "test.py", line 25, in <module> net = cv2.dnn.readNetFromDarknet(configPath, weightsPath) AttributeError: module 'cv2' has no attribute 'dnn' pi@raspberrypi:~/darknet $ python test.py [INFO] loading YOLO from disk... Traceback (most recent call last): File "test.py", line 25, in <module> net = cv2.dnn.readNetFromDarknet(configPath, weightsPath) AttributeError: 'module' object has no attribute 'dnn' pi@raspberrypi:~/darknet $ python test.py

it seems a mission impossible because it's one week i'm working on that without a solution. Can you please help me?

RaspberryPI & OpenCV + Yolo: AttributeError: module 'cv2' has no attribute 'dnn'

Hi,

i want to use object detection with my raspberry pi 3 and zero with rasp_pi cam. i've followed the following: - OPENCV installed: https://www.youtube.com/watch?v=xlmJsTeZL3w - DARKNET installed: https://github.com/AlexeyAB/darknet

Everything is working if i pass an image (jpg).

i want the real time video streaming, so i use this code (part1 is working, it's not working part2/3): - CODE (part2): https://hills.ccsf.edu/~cluk1/cs231/project/code.html

i got this errors: pi@raspberrypi:~/darknet $ python3 test.py [INFO] loading YOLO from disk... Traceback (most recent call last): File "test.py", line 25, in <module> net = cv2.dnn.readNetFromDarknet(configPath, weightsPath) AttributeError: module 'cv2' has no attribute 'dnn' 'dnn'

pi@raspberrypi:~/darknet $ python test.py [INFO] loading YOLO from disk... Traceback (most recent call last): File "test.py", line 25, in <module> net = cv2.dnn.readNetFromDarknet(configPath, weightsPath) AttributeError: 'module' object has no attribute 'dnn' pi@raspberrypi:~/darknet $ python test.py'dnn'

it seems a mission impossible because it's one week i'm working on that without a solution. Can you please help me?