Add more vehicle types to default attribute map (#24097)
CI / AMD64 Build (push) Canceled after 0s
CI / ARM Build (push) Canceled after 0s
CI / Jetson Jetpack 6 (push) Canceled after 0s
CI / AMD64 Extra Build (push) Canceled after 0s
CI / ARM Extra Build (push) Canceled after 0s
CI / Synaptics Build (push) Canceled after 0s
CI / Assemble and push default build (push) Canceled after 0s

* run lpr on more vehicle types by default

before, a config change to attribute_map was required

* logging tweaks

* remove arg

* use attributes for frontend check

* docs

* only check thumbnail attributes the object can have
This commit is contained in:
Josh Hawkins
2026-08-26 08:23:15 -06:00
committed by GitHub
parent 18c77faea5
commit 5197881ef7
9 changed files with 47 additions and 46 deletions
+7 -2
View File
@@ -60,6 +60,11 @@ class CameraState:
# face/LPR pipelines when using a model without built-in detection.
self.face_recognition_min_obj_area: int = 0
self.lpr_min_obj_area: int = 0
self.lp_objects = {
label
for label, attributes in config.model.attributes_map.items()
if "license_plate" in attributes
}
if (
self.camera_config.face_recognition.enabled
@@ -452,7 +457,7 @@ class CameraState:
and obj_area >= self.face_recognition_min_obj_area
and updated_obj.obj_data.get("sub_label") is None
) or (
obj_label in ("car", "motorcycle")
obj_label in self.lp_objects
and self.lpr_min_obj_area > 0
and obj_area >= self.lpr_min_obj_area
and updated_obj.obj_data.get("sub_label") is None
@@ -548,7 +553,7 @@ class CameraState:
current_best.thumbnail_data is not None
and obj.thumbnail_data is not None
and is_better_thumbnail(
object_type,
obj.thumbnail_attributes,
current_best.thumbnail_data,
obj.thumbnail_data,
self.camera_config.frame_shape,