mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-03 22:04:53 +03:00
Consider LP that are not sub label
This commit is contained in:
parent
759bf6f7d4
commit
c0cef65a9f
@ -398,19 +398,20 @@ 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:
|
|
||||||
obj_label = updated_obj.obj_data.get("label")
|
|
||||||
if (
|
if (
|
||||||
obj_label == "person"
|
obj_label == "person"
|
||||||
and self.face_recognition_min_obj_area > 0
|
and self.face_recognition_min_obj_area > 0
|
||||||
and obj_area >= self.face_recognition_min_obj_area
|
and obj_area >= self.face_recognition_min_obj_area
|
||||||
|
and updated_obj.obj_data.get("sub_label") is None
|
||||||
) 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
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user