Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple face contours #49

Closed
mig35 opened this issue Jan 29, 2019 · 7 comments
Closed

Support multiple face contours #49

mig35 opened this issue Jan 29, 2019 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@mig35
Copy link

mig35 commented Jan 29, 2019

Describe your environment

  • Android device: Xiaomi Mi4c and Samsung S9
  • Android OS version: 7.1.1 and 9.0
  • Google Play Services version: 14.7.99
  • Firebase/Play Services SDK version: firebase-core:16.0.6, firebase-ml-vision:18.0.2, firebase-ml-vision-face-model:17.0.2

Describe the problem:

I'm using Face Detection ml kit library to detect face contour and its lips. So I'm using this configuration:

val options = FirebaseVisionFaceDetectorOptions.Builder()
            .setMinFaceSize(0.15f)
            .setPerformanceMode(FirebaseVisionFaceDetectorOptions.ACCURATE) // I need more then 1 face
            .setContourMode(FirebaseVisionFaceDetectorOptions.ALL_CONTOURS) // I need contours of faces
            .enableTracking()
            .setLandmarkMode(FirebaseVisionFaceDetectorOptions.NO_LANDMARKS)
            .setClassificationMode(FirebaseVisionFaceDetectorOptions.NO_CLASSIFICATIONS)
            .build()

I'm able to get more then 1 face (3 in my example image) with boundingBox and trackingId, but countours are populated only for one face. All others are just empty.
Documentation says that ALL_CONTOURS: Detects FirebaseVisionFaceContour for a given face. Note that it would return contours for up to 5 faces. So I expect that ml kit will return contours for up to 5 faces, but not the only 1 of them.

Steps to reproduce:

  1. Setup Ml Kit and sdk with configuration above
  2. Process an image or camera frame with multiply faces
  3. See face detection result

Observed Results:

  • There are more then 1 face in result (3 in my case of image). But contours are populated only for one face in the result (for others just an empty lists).

Expected Results:

  • Want to get up to 5 faces contours as it is said in the documentation.
@google-oss-bot
Copy link

This issue does not seem to follow the issue template. Make sure you provide all the required information.

@marshallaf
Copy link

I'm also only getting a single face's contours per analysis.

Perhaps the documentation for ALL_CONTOURS is incorrect. On the "Detect Faces with ML Kit on Android" quickstart page it says under "Detect contours" that "Contours are detected for only the most prominent face in an image."

@OmarBenyahyaten
Copy link

temporary solution :

Same here. I'm detecting 5 faces but I'm only getting one face that has a contour.
So, each time, I crop the picture on the faces for which the API can not detect its contour, I pass them to the API one by one, and there I can get the contour of each face. It's bad but it's working

@usmanali45
Copy link

i am also facing the same problem using firebase ml kit. Detecting multiple faces in the image but contours of only the most prominent face in the image. Anyone plzzzz help me!

@AliAzaz
Copy link

AliAzaz commented Nov 21, 2019

Facing the same issue... any solution for it????
also check the discription:
image

@ulukaya ulukaya transferred this issue from firebase/quickstart-android Jun 30, 2020
@ulukaya ulukaya transferred this issue from another repository Jun 30, 2020
@calren
Copy link
Collaborator

calren commented Jul 20, 2020

I believe the current API only supports the contour for ONE face. I'll mark this as a feature request for now. Thanks!

@calren calren added the enhancement New feature or request label Jul 20, 2020
@calren calren changed the title Ml Kit multiply face contours Support multiple face contours Jul 20, 2020
@jackqdyulei
Copy link
Collaborator

Hi all,

Please try new Face mesh detection SDK, which has improved functionality for face contour

  1. It provides 468 3D points, rather than 133 2D points
  2. It provides face mesh for at most 2 faces.(Please let us know if you need to support more faces, we might consider it in future)

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants