From bb134b25d2110886667ac550009168b75c6dad04 Mon Sep 17 00:00:00 2001 From: galthran-wq Date: Tue, 11 Feb 2025 13:56:09 +0000 Subject: [PATCH] compatibility --- deepface/modules/representation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deepface/modules/representation.py b/deepface/modules/representation.py index a017114..6bdbf1b 100644 --- a/deepface/modules/representation.py +++ b/deepface/modules/representation.py @@ -154,6 +154,8 @@ def represent( # Forward pass through the model for the entire batch embeddings = model.forward(batch_images) + if len(batch_images) == 1: + embeddings = [embeddings] for embedding, region, confidence in zip(embeddings, batch_regions, batch_confidences): resp_objs.append(