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

-212 Parsing error at Windows10 #18

Open
skykongkong8 opened this issue Feb 5, 2021 · 0 comments
Open

-212 Parsing error at Windows10 #18

skykongkong8 opened this issue Feb 5, 2021 · 0 comments

Comments

@skykongkong8
Copy link

skykongkong8 commented Feb 5, 2021

Have NO CLUE why this isnt working cuz it worked with THE SAME method at mac... Plz gimme any advice to solve my ```
problem..

`import cv2
import numpy
net = cv2.dnn.readNet("yolov3.weights", "yolov3.cfg")
classes = []
with open("coco.names", "r") as f:
    classes = [line.strip() for line in f.readlines()]
layer_names = net.getLayerNames()
output_layers = [layer_names[i[0] - 1] for i in net.getUnconnectedOutLayers()]
colors = np.random.uniform(0, 255, size=(len(classes), 3))
 `

and the error message is like: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-kh7iq4w7\opencv\modules\dnn\src\darknet\darknet_importer.cpp:207: error: (-212:Parsing error) Failed to parse NetParameter file: yolov3.cfg in function 'cv::dnn::dnn4_v20201117::readNetFromDarknet'

I had already tried the 'absolute path method' and the 'lowering the cv-py version method' but it seems both of them isnt my problem..

++ I also tried re-downloading the .cfg file since the error message seemed to have some problem with it, but it didnt make any progress. (I downloaded it from ) so guess the file source isnt the real problem

AYUDAME POR FAVOR

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