ObjectDetector.jl icon indicating copy to clipboard operation
ObjectDetector.jl copied to clipboard

Question on result returned by yolomod

Open ngiann opened this issue 1 year ago • 1 comments

I have a question regarding the following call in the provided example:

res = yolomod(batch, detectThresh=0.5, overlapThresh=0.8)

What do the numbers in res mean? I have only managed to figure out that the number of columns in res is the number of bounding boxes. But what do the entries in each column mean?

The reason I am asking is because I am interested in obtaining the size and position of the bounding boxes and I suspect this information must be somewhere in there.

Thanks for reading this.

ngiann avatar Jul 29 '24 06:07 ngiann

I think I managed to answer my own question by finding the relevant spot in the code. I located the following code in the file utils.jl:

bbox = results[1:4, i] .- padding
class = results[end-1, i]
conf = results[5,i]

The first four entries define the bounding box, the 5th entry is the confidence of the prediction and the penultimate entry is the class of the detected object. I should have figured this out earlier as the code is written in a very clean manner.

ngiann avatar Jul 29 '24 08:07 ngiann