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

getting an error #3

Open
faroogfatma opened this issue Mar 5, 2021 · 1 comment
Open

getting an error #3

faroogfatma opened this issue Mar 5, 2021 · 1 comment

Comments

@faroogfatma
Copy link

error Traceback (most recent call last)
in ()
32 # load our YOLO object detector trained on COCO dataset (80 classes)
33 print("[INFO] loading YOLO from disk...")
---> 34 net = cv2.dnn.readNetFromDarknet(configPath, weightsPath)
35
36 # determine only the output layer names that we need from YOLO

error: OpenCV(4.1.2) /io/opencv/modules/dnn/src/darknet/darknet_importer.cpp:214: error: (-212:Parsing error) Failed to parse NetParameter file: /content/drive/My Drive/social-distance-detector/yolo-coco/yolov3.weights in function 'readNetFromDarknet'

@ghost
Copy link

ghost commented Sep 12, 2022

The dnn module of OpenCv can't get the path to your YOLO weights. You may keep in it in root folder of your program, or create folder within this root folder and copy the path to the weights. Also remember that weights comes before cfg.
cv2.dnn.readNetFromDarknet('weghtsPath', 'configPath')

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

1 participant