0

I am using MLKit for face detection, it is working fine. But there is a use case in which I am getting trouble. MLKit is too Fast, it can detect half face too. I want to detect whole face, I want to know whether there is the complete face in the frame or not?enter image description here

E.g: I apply MLKit' Face Detection on the attached Image, it is returning me all the Landmarks positions, all the contours etc. It is also returning me the smiling probability even there are no lips in the image.

markalex
  • 8,623
  • 2
  • 7
  • 32
Faizan Ahmad
  • 352
  • 4
  • 20

2 Answers2

1

I think you can call face.getBoundingBox() to get the coordinates of the bounding box, and check whether all the corners are in the frame.

yliu
  • 51
  • 2
  • I tries it but it was not working completely. We have to convert pixels to ScaleX and ScaleY according to graphic overlay, after that I got my solution. – Faizan Ahmad Jan 10 '23 at 10:33
  • @FaizanAhmad, can you post your solution and mark it as an answer? – sandeepd Jan 30 '23 at 06:18
0

I used MediaPipe' Face Mesh solution. Through it, I am getting Face contours, these (36) points are in oval, from 0 to 35.

Faizan Ahmad
  • 352
  • 4
  • 20