Step 1: Face Detection and Alignment
The moment your image arrives, Ollie runs a face detection model to locate the face within the photo. This model identifies five key facial landmarks: the positions of both eye centres, the nose tip, and the two mouth corners. Using these five points, a geometric transformation is applied to the image that standardises the face: rotating it so the eyes are horizontal, scaling it so the inter-ocular distance matches the expected value, and cropping to a square region centred on the face.
This face alignment step is not cosmetic, it is functionally critical. The recognition network was trained exclusively on aligned face crops. Providing it with a misaligned crop, even by a small amount, shifts the positions of facial features relative to the patterns the network expects, substantially degrading embedding accuracy.
Step 2: Embedding Extraction
The aligned crop is passed through the convolutional neural network. The image travels through multiple convolutional blocks, each extracting progressively higher-level features. This forward pass is the most computationally intensive step in the pipeline, on Ollie's server it takes a fraction of a second. The final layer produces a 512-number vector, which is then L2-normalised.
The resulting 512-number vector is your facial embedding, the mathematical fingerprint of your face as the network understands it. It encodes the structural geometry of your face in a format optimised for distance computation. This vector is the only thing passed to the next stage; the original image is no longer needed.
Step 3: Comparing Against Every Celebrity
Your embedding is compared with the pre-computed embedding of every celebrity photo in Ollie's database. There is no shortcut or approximation: for tens of thousands of photos this is one matrix calculation that finishes in milliseconds.
The comparison gives a distance for each photo: the Euclidean distance between two L2-normalised vectors, which grows with the angle between them. Each celebrity's score comes from their single closest photo, the one that looks most like you.
Step 4: Score Conversion and Ranking
The distances are turned into percentages in two steps: each distance is mapped onto a 0–100 scale, and then the range where real matches fall is stretched so the differences between your top matches are easier to see. The order of your matches never changes; only the display does. The percentage isn't calibrated against human ratings, so read it as a ranking aid rather than a probability.
The top five celebrities, with their percentages and the photo of each that matched you best, are sent back to your browser. A search usually takes a few seconds, or up to about 15 seconds when the server has to wake up first.
