Skip to content

Commit e9d528e

Browse files
committed
fixed typo on yolo object detection tutorial
1 parent a0f3a50 commit e9d528e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

machine-learning/object-detection/live_yolo_opencv.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979

8080
color = [int(c) for c in COLORS[class_ids[i]]]
8181
cv2.rectangle(image, (x, y), (x + w, y + h), color=color, thickness=thickness)
82-
text = f"{LABEL[class_ids[i]]}: {confidences[i]:.2f}"
82+
text = f"{LABELS[class_ids[i]]}: {confidences[i]:.2f}"
8383
# calculate text width & height to draw the transparent boxes as background of the text
8484
(text_width, text_height) = cv2.getTextSize(text, cv2.FONT_HERSHEY_SIMPLEX, fontScale=font_scale, thickness=thickness)[0]
8585
text_offset_x = x

0 commit comments

Comments
 (0)