From 3b99fb78c767469f0ef5ff9d805e663a3a844f3a Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Fri, 25 Oct 2024 12:19:46 -0500 Subject: [PATCH] don't process for stationary cars --- frigate/embeddings/maintainer.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frigate/embeddings/maintainer.py b/frigate/embeddings/maintainer.py index 0226917c6..66a8f0e9d 100644 --- a/frigate/embeddings/maintainer.py +++ b/frigate/embeddings/maintainer.py @@ -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: