added review changes

This commit is contained in:
Raghucharan16 2025-03-01 14:01:59 +05:30
parent 112eb0a6c2
commit 91319705b1

View File

@ -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
""" """
@ -99,3 +101,4 @@ class Buffalo_L(FacialRecognition):
else: else:
raise ValueError(f"Unexpected embedding type: {type(embedding)}") raise ValueError(f"Unexpected embedding type: {type(embedding)}")
return embedding.tolist() return embedding.tolist()