From 082867447b47e6bc0f916f8751ea342742ce3431 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Fri, 26 Sep 2025 06:03:59 -0600 Subject: [PATCH] Stationary bug fixes (#20225) * Correctly only enable for car * Fix limiting stationary objects history --- frigate/track/norfair_tracker.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frigate/track/norfair_tracker.py b/frigate/track/norfair_tracker.py index 9cddb17ed..6af2898cd 100644 --- a/frigate/track/norfair_tracker.py +++ b/frigate/track/norfair_tracker.py @@ -410,7 +410,7 @@ class NorfairTracker(ObjectTracker): # if there are more than 5 and less than 10 entries for the position, add the bounding box # and recompute the position box - if 5 <= len(position["xmins"]) < 10: + if len(position["xmins"]) < 10: position["xmins"].append(xmin) position["ymins"].append(ymin) position["xmaxs"].append(xmax) @@ -614,7 +614,11 @@ class NorfairTracker(ObjectTracker): self.tracked_objects[id]["estimate"] = new_obj["estimate"] # else update it else: - self.update(str(t.global_id), new_obj, yuv_frame) + self.update( + str(t.global_id), + new_obj, + yuv_frame if new_obj["label"] == "car" else None, + ) # clear expired tracks expired_ids = [k for k in self.track_id_map.keys() if k not in active_ids]