The API for searching media asset segments by face image (fine search) returns information about relevant character segments in the media asset where the face appears, based on coarse search results.
Operation description
For questions about using or troubleshooting the Intelligent Media Search feature of Alibaba Cloud Intelligent Media Services, please search for the DingTalk group (30415005038) and join the Intelligent Media Services multimodal search Customer Support DingTalk group to contact us.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ice:SearchMediaClipByFace |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| SearchLibName |
string |
No |
The name of the search library. |
test1 |
| PageNo |
integer |
No |
The page number. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page. Default value: 10. Maximum value: 50. |
10 |
| EntityId |
string |
No |
The ID of the entity. |
2d3bf1e35a1e42b5ab338d701efa**** |
| FaceSearchToken |
string |
Yes |
The value of this parameter is the same as that of the FaceSearchToken parameter in the SearchMediaByFace request. This specifies to return media asset clips that meet the same query conditions. |
zxtest-huangxuan-2023-3-7-V1 |
| MediaId |
string |
Yes |
The ID of the media asset. |
3b187b3620c8490886cfc2a9578c**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The ID of the request. |
E44FFACD-9E90-555A-A09A-6FD3B7335E39 |
| Success |
string |
Indicates whether the request was successful. Valid values: true and false. |
true |
| Code |
string |
The status code returned. |
200 |
| MediaClipList |
array<object> |
The media asset clips that meet the requirements. |
|
|
array<object> |
|||
| Score |
number |
The score of the clip. The value is of the Float type. The value is in the range of [0,1]. |
0.99041677 |
| EntityId |
string |
The ID of the entity, which is the same as the entity ID returned in tag analysis. |
1031025**** |
| LabelName |
string |
The name of the entity. |
Zhang San |
| OccurrencesInfos |
array<object> |
The information about clips related to the face. |
|
|
array<object> |
|||
| StartTime |
number |
The start time of the clip. Unit: seconds. The value is of the Float type. |
61.066353 |
| EndTime |
number |
The end time of the clip. Unit: seconds. The value is of the Float type. |
69.06635 |
| TrackData |
array<object> |
The information about the face in the clip. |
|
|
array<object> |
|||
| Timestamp |
number |
The timestamp when the face appears in the clip. Unit: seconds. The value is of the Float type. |
62.03302 |
| BoxPosition |
object |
The coordinates of the face. |
|
| X |
integer |
The x-axis coordinate of the upper-left corner. Unit: pixels. |
517 |
| Y |
integer |
The y-axis coordinate of the upper-left corner. Unit: pixels. |
409 |
| W |
integer |
The width of the rectangle frame. Unit: pixels. |
128 |
| H |
integer |
The height of the rectangle frame. Unit: pixels. |
168 |
| Expression |
string |
Expression. |
Calm |
| Category |
string |
The type of the character. Valid values: celebrity sensitive politician custom unknown |
celebrity |
| Total |
integer |
The total number of media asset clips that meet the conditions. |
5 |
Examples
Success response
JSON format
{
"RequestId": "E44FFACD-9E90-555A-A09A-6FD3B7335E39",
"Success": "true",
"Code": "200",
"MediaClipList": [
{
"Score": 0.99041677,
"EntityId": "1031025****",
"LabelName": "John Doe",
"OccurrencesInfos": [
{
"StartTime": 61.066353,
"EndTime": 69.06635,
"TrackData": [
{
"Timestamp": 62.03302,
"BoxPosition": {
"X": 517,
"Y": 409,
"W": 128,
"H": 168
}
}
],
"Expression": "Calm"
}
],
"Category": "celebrity"
}
],
"Total": 5
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.