How Does Facial Recognition Work?
Facial recognition works by detecting a face, mapping its features into a numerical embedding vector, and matching identities by computing similarity in that vector space.
A complete interactive classroom, not just a preview.
Start when you are ready to enter this Stage's 9 scenes and explore, respond, and learn as you go.
How does a computer actually recognize a face?
Your phone unlocks just by looking at it — but how does a machine actually tell your face apart from billions of others?
It feels like magic, yet faces are never exactly the same twice. Is the system comparing a stored photo pixel-by-pixel, or doing something stranger?
A manipulable simulation that turns a face into numerical measurements, plus side-by-side diagrams of how a match is scored against a database.
Facial recognition converts a face into a compact numerical signature (a face embedding) and decides identity by measuring similarity in that mathematical space — not by comparing raw images.
The system probably compares a stored photo against the live camera image pixel by pixel.
- Privacy, surveillance policy, and legal concerns
- Specific commercial product benchmarks
- Deepfake generation or face synthesis
- Iris or fingerprint recognition
- 01The Driving QuestionslideQuestion
Frame the puzzle: faces vary in lighting, angle, expression, and age — yet phones unlock in under a second. How is that even possible?
- Faces are not stable like fingerprints
- Speed and accuracy seem contradictory
- This sets up what we need to explain
- 02Commit to Your First GuessquizPrediction
Before any explanation, the learner picks what they think facial recognition actually does behind the scenes.
- Make one independent hypothesis
- Reveal whether you guessed pixel matching or something deeper
- 03Pixel Matching vs. Embedding DistanceinteractiveEvidence
Try to 'recognize' faces two different ways and feel the difference: raw pixel comparison versus a similarity score in feature space.
- Compare the same face under two lighting conditions
- See that pixel difference is large but feature similarity stays high
- Notice when a different person scores close under pixel comparison
- 04Step 1: Detecting the FaceslideExplanation
Before recognition can happen, the system has to find the face in the image. Explain bounding boxes and landmark localization.
- A detector scans the image for face-like regions
- Landmarks mark eyes, nose, mouth, jaw
- The face is cropped and aligned to a canonical pose
- 05Step 2: Building a Face EmbeddinginteractiveExplanation
A manipulable diagram showing how a deep network turns the aligned face into a vector of numbers that encodes its geometry and texture.
- Each layer of the network extracts increasingly abstract features
- The final vector is the embedding — a compact numerical fingerprint
- Adjust input conditions to see which embedding values change and which stay stable
- 06Step 3: Matching by DistanceslideEvidence
Show how two embeddings are compared: distance (or cosine similarity) decides whether the face matches a stored identity.
- Embeddings of the same person cluster together
- Embeddings of different people sit far apart
- A threshold turns distance into a yes/no decision
- 07When It BreaksinteractiveBoundary
A visualization that pushes the system to its limits: extreme angles, masks, twins, and aging — see which conditions collapse the match.
- Heavy occlusion degrades the embedding
- Identical twins produce near-identical embeddings
- Lighting extremes shift the feature values noticeably
- 08From Faces to Other PatternsslideTransfer
The same recipe — detect, embed, compare — powers voice ID, music recommendation, and anomaly detection. The principle generalizes.
- Voice assistants use audio embeddings
- Recommenders use preference embeddings
- Anomaly detection uses behavioral embeddings
- 09Answering the Driving QuestionslideResolution
Tie everything back: facial recognition is not pixel matching — it is geometry and texture compressed into a vector and compared by distance.
- Detect the face
- Extract a stable embedding
- Match by similarity in embedding space
- Threshold converts similarity into an identity decision
Discussion threads for a Stage aren't available yet.