mirror of
https://github.com/serengil/deepface.git
synced 2025-06-06 19:45: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).
|
expand_percentage (int): expand detected facial area with a percentage (default is 0).
|
||||||
|
|
||||||
grayscale (boolean): Flag to convert the image to grayscale before
|
grayscale (boolean): Flag to convert the output face image to grayscale
|
||||||
processing (default is False).
|
(default is False).
|
||||||
|
|
||||||
anti_spoofing (boolean): Flag to enable anti spoofing (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
|
expand_percentage (int): expand detected facial area with a percentage
|
||||||
|
|
||||||
grayscale (boolean): Flag to convert the image to grayscale before
|
grayscale (boolean): Flag to convert the output face image to grayscale
|
||||||
processing (default is False).
|
(default is False).
|
||||||
|
|
||||||
anti_spoofing (boolean): Flag to enable anti spoofing (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)
|
h = int(current_region.h)
|
||||||
|
|
||||||
resp_obj = {
|
resp_obj = {
|
||||||
"face": current_img[:, :, ::-1],
|
"face": current_img if grayscale else current_img[:, :, ::-1],
|
||||||
"facial_area": {
|
"facial_area": {
|
||||||
"x": x,
|
"x": x,
|
||||||
"y": y,
|
"y": y,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user