Azure 人脸识别给出 "Attribute 'qualityForRecognition' is only supported for recognition_03 and recognition_04." 错误
Azure Face Recognition gives "Attribute 'qualityForRecognition' is only supported for recognition_03 and recognition_04." error
我正在遵循官方 MS Azure 快速入门指南 (https://docs.microsoft.com/en-gb/azure/cognitive-services/face/quickstarts/client-libraries?tabs=visual-studio&pivots=programming-language-rest-api),特别是“获取面部属性”部分,当在 Postman 中复制提供的 cURL 示例时,我收到以下错误:
{
"error": {
"code": "BadArgument",
"message": "Attribute 'qualityForRecognition' is only supported for recognition_03 and recognition_04."
}
}
有什么想法吗?看起来他们已经更新了他们的 API 而没有更新文档,这是我对 Microsoft 这样的公司所期望的,但这是我唯一能想到的为什么它不起作用的原因。作为参考,这是我的 Postman 请求的屏幕截图。
To extract face attributes, call the Detect API again, but set detectionModel to detection_01. Add the returnFaceAttributes
query parameter as well.
用流例子检测:
POST {Endpoint}/face/v1.0/detect?overload=stream&returnFaceAttributes=age,gender,headPose,smile,facialHair,glasses,emotion,hair,makeup,occlusion,accessories,blur,exposure,noise&recognitionModel=recognition_01&returnRecognitionModel=True&detectionModel=detection_01
Ocp-Apim-Subscription-Key: {API key}
returnFaceAttributes
:分析returncomma-separated字符串中指定的一个或多个人脸属性,如“returnFaceAttributes=age,gender”。
注意:detection_01
支持年龄、性别、头姿、微笑、面部毛发、眼镜、情绪、头发、妆容、遮挡、配饰、模糊、曝光、噪点, 而 qualityForRecognition 而 detection_02
不支持任何属性并且 detection_03
只支持掩码和 qualityForRecognition
。 qualityForRecognition
仅在 'recognitionModel' 指定为“recognition_03”或“recognition_04[=41 时才受支持=]'.
根据 Add QualityForRecognition in Face how-to samples,detection_01
与 recognition_04
一起使用
var faces3 = await faceClient.Face.DetectWithUrlAsync(url: imageUrl, returnFaceId: true, returnFaceAttributes: requiredFaceAttributes, detectionModel: DetectionModel.Detection01, recognitionModel: RecognitionModel.Recognition04);
我正在遵循官方 MS Azure 快速入门指南 (https://docs.microsoft.com/en-gb/azure/cognitive-services/face/quickstarts/client-libraries?tabs=visual-studio&pivots=programming-language-rest-api),特别是“获取面部属性”部分,当在 Postman 中复制提供的 cURL 示例时,我收到以下错误:
{
"error": {
"code": "BadArgument",
"message": "Attribute 'qualityForRecognition' is only supported for recognition_03 and recognition_04."
}
}
有什么想法吗?看起来他们已经更新了他们的 API 而没有更新文档,这是我对 Microsoft 这样的公司所期望的,但这是我唯一能想到的为什么它不起作用的原因。作为参考,这是我的 Postman 请求的屏幕截图。
To extract face attributes, call the Detect API again, but set detectionModel to detection_01. Add the
returnFaceAttributes
query parameter as well.
用流例子检测:
POST {Endpoint}/face/v1.0/detect?overload=stream&returnFaceAttributes=age,gender,headPose,smile,facialHair,glasses,emotion,hair,makeup,occlusion,accessories,blur,exposure,noise&recognitionModel=recognition_01&returnRecognitionModel=True&detectionModel=detection_01
Ocp-Apim-Subscription-Key: {API key}
returnFaceAttributes
:分析returncomma-separated字符串中指定的一个或多个人脸属性,如“returnFaceAttributes=age,gender”。
注意:detection_01
支持年龄、性别、头姿、微笑、面部毛发、眼镜、情绪、头发、妆容、遮挡、配饰、模糊、曝光、噪点, 而 qualityForRecognition 而 detection_02
不支持任何属性并且 detection_03
只支持掩码和 qualityForRecognition
。 qualityForRecognition
仅在 'recognitionModel' 指定为“recognition_03”或“recognition_04[=41 时才受支持=]'.
根据 Add QualityForRecognition in Face how-to samples,detection_01
与 recognition_04
var faces3 = await faceClient.Face.DetectWithUrlAsync(url: imageUrl, returnFaceId: true, returnFaceAttributes: requiredFaceAttributes, detectionModel: DetectionModel.Detection01, recognitionModel: RecognitionModel.Recognition04);