flutter-ml / google_ml_kit_flutter

A flutter plugin that implements Google's standalone ML Kit
MIT License
944 stars 723 forks source link

Face contour is only detected for a single face when multiple faces are detected #251

Closed matanby closed 2 years ago

matanby commented 2 years ago

Hi,

When using the FaceDetector to detect faces in images where multiple faces are present, and enableContours is set to true, the returned list of faces contain face contours for one face only. For the rest of the faces, the _contours map contain only null values .

https://user-images.githubusercontent.com/8208862/167833362-80663182-192b-451b-9305-54751f322409.mov

fbernaly commented 2 years ago

That is no bug, that is how the Google API works, and it is explained in their documentation:

Whether to detect the contours of facial features. Contours are detected for only the most prominent face in an image.

Source: check this contourMode in this table: https://developers.google.com/ml-kit/vision/face-detection/ios#1.-configure-the-face-detector