mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-08-04 13:47:37 +02:00
Debug frame cache (#18697)
This commit is contained in:
parent
4a21b2f16d
commit
25cc2f31d4
@ -256,6 +256,7 @@ class CameraState:
|
|||||||
updated_ids = current_ids.intersection(previous_ids)
|
updated_ids = current_ids.intersection(previous_ids)
|
||||||
|
|
||||||
for id in new_ids:
|
for id in new_ids:
|
||||||
|
logger.debug(f"{self.name}: New tracked object ID: {id}")
|
||||||
new_obj = tracked_objects[id] = TrackedObject(
|
new_obj = tracked_objects[id] = TrackedObject(
|
||||||
self.config.model,
|
self.config.model,
|
||||||
self.camera_config,
|
self.camera_config,
|
||||||
@ -265,6 +266,7 @@ class CameraState:
|
|||||||
)
|
)
|
||||||
|
|
||||||
# add initial frame to frame cache
|
# 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)
|
self.frame_cache[frame_time] = np.copy(current_frame)
|
||||||
|
|
||||||
# save initial thumbnail data and best object
|
# 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
|
if t not in current_thumb_frames and t not in current_best_frames
|
||||||
]
|
]
|
||||||
for t in thumb_frames_to_delete:
|
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]
|
del self.frame_cache[t]
|
||||||
|
|
||||||
with self.current_frame_lock:
|
with self.current_frame_lock:
|
||||||
|
@ -350,6 +350,9 @@ class TrackedObject:
|
|||||||
|
|
||||||
self.obj_data.update(obj_data)
|
self.obj_data.update(obj_data)
|
||||||
self.current_zones = current_zones
|
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)
|
return (thumb_update, significant_change, path_update, autotracker_update)
|
||||||
|
|
||||||
def to_dict(self):
|
def to_dict(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user