Azure Face API、python SDK属性url

Azure Face API、python SDK属性url,python,azure,microsoft-cognitive,face-api,Python,Azure,Microsoft Cognitive,Face Api,我使用的是 我想返回面属性,文档建议添加 /detect[&returnFaceAttributes=age,gender] 到基本URl将返回年龄和性别属性。这让我犯了个错误,我错过了什么吗 这是我第一次使用Azure Face API 我们可以使用下面的代码来获取returnFaceAttribute faces = CF.face.detect(img_url,attributes='age,gender') 整个演示代码 import cognitive_face as CF

我使用的是

我想返回面属性,文档建议添加

/detect[&returnFaceAttributes=age,gender]
到基本URl将返回年龄和性别属性。这让我犯了个错误,我错过了什么吗


这是我第一次使用Azure Face API

我们可以使用下面的代码来获取returnFaceAttribute

faces = CF.face.detect(img_url,attributes='age,gender')
整个演示代码

import cognitive_face as CF
KEY = 'xxxxx'  # Replace with a valid subscription key (keeping the quotes in place).
CF.Key.set(KEY)
BASE_URL = 'https://{location}.api.cognitive.microsoft.com/face/v1.0'  # Replace with your regional Base URL
CF.BaseUrl.set(BASE_URL)
#You can use this example JPG or replace the URL below with your own URL to a JPEG image.
img_url = 'https://raw.githubusercontent.com/Microsoft/Cognitive-Face-Windows/master/Data/detection1.jpg'
faces = CF.face.detect(img_url,attributes='age,gender')
测试结果:


我们可以使用下面的代码来获取ReturnFace属性

faces = CF.face.detect(img_url,attributes='age,gender')
整个演示代码

import cognitive_face as CF
KEY = 'xxxxx'  # Replace with a valid subscription key (keeping the quotes in place).
CF.Key.set(KEY)
BASE_URL = 'https://{location}.api.cognitive.microsoft.com/face/v1.0'  # Replace with your regional Base URL
CF.BaseUrl.set(BASE_URL)
#You can use this example JPG or replace the URL below with your own URL to a JPEG image.
img_url = 'https://raw.githubusercontent.com/Microsoft/Cognitive-Face-Windows/master/Data/detection1.jpg'
faces = CF.face.detect(img_url,attributes='age,gender')
测试结果:


新一代FaceSDK已于昨天发布(字面意思):并提供示例。您提到的SDK将在昨天发布的新一代FaceSDK(字面意思)被弃用(我在SDK团队中的MS工作)后立即被标记为示例。您提到的SDK将很快被标记为已弃用(我在SDK团队的MS工作)