Face_recognition: face_encodings return empty list

Created on 10 May 2018  路  2Comments  路  Source: ageitgey/face_recognition

Description

I have an image dataset and half of them couldn't be encoded using face_encodings() function.
This is one of them:
tr ng_hoa_binh_0018
Firstly, I used load_image_file() and I got a numpy array with shape (182,182,3). There was no problem, but when I use the numpy array I've got with face_encodings(), it return [ ].

Most helpful comment

That means it didn't find any faces in the image to encode. By default, it tries to locate a face in the image before it encodes it. Since your image is already cropped to the face area, you can pass in known_face_locations=[(0, width, height, 0]] to tell it where the face is.

All 2 comments

That means it didn't find any faces in the image to encode. By default, it tries to locate a face in the image before it encodes it. Since your image is already cropped to the face area, you can pass in known_face_locations=[(0, width, height, 0]] to tell it where the face is.

That seems to work, thank you @ageitgey

Was this page helpful?
0 / 5 - 0 ratings

Related issues

InnovativeInventor picture InnovativeInventor  路  6Comments

safaad picture safaad  路  4Comments

carlhung picture carlhung  路  6Comments

cjosephson picture cjosephson  路  5Comments

dharam1890 picture dharam1890  路  3Comments