From a3c0e30502f880cb78800a5f4eb2e8c2de30f290 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Fri, 20 Oct 2023 17:21:34 -0600 Subject: [PATCH] Use existing bounding box for region when object is stationary (#8248) --- frigate/video.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frigate/video.py b/frigate/video.py index a6d52dfc7..aa85a89df 100755 --- a/frigate/video.py +++ b/frigate/video.py @@ -607,7 +607,12 @@ def process_frames( # get tracked object boxes that aren't stationary tracked_object_boxes = [ - obj["estimate"] + ( + # use existing object box for stationary objects + obj["estimate"] + if obj["motionless_count"] < detect_config.stationary.threshold + else obj["box"] + ) for obj in object_tracker.tracked_objects.values() if obj["id"] not in stationary_object_ids ]