What does it do?
This library looks at a photo, finds any faces in it, measures the unique geometry of each one, and can then tell you whether a face matches another photo you’ve shown it before, similar to how you might glance at someone and instantly think that’s definitely my cousin based on familiar features. It’s built on top of deep learning models, so it’s doing genuinely sophisticated pattern recognition, wrapped so simply that a few lines of code can recognize a person across different photos. It can also just draw boxes around faces without identifying anyone, useful for headcounts or tagging. It was explicitly designed to be the simplest possible entry point into face recognition technology.
See it in action
This loads a photo, searches it for human faces, and reports how many faces it found.
import face_recognition
image = face_recognition.load_image_file("path/to/photo.jpg")
face_locations = face_recognition.face_locations(image)
print(f"Found {len(face_locations)} face(s) in the photo")
Why would a non-developer care?
This is the same category of technology behind phone face-unlock, photo-app person tagging, and airport facial recognition checkpoints. It matters because it puts genuinely powerful, previously research-lab-only technology into the hands of anyone willing to write a short script, which raises real questions about privacy alongside the convenience.
Real-world examples
Hobbyist projects have used it to build home security systems that recognize familiar faces versus strangers, and photo organizing tools use similar techniques to group photos automatically by person. Law enforcement and security firms have used comparable facial recognition technology in ways that have sparked significant public debate over accuracy and bias, particularly for people with darker skin tones. It’s a good example of a tool whose ease of use outran the ethical conversation about how it should be used.
Who uses it
Hobbyists building home automation or security projects, and developers prototyping facial recognition features before considering more robust commercial solutions.
How it compares to alternatives
It’s dramatically simpler to get started with than building on raw deep learning frameworks like TensorFlow or PyTorch directly, though commercial systems like Amazon Rekognition or Microsoft Azure Face tend to be more accurate and better tested for production use and bias mitigation.
Fun fact
The library’s face-matching models are built on dlib, and its creator, Adam Geitgey, explicitly designed it to work with as little as three lines of code as a deliberate accessibility goal.