google-ai-edge / mediapipe

Cross-platform, customizable ML solutions for live and streaming media.
https://ai.google.dev/edge/mediapipe
Apache License 2.0
27.76k stars 5.18k forks source link

How to do face landmarks detection without face detection #4974

Closed kaikaizhu closed 11 months ago

kaikaizhu commented 1 year ago

Have I written custom code (as opposed to using a stock example script provided in MediaPipe)

None

OS Platform and Distribution

ubuntu

MediaPipe Tasks SDK version

No response

Task name (e.g. Image classification, Gesture recognition etc.)

face landmarks detection

Programming Language and version (e.g. C++, Python, Java)

c++/python

Describe the actual behavior

I want to know, if I only have 256x256 face image, how should I do face landmarks detection. What pretreatment needs to be done? Or if there is any code that runs face_landmarks directly.

Describe the expected behaviour

none

Standalone code/steps you may have used to try to get what you need

none

Other info / Complete Logs

No response

kuaashish commented 1 year ago

Hi @kaikaizhu,

Regrettably, at present, we do not provide customization options for our Tasks. Nonetheless, enhancing this feature is a top priority for us, and we anticipate having a solution in the near future (though we advise against waiting for it). In the interim, the only suggestion available is to either modify the code directly or utilize our legacy Face Detection solution, adjusting its graph as needed.

Thank you

schmidt-sebastian commented 11 months ago

You can run the FaceLandmarker API directly. There is no need for any pre-treatment as our image handling code handles any necessary resizing/conversions.