don't process for stationary cars

This commit is contained in:
Josh Hawkins 2024-10-25 12:19:46 -05:00
parent 0dfc1967cc
commit 3b99fb78c7

View File

@ -486,14 +486,19 @@ class EmbeddingMaintainer(threading.Thread):
def _process_license_plate(
self, obj_data: dict[str, any], frame: np.ndarray
) -> None:
"""Look for faces in image."""
"""Look for license plates in image."""
id = obj_data["id"]
# don't run for non person objects
# don't run for non car objects
if obj_data.get("label") != "car":
logger.debug("Not a processing license plate for non car object.")
return
# don't run for stationary car objects
if obj_data.get("stationary") == True:
logger.debug("Not a processing license plate for a stationary car object.")
return
# don't overwrite sub label for objects that have a sub label
# that is not a license plate
if obj_data.get("sub_label") and id not in self.detected_license_plates: