From 967beea8164b76970f2ae1731844bafc38864275 Mon Sep 17 00:00:00 2001 From: Mehran Ghandehari Date: Thu, 19 Dec 2024 16:21:09 -0500 Subject: [PATCH] Update CenterFace threshold the original repo use a threshold of 0.35 that is appropriate based on my tests. 0.8 is very large and results in many false negatives. --- deepface/models/face_detection/CenterFace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deepface/models/face_detection/CenterFace.py b/deepface/models/face_detection/CenterFace.py index d8e08bddd..b8fdf6b3c 100644 --- a/deepface/models/face_detection/CenterFace.py +++ b/deepface/models/face_detection/CenterFace.py @@ -46,7 +46,7 @@ def detect_faces(self, img: np.ndarray) -> List["FacialAreaRegion"]: """ resp = [] - threshold = float(os.getenv("CENTERFACE_THRESHOLD", "0.80")) + threshold = float(os.getenv("CENTERFACE_THRESHOLD", "0.35")) # BUG: model causes problematic results from 2nd call if it is not flushed # detections, landmarks = self.model.forward(