This commit is contained in:
Josh Hawkins
2025-05-17 16:11:19 -06:00
committed by GitHub
parent ebae6cb1ed
commit 5d13925d2b
12 changed files with 45 additions and 14 deletions
+2 -1
View File
@@ -172,6 +172,7 @@ class CameraState:
# draw any attributes
for attribute in obj["current_attributes"]:
box = attribute["box"]
box_area = int((box[2] - box[0]) * (box[3] - box[1]))
draw_box_with_label(
frame_copy,
box[0],
@@ -179,7 +180,7 @@ class CameraState:
box[2],
box[3],
attribute["label"],
f"{attribute['score']:.0%}",
f"{attribute['score']:.0%} {str(box_area)}",
thickness=thickness,
color=color,
)