mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 03:55:21 +00:00
Remove redundant squeeze.
This commit is contained in:
parent
db4b749c98
commit
95bb92c933
@ -62,8 +62,7 @@ class Demography(ABC):
|
|||||||
Four-dimensional numpy array (n, 224, 224, 3)
|
Four-dimensional numpy array (n, 224, 224, 3)
|
||||||
"""
|
"""
|
||||||
image_batch = np.array(img)
|
image_batch = np.array(img)
|
||||||
# Remove batch dimension in advance if exists
|
|
||||||
image_batch = image_batch.squeeze()
|
|
||||||
# Check input dimension
|
# Check input dimension
|
||||||
if len(image_batch.shape) == 3:
|
if len(image_batch.shape) == 3:
|
||||||
# Single image - add batch dimension
|
# Single image - add batch dimension
|
||||||
|
Loading…
x
Reference in New Issue
Block a user