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

Convert *.h5 (keras model) into *.pb and *.pbtxt (tensorflow model), and load them by opencv dnn #463

Open
namnguyenphuong10 opened this issue Dec 10, 2020 · 0 comments

Comments

@namnguyenphuong10
Copy link

I converted completely keras model (full yolo v2) into tensorflow model, then i loaded them by tensorflow and carried out exactly however i can not load them by cv2.dnn.readNetFromTensorflow().
I got a problem while loading tensorflow model by using dnn.

Code bellow:

import cv2
net = cv2.dnn.readNetFromTensorflow('model.pb', './model.pbtxt')

error: OpenCV(4.2.0) /io/opencv/modules/dnn/src/tensorflow/tf_importer.cpp:663: error: (-215:Assertion failed) const_layers.insert(std::make_pair(name, li)).second in function 'addConstNodes'

Did anyone get the same issue and seek out solutions? Thanks a lot.

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