From e1b630b6ad34124524be0d199ce3b269aab2fde8 Mon Sep 17 00:00:00 2001 From: leccelecce <24962424+leccelecce@users.noreply.github.com> Date: Wed, 19 Mar 2025 10:13:01 +0000 Subject: [PATCH] Face rec: only consider webp files --- frigate/api/classification.py | 2 +- frigate/data_processing/real_time/face.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frigate/api/classification.py b/frigate/api/classification.py index df804f34a..632214930 100644 --- a/frigate/api/classification.py +++ b/frigate/api/classification.py @@ -39,7 +39,7 @@ def get_faces(): face_dict[name] = [] for file in sorted( - os.listdir(face_dir), + filter(lambda f: (f.endswith(".webp")), os.listdir(face_dir)), key=lambda f: os.path.getctime(os.path.join(face_dir, f)), reverse=True, ): diff --git a/frigate/data_processing/real_time/face.py b/frigate/data_processing/real_time/face.py index acb891449..102913442 100644 --- a/frigate/data_processing/real_time/face.py +++ b/frigate/data_processing/real_time/face.py @@ -484,7 +484,7 @@ class FaceRealTimeProcessor(RealTimeProcessorApi): shutil.move(current_file, new_file) files = sorted( - os.listdir(folder), + filter(lambda f: (f.endswith(".webp")), os.listdir(folder)), key=lambda f: os.path.getctime(os.path.join(folder, f)), reverse=True, )