From 532004e7eeb4400badee220e489bc28535ca44f7 Mon Sep 17 00:00:00 2001 From: Sefik Ilkin Serengil Date: Sat, 5 Oct 2024 22:30:49 +0100 Subject: [PATCH] avalability of nose and mouth check --- deepface/modules/detection.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deepface/modules/detection.py b/deepface/modules/detection.py index 6ab3a877..17bd5d90 100644 --- a/deepface/modules/detection.py +++ b/deepface/modules/detection.py @@ -158,11 +158,11 @@ def extract_faces( } # optional nose, mouth_left and mouth_right fields are coming just for retinaface - if current_region.nose: + if current_region.nose is not None: facial_area["nose"] = current_region.nose - if current_region.mouth_left: + if current_region.mouth_left is not None: facial_area["mouth_left"] = current_region.mouth_left - if current_region.mouth_right: + if current_region.mouth_right is not None: facial_area["mouth_right"] = current_region.mouth_right resp_obj = {