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

solutions.drawing_utils.draw_landmarks does not work on RGBA images #5266

Closed
JC3 opened this issue Mar 26, 2024 · 5 comments
Closed

solutions.drawing_utils.draw_landmarks does not work on RGBA images #5266

JC3 opened this issue Mar 26, 2024 · 5 comments
Assignees
Labels
gpu MediaPipe GPU related issues os:macOS Issues on MacOS platform:python MediaPipe Python issues task:pose landmarker Issues related to Pose Landmarker: Find people and body positions type:bug Bug in the Source Code of MediaPipe Solution

Comments

@JC3
Copy link

JC3 commented Mar 26, 2024

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

@JC3 JC3 added the type:bug Bug in the Source Code of MediaPipe Solution label Mar 26, 2024
@kuaashish kuaashish added os:macOS Issues on MacOS platform:python MediaPipe Python issues gpu MediaPipe GPU related issues task:pose landmarker Issues related to Pose Landmarker: Find people and body positions labels Mar 28, 2024
@kuaashish
Copy link
Collaborator

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!!

@kuaashish kuaashish added the stat:awaiting response Waiting for user response label Apr 2, 2024
@JC3
Copy link
Author

JC3 commented Apr 2, 2024

Can't repro; will investigate further and post back.

@kuaashish
Copy link
Collaborator

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!!

@kuaashish kuaashish added the stat:awaiting response Waiting for user response label May 3, 2024
Copy link

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.

@github-actions github-actions bot added the stale label May 11, 2024
Copy link

This issue was closed due to lack of activity after being marked stale for past 7 days.

@kuaashish kuaashish removed stat:awaiting response Waiting for user response stale labels May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gpu MediaPipe GPU related issues os:macOS Issues on MacOS platform:python MediaPipe Python issues task:pose landmarker Issues related to Pose Landmarker: Find people and body positions type:bug Bug in the Source Code of MediaPipe Solution
Projects
None yet
Development

No branches or pull requests

2 participants