你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Face List Operations - Get Large Face List Faces
在指定的大型人脸列表中列出人脸的 persistedFaceId 和 userData。
人脸按在“添加大型人脸列表人脸”中创建的 persistedFaceId 的字母顺序存储。
-
- “start”参数 (字符串,可选) 指定一个 ID 值,返回的条目将基于字符串比较具有更大的 ID。 将“start”设置为空值表示应从第一个项开始返回条目。
- “top”参数 (int,可选) 确定要返回的最大条目数,每次调用最多 1000 个条目的限制。 若要检索超出此限制的其他条目,请使用当前调用中返回的最后一个条目的 personId 指定“start”。
提示
- 例如,总共有 5 个项目及其 ID:“itemId1”、“...”、“itemId5”。
- “start=&top=”将返回所有 5 个项目。
- “start=&top=2”将返回“itemId1”、“itemId2”。
- “start=itemId2&top=3”将返回“itemId3”、“itemId4”、“itemId5”。
GET {endpoint}/face/{apiVersion}/largefacelists/{largeFaceListId}/persistedfaces
GET {endpoint}/face/{apiVersion}/largefacelists/{largeFaceListId}/persistedfaces?start={start}&top={top}
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
api
|
path | True |
string |
API 版本 |
endpoint
|
path | True |
string uri |
支持的认知服务终结点 (协议和主机名,例如:https://{resource-name}.cognitiveservices.azure.com) 。 |
large
|
path | True |
string |
有效字符是小写字母、数字或“-”或“_”,最大长度为 64。 Regex pattern: |
start
|
query |
string |
列出大于“start”的资源。 它包含不超过 64 个字符。 默认为空, |
|
top
|
query |
integer int32 |
要列出的项数,范围为 [1, 1000]。 默认值为 1000。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
成功的调用将返回持久化人脸的数组及其信息 (persistedFaceId 和 userData) 。 |
|
Other Status Codes |
意外的错误响应。 Headers x-ms-error-code: string |
安全性
Ocp-Apim-Subscription-Key
Azure AI 人脸订阅的密钥。
Type:
apiKey
In:
header
AADToken
Azure Active Directory OAuth2 流
Type:
oauth2
Flow:
accessCode
Authorization URL:
https://api.example.com/oauth2/authorize
Token URL:
https://api.example.com/oauth2/token
Scopes
名称 | 说明 |
---|---|
https://cognitiveservices.azure.com/.default |
示例
Get Faces from LargeFaceList
Sample Request
GET {endpoint}/face/v1.1-preview.1/largefacelists/your_large_face_list_id/persistedfaces?start=00000000-0000-0000-0000-000000000000&top=20
Sample Response
[
{
"persistedFaceId": "43897a75-8d6f-42cf-885e-74832febb055",
"userData": "your_user_data"
}
]
定义
名称 | 说明 |
---|---|
Face |
错误对象。 有关人脸服务返回的错误代码和消息的综合详细信息,请参阅以下链接: https://aka.ms/face-error-codes-and-messages。 |
Face |
包含错误详细信息的响应。 |
Large |
大型人脸列表的人脸资源。 |
FaceError
错误对象。 有关人脸服务返回的错误代码和消息的综合详细信息,请参阅以下链接: https://aka.ms/face-error-codes-and-messages。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
服务器定义的一组错误代码中的一个。 |
message |
string |
错误的用户可读表示形式。 |
FaceErrorResponse
包含错误详细信息的响应。
名称 | 类型 | 说明 |
---|---|---|
error |
错误对象。 |
LargeFaceListFace
大型人脸列表的人脸资源。
名称 | 类型 | 说明 |
---|---|---|
persistedFaceId |
string |
人脸的 ID。 |
userData |
string |
用户提供的数据附加到人脸。 长度限制为 1K。 |