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

Converting from .pt to .onnx not working correctly. #53

Open
GeneralSyb opened this issue Apr 1, 2022 · 4 comments
Open

Converting from .pt to .onnx not working correctly. #53

GeneralSyb opened this issue Apr 1, 2022 · 4 comments

Comments

@GeneralSyb
Copy link

I've been trying to get my own models working in the .onnx type, but when it is exported to .onnx it doesn't find anything in an image. The results in pytorch are pretty good, but even converting models like coco don't work.

I saw this issue: #51, but he seems to have fixed it by adding more image or something?

@sstainba
Copy link

I don't understand wtf he said fixed it... BUT... I was having the same issue and the key was the "Dimensions" property on the inherited class. I left it as the default cause I have no idea what it means. Didn't find anything. But, I used Netron to inspect my ONNX file and the output was of type float32[1, 25200, 6]. I guessed that the last dimension in the tensor was the "Dimensions" here... and then BAM. 88% confidence.

@GeneralSyb
Copy link
Author

Sorry for the late reply, I was on vacation.

Thank you for your reply, but which inherited class do you mean? I can't seem to find anything with a Dimensions property.

@sstainba
Copy link

sstainba commented Aug 5, 2022

the inherited class you write. for a custom model, he says you have to inherit from the yolomodel base class. it has a property for "dimensions." but, after reading more, i think it actually means the dimensions of the float array (which in this case is 3). i think it only seemed to work for me because 6 is a multiple of 3.

@GeneralSyb
Copy link
Author

I didn't write any inherited class, I'm pretty sure. I used this to train and create my onnx file.

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

2 participants