How Facial Recognition Works
Facial recognition has become an everyday convenience while its complex engineering remains largely unseen. Between rapid technical progress and rising risks, the technology exposes a delicate balance between usability and surveillance. Understanding how it works is essential for assessing its impact and responsibilities.

Few innovations have moved so quickly from research environments to everyday life as facial recognition. The practice of unlocking a phone simply by looking at the screen, boarding a flight without presenting printed documents, or receiving automatic tagging suggestions in photographs has become so common that most people no longer notice the complexity involved.
Understanding what happens between the moment the camera captures light and the moment the system states that a face belongs to a specific individual helps reveal two complementary dimensions, the extraordinary technical progress achieved in recent years and the silent risk that accompanies this advancement.
The process begins with detection. Before identifying who is in front of the sensor, the software only needs to recognize that a face is present in the scene. For a long time, the dominant method was the Viola and Jones cascade classifier, which examined the image in search of predictable contrast patterns, such as the eye region usually being darker than the cheeks. Over time, convolutional neural networks took over this task and today can locate faces under poor lighting, tilted angles, glasses, partial coverings, and rapid movement. The result of this initial stage is simple, a rectangle with coordinates marking where the face is.
Next comes geometric alignment, a rarely discussed yet essential phase for final accuracy. The model marks anatomical reference points, known as landmarks, distributed across the corners of the eyes, the tip of the nose, the outline of the lips, and the jawline. With these anchors, it applies rotations, cropping, and scaling adjustments so that each analyzed face occupies a standardized position within a frame of fixed dimensions. Without this correction, a slightly tilted head would produce a mathematical description incompatible with the same person photographed from the front, causing the system to fail for a trivial reason.
After normalization, the stage that supports the recent revolution begins, feature extraction. A deep network trained with millions of portraits converts the cropped image into a numerical vector with hundreds of dimensions, called an embedding. This set of values does not store eyes, nose, or mouth in a readable form but rather an abstract statistical signature that summarizes what distinguishes one individual from another.
Architectures such as FaceNet and loss functions like ArcFace were developed to bring images of the same person closer together in vector space and push those of strangers farther apart, making the representation resistant to beards, aging, makeup, and weight variations. A not‑so‑intuitive detail explains the scalability of these platforms, registering a new individual does not require retraining. It is enough to compute their vector once and store it, since the network learned to measure similarity instead of memorizing specific identities.
Identification itself is reduced to simple calculations. The program measures the distance between two vectors, usually through cosine similarity, and compares the resulting value with a previously calibrated threshold.
In one‑to‑one verification, such as unlocking devices, it is enough to compare the presented face with the reference stored locally on the device. In the one‑to‑many mode, used in police investigations and corporate access control, the newly captured signature is compared with databases containing millions of records, returning an ordered list of likely candidates.
Adjusting this threshold is a political decision disguised as a technical parameter, since loosening it increases false alarms and tightening it too much allows individuals who should be identified to go unnoticed.
Recent advances focus on reliability and fraud resistance. Depth sensors project thousands of infrared points onto the skin and build a three‑dimensional mesh, preventing the old trick of holding a printed photograph in front of the camera.
Liveness detection routines analyze skin microtextures, corneal reflections, pulse estimated through chromatic variation, and involuntary responses to light stimuli. Independent evaluations conducted by the American institute NIST recorded a significant drop in error rates between 2014 and 2020, with the best algorithms failing at much lower proportions. Under controlled conditions, accuracy already surpasses that of trained human examiners.
It is precisely at this point that fascination should give way to concern. Leaked passwords can be changed quickly, cloned cards can be canceled by phone, but no one can request a new face. Facial biometrics function as a permanent credential, constantly exposed in public spaces, transmitted through videoconferences, and voluntarily published on social networks. When an embedding repository is compromised, and such incidents occur with troubling frequency, the damage does not disappear.
Academic research shows that vectors considered irreversible allow the reconstruction of visual approximations of the original face, undermining the notion that storing only numbers would be harmless.
Scale intensifies the problem. Companies scrape billions of images from public profiles to build catalogs sold to corporations and governments, without any authorization from the individuals portrayed. Urban cameras integrated into these databases stop recording scenes and begin recording people, enabling the reconstruction of movements, frequent companions, union affiliation, religious practice, medical treatment, and presence at demonstrations.
Added to this is the performance disparity documented by NIST in 2019, with much higher error rates for women and darker skin tones, and the result appears in news reports, wrongful arrests of innocent individuals identified through a statistical match treated as definitive proof. Nothing prevents old recordings from being reprocessed years later by more powerful models, turning archived material without defined purpose into an endless source of retroactive surveillance over people who were never suspects.
There is also a more delicate frontier, where providers claim to infer emotion, sexual orientation, criminal propensity, or mental state from facial geometry. Such promises lack solid scientific foundation and revive nineteenth‑century phrenology under an algorithmic appearance.
The danger lies not only in isolated mistakes but in the authority that automated judgments acquire when no citizen can audit the applied criteria or contest the conclusion.
None of this condemns facial recognition to abandonment, it only demands that the debate move beyond fascination and reach clear rules. Asking who manages the database, how long vectors remain stored, what purpose was declared, whether explicit consent was given, and who is responsible for possible errors ceases to be legal pedantry and becomes practical protection. Brazilian legislation offers tools in this regard, and each user should demand transparency before placing their face in front of another reader.
After all, what the camera captures does not disappear, and the memory of machines lasts far longer than ours.