mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 12:05:22 +00:00
Update DeepFace.py
This commit is contained in:
parent
37c94467f3
commit
bb2b28e1d9
@ -684,6 +684,8 @@ def represent(
|
|||||||
if len(img.shape) == 3:
|
if len(img.shape) == 3:
|
||||||
img = cv2.resize(img, target_size)
|
img = cv2.resize(img, target_size)
|
||||||
img = np.expand_dims(img, axis=0)
|
img = np.expand_dims(img, axis=0)
|
||||||
|
# when represent is called from verify, this is already normalized
|
||||||
|
if img.max() > 1:
|
||||||
img /= 255
|
img /= 255
|
||||||
# --------------------------------
|
# --------------------------------
|
||||||
img_region = [0, 0, img.shape[1], img.shape[0]]
|
img_region = [0, 0, img.shape[1], img.shape[0]]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user