exception messages updated

This commit is contained in:
Sefik Ilkin Serengil 2024-08-17 08:10:49 +01:00
parent 39a6d24163
commit 52d6873253

View File

@ -115,8 +115,7 @@ def verify(
} }
def extract_embeddings_and_facial_areas( def extract_embeddings_and_facial_areas(
img_path: Union[str, np.ndarray, List[float]], img_path: Union[str, np.ndarray, List[float]], index: int
index: int
) -> Tuple[List[List[float]], List[dict]]: ) -> Tuple[List[List[float]], List[dict]]:
""" """
Extracts facial embeddings and corresponding facial areas from an Extracts facial embeddings and corresponding facial areas from an
@ -150,7 +149,7 @@ def verify(
if silent is False: if silent is False:
logger.warn( logger.warn(
"You passed 1st image as pre-calculated embeddings." f"You passed {index}-th image as pre-calculated embeddings."
"Please ensure that embeddings have been calculated" "Please ensure that embeddings have been calculated"
f" for the {model_name} model." f" for the {model_name} model."
) )
@ -158,7 +157,7 @@ def verify(
if len(img_path) != dims: if len(img_path) != dims:
raise ValueError( raise ValueError(
f"embeddings of {model_name} should have {dims} dimensions," f"embeddings of {model_name} should have {dims} dimensions,"
f" but it has {len(img_path)} dimensions input" f" but {index}-th image has {len(img_path)} dimensions input"
) )
img_embeddings = [img_path] img_embeddings = [img_path]