mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 20:15:21 +00:00
Add comment.
This commit is contained in:
parent
5747d9648b
commit
5a1881492f
@ -37,8 +37,7 @@ class Demography(ABC):
|
|||||||
|
|
||||||
if img_batch.shape[0] == 1: # Single image
|
if img_batch.shape[0] == 1: # Single image
|
||||||
img_batch = img_batch.squeeze(0) # Remove batch dimension
|
img_batch = img_batch.squeeze(0) # Remove batch dimension
|
||||||
predict_result = self.model(img_batch, training=False).numpy()[0, :]
|
predict_result = self.model(img_batch, training=False).numpy()[0, :] # Predict with legacy method.
|
||||||
predict_result = np.expand_dims(predict_result, axis=0) # Add batch dimension
|
|
||||||
return predict_result
|
return predict_result
|
||||||
else: # Batch of images
|
else: # Batch of images
|
||||||
return self.model.predict_on_batch(img_batch)
|
return self.model.predict_on_batch(img_batch)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user