Guides

Emotion Recognition

Request Parameters

ParameterTypeDescription
dispositionObject(Optional) This field can be used to decide if a disposition action should be taken for the processed asset.
disposition .update_metadataBoolean(Optional) true or false. Defaults to false, You can use this to specify whether the asset's metadata should be updated with information about the processed emotions.
disposition .confidence_thresholdFloat(Optional) By default, this is set to 0.5. It can be adjusted to determine the threshold above which an emotion is considered relevant (Minimum value is 0.0 and maximum is 1.0).

Response JSON

Response JSON when is_synchronous is true

The API call will return with a JSON response as below.

{
  "data": [
    {
      "region": {
        "x": 230,
        "y": 120,
        "w": 36,
        "h": 45
      },
      "dominant_emotion": "happy",
      "emotion": {
        "sad": 0.225024865217,
        "angry": 0.5186973464221,
        "surprise": 0.3902171247860,
        "fear": 0.47202384428123,
        "happy": 0.693415601296,
        "disgust": 0.10793584062128,
        "neutral": 0.155791659105
      }
    },
    {
      "region": {
        "x": 300,
        "y": 150,
        "w": 40,
        "h": 50
      },
      "dominant_emotion": "neutral",
      "emotion": {
        "sad": 0.225024865217,
        "angry": 0.5186973464221,
        "surprise": 0.3902171247860,
        "fear": 0.155791659105,
        "happy": 0.473415601296,
        "disgust": 0.10793584062128,
        "neutral": 0.69202384428123
      }
    },
  ]
}
ParameterTypeDescription
regionJSONCo-ordinates for the face
dominant_emotionstringThe emotion with the highest confidence score
emotionJSONThe confidence score for each emotion, values are normalised so the total is 1

Response JSON when is_synchronous is false

The API call will return with a JSON response as below.

{
    "job_id" : "f0d5cf41-5b60-4659-9ce5-275400cf6c29"
}
KeyValueDescription
job_idStringThe job ID to track the job
Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!