From 2510f896059d6e86e7c0c1a3f7d4c7f95b65b6e0 Mon Sep 17 00:00:00 2001 From: Javier Infante Date: Wed, 26 Feb 2025 11:28:14 +0100 Subject: [PATCH] allow integers on pre-calculated embeddings --- deepface/modules/verification.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deepface/modules/verification.py b/deepface/modules/verification.py index 43c3ba9..5ddf10f 100644 --- a/deepface/modules/verification.py +++ b/deepface/modules/verification.py @@ -141,7 +141,8 @@ def verify( """ if isinstance(img_path, list): # given image is already pre-calculated embedding - if not all(isinstance(dim, float) for dim in img_path): + if not all(isinstance(dim, (float, int)) for dim in img_path): + raise ValueError( f"When passing img{index}_path as a list," " ensure that all its items are of type float."