Skip to content

Commit

Permalink
Update DeepFace.py
Browse files Browse the repository at this point in the history
  • Loading branch information
serengil authored Nov 22, 2023
1 parent 37c9446 commit bb2b28e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deepface/DeepFace.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,9 @@ def represent(
if len(img.shape) == 3:
img = cv2.resize(img, target_size)
img = np.expand_dims(img, axis=0)
img /= 255
# when represent is called from verify, this is already normalized
if img.max() > 1:
img /= 255
# --------------------------------
img_region = [0, 0, img.shape[1], img.shape[0]]
img_objs = [(img, img_region, 0)]
Expand Down

0 comments on commit bb2b28e

Please sign in to comment.