From ce36fd16af97de6a14e884b458f7328d998227d9 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Thu, 18 Jan 2024 14:16:51 -0700 Subject: [PATCH] Use different box variation to designate when an object is stationary on debug --- frigate/object_processing.py | 8 ++++++-- frigate/track/norfair_tracker.py | 4 +--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/frigate/object_processing.py b/frigate/object_processing.py index 68cac4ec0..f3bb54adc 100644 --- a/frigate/object_processing.py +++ b/frigate/object_processing.py @@ -489,8 +489,12 @@ class CameraState: # draw the bounding boxes on the frame for obj in tracked_objects.values(): if obj["frame_time"] == frame_time: - thickness = 2 - color = self.config.model.colormap[obj["label"]] + if obj["stationary"]: + color = (220, 220, 220) + thickness = 1 + else: + thickness = 2 + color = self.config.model.colormap[obj["label"]] else: thickness = 1 color = (255, 0, 0) diff --git a/frigate/track/norfair_tracker.py b/frigate/track/norfair_tracker.py index a68af308b..cb42ff52e 100644 --- a/frigate/track/norfair_tracker.py +++ b/frigate/track/norfair_tracker.py @@ -220,9 +220,7 @@ class NorfairTracker(ObjectTracker): id = self.track_id_map[track_id] self.disappeared[id] = 0 # update the motionless count if the object has not moved to a new position - if self.update_position( - id, obj["box"], self.tracked_objects[id]["motionless_count"] > 1 - ): + if self.update_position(id, obj["box"]): self.tracked_objects[id]["motionless_count"] += 1 if self.is_expired(id): self.deregister(id, track_id)