azure - Microsoft Azure Face API - 人脸检测返回值,但不返回faceId

标签 azure azure-cognitive-services face-api

Microsoft Azure Face API - 人脸检测返回对象

{
    "faceRectangle": {
      "top": 114,
      "left": 206,
      "width": 167,
      "height": 167
    }
}

但我需要faceId。它不返回faceId。我没有找到解决方案。

enter image description here

最佳答案

我在我的环境中进行了尝试并得到了以下结果:

如果您需要获取图片的人脸Id,可以使用以下请求。

在请求中需要添加returnFaceId =true来获取人脸Id。

Post https://your-azure-faceapi-endpoint.cognitiveservices.azure.com/face/v1.0/detect?returnFaceId =true
 { "url": "{Image Url here}" }
 Header:
 Ocp-Apim-Subscription-Key : "your-api-key"

postman : enter image description here

引用:

Face - Detect With Url - REST API (Azure Cognitive Services - Face) | Microsoft Learn

关于azure - Microsoft Azure Face API - 人脸检测返回值,但不返回faceId,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76618780/

相关文章:

azure - 搜索 Bing News API 以获取过去 24 小时的新闻

azure - 微软认知服务-计算机视觉 : Invalid Subscription Key

azure - Microsoft 认知人脸 API 订阅 key 无效

azure - 将 200MB 文件上传到 Azure Blob 存储时出错

security - Azure PaaS 与 Azure 存储通信 - 是否使用 SSL?

azure - 我们可以动态添加文本字段吗

sql-server - 如何将 SQL Server 中的架构设为 "USE"

image - 微软认知服务: Uploading image

azure - Microsoft Cognitive - Face API - 使用 persistedFaceId 进行面对面验证