Azure Cognitive Services - Face API Response: Reserved Fields or Bugs?

白昼怎懂夜的黑 提交于 2019-12-13 04:13:18

问题


In the Azure Cognitive Services Face API (see e.g. https://azure.microsoft.com/en-us/services/cognitive-services/face), the following response fields never seem to trigger:

  1. headPose:pitch (reserved field)
  2. foreheadOccluded
  3. eyeOccluded

Am I misusing these, or is there a plan for them, or is there no plan to activate them?


回答1:


If you look at the API documentation here:

  • For the headPose, it says:

EDIT 13/06/2019: doc was saying

HeadPose's pitch value is a reserved field and will always return 0

Now changed to:

headPose: 3-D roll/yaw/pitch angles for face direction.

  • For the foreheadOccluded value, I successfully got true value in the following test, where there is a cap on the head (sorry for the sample, did not find anything else quickly!):

    • URL: https://westeurope.api.cognitive.microsoft.com/face/v1.0/detect?returnFaceId=true&returnFaceLandmarks=false&returnFaceAttributes=occlusion
    • Content sent: { "url": "https://www.knijff.com/markmatters/wp-content/uploads/2015/10/Trump-Red-Hat.jpg" }

Reply received:

[{
  "faceId": "e6ae42a6-b008-4859-9bf5-1ae22e4b71a7",
  "faceRectangle": {
    "top": 118,
    "left": 212,
    "width": 276,
    "height": 276
  },
  "faceAttributes": {
    "occlusion": {
      "foreheadOccluded": true,
      "eyeOccluded": false,
      "mouthOccluded": false
    }
  }
}]
  • For the eyeOccluded value, I successfully got true and false values in the following test where the same person appears 2 times, one with a rectangle over the eyes:

    • URL: https://westeurope.api.cognitive.microsoft.com/face/v1.0/detect?returnFaceId=true&returnFaceLandmarks=false&returnFaceAttributes=occlusion
    • Content sent: { "url": "https://jov.arvojournals.org/data/Journals/JOV/933685/i1534-7362-14-13-14-f09.png" }

Reply received (please note that 1st face is the right one):

[{
  "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
    }
  }
}]


来源:https://stackoverflow.com/questions/53096262/azure-cognitive-services-face-api-response-reserved-fields-or-bugs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!