Detect whole face through MLKit in Android

693 views Asked by At

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.

2

There are 2 answers

0
Faizan Ahmad On BEST ANSWER

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

2
yliu On

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.