Skip to content
Technology

How Ollie's Celebrity Lookalike AI Works: A Technical Overview

Ollie is a celebrity lookalike AI that works in four steps: detect your face and five key points, align it to 112 by 112 pixels, turn it into a 512-number embedding with a neural network trained from scratch, and compare it with over 40,000 verified photos of more than 5,000 celebrities. The closest celebrities become your top five. Your photo is processed in memory and never stored.

The Ollie teamJune 22, 2026 · 4 min read
A graphics card, the kind of chip used to run neural networks
Image: Asim18 at English Wikipedia, Public domain, via Wikimedia Commons

The Pipeline at a Glance

When you upload a photo to Ollie, it goes through four steps. Each has one job.

StepWhat happensOutput
1. DetectionFind every face and five key points on eachThe largest face and its landmarks
2. AlignmentRotate, scale and crop the face to a standard positionA 112 by 112 pixel face image
3. EmbeddingRun the crop through Ollie's neural network512 numbers that describe the face
4. SearchCompare those numbers with every celebrity photoYour top five celebrities, with scores

The whole thing takes a second or two, and most of that is uploading the photo. Knowing the steps also explains where results can go wrong, so it's worth going through them.

Step 1: Finding Your Face

Detection uses YuNet, an open-source face detector that ships with OpenCV. It scans the image for faces and, for each one, places five landmarks: the centre of each eye, the tip of the nose and the two corners of the mouth.

If there's more than one face, Ollie keeps the largest. That's usually the person who took or is the subject of the photo, but in a group shot it might not be you. If no face is found, usually because the photo is too dark, too small or the face is turned too far, you'll get an error rather than a guess.

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

Step 2: Lining It Up

Faces in photos come at all sizes and angles. The network needs them in the same position every time. Alignment uses the five landmarks to work out a transformation (rotate, scale and shift) that moves those points to fixed target positions, then crops a 112 by 112 pixel square.

After alignment, your eyes sit at the same pixel positions as the eyes in every training photo and every celebrity photo. This is why a tilted head barely matters: it's simply rotated back. A head turned to one side is harder, because the hidden side of the face can't be recovered. See the best angle for a face match.

Step 3: The Neural Network

This is the part we built ourselves. The aligned crop goes through a 20-layer convolutional neural network with the SphereFace architecture, which uses residual connections so that information flows easily through the layers. The last layer outputs 512 numbers, which are scaled to unit length. That list is your face embedding, sometimes called a facial fingerprint.

The network was written and trained from scratch in PyTorch, with no pretrained weights:

  • Training data: a public research dataset of about 5.8 million face photos of 85,742 people.
  • Loss function: CosFace, which pushes photos of the same person close together and different people apart by a fixed margin. See ArcFace and CosFace explained.
  • Hardware: about 10 days on a single NVIDIA RTX 4060 Ti.
  • Accuracy: 99.5% on the LFW benchmark, with all LFW people removed from the training data first so the test is fair.

During training the network was never told what a nose or jaw is. It learned which patterns tell people apart because getting that right was the only way to reduce its error.

Read more: How Ollie's Celebrity Database Was Built

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: Searching the Celebrities

Ollie's index holds over 5,000 celebrities and over 40,000 photos, all freely licensed from Wikimedia Commons, with 2 to 12 verified photos per person. Every one of those photos went through steps 1 to 3 ahead of time, so their embeddings are already stored. How the database was built is covered in how Ollie's celebrity database was built.

Your embedding is compared with all of them in one matrix multiplication, which takes milliseconds. Because every embedding has unit length, the comparison is cosine similarity: the closer two embeddings point in the same direction, the more alike the faces.

Each celebrity is scored by their single closest photo, so you see the exact photo that matched you best. The raw scores are rescaled into percentages that are easier to read. There are no hand-made adjustments for skin tone, gender or anything else in the score itself.

By default, results include everyone. You can limit them to men or women, using each celebrity's gender as recorded on Wikidata, and narrow results to actors, singers or footballers.

What Happens to Your Photo

Your photo is processed in memory on the model server and never written to disk or logged. Once your matches are returned, it's gone. For each search, Ollie stores only an account ID (or a hashed IP address for guests), the IP address and a timestamp, to enforce search limits. Those records are deleted after 90 days.

Where It Can Go Wrong

Knowing the pipeline makes the failure modes easy to predict:

  • Wrong face picked in a group photo (step 1).
  • Poor alignment from a strong head turn or a small, blurry face (step 2).
  • A distorted embedding from a close-up selfie, harsh shadows, sunglasses or a big expression (step 3).
  • A narrow choice if your true closest match isn't in the index, so the nearest available celebrity is returned instead (step 4).

The fixes are mostly about the photo. See six ways to get better results.

Frequently Asked Questions

How does a celebrity lookalike AI work?

It finds your face, straightens it, turns it into a list of numbers with a neural network, and compares those numbers with stored numbers for celebrity photos. The closest are your matches.

What neural network does Ollie use?

Its own 20-layer SphereFace-style network, trained from scratch with the CosFace loss on about 5.8 million face photos. It outputs 512 numbers per face and scores 99.5% on LFW.

How many celebrities does Ollie compare me with?

Over 5,000 celebrities and over 40,000 photos, all freely licensed from Wikimedia Commons.

Does Ollie store my photo?

No. Your photo is processed in memory and never stored. Only an account ID or hashed IP, IP and timestamp are kept per search, for 90 days.

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