How to convert YOLOv8 raw output to bounding box coordinates and class probabilities #7950
Unanswered
Santabot123
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I trained a custom object detection model using ultralytics and converted it to Tensorflow Lite format.
Now when I make a prediction for an image (640x640x3) using the tflite model, the result is a tensor of the shape [1, 7, 8400].
I found out that in [1, 7, 8400]:
1 - is batch size
7 - 4 bounding box coordinates(x_center, y_center, width, height) + 3 probability each class
8400 - 640 pixels/8 =80; 80x80=6400. 640 pixels/16=40; 40x40= 1600. 640 pixels/32=20; 20x20=400. 6400+1600+400=8400
I am looking for a way to decode this tensor to bounding box coordinates and class probabilities. Is there any ready-made solution ?
Beta Was this translation helpful? Give feedback.
All reactions