mirror of
https://github.com/serengil/deepface.git
synced 2025-06-06 11:35:21 +00:00
Merge pull request #1276 from ProgramadorArtificial/bugfix/extract_faces_grayscale
Fix extract faces grayscale
This commit is contained in:
commit
b75e37c3f6
@ -503,8 +503,8 @@ def extract_faces(
|
||||
|
||||
expand_percentage (int): expand detected facial area with a percentage (default is 0).
|
||||
|
||||
grayscale (boolean): Flag to convert the image to grayscale before
|
||||
processing (default is False).
|
||||
grayscale (boolean): Flag to convert the output face image to grayscale
|
||||
(default is False).
|
||||
|
||||
anti_spoofing (boolean): Flag to enable anti spoofing (default is False).
|
||||
|
||||
|
@ -45,8 +45,8 @@ def extract_faces(
|
||||
|
||||
expand_percentage (int): expand detected facial area with a percentage
|
||||
|
||||
grayscale (boolean): Flag to convert the image to grayscale before
|
||||
processing (default is False).
|
||||
grayscale (boolean): Flag to convert the output face image to grayscale
|
||||
(default is False).
|
||||
|
||||
anti_spoofing (boolean): Flag to enable anti spoofing (default is False).
|
||||
|
||||
@ -125,7 +125,7 @@ def extract_faces(
|
||||
h = int(current_region.h)
|
||||
|
||||
resp_obj = {
|
||||
"face": current_img[:, :, ::-1],
|
||||
"face": current_img if grayscale else current_img[:, :, ::-1],
|
||||
"facial_area": {
|
||||
"x": x,
|
||||
"y": y,
|
||||
|
Loading…
x
Reference in New Issue
Block a user