Azure的面部识别给出了“属性”'仅支持识别_03和识别_04。”。错误

发布于 2025-01-20 09:26:15 字数 942 浏览 3 评论 0 原文

我正在遵循官方的Azure QuickStart指南( https://learn.microsoft.com/en-gb/azure/cognitive-services/face/quickstarts/quickstarts/client-lient-lient-lient-liblaries? ; pivots =编程语言 - 式API ),特别是“ feet face属性”部分,当复制Postman中提供的卷曲示例时,我会收到以下错误:

{
    "error": {
        "code": "BadArgument",
        "message": "Attribute 'qualityForRecognition' is only supported for recognition_03 and recognition_04."
    }
}

有什么想法吗?看来他们已经更新了API而没有更新文档,这是我对Microsoft这样的Corp的期望,但这是我唯一能想到为什么它无法正常工作的事情。作为参考,这是我邮递员请求的屏幕截图。

I'm following the official MS Azure quickstart guide (https://learn.microsoft.com/en-gb/azure/cognitive-services/face/quickstarts/client-libraries?tabs=visual-studio&pivots=programming-language-rest-api), specifically the "Get face attributes" part and when replicating provided cURL examples in Postman, I'm getting the following error:

{
    "error": {
        "code": "BadArgument",
        "message": "Attribute 'qualityForRecognition' is only supported for recognition_03 and recognition_04."
    }
}

Any ideas? It seems like they've updated their API without updating documentation, which is something I wouldn've expected from a corp like Microsoft, but it's the only thing I can think of why it wouldn't be working. For reference, here's a screenshot of my Postman request.
enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

╭ゆ眷念 2025-01-27 09:26:15

按照::

要提取面部属性,请再次调用检测API,但将检测模型设置为检测_01。添加 returnfaceattributes 查询参数。

用流示例检测:

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 :分析并返回逗号分隔字符串中的一个或多个指定的脸部属性,例如“ returnfaceattributes = age,agender,性别”。

注意: detection_01 支持年龄,性别,头痛,微笑,面部护理,眼镜,情感,头发,化妆,遮挡,附件,配件,模糊,暴露,噪音,噪音和质量认识,<代码> distion_02 不支持任何属性, dincection_03 仅支持蒙版和 Qualityforrencognition QualityForrencognition 仅在指定为'识别_03 '或' nesition_04 '时,才支持。

按照 dintection_01 识别_04 一起使用,

var faces3 = await faceClient.Face.DetectWithUrlAsync(url: imageUrl, returnFaceId: true, returnFaceAttributes: requiredFaceAttributes, detectionModel: DetectionModel.Detection01, recognitionModel: RecognitionModel.Recognition04);

您也可以参考添加质量forterforrecognition属性到面部检测

As per documentation:

To extract face attributes, call the Detect API again, but set detectionModel to detection_01. Add the returnFaceAttributes query parameter as well.

Detect with stream example:

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: Analyze and return the one or more specified face attributes in the comma-separated string like "returnFaceAttributes=age,gender".

Note: detection_01 supports age, gender, headPose, smile, facialHair, glasses, emotion, hair, makeup, occlusion, accessories, blur, exposure, noise, and qualityForRecognition While detection_02 does not support any attributes and detection_03 only supports mask and qualityForRecognition. qualityForRecognition is only supported when the 'recognitionModel' is specified as 'recognition_03' or 'recognition_04'.

As per Add QualityForRecognition in Face how-to samples, detection_01 is used with recognition_04

var faces3 = await faceClient.Face.DetectWithUrlAsync(url: imageUrl, returnFaceId: true, returnFaceAttributes: requiredFaceAttributes, detectionModel: DetectionModel.Detection01, recognitionModel: RecognitionModel.Recognition04);

You can also refer to Add qualityForRecognition attribute to Face Detection

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文