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

A small bug where attributes are assigned before the initialization of poseLandmarkerHelper #5772

Open
Henryers opened this issue Dec 8, 2024 · 1 comment
Assignees
Labels
platform:android Issues with Android as Platform stat:awaiting googler Waiting for Google Engineer's Response task:pose landmarker Issues related to Pose Landmarker: Find people and body positions type:bug Bug in the Source Code of MediaPipe Solution

Comments

@Henryers
Copy link

Henryers commented Dec 8, 2024

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

None

OS Platform and Distribution

Android 14

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

Kotlin

MediaPipe version

No response

Bazel version

No response

Solution

A bug about poseLandmarkerHelper, and I want to provide a solution code for reference.

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

At https://github.com/google-ai-edge/mediapipe-samples/blob/main/examples/pose_landmarker/android/app/src/main/java/com/google/mediapipe/examples/poselandmarker/fragment/GalleryFragment.kt, in line 216: "poseLandmarkerHelper.currentModel = p2" But at this time , poseLandmarkerHelper hasn't inited yet.

Describe the expected behaviour

Use "viewModel.setModel(p2)" instead. When we create the object, we can add this line in 282: currentModel = viewModel.currentModel

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

https://github.com/google-ai-edge/mediapipe-samples/blob/main/examples/pose_landmarker/android/app/src/main/java/com/google/mediapipe/examples/poselandmarker/fragment/GalleryFragment.kt, in line 216: "poseLandmarkerHelper.currentModel = p2"

Other info / Complete Logs

Because poseLandmarkerHelper is lateinit, when I want to adjust the parameter "currentModel" before gesture detection of the image, click it, and it will flash back, and then change to my line of code to return to normal.
@Henryers Henryers added the type:bug Bug in the Source Code of MediaPipe Solution label Dec 8, 2024
@kalyan2789g kalyan2789g assigned kalyan2789g and unassigned kuaashish Dec 9, 2024
@kalyan2789g kalyan2789g added platform:android Issues with Android as Platform task:pose landmarker Issues related to Pose Landmarker: Find people and body positions labels Dec 9, 2024
@kuaashish
Copy link
Collaborator

Hi @schmidt-sebastian,

Could you please look into this issue? It seems that the problem is on our end, and a small correction is needed in the codebase.

Thank you!!

@kuaashish kuaashish added the stat:awaiting googler Waiting for Google Engineer's Response label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:android Issues with Android as Platform stat:awaiting googler Waiting for Google Engineer's Response 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

4 participants