Skip to content

NVR with realtime local object detection for IP cameras

Debug frame cache (#18697)

Josh Hawkins25cc2f31d4a7
diff --git a/frigate/camera/state.py b/frigate/camera/state.py
index d863d10401..8bceca43cd 100644
--- a/frigate/camera/state.py
+++ b/frigate/camera/state.py
@@ -256,6 +256,7 @@ class CameraState:
updated_ids = current_ids.intersection(previous_ids)
for id in new_ids:
+ logger.debug(f"{self.name}: New tracked object ID: {id}")
new_obj = tracked_objects[id] = TrackedObject(
self.config.model,
self.camera_config,
@@ -265,6 +266,7 @@ class CameraState:
)
# add initial frame to frame cache
+ logger.debug(f"{self.name}: Adding {frame_time} to frame cache for {id}")
self.frame_cache[frame_time] = np.copy(current_frame)
# save initial thumbnail data and best object
@@ -429,6 +431,9 @@ class CameraState:
if t not in current_thumb_frames and t not in current_best_frames
]
for t in thumb_frames_to_delete:
+ logger.debug(
+ f"{self.name}: Deleting {t} from frame cache for {obj.obj_data['id']}"
+ )
del self.frame_cache[t]
with self.current_frame_lock:
diff --git a/frigate/track/tracked_object.py b/frigate/track/tracked_object.py
index 2852d89177..5f8b228e35 100644
--- a/frigate/track/tracked_object.py
+++ b/frigate/track/tracked_object.py
@@ -350,6 +350,9 @@ class TrackedObject:
self.obj_data.update(obj_data)
self.current_zones = current_zones
+ logger.debug(
+ f"{self.camera_config.name}: Updating {obj_data['id']}: thumb update? {thumb_update}, significant change? {significant_change}, path update? {path_update}, autotracker update? {autotracker_update} "
+ )
return (thumb_update, significant_change, path_update, autotracker_update)
def to_dict(self):