specifying bounding boxes when adding faces to large_person_group_person in cognitive Face API

别等时光非礼了梦想. 提交于 2020-01-17 18:11:32

问题


What I'm trying to do is to use only face recognition without detection because I already have ground truth bounding box information. So I want to add faces to my large_person_group_person with my own bounding box information. Is there a way to specify bounding box information when using face add function? or other functions that supports this?

The link below is the reference of face add function.

https://westus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations/599adf2a3a7b9412a4d53f42

the argument 'target_face' in face add function is used for selecting the face when the face is detected by the cognitive detector. The problem is that there are a lot of faces failed to be detected. what I want to do is to specify bounding box information.


回答1:


Yes, you can use face bounding box information to add a face to your person in a large group. You can follow the steps below: This is my image about to upload, I have marked the face bounding box information out :

Based on the face add API, you the "tragetFace" value should be: left,top,width,height. In this case values 315,178,53,53 .So just call the API as below :

https://faceteststan.cognitiveservices.azure.com/face/v1.0/largepersongroups/testlargegroup/persons/e28981bd-1361-411a-b28a-eb79bc06ea51/persistedfaces?targetFace=315,178,53,53&detectionModel=detection_02

Result :

As you can see a face has been added successfully . Juts modify the API params based on your own and your own requirement will be ok here.

Btw, pls note that if the provided "targetFace" rectangle is not returned from Face - Detect, there’s no guarantee to detect and add the face successfully.

Hope it helps .



来源:https://stackoverflow.com/questions/58038397/specifying-bounding-boxes-when-adding-faces-to-large-person-group-person-in-cogn

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