mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 03:55:21 +00:00
added review changes
This commit is contained in:
parent
112eb0a6c2
commit
91319705b1
@ -25,7 +25,8 @@ class Buffalo_L(FacialRecognition):
|
|||||||
raise ModuleNotFoundError(
|
raise ModuleNotFoundError(
|
||||||
"InsightFace and its dependencies are optional for the Buffalo_L model. "
|
"InsightFace and its dependencies are optional for the Buffalo_L model. "
|
||||||
"Please install them with: "
|
"Please install them with: "
|
||||||
"pip install insightface>=0.7.3 onnxruntime>=1.9.0 typing-extensions pydantic albumentations"
|
"pip install insightface>=0.7.3 onnxruntime>=1.9.0 typing-extensions pydantic"
|
||||||
|
"albumentations"
|
||||||
) from err
|
) from err
|
||||||
|
|
||||||
# Define the model filename and subdirectory
|
# Define the model filename and subdirectory
|
||||||
@ -86,7 +87,8 @@ class Buffalo_L(FacialRecognition):
|
|||||||
"""
|
"""
|
||||||
Extract face embedding from a pre-cropped face image.
|
Extract face embedding from a pre-cropped face image.
|
||||||
Args:
|
Args:
|
||||||
img: Preprocessed face image with shape (1, 112, 112, 3) or batch (batch_size, 112, 112, 3)
|
img: Preprocessed face image with shape (1, 112, 112, 3)
|
||||||
|
or batch (batch_size, 112, 112, 3)
|
||||||
Returns:
|
Returns:
|
||||||
Face embedding as a list of floats or list of lists of floats
|
Face embedding as a list of floats or list of lists of floats
|
||||||
"""
|
"""
|
||||||
@ -98,4 +100,5 @@ class Buffalo_L(FacialRecognition):
|
|||||||
embedding = np.array(embedding).flatten()
|
embedding = np.array(embedding).flatten()
|
||||||
else:
|
else:
|
||||||
raise ValueError(f"Unexpected embedding type: {type(embedding)}")
|
raise ValueError(f"Unexpected embedding type: {type(embedding)}")
|
||||||
return embedding.tolist()
|
return embedding.tolist()
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user