question

PierluigiColombo-0524 avatar image
0 Votes"
PierluigiColombo-0524 asked PierluigiColombo-0524 commented

Face Detection in rotate images

Hi,
i'm trying to use 2 services of the face Api:

  • Face Detection

  • Face Verification

In a test I have noted that no face are detected if the face image is rotated of 90°.
Do I need to rotate to myself the image in the correct position before the analysis of the Face Cognitive Service?

Thanks
Pierluigi


azure-face
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

YutongTie-MSFT avatar image
0 Votes"
YutongTie-MSFT answered PierluigiColombo-0524 commented

Hello,

Yes, you need. When you know the direction of the face, you can rotate the rectangular face frame to align it more properly. To crop faces in an image, you can programmatically rotate the image so that the faces always appear upright. More details please refer to the document to address the landmark.

How to detect head posture: https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/how-to-use-headpose#explore-the-sample-code

https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/howtodetectfacesinimage#get-face-landmarks


Regards,
Yutong

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, thanks for the answer, just one note: if i don't know the rotation angle (some images can have a rotation of 45°, others of 60° and so on), is there a method to rotate the image in the right direction for the Face Api Service?

Thanks
Pierluigi

0 Votes 0 ·