Implement API for predictions

This commit is contained in:
2023-02-16 13:53:25 +01:00
parent 8a9c3c1edc
commit 19e538bdff
2 changed files with 122 additions and 20 deletions
+1
View File
@@ -5,6 +5,7 @@ def draw_boxes(image, bboxes):
img = image.copy()
for idx, bbox in enumerate(bboxes):
xmin, ymin, xmax, ymax = bbox
xmin, ymin, xmax, ymax = int(xmin), int(ymin), int(xmax), int(ymax)
# Draw bounding box and number on original image
img = cv2.rectangle(img, (xmin, ymin), (xmax, ymax), (0, 255, 0), 2)
img = cv2.putText(img, str(idx), (xmin + 5, ymin + 25),