mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 20:15:21 +00:00
imread restored
This commit is contained in:
parent
9e8bdff845
commit
aa4e4abe30
@ -104,14 +104,14 @@ def load_image(img):
|
|||||||
raise ValueError(f"Confirm that {img} exists")
|
raise ValueError(f"Confirm that {img} exists")
|
||||||
|
|
||||||
# For reading images with unicode names
|
# For reading images with unicode names
|
||||||
with open(img, "rb") as img_f:
|
# with open(img, "rb") as img_f:
|
||||||
chunk = img_f.read()
|
# chunk = img_f.read()
|
||||||
chunk_arr = np.frombuffer(chunk, dtype=np.uint8)
|
# chunk_arr = np.frombuffer(chunk, dtype=np.uint8)
|
||||||
img = cv2.imdecode(chunk_arr, cv2.IMREAD_COLOR)
|
# img = cv2.imdecode(chunk_arr, cv2.IMREAD_COLOR)
|
||||||
|
# return img
|
||||||
return img
|
|
||||||
# This causes troubles when reading files with non english names
|
# This causes troubles when reading files with non english names
|
||||||
# return cv2.imread(img)
|
return cv2.imread(img)
|
||||||
|
|
||||||
|
|
||||||
# --------------------------------------------------
|
# --------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user