Skip to content

Commit 60fe4e8

Browse files
Tobias Mérinatageitgey
authored andcommitted
clarify that file object is also a valid parameter
1 parent 2cbfe1c commit 60fe4e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

face_recognition/api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ def face_distance(face_encodings, face_to_compare):
6767
return np.linalg.norm(face_encodings - face_to_compare, axis=1)
6868

6969

70-
def load_image_file(filename, mode='RGB'):
70+
def load_image_file(name, mode='RGB'):
7171
"""
7272
Loads an image file (.jpg, .png, etc) into a numpy array
7373
74-
:param filename: image file to load
74+
:param name: image file name or file object to load
7575
:param mode: format to convert the image to. Only 'RGB' (8-bit RGB, 3 channels) and 'L' (black and white) are supported.
7676
:return: image contents as numpy array
7777
"""
78-
return scipy.misc.imread(filename, mode=mode)
78+
return scipy.misc.imread(name, mode=mode)
7979

8080

8181
def _raw_face_locations(img, number_of_times_to_upsample=1):

0 commit comments

Comments
 (0)