F.A.C.E.

Face Analysis Cloud Engine


Getting Started

Welcome to Sightcorp F.A.C.E., the face analysis cloud engine based on Sightcorp Face analysis technologies.

This web service has been designed from the ground up to give developers easy access to face information present in images. By sending a picture with one or more faces, the service will reply with a JSON response containing the following information:

Age, Gender, Facial Expressions, Face Position, Eye Position, Head Pose, Ethnicity, Mood, Clothing Colors.

Requesting any of these features counts as one API usage

The basic account gives you access to 5000 API requests per month for free. In order to guarantee continuation of operation for your application, you will have to upgrade to one of our paid monthly subscriptions. For more information, see face.sightcorp.com/pricing/

BETA PHASE: During the beta phase you will have unlimited access to API calls. Real-time offline usage, batch video analysis, model creation and comparison APIs will be enabled in the future.


Usage Examples


Javascipt examples

You can find a package containing Javascript examples here. This gives you a good understanding on how the F.A.C.E. API works.


F.A.C.E. Detect PHP example

<?php
  require_once 'HttpClient.class.php';

  $parameters = array(
        'app_key' => '1234',
        'client_id' => '5678',
        'url' => '<URL to face image>',
        );

  $face = new HttpClient('api.sightcorp.com');
  $response = $face->post("/api/detect/", $parameters);

  echo $face->getContent();
?>
    

F.A.C.E. Detect Python example

import requests

json_resp = requests.post( 'http://api.sightcorp.com/api/detect/',
              data   = { 'app_key'   : '<your application key>',
                         'client_id' : '<your client id>' },
              files  = { 'img'       : ( 'filename', open( '<path to file>', 'rb' ) ) } )

print "Response : ", json_resp.text
    

F.A.C.E. Response

The schema specification of the JSON response can be found here along with the POST request specification. The following JSON snippet is an example of a typical F.A.C.E. response:

{
  "persons":[
      {
         "expressions":{
            "sadness":{
               "value":11
            },
            "neutral":{
               "value":0
            },
            "disgust":{
               "value":26
            },
            "anger":{
               "value":17
            },
            "surprise":{
               "value":13
            },
            "fear":{
               "value":12
            },
            "happiness":{
               "value":8
            }
         },
         "head":{
            "yaw":{
               "value":21.33
            "roll":{
               "value":0
            },
            "pitch":{
               "value":32.65
            }
         },
         "mood":{
            "confidence":50.22,
            "value":"Negative"
         },
         "clothingcolors":[
            "#000000",
            "#000011",
            "#111111"
         ],
         "gender":{
            "confidence":34.55,
            "value":"Male"
         },
         "age":{
            "range":5,
            "value":23
         },
         "landmarks":{
            "eyeRight":{
               "y":275,
               "x":352
            },
            "eyeLeft":{
               "y":283,
               "x":421
            }
         },
         "ethnicity":{
            "confidence":50,
            "value":"Caucasian"
         },
         "face":{
            "y":210,
            "x":296,
            "w":178,
            "h":178
         }
      }
   ],
   "img_height":640,
   "img_width":480
}