From 1f8bea146ee8bf82d4abee7c6ad5f46a56555a43 Mon Sep 17 00:00:00 2001 From: Sean Yong Date: Wed, 17 Feb 2021 13:55:49 +0800 Subject: [PATCH] Fixed bug with ssd facebox region --- .gitignore | 3 ++- deepface/commons/functions.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 4497437..cef20c6 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ deepface/commons/__pycache__/* deepface/basemodels/__pycache__/* deepface/extendedmodels/__pycache__/* deepface/subsidiarymodels/__pycache__/* -tests/dataset/*.pkl \ No newline at end of file +tests/dataset/*.pkl +Age_Gender_Retail_Analysis.ipynb \ No newline at end of file diff --git a/deepface/commons/functions.py b/deepface/commons/functions.py index 03f8166..68f8974 100644 --- a/deepface/commons/functions.py +++ b/deepface/commons/functions.py @@ -260,7 +260,7 @@ def detect_face(img, detector_backend = 'opencv', grayscale = False, enforce_det detected_face = base_img[int(top*aspect_ratio_y):int(bottom*aspect_ratio_y), int(left*aspect_ratio_x):int(right*aspect_ratio_x)] - return detected_face, [int(left*aspect_ratio_x), int(top*aspect_ratio_y), int(right*aspect_ratio_y) - int(left*aspect_ratio_x), int(bottom*aspect_ratio_y) - int(top*aspect_ratio_y)] + return detected_face, [int(left*aspect_ratio_x), int(top*aspect_ratio_y), int(right*aspect_ratio_x) - int(left*aspect_ratio_x), int(bottom*aspect_ratio_y) - int(top*aspect_ratio_y)] else: #if no face detected