mediapipe
mediapipe copied to clipboard
solutions.drawing_utils.draw_landmarks does not work on RGBA images
Have I written custom code (as opposed to using a stock example script provided in MediaPipe)
None
OS Platform and Distribution
MacOS
Mobile device if the issue happens on mobile device
No response
Browser and version if the issue happens on browser
No response
Programming Language and version
Python
MediaPipe version
0.10.9
Bazel version
No response
Solution
Pose Landmarker
Android Studio, NDK, SDK versions (if issue is related to building in Android environment)
No response
Xcode & Tulsi version (if issue is related to building for iOS)
No response
Describe the actual behavior
If an RGBA image is passed to solutions.drawing_utils.draw_landmarks (such as when using GPU mode, where the image must be RGBA), then solutions.drawing_utils.draw_landmarks fails. As a workaround, the image can be converted back to RGB prior to passing to this function.
Describe the expected behaviour
solutions.drawing_utils.draw_landmarks should work on RGBA images.
Standalone code/steps you may have used to try to get what you need
solutions.drawing_utils.draw_landmarks
Other info / Complete Logs
No response
Hi @JC3,
Could you kindly provide the detailed steps you are following from our documentation, or alternatively, share the standalone code with us? This will help us to reproduce the issue and gain a better understanding of it.
Thank you!!
Can't repro; will investigate further and post back.
Hi @JC3,
Based on our team's investigation indicates that the existing MediaPipe visualization utilities API is not directly compatible with the new Tasks API. This is because the visualization utilities were designed for the legacy solutions.
For correct guidance on using visualization with the new Tasks API, please refer to the Colab example https://github.com/googlesamples/mediapipe/blob/main/examples/pose_landmarker/python/%5BMediaPipe_Python_Tasks%5D_Pose_Landmarker.ipynb.
Thank you!!
This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.
This issue was closed due to lack of activity after being marked stale for past 7 days.