Home › Explainers › Technology
TechnologyHow Facial Recognition Software Identifies a Face
- Facial recognition doesn't compare images directly; it converts a face into a set of numerical measurements called a faceprint and compares those numbers instead.
- A neural network learns which measurements matter most for telling faces apart by training on large sets of labeled photos before it ever processes a real query.
- The system reports a similarity score, not a certainty, which is why accuracy varies by lighting, angle, image quality, and the demographic makeup of the training data.
A camera pointed at a crowd, or a phone unlocking when its owner looks at it, both depend on software solving the same underlying problem: turning a two-dimensional image of a face into something that can be compared, mathematically, against other faces already on file. The computer never sees a face the way a person does. It sees a grid of numbers, and everything that follows is an attempt to extract stable, distinctive numbers from that grid.
Finding the Face Before Identifying It
Before any identification can happen, the software first has to locate where in the image a face actually is, a separate step called face detection. This step looks for patterns that reliably indicate a face regardless of who it belongs to: the general arrangement of eyes above a nose above a mouth, the contrast between eye sockets and surrounding skin, the rough oval outline of a head. Only once a face has been detected and isolated from the rest of the image does the system move on to the harder task of figuring out whose face it is.
Turning a Face Into Numbers
Once isolated, the face is analyzed for a set of measurements that make one face distinguishable from another: the distance between the eyes, the width of the nose, the depth of the eye sockets, the shape of the cheekbones, the contour of the jawline, and dozens of other measurements. Modern systems don't select these measurements by hand the way early facial recognition attempts did decades ago. Instead, a neural network is trained on very large sets of labeled face photos, and during that training it learns on its own which combination of measurements is most reliable for telling different people apart while staying consistent across different photos of the same person. The output is a numerical vector, often called a faceprint or facial embedding, that represents the face as a point in a high-dimensional mathematical space rather than as an image at all.
Matching Is a Distance Calculation
Identifying or verifying a face comes down to comparing its faceprint against one or more faceprints already stored in a database, and that comparison is a mathematical distance calculation: how close are these two points in that high-dimensional space. Two photos of the same person, even taken years apart or under different lighting, tend to produce faceprints that land close together, while photos of two different people tend to land farther apart. The system sets a threshold distance and reports a match if two faceprints fall within it, but crucially, this is always a statistical similarity score, not a certainty. A close match is reported as more or less likely, which is why systems used for anything consequential are generally paired with a human reviewer rather than treated as a final, automatic verdict.
Why Accuracy Isn't Uniform
Because the underlying neural network learns its measurements from training data, its performance depends heavily on what that training data looked like. A system trained mostly on photos taken in even, front-facing studio lighting will generally perform worse on photos taken at an angle, in poor lighting, or with the face partially obscured. Independent evaluations, including the ongoing Face Recognition Vendor Test run by the National Institute of Standards and Technology, have documented that accuracy can also vary measurably across demographic groups when training data underrepresents certain populations, which is one of the central technical and policy debates surrounding the technology's deployment in law enforcement and public settings.
Verification Versus Identification
Two very different tasks both get called facial recognition, and the distinction matters. Verification, the kind used to unlock a phone, is a one-to-one comparison: does this face match the one specific face already registered to this device. Identification is a one-to-many search: does this face match any of potentially millions of faces in a large database. Verification is inherently a narrower and generally more reliable problem, since the system only needs to distinguish one known face from an impostor, while identification has to rule out every other entry in a large database, which increases both the computational load and the chance of a false match as the database grows larger.
Facial recognition works by detecting a face in an image, converting its distinguishing measurements into a numerical faceprint using a trained neural network, and then comparing that faceprint against stored templates as a mathematical distance calculation. The result is always a similarity score rather than absolute certainty, and accuracy depends heavily on image quality, angle, lighting, and how representative the system's training data was of the population it's applied to.