URL: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次,其中一个在眼睛上方带有矩形: URL: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 } }}]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:headPose:pitch (reserved field)foreheadOccludedeyeOccludedAm I misusing these, or is there a plan for them, or is there no plan to activate them? 解决方案 If you look at the API documentation here:For the headPose, it says:EDIT 13/06/2019: doc was sayingNow changed to: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=occlusionContent 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=occlusionContent 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 } }}] 这篇关于Azure认知服务-面部API响应:保留字段还是错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-15 20:07