Extracting class labels #5280
Replies: 4 comments 3 replies
-
Try reading the model as a protobuf file and extract information with protobuf APIs? |
Beta Was this translation helpful? Give feedback.
-
Have you tried this code:
The user, D Dowling, posted this snippet at Stack Overflow. Although my ONNX file gives "props" as an empty List. |
Beta Was this translation helpful? Give feedback.
-
UPDATE! my current solution is perhaps a bit primitive but functional for my purpose. i read the model as a .txt file and then look for the specific line expected before it
|
Beta Was this translation helpful? Give feedback.
-
@FishingBehindTheNet You mentioned that you read the ONNX file as TXT. When I see your code, you still used "load" function from "onnx" tool. Is correct? |
Beta Was this translation helpful? Give feedback.
-
I made an object detection model with YOLOv8 that I converted to an onnx model to make it faster on cpu. I want to extract the original label names used for annotation. I can see the labels in order in the onnx file when i open it as .txt file, but im not sure how to read this list with code. The goal is the list labels. Does anyone have a solution to get this data from the model?
Beta Was this translation helpful? Give feedback.
All reactions