Step by Step
D
Detect — finding faces in the image
The pipeline begins by detecting faces within an image, using models like MTCNN or RetinaFace.
Example: MTCNN identifying and drawing bounding boxes around all faces present in a group photo.
A
Align — normalizing orientation using landmarks
Detected faces are aligned using facial landmark points (eyes, nose, mouth), normalizing their orientation and position before further processing.
Example: rotating and cropping a detected face so its eyes are level and centered, based on detected landmark points, before feeding it into the embedding model.
E
Embed — encoding faces into compact vectors
Each aligned face is encoded into a compact vector representation (commonly 128 or 512 dimensions), using models like ArcFace, the current state-of-the-art approach using an additive angular margin loss.
Example: ArcFace encoding a specific person's aligned face into a 512-dimensional vector that captures their unique facial identity.
C
Compare — matching via cosine similarity
New face embeddings are compared against known embeddings using cosine similarity, with triplet loss training specifically designed to pull same-person embeddings together while pushing different people's embeddings apart.
Example: comparing a new face embedding against a database of known embeddings via cosine similarity to determine the closest, most likely identity match.
Applied Walkthrough
1
A security system needs to identify a person from a security camera photo by comparing it against a known database of employee faces.
2
The system first detects the face in the camera image, then aligns it using facial landmarks to normalize its orientation.
3
ArcFace then encodes this aligned face into a 512-dimensional embedding vector, capturing this person's unique facial identity in a compact numerical form.
4
Finally, this new embedding is compared via cosine similarity against the database of known employee embeddings, identifying the closest match — while being mindful of documented bias issues, since such systems have historically shown higher error rates for dark-skinned women.
Exam Application
Exams test whether you can correctly sequence the four-step face recognition pipeline (detect, align, embed, compare) and whether you know ArcFace as the current state-of-the-art embedding approach, along with documented bias issues (higher error rates for dark-skinned women) and the EU AI Act's ban on real-time biometric surveillance in public spaces.
⚠ Common Trap
The most common trap is skipping the alignment step conceptually, assuming detection can go straight to embedding. Alignment using facial landmarks is a distinct, necessary step that normalizes face orientation and position before embedding, significantly improving the accuracy and consistency of the resulting embeddings.
✓ Quick Self-Check
1. What are the four steps of the face recognition pipeline, in order?
Detect, Align, Embed, Compare.
Tap to reveal / hide
2. What does the alignment step use to normalize a detected face?
Facial landmark points (eyes, nose, mouth).
Tap to reveal / hide
3. What loss function does ArcFace use, and what is it considered?
Additive angular margin loss; it's considered the current state-of-the-art approach for face embeddings.
Tap to reveal / hide
4. What does triplet loss training aim to achieve?
Pulling same-person embeddings together while pushing different people's embeddings apart.
Tap to reveal / hide
5. What documented bias issue affects many face recognition systems?
Higher error rates for dark-skinned women.
Tap to reveal / hide