Does anyone know how to get bounding box coordinates which only passes threshold value?
I found this answer (here\'s a link), so I tried using it and done the following
Update:
The boxes
and scores
returned by previous functions are both numpy array objects, therefore you can use boolean indexing to filter out boxes below the threshold.
This should give you the box that passes the threshold.
true_boxes = boxes[0][scores[0] > min_score_thresh]
And then you can do
for i in range(true_boxes.shape[0]):
ymin = true_boxes[i,0]*height
xmin = true_boxes[i,1]*width
ymax = true_boxes[i,2]*height
xmax = true_boxes[i,3]*width
print ("Top left")
print (xmin,ymin,)
print ("Bottom right")
print (xmax,ymax)