From b5d82e7ae9aa2b29246a3974916f389daa7fcf15 Mon Sep 17 00:00:00 2001 From: "Omar M. Osman" Date: Fri, 5 Feb 2021 21:15:08 +0200 Subject: [PATCH] fix: use same color for labels and boxes --- imageai/Detection/YOLO/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imageai/Detection/YOLO/utils.py b/imageai/Detection/YOLO/utils.py index fdd8098e..f30160f3 100644 --- a/imageai/Detection/YOLO/utils.py +++ b/imageai/Detection/YOLO/utils.py @@ -357,7 +357,7 @@ def draw_boxes(image, box_points, draw_box, label, percentage_probability, color label = "{:.2f}".format(percentage_probability) if label is not None or percentage_probability is not None: - cv2.putText(image, label, (xmin, ymin - 13), cv2.FONT_HERSHEY_SIMPLEX, 1e-3 * image.shape[0], (255, 0, 0), 2) + cv2.putText(image, label, (xmin, ymin - 13), cv2.FONT_HERSHEY_SIMPLEX, 1e-3 * image.shape[0], color, 2) cv2.putText(image, label, (xmin, ymin - 13), cv2.FONT_HERSHEY_SIMPLEX, 1e-3 * image.shape[0], (255, 255, 255), 1) return image \ No newline at end of file