diff --git a/frigate/camera/state.py b/frigate/camera/state.py index e5a9ada9d..025bf1266 100644 --- a/frigate/camera/state.py +++ b/frigate/camera/state.py @@ -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) if attribute['label'] in ['license_plate', 'face'] else ''}", thickness=thickness, color=color, ) diff --git a/frigate/track/tracked_object.py b/frigate/track/tracked_object.py index 141a7a3d5..e4dd29639 100644 --- a/frigate/track/tracked_object.py +++ b/frigate/track/tracked_object.py @@ -474,6 +474,7 @@ class TrackedObject: # draw any attributes for attribute in self.thumbnail_data["attributes"]: box = attribute["box"] + box_area = int((box[2] - box[0]) * (box[3] - box[1])) draw_box_with_label( best_frame, box[0], @@ -481,7 +482,7 @@ class TrackedObject: box[2], box[3], attribute["label"], - f"{attribute['score']:.0%}", + f"{attribute['score']:.0%}{' ' + str(box_area) if attribute['label'] in ['license_plate', 'face'] else ''}", thickness=thickness, color=color, )