Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
228 views
in Technique[技术] by (71.8m points)

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

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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 : enter image description here

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 :

enter image description here

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 .


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...