Facial Recognition Explained
See how software turns a face into numbers, why matches can be wrong, where the technology shows up, and which choices you have.
Key takeaways
- Facial recognition compares numerical templates of faces and returns a probability-like score instead of a certain identity.
- Checking that you are who you claim (one-to-one) is a much easier problem than finding an unknown face in a large database (one-to-many).
- Image quality, lighting, angle, age gaps and the training data all affect how often a system is wrong.
- Phone face unlock typically keeps its template on the device, while many other systems store face data on servers run by others.
- Laws on biometric data vary widely, so check the rules where you live and the options each service gives you.
Facial recognition is software that measures a face in an image, turns those measurements into a set of numbers and compares them with other sets to estimate whether two images show the same person. It never "knows" anyone. It produces similarity scores, and people or rules decide what score counts as a match.
That one detail explains much of what follows: why unlocking your phone is a very different task from searching a crowd, why errors happen, and why the settings and policies around a system matter as much as the algorithm inside it.
How the process works
A typical system works in stages. First, detection finds whether there is a face in the picture and where. Detection alone doesn't identify anyone; a camera that draws a box around faces to set focus is doing only this.
Next, alignment rotates and scales the face so features such as the eyes sit in predictable positions. Then a trained neural network converts the aligned face into a template (also called an embedding): a list of numbers arranged so that images of the same person tend to land close together and images of different people land far apart.
Finally, comparison measures the distance between two templates and turns it into a score. A threshold decides whether the score is high enough to report a match.
One-to-one and one-to-many
The phrase "facial recognition" covers tasks with very different risks.
Verification (one-to-one) asks: is this the same person as the stored reference? Unlocking a phone or matching a traveler to a passport photo works this way. The system compares two things, and the person usually takes part knowingly.
Identification (one-to-many) asks: who, if anyone, in this database is this? The input might be a still from a security camera and the database might hold a great many photos. Because there are so many comparisons, even a small error rate per comparison can produce wrong candidates. The system often returns a ranked list, and the top name may simply be the closest lookalike in a database that doesn't contain the real person.
A related use is grouping, where a photo app clusters pictures of the same face so you can label them. There is also analysis that guesses traits such as age range or expression, which is a separate and often more contested kind of inference.
| Use | Question asked | Typical consequence of an error |
|---|---|---|
| Phone unlock | Is this the owner? | You retry or type a passcode |
| Border or boarding check | Does this face match this document? | Delay and manual inspection |
| Photo grouping | Which pictures show the same face? | A mislabeled album |
| Investigative search | Who might this unknown person be? | Suspicion falls on the wrong person |
| Venue or store watchlist | Is anyone here on a list? | Someone is wrongly refused or confronted |
Why systems get it wrong
Two kinds of error trade against each other. A false match says two different people are the same. A false non-match says the same person is two different people. Raising the threshold reduces false matches and increases false non-matches, so operators choose which mistake they would rather make.
Several factors push error rates up:
- Low resolution, motion blur, poor lighting and camera angles from above.
- Masks, glasses, hats, hair and other coverings.
- Long gaps in time between the two images, especially for children.
- Close relatives and unrelated lookalikes.
- Training data that represents some groups less well than others.
Public testing, including evaluations run by the US National Institute of Standards and Technology, has found that accuracy differs among algorithms, and that some show different error rates across demographic groups. Results from one product and setting don't transfer automatically to another. A system that performs well on clear passport-style photos may do far worse on grainy footage.
Humans add their own bias. A reviewer shown a candidate with a high score may be inclined to agree. Good practice treats results as leads, requires independent evidence and records who made the final judgment.
A worked example of thresholds and scale
Imagine, purely for illustration, a system that wrongly matches two different people once in every 100,000 comparisons. In a one-to-one check, that is a rare event: an impostor would very seldom get through on a given try.
Now use the same system to search one unknown face against a database of 1,000,000 people. Each search makes a million comparisons, so you should expect around ten false candidates to clear the threshold, whether or not the right person is in the database at all. If the unknown person is there, the true match sits among those lookalikes. If not, every candidate is wrong.
Operators can raise the threshold to cut the false candidates, but then a poor-quality image of the right person may fail to clear it. This is why a vendor's single accuracy figure tells you little unless you also know the database size, the image quality and the threshold used in testing. It also explains why a candidate list should start an investigation and never finish one.
Face unlock on your own device
Phone and laptop face unlock systems vary in design. Some use a depth sensor or infrared projector to map the face in three dimensions, which is much harder to fool with a flat photo. Others rely mainly on the ordinary front camera and are correspondingly weaker. Device makers generally describe the template as stored in protected hardware on the device and not uploaded, but confirm that for your own model.
A face unlock is a convenience layered over a passcode. The passcode still protects the encrypted data, as explained in full-disk encryption on laptops and phones. Many devices let you temporarily disable biometrics through a button combination or restart. Learning that shortcut is worthwhile, because legal rules about compelled unlocking can differ between biometrics and passcodes and have been unsettled in some places.
Face unlock is also commonly used with passkeys. In that case the face check happens locally, and the website receives only a cryptographic proof, never your face.
Face data you don't control
A password can be changed after a leak. A face cannot, which is why biometric databases attract concern. Face data may reach others through:
- Photo services that group or tag people.
- Identity checks that ask for a selfie and a document.
- Employers, schools, gyms or venues using face-based entry.
- Cameras in stores or public spaces with recognition features.
- Companies that gather publicly posted images to build searchable indexes.
Before enrolling, ask what is stored (the image, the template or both), where, for how long, who it is shared with, whether it trains models and how to delete it. Ask whether there is an alternative, such as a card, code or staffed counter. Our overview of biometric data and the law explains the kinds of consent and retention rules some jurisdictions impose.
Reducing your exposure
You can't stop every camera, but you can limit some paths.
- Turn off face grouping or tag suggestions in photo and social apps if you don't want them.
- Restrict who can see your photos, especially clear, front-facing profile pictures.
- Ask before posting other people, particularly children.
- Choose the non-biometric option at checkpoints and businesses where one is offered and lawful.
- Use access or deletion requests where privacy law gives you that right.
- Check whether face search services offer an opt-out in your region.
Your photos also carry other data. See photo metadata and hidden locations before sharing originals.
The policy debate
Supporters argue that recognition can speed up identity checks, help find missing people, assist investigations when other evidence is thin and offer convenient security. They add that human eyewitness identification also fails, and that tested tools with strict procedures can improve on it.
Critics argue that identification at scale can end the practical anonymity of walking down a street, that errors can lead to wrongful stops or arrests, that uneven accuracy and uneven deployment can fall harder on some communities, and that data gathered for one purpose tends to spread to others.
Responses around the world range from outright bans for certain public uses, through warrant, notice and audit requirements, to few specific rules at all. These rules have been changing, so check the current position where you are. Questions worth asking of any deployment include: what threshold is used, how was it tested on conditions like these, who reviews results, what happens to non-matches, and how can a person challenge an outcome? Cameras themselves are covered in plate readers and public surveillance.
Common questions
Is face detection the same as facial recognition?
No. Detection finds that a face exists. Recognition compares it to determine whether it matches a particular person. Many cameras only detect.
Can a photograph unlock a phone?
It depends on the hardware and software. Systems with depth sensing are designed to reject flat images. Camera-only methods may be easier to fool, so check how your device maker describes its security level.
Can I find out whether I'm in a database?
Sometimes. Privacy laws in some places let you request what a company holds about you. Government and law enforcement databases usually follow separate rules.