Receiving classification probability vectors of each predicted bbox #2724
Unanswered
johanenforcer
asked this question in
Q&A
Replies: 1 comment 2 replies
-
@johanenforcer yes that's correct. indices 5 onward are the class probabilities. 0-3 are the xywh box coordinates and 4 is the object confidence. For inference you can either use detect.py from the command line (or called from another python function) or YOLOv5 PyTorch Hub models directly in your own python code. For the Hub option see the PyTorch Hub tutorial: YOLOv5 Tutorials
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What I am looking to do is to run each sample of a pool consisting of unlabeled samples through a forward pass in in order to look at their softmax probability vectors to then later use this information. I assume in order to retrieve this information, I would have to call the detect.py with the chosen image files and store their probability vectors. I dont know whether my understanding is correct but does the x[:, 5:] in x[:, 5:] *= x[:, 4:5], represent the probability vector assuming the first 5 columns are xywhc?
Furthermore, from what I can see would I have to manually change the detect function so that it is callable instead of having to run it through cmd, by for example just inputting the parser information as arguments in the function call?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions