From c091b10df932ef82f636f2811659bad83bf198da Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Tue, 14 Oct 2025 06:52:34 -0600 Subject: [PATCH] Ensure that a negative score can not be sent (#20483) --- frigate/data_processing/common/face/model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frigate/data_processing/common/face/model.py b/frigate/data_processing/common/face/model.py index 68a5681c3..51ee64938 100644 --- a/frigate/data_processing/common/face/model.py +++ b/frigate/data_processing/common/face/model.py @@ -262,7 +262,7 @@ class FaceNetRecognizer(FaceRecognizer): score = confidence label = name - return label, round(score - blur_reduction, 2) + return label, max(0, round(score - blur_reduction, 2)) class ArcFaceRecognizer(FaceRecognizer): @@ -370,4 +370,4 @@ class ArcFaceRecognizer(FaceRecognizer): score = confidence label = name - return label, round(score - blur_reduction, 2) + return label, max(0, round(score - blur_reduction, 2))