post https://{app}.{filespin}.{io}/api/v1/assets//addons/emotion_recognition
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 , You can use this to specify whether the asset's metadata should be updated with information about the processed emotions. |
disposition .confidence_threshold | Float | (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
}
},
]
}
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
The API call will return with a JSON response as below.
{
"job_id" : "f0d5cf41-5b60-4659-9ce5-275400cf6c29"
}
Key | Value | Description |
---|---|---|
job_id | String | The job ID to track the job |