mirror of
https://github.com/serengil/deepface.git
synced 2025-06-05 19:15:23 +00:00
added review changes
This commit is contained in:
parent
112eb0a6c2
commit
91319705b1
@ -25,7 +25,8 @@ class Buffalo_L(FacialRecognition):
|
||||
raise ModuleNotFoundError(
|
||||
"InsightFace and its dependencies are optional for the Buffalo_L model. "
|
||||
"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
|
||||
|
||||
# Define the model filename and subdirectory
|
||||
@ -86,7 +87,8 @@ class Buffalo_L(FacialRecognition):
|
||||
"""
|
||||
Extract face embedding from a pre-cropped face image.
|
||||
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:
|
||||
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()
|
||||
else:
|
||||
raise ValueError(f"Unexpected embedding type: {type(embedding)}")
|
||||
return embedding.tolist()
|
||||
return embedding.tolist()
|
||||
|
Loading…
x
Reference in New Issue
Block a user