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

Trying to convert from Yolov5 pt to onxx and then to h5 keras #164

Open
SaulA01745146 opened this issue Jun 10, 2023 · 0 comments
Open

Trying to convert from Yolov5 pt to onxx and then to h5 keras #164

SaulA01745146 opened this issue Jun 10, 2023 · 0 comments

Comments

@SaulA01745146
Copy link

I trained my model using yolov5 and with ultralitics/yolov5 github repository converted it to a onnx model. I want to convert it to a h5 keras model but the code throws an exception.
`import onnx2keras
from onnx2keras import onnx_to_keras
import keras
import onnx

onnx_model = onnx.load('best.onnx')
k_model = onnx_to_keras(onnx_model,['images'],name_policy='renumerate')

keras.models.save_model(k_model,'kerasModel.h5',overwrite=True,include_optimizer=True)`

672d9b83-20aa-4b9b-9077-5f44fed28be7

Can someone tell me what can I do to fix this?

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