Skip to content

Commit

Permalink
Merge pull request #1377 from sachadee/patch-1
Browse files Browse the repository at this point in the history
Update image_utils.py
  • Loading branch information
serengil authored Oct 28, 2024
2 parents 29eac19 + 8d68c6e commit cc484b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deepface/commons/image_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def load_image_from_base64(uri: str) -> np.ndarray:
if file_type not in {"jpeg", "png"}:
raise ValueError(f"Input image can be jpg or png, but it is {file_type}")

nparr = np.fromstring(decoded_bytes, np.uint8)
nparr = np.frombuffer(decoded_bytes, np.uint8)
img_bgr = cv2.imdecode(nparr, cv2.IMREAD_COLOR)
# img_rgb = cv2.cvtColor(img_bgr, cv2.COLOR_BGR2RGB)
return img_bgr
Expand Down

0 comments on commit cc484b5

Please sign in to comment.