Face List - Create a Face List
创建一个空的且用户指定的faceListId, name and an optional userData的face list.一个订阅的用户可以之多创建64个face lists。
face list 是一组faces,并且faces 永不过期。。face list 可在Face - Find Similar作为face的资源参数。用于查找固定设置的face的类似面部数据。例如:在明星脸中,朋友或者家人中查找类似的脸。
face list中最多存放1000个face
Http Method
`POST`
Request URL
`https://api.cognitive.azure.cn/face/v1.0/facelists/{faceListId}`
Request parameters
| 参数名|参数类型 |描述 |
| --- | --- | --- |
| faceListId |string | 长度不超过64位由小写字母,数字,‘—’,‘_’组成的字符串 |
Request headers
| 请求头 |类型 |描述 |
| --- | --- | --- |
| Content-Type(可选) | string | Media type of the body sent to the API |
| Ocp-Apim-Subscription-Key | string | Subscription key which provides access to this API. Found in your Cognitive Services accounts. |
Request body
JSON fields in request body:
| Fields | Type | Description |
| --- | --- | --- |
| name | String | 被创建的face list 的名字 |
| userData (可选) | String | 用户为该face list定义数据,最大长度16k |
~~~
{
"name":"sample_list",
"userData":"User-provided data attached to the face list"
}
~~~
Response 200
请求成功返回空
Response 400
Error code and message returned in JSON
| Error Code | Error Message Description |
| --- | --- |
|BadArgument | Name 过长 |
| BadArgument | useData过长 |
| BadArgument | 错误的或者未识别的JSON body |
| BadArgument | 无效的Face list ID is invalid,有效格式为:小写字母,数字,‘—’,‘_’,字符串最大长度是64 |
~~~
{
"error":{
"code":"BadArgument",
"message":"'name' is too long."
}
}
~~~
Response 401
| Error Code | Error Message Description |
| --- | --- |
| Unspecified | 无效的subscription Key 或user/plan 被冻结 |
~~~
{
"error":{
"code": "Unspecified",
"message": "Access denied due to invalid subscription key. Make sure you are subscribed to an API you are trying to call and provide the right key."
}
}
~~~
Response 403
face list数据超出范围,最大为64
~~~
{
"error":{
"code":"QuotaExceeded",
"message":"Face list number reached limit"
}
}
~~~
Response 409
| Error Code | Error Message Description |
| --- | --- |
| FaceListExists |Face list已经存在 |
| ConcurrentOperationConflict | 当前资源运算有冲突 |
~~~
{
"error":{
"code":"FaceListExists",
"message":"Face list 'sample_list' already exists."
}
}
~~~
Response 415
不支持的媒体格式,该API支持application/json
~~~
{
"error":{
"code":"BadArgument",
"message":"Invalid Media Type"
}
}
~~~
Response 429
~~~
{
"error":{
"statusCode": 429,
"message": "Rate limit is exceeded. Try again in 26 seconds."
}
}
~~~
- 空白目录
- Face
- Detect
- Find Similar
- Group
- Identify
- Verify
- Face List
- Add a Face to a Face List
- Create a Face List
- Delete a Face from a Face List
- Delete a Face List
- Get a Face List
- List Face Lists
- Update a Face List
- Person
- Add a Person Face
- Create a Person
- Delete a Person
- Delete a Person Face
- Get a Person
- Get a Person Face
- List Persons in a Person Group
- Update a Person
- Update a Person Face
- Person Group
- Create a Person Group
- Delete a Person Group
- Get a Person Group
- Get Person Group Training Status
- List Person Groups
- Train Person Group
- Update a Person Group