Skip to content

ONNX export of custom trainset has weird shape #4054

Answered by Angele
Angele asked this question in Q&A
Discussion options

You must be logged in to vote

The shape is predictions times (stats + class prediction) .
Yolo5s makes 25200 predictions while Yolo5l makes 42588 by design.
Hence the [42588, (x, y, full_width, full_heigh, confidence, .... class predictions)]

So to get top left corner of your first rect make: ( output[0, 0] - output [0, 2] / 2 )
To see what prediction for class 0 is do output[0, 5]
To see if an object is there get output[0, 4]

The other outputs, like 104,104, 52,52 or 26,26 for yolo5l can be ignored, if you don't want to build your own yolo.

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@Angele
Comment options

Comment options

You must be logged in to vote
5 replies
@glenn-jocher
Comment options

@glenn-jocher
Comment options

@glenn-jocher
Comment options

@glenn-jocher
Comment options

@Angele
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Angele
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants