From 0cf78277b5c15f5f9ce19d252dd48decfa903848 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Sat, 14 Nov 2020 07:41:08 -0600 Subject: [PATCH] add some debug logging to frame cache --- docker/Dockerfile.base | 2 +- frigate/object_processing.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile.base b/docker/Dockerfile.base index 0d6cd9855..7a8d8c6fe 100644 --- a/docker/Dockerfile.base +++ b/docker/Dockerfile.base @@ -20,7 +20,7 @@ RUN apt-get -qq update \ python3-pip \ && pip3 install -U /wheels/*.whl \ && APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn apt-key adv --fetch-keys https://packages.cloud.google.com/apt/doc/apt-key.gpg \ - && echo "deb https://packages.cloud.google.com/apt coral-edgetpu-unstable main" > /etc/apt/sources.list.d/coral-edgetpu.list \ + && echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" > /etc/apt/sources.list.d/coral-edgetpu.list \ && echo "libedgetpu1-max libedgetpu/accepted-eula select true" | debconf-set-selections \ && apt-get -qq update && apt-get -qq install --no-install-recommends -y \ libedgetpu1-max=15.0 \ diff --git a/frigate/object_processing.py b/frigate/object_processing.py index 9df60240c..ce797ab28 100644 --- a/frigate/object_processing.py +++ b/frigate/object_processing.py @@ -311,6 +311,7 @@ class CameraState(): if (not updated_obj.false_positive and updated_obj.thumbnail_data['frame_time'] == frame_time and frame_time not in self.frame_cache): + logging.info(f"Adding {frame_time} to cache.") self.frame_cache[frame_time] = np.copy(current_frame) # call event handlers @@ -376,6 +377,7 @@ class CameraState(): current_best_frames = set([obj.thumbnail_data['frame_time'] for obj in self.best_objects.values()]) thumb_frames_to_delete = [t for t in self.frame_cache.keys() if not t in current_thumb_frames and not t in current_best_frames] for t in thumb_frames_to_delete: + logging.info(f"Removing {t} from cache.") del self.frame_cache[t] with self.current_frame_lock: