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 InsightFace) 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.
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 MS1MV2, a 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 98.5% at deciding whether two photos show the same person.
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's score is the average of their two best-matching photos, so someone with twelve photos in the database doesn't get an unfair edge over someone with three.
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.
