Skip to content

Commit

Permalink
Fix birdseye (blakeblackshear#15051)
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 authored Nov 18, 2024
1 parent 474c248 commit 26c3f9f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions frigate/output/birdseye.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def update_frame(self, frame: np.ndarray):
for cam, cam_data in self.cameras.items()
if self.config.cameras[cam].birdseye.enabled
and cam_data["last_active_frame"] > 0
and cam_data["current_frame"] - cam_data["last_active_frame"]
and cam_data["current_frame_time"] - cam_data["last_active_frame"]
< self.inactivity_threshold
]
)
Expand All @@ -405,7 +405,7 @@ def update_frame(self, frame: np.ndarray):
limited_active_cameras = sorted(
active_cameras,
key=lambda active_camera: (
self.cameras[active_camera]["current_frame"]
self.cameras[active_camera]["current_frame_time"]
- self.cameras[active_camera]["last_active_frame"]
),
)
Expand Down Expand Up @@ -517,7 +517,7 @@ def update_frame(self, frame: np.ndarray):
self.copy_to_position(
position[1],
position[0],
frame,
self.cameras[position[0]]["current_frame"],
)

return True
Expand Down Expand Up @@ -689,7 +689,8 @@ def update(
return False

# update the last active frame for the camera
self.cameras[camera]["current_frame"] = frame_time
self.cameras[camera]["current_frame"] = frame.copy()
self.cameras[camera]["current_frame_time"] = frame_time
if self.camera_active(camera_config.mode, object_count, motion_count):
self.cameras[camera]["last_active_frame"] = frame_time

Expand Down Expand Up @@ -755,7 +756,7 @@ def write_data(
current_tracked_objects: list[dict[str, any]],
motion_boxes: list[list[int]],
frame_time: float,
frame,
frame: np.ndarray,
) -> None:
# check if there is an updated config
while True:
Expand Down

0 comments on commit 26c3f9f

Please sign in to comment.