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 read onnx and obtain names, imgsz #6130

Open
monkeycc opened this issue May 5, 2024 · 3 comments
Open

How to read onnx and obtain names, imgsz #6130

monkeycc opened this issue May 5, 2024 · 3 comments
Labels
question Questions about ONNX

Comments

@monkeycc
Copy link

monkeycc commented May 5, 2024

微信截图_20240505183051

python
How to read onnx and obtain names, imgsz,task
task
imgsz
names

@monkeycc monkeycc added the question Questions about ONNX label May 5, 2024
@linkerzhang
Copy link
Member

linkerzhang commented May 6, 2024

I'm not sure that I understand your question properly.

"task" means the usage of your model (in this case it's a detection model - given an image, the model will tell you what it is).
"imgsz" means the image size of your model input.
"names" seems to be all image categories that your model may figure out.

if you want to get these meta data programmatically, you may check the .proto file format, which may tell you how to fetch all these fields.

@justinchuby
Copy link
Contributor

I suspect they are stored in the metadata_props field. You may check model.metadata_props for them.

@gramalingam
Copy link
Contributor

Check here for how to load an onnx model. (For more information, protobuf's generated python API documentation will tell you about the different fields.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions about ONNX
Projects
None yet
Development

No branches or pull requests

4 participants