Skip to main content

Emotion Recognition

POST 

/api/v1/assets/:asset_id/addons/emotion_recognition

Detect and classify emotions in facial images.

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. Specify whether the asset's metadata should be updated with information about the processed emotions.
disposition .confidence_thresholdFloat(Optional) Defaults to 0.5. Threshold above which an emotion is considered relevant (minimum 0.0, maximum 1.0).

Response JSON when is_synchronous is true

{
"data": [
{
"region": { "x": 230, "y": 120, "w": 36, "h": 45 },
"dominant_emotion": "happy",
"emotion": {
"sad": 0.225, "angry": 0.519, "surprise": 0.390,
"fear": 0.472, "happy": 0.693, "disgust": 0.108, "neutral": 0.156
}
}
]
}
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

{
"job_id": "f0d5cf41-5b60-4659-9ce5-275400cf6c29"
}
KeyValueDescription
job_idStringThe job ID to track the job

Request

Responses

Successful operation