Show sub label in debug view if available

This commit is contained in:
Nick Mowen 2023-08-24 08:26:57 -06:00
parent 7c629c1874
commit 27052ec8bf

View File

@ -509,13 +509,14 @@ class CameraState:
# draw the bounding boxes on the frame
box = obj["box"]
text = obj["label"] if not obj.get("sub_label") else obj["sub_label"][0]
draw_box_with_label(
frame_copy,
box[0],
box[1],
box[2],
box[3],
obj["label"],
text,
f"{obj['score']:.0%} {int(obj['area'])}",
thickness=thickness,
color=color,