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

opencv cannot read net - Error of "Unknown layer type" #17

Open
chenharel1 opened this issue Jun 5, 2019 · 0 comments
Open

opencv cannot read net - Error of "Unknown layer type" #17

chenharel1 opened this issue Jun 5, 2019 · 0 comments

Comments

@chenharel1
Copy link

Hello,
I am trying to use your code for running detection of yolo v1.
I use python 3.5
I use opencv 4.1.0
The error occurs in line 57:
net = cv2.dnn.readNet(args.weights, args.config)
It says:

cv2.error: OpenCV(4.1.0) /io/opencv/modules/dnn/src/darknet/darknet_io.cpp:668: error: (-212:Parsing error) Unknown layer type: connected in function 'ReadDarknetFromCfgStream'

I took the weights and config from the original Darknet.
I tried weights and cfg for yolov1, as well as for yolov1 tiny, but the same error happens for both.
On the other hand, when I tried weights and cfg for yolov3, it succeeded.
So, does cv2.dnn modules are not compatible with yolo1? Is that the problem or anything else?

Thanks!

@chenharel1 chenharel1 changed the title opencv cannot readNet - Error of "Unknown layer type" opencv cannot read net - Error of "Unknown layer type" Jun 5, 2019
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