Consider LP that are not sub label

This commit is contained in:
Nicolas Mowen 2026-03-29 10:56:27 -06:00
parent 759bf6f7d4
commit c0cef65a9f

View File

@ -398,21 +398,22 @@ class CameraState:
# Fast-track to 1s for objects in the optimal size range for # Fast-track to 1s for objects in the optimal size range for
# secondary face/LPR recognition that don't yet have a sub_label. # secondary face/LPR recognition that don't yet have a sub_label.
obj_area = updated_obj.obj_data.get("area", 0) obj_area = updated_obj.obj_data.get("area", 0)
has_sub_label = updated_obj.obj_data.get("sub_label") is not None obj_label = updated_obj.obj_data.get("label")
publish_threshold = 5 publish_threshold = 5
if not has_sub_label: if (
obj_label = updated_obj.obj_data.get("label") obj_label == "person"
if ( and self.face_recognition_min_obj_area > 0
obj_label == "person" and obj_area >= self.face_recognition_min_obj_area
and self.face_recognition_min_obj_area > 0 and updated_obj.obj_data.get("sub_label") is None
and obj_area >= self.face_recognition_min_obj_area ) or (
) or ( obj_label in ("car", "motorcycle")
obj_label in ("car", "motorcycle") and self.lpr_min_obj_area > 0
and self.lpr_min_obj_area > 0 and obj_area >= self.lpr_min_obj_area
and obj_area >= self.lpr_min_obj_area and updated_obj.obj_data.get("sub_label") is None
): and updated_obj.obj_data.get("recognized_license_plate") is None
publish_threshold = 1 ):
publish_threshold = 1
if ( if (
( (