June 10th, 2018

Models / Celebrity Detection

Celebrity Detection


The celebrity detection model detects people with a public notoriety. This includes politicians, actors, athletes, business people and more.

(Brad Pitt)
Television presenter
(Ellen Degeneres)
Business Person
(Elon Musk)
(Michael Jordan)
(Barack Obama)


The Celebrity recognition works by first finding relevant faces within an image or a video frame and then comparing the face characteristics to our list of known celebrities.

Our Face Recognition works in a way that makes it robust and able to recognize celebrities in previously unknown images, just like a human would. The API works for color images as well as black-and-white, and will work from different angles, in different lighting conditions.

Celebrity probability

For each face the API will return a list of possible celebrity names along with a probability, ranked from the highest to the lowest probability.

Probability values are between 0 and 1. The closer the value is to 1, the more confident the API is that this is the correct name.

  • Ellen DeGeneres: 0.99
  • Nicky Hilton: 0.19
  • Lindsay Ridgeway: 0.08
  • Lori Petty: 0.07
  • Denise Gough: 0.06

Detecting multiple celebrities

The celebrities model can also identify several celebrities within a single image or single video frame.


  • Faces that are smaller than 10% of the image dimensions, are very blurry or have a low contrast with the background may go undetected
  • Faces that are not visible to human eyes (mostly hidden for instance or too small) might not be detected
  • Pictures of celebrities at a very young age (for instance a picture of Jennifer Lawrence when she was a baby or a picture of Ellen DeGeneres as a young girl) would result on lower accuracy

Adding celebrities to our database

We are steadily improving our celebrity detection model. Feel free to contact us to add celebrities you want to detect.

Use the model

If you haven't already, create an account to get your own API keys. You should then install the SDK that corresponds to your programming language. You can also implement your own logic to interact with our API if you prefer. Have a look at our API reference for more details.

# install cURL: https://curl.haxx.se/download.html

pip install sightengine

composer require sightengine/client-php

npm install sightengine --save

Detect a celebrity

Let's say you want to moderate the following image:

You can either upload a public URL to the image, or upload the raw binary image. Here's how to proceed if you choose to share the image's public URL:

curl -X GET -G 'https://api.sightengine.com/1.0/check.json' \
    -d 'models=celebrities' \
    -d 'api_user={api_user}&api_secret={api_secret}' \
    -d 'url=https://sightengine.com/assets/img/examples/example-craig-300.jpg'

 # if you haven't already, install the SDK with 'pip install sightengine'
from sightengine.client import SightengineClient
client = SightengineClient('{api_user}','{api_secret}')
output = client.check('celebrities').set_url('https://sightengine.com/assets/img/examples/example-craig-300.jpg')

// if you haven't already, install the SDK with 'composer require sightengine/client-php'
use \Sightengine\SightengineClient;
$client = new SightengineClient('{api_user}','{api_secret}');

// if you haven't already, install the SDK with 'npm install sightengine --save'
var sightengine = require('sightengine')('{api_user}','{api_secret}');
sightengine.check(['celebrities']).set_url('https://sightengine.com/assets/img/examples/example-craig-300.jpg').then(function(result) {
    // The API response (result)
}).catch(function(err) {
    // Handle error

The API will then return a JSON response:

    "status": "success",
    "request": {
        "id": "req_0MtAXnNu1zHLs6CZXMVaw",
        "timestamp": 1494409587.8202,
        "operations": 1
    "faces": [
            "x1": 0.293,
            "y1": 0.1491,
            "x2": 0.7035,
            "y2": 0.8158,
            "features": {
                "left_eye": {
                    "x": 0.61,
                    "y": 0.4378
                "right_eye": {
                    "x": 0.43,
                    "y": 0.4016
                "nose_tip": {
                    "x": 0.5167,
                    "y": 0.5663
                "left_mouth_corner": {
                    "x": 0.5667,
                    "y": 0.6787
                "right_mouth_corner": {
                    "x": 0.4133,
                    "y": 0.6466
            "celebrity": [
                    "name": "Daniel Craig",
                    "prob": 0.99
                    "name": "Dean Wareham",
                    "prob": 0.06
                    "name": "Ben Daniels",
                    "prob": 0.06
                    "name": "Graham Fellows",
                    "prob": 0.05
    "media": {
        "id": "med_0MtAtt9ud8Jaz93Ohb9UE",
        "uri": "https:\/\/sightengine.com\/assets\/img\/examples\/example-craig-300.jpg"

Any other needs?

See our full list of models for details on other filters and checks you can run on your images and videos.

Did you find this page helpful?

We're always looking for advice to help improve our documentation!

Let us know what you think

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more