How To Get The Multiple Bounding Box Coordinates In Tensorflow Object-detection Api
I want to get the multiple bounding boxes co-ordinates and the class of each bounding box and return it as a JSON file. when I print boxes[] from the following code, It has a shap
Solution 1:
I followed this answer here link and I found all of my bounding box coordinates:
min_score_thresh=0.60
true_boxes = boxes[0][scores[0] > min_score_thresh]
for i in range(true_boxes.shape[0]):
ymin = int(true_boxes[i,0]*height)
xmin = int(true_boxes[i,1]*width)
ymax = int(true_boxes[i,2]*height)
xmax = int(true_boxes[i,3]*width)
roi = image[ymin:ymax,xmin:xmax].copy()
cv2.imwrite("box_{}.jpg".format(str(i)), roi)
Post a Comment for "How To Get The Multiple Bounding Box Coordinates In Tensorflow Object-detection Api"