Recognize faces from Python or from the command line
Project description
The world’s simplest face recognition and face manipulation library.
Built using dlib’s state-of-the-art deep learning face recognition.
Recognize and manipulate faces from Python or from the command line
Free software, MIT license.
Features
Find faces in pictures
Find all the faces that appear in a picture.
Find and manipulate facial features in pictures
Get the locations and outlines of each person’s eyes, nose, mouth and chin.
Finding facial features is super useful for lots of important stuff.
But you can also use for really stupid stuff
like applying digital make-up (think ‘Meitu’):
Identify faces in pictures
Recognize who appears in each photo.
Usage
Command-Line Interface
When you install face_recognition, you get a simple command-line
program
called face_recognition that you can use to recognize faces in a
photograph or folder full for photographs.
First, you need to provide a folder with one picture of each person
you
already know. There should be one image file for each person with the
files named according to who is in the picture:
Next, you need a second folder with the files you want to identify:
Then in you simply run the commnad face_recognition, passing in
the folder of known people and the folder (or single image) with
unknown
people and it tells you who is in each image:
$ face_recognition ./pictures_of_people_i_know/ ./unknown_pictures/
/unknown_pictures/unknown.jpg,Barack Obama
/face_recognition_test/unknown_pictures/unknown.jpg,unknown_person
There’s one line in the output for each face. The data is
comma-separated
with the filename and the name of the person found.
An unknown_person is a face in the image that didn’t match anyone
in
your folder of known people.
If you simply want to know the names of the people in each photograph
but don’t
care about file names, you could do this:
$ face_recognition ./pictures_of_people_i_know/ ./unknown_pictures/ | cut -d ',' -f2
Barack Obama
unknown_person
Python API
API Docs: [https://face-recognition.readthedocs.io](https://fac
History
0.1.0 (2017-03-03)
First test release.