在Azure Cognitive Services Face API(例如,https://azure.microsoft.com/en-us/services/cognitive-services/face)中,似乎从未触发以下响应字段:
我是滥用它们,还是有针对它们的计划,或者没有计划激活它们?
答案 0 :(得分:1)
如果您查看API文档here:
headPose
,它说:HeadPose的音调值是一个保留字段,将始终返回0
=>这样您就不会有所不同
对于foreheadOccluded
的值,我在以下测试中成功获得了true
的值,该测试的头部有一个顶盖(很抱歉,该示例没有很快找到其他东西! ):
https://westeurope.api.cognitive.microsoft.com/face/v1.0/detect?returnFaceId=true&returnFaceLandmarks=false&returnFaceAttributes=occlusion
{ "url": "https://www.knijff.com/markmatters/wp-content/uploads/2015/10/Trump-Red-Hat.jpg" }
收到回复:
[{
"faceId": "e6ae42a6-b008-4859-9bf5-1ae22e4b71a7",
"faceRectangle": {
"top": 118,
"left": 212,
"width": 276,
"height": 276
},
"faceAttributes": {
"occlusion": {
"foreheadOccluded": true,
"eyeOccluded": false,
"mouthOccluded": false
}
}
}]
对于eyeOccluded
值,我在以下测试中成功获得了true
和false
值,其中同一个人出现2次,其中一个在眼睛上带有矩形:
https://westeurope.api.cognitive.microsoft.com/face/v1.0/detect?returnFaceId=true&returnFaceLandmarks=false&returnFaceAttributes=occlusion
{ "url": "https://jov.arvojournals.org/data/Journals/JOV/933685/i1534-7362-14-13-14-f09.png" }
收到回复(请注意第一张脸是正确的):
[{
"faceId": "4c2eb52e-2fd4-456c-bdae-694df1adc571",
"faceRectangle": {
"top": 204,
"left": 683,
"width": 297,
"height": 297
},
"faceAttributes": {
"occlusion": {
"foreheadOccluded": false,
"eyeOccluded": false,
"mouthOccluded": true
}
}
}, {
"faceId": "5b9dc938-e6cf-4fe9-8e6c-8649fef44e7a",
"faceRectangle": {
"top": 213,
"left": 107,
"width": 275,
"height": 275
},
"faceAttributes": {
"occlusion": {
"foreheadOccluded": false,
"eyeOccluded": true,
"mouthOccluded": false
}
}
}]