Skip to content
Technology

How Does AI Facial Recognition Actually Work? A Plain-English Guide

Facial recognition works in three steps: find the face, turn it into numbers, and compare those numbers. A neural network converts the aligned face into a 512-number facial fingerprint (an embedding), and two faces match when their fingerprints are close. Ollie uses this to compare your photo with thousands of celebrity photos and show the five closest.

The Ollie teamSeptember 26, 2026 · 3 min read
Illustration of a face scanned with a mesh of facial recognition points
Image: teguhjatipras, CC0, via Wikimedia Commons

The Short Version

When you upload a photo to Ollie, it never compares pixels directly. It finds your face, turns it into a list of 512 numbers called a facial fingerprint (or embedding), and compares that list with the fingerprints of thousands of celebrity photos. The celebrities whose fingerprints sit closest to yours are your matches.

Each step below is a separate piece of the system: finding the face, turning it into numbers, and comparing those numbers. Knowing what each one does also explains why some photos give better results than others.

Step 1: Finding and Straightening the Face

A face detector (Ollie uses YuNet, an open-source detector that ships with OpenCV) scans the photo for faces and picks the largest one. It also finds five landmarks: the centres of both eyes, the tip of the nose, and the two corners of the mouth.

Those five points are used to align the face: the image is rotated, scaled and cropped so the eyes are level and sit in the same place in a small 112 × 112 pixel square. Every face the network ever sees, in training and in your search, is lined up the same way, so it can focus on the shape of the face instead of where it happens to be in the photo.

Read more: What Is Facial Embedding? The Technology Behind Celebrity Matching

Step 2: A Convolutional Network Reads the Face

The aligned face goes through a convolutional neural network (CNN). Ollie's is a 20-layer network in the SphereFace style, with residual connections that let information skip past layers so a deep network still trains well.

Early layers respond to simple patterns such as edges and changes in brightness. Later layers combine those into eye shapes, nose bridges and jawlines, and the last layers boil everything down to 512 numbers that describe the face's identity. The network is never told to measure eye spacing or nose width; it learns for itself which patterns tell people apart.

Step 3: How the Network Learned to Tell Faces Apart

Ollie's network was trained from scratch on a public research dataset of about 5.8 million photos of 85,742 people. Training took around 10 days on a single NVIDIA RTX 4060 Ti graphics card.

It was trained with the CosFace loss. During training the network has to say which of the 85,742 people is in each photo, but the loss adds a margin: the correct answer must win by a clear angle, not just barely. That pressure pushes photos of the same person into a tight cluster and different people far apart, which is exactly what makes the fingerprints useful for comparing faces the network has never seen.

To check it, the model was tested on the Labeled Faces in the Wild (LFW) benchmark, with every LFW person removed from the training data first. It scored 99.5% at deciding whether two photos show the same person.

Read more: Siamese Neural Networks Explained: The Twin-Network Idea Behind Face Matching

Get new guides by email

By joining, you agree that Ollie can email you about new features and style tips. Every email has an unsubscribe link. Privacy

Step 4: Comparing Fingerprints

The fingerprints are normalised to the same length, so comparing two faces comes down to measuring the distance between two points. Close together means similar faces; far apart means different faces.

Your fingerprint is compared with the fingerprint of every celebrity photo in the database. That sounds slow, but it is one matrix calculation over tens of thousands of numbers and finishes in milliseconds. Each celebrity gets the score of their single closest photo, so one great match isn't diluted by their other photos, and you see that photo next to your result.

Step 5: From Distance to a Percentage

The raw distances are rescaled into a percentage that's easier to read. The percentage is good for ranking: a higher number means a closer match. It is not a calibrated probability, and it can't tell you whether two photos show the same person. Treat it as a friendly way to compare your top matches with each other.

Why Results Change Between Photos

The fingerprint depends on the photo, not just the person. Harsh shadows, a strong angle, sunglasses, a hand in front of the face or a heavy filter all change what the network sees, so different photos of you can bring up different celebrities.

For the most consistent results, use a clear, front-facing photo in soft, even light, with only your face in the frame. Trying two or three photos and looking at which names keep coming back is the best way to find your real lookalike.

Frequently Asked Questions

How does AI facial recognition work in simple terms?

A neural network turns a photo of a face into a list of numbers (a facial fingerprint). Photos of similar-looking people give similar lists, so finding a lookalike means finding the celebrity fingerprints closest to yours.

What neural network does Ollie use?

A 20-layer SphereFace-style convolutional neural network, trained from scratch with the CosFace loss on about 5.8 million face photos. It scored 99.5% on the LFW benchmark.

How many numbers are in a facial fingerprint?

Ollie's fingerprints have 512 numbers. None of them stands for a single feature like eye spacing; together they describe the face's identity.

Is the similarity percentage a probability?

No. It is a rescaled distance between two fingerprints. It is useful for ranking matches, but it isn't a calibrated probability and can't confirm that two photos show the same person.

Does Ollie keep my photo?

No. Your photo is used only in memory to run the search and is discarded when the search finishes.

How long does Ollie take to find a celebrity match?

Usually a few seconds. If the matching server has been idle, it can take up to about 15 seconds to wake up first.

Does Ollie compare my face with every celebrity?

Yes. Your fingerprint is compared with the fingerprint of every celebrity photo in the database, which takes milliseconds. Each celebrity is then scored by their single closest photo.

Try it yourself

Find your celebrity lookalike

Upload a photo and see which celebrities you look most like. Free to try, and your photo is never stored.

Find my celebrity look alike

About the author

The Ollie teamWrites for Ollie, a free celebrity lookalike AI

The Ollie team wrote and trained Ollie's own face-recognition model from scratch, and writes these guides to explain how face matching works in plain English. Questions or corrections are welcome on the contact page, and the FAQ covers how Ollie works and what happens to your photo.

Related Articles