Emotion Recognition
POST/api/v1/assets/:asset_id/addons/emotion_recognition
Detect and classify emotions in facial images.
Request Parameters
| Parameter | Type | Description |
|---|---|---|
disposition | Object | (Optional) This field can be used to decide if a disposition action should be taken for the processed asset. |
disposition .update_metadata | Boolean | (Optional) true or false. Defaults to false. Specify whether the asset's metadata should be updated with information about the processed emotions. |
disposition .confidence_threshold | Float | (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
}
}
]
}
| Parameter | Type | Description |
|---|---|---|
region | JSON | Co-ordinates for the face |
dominant_emotion | string | The emotion with the highest confidence score |
emotion | JSON | The 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"
}
| Key | Value | Description |
|---|---|---|
job_id | String | The job ID to track the job |
Request
Responses
- 200
- 401
- 403
- 500
Successful operation
Unauthorized - Invalid or missing authentication
Forbidden - Insufficient permissions
Internal server error