A small bug where attributes are assigned before the initialization of poseLandmarkerHelper #5772
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
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
The text was updated successfully, but these errors were encountered: