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

How to convert the models to ONNX? #26

Open
chenscottus opened this issue Oct 24, 2023 · 2 comments
Open

How to convert the models to ONNX? #26

chenscottus opened this issue Oct 24, 2023 · 2 comments

Comments

@chenscottus
Copy link

Hello,

 How to convert the models to ONNX?

 Thanks!

-Scott

@Itto1992
Copy link

Itto1992 commented Dec 4, 2023

@chenscottus
Firsr I tried to convert this model, it fails.
Because the model contains numpy operation in the forward method, which cannot be converted into ONNX.

Thus, you can convert the model by

  • replace all the numpy ops by torch ones
  • disjoint numpy ops (NMS) from the forward method

In actual, after commenting out all the numpy ops from YOWO class (https://github.com/yjh0410/YOWOv2/blob/master/models/yowo/yowo.py), I succeeded in conversion. (I have not checked the converted model is consistent with the one before conversion.)

@AI-ctrl
Copy link

AI-ctrl commented Dec 17, 2023

@Itto1992 can you provide the modified script because i also the same but converted model is giving same results for every input kind of a constant output.
Thanks

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

3 participants