Feat: Add visibility and presence to landmark results(AOS) #178
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR updates the pose detection module to include visibility and presence data in the landmark results returned to the React Native side.
Motivation and Context
Currently, the poseLandmarker implementation only provides x, y, and z coordinates for each landmark. However, the underlying MediaPipe PoseLandmarkerResult also provides visibility and presence values, which are crucial for determining if a landmark is occluded or within the frame. This missing data limits the ability to build more context-aware features.
This change exposes these valuable properties, allowing developers to create more robust applications.
Changes
Upgraded Dependency: The com.google.mediapipe:tasks-vision dependency has been upgraded from 0.10.2 to 0.10.26 to ensure access to the latest landmark properties and improvements.
Updated Data Converters: The landmarkToWritableMap and normalizedLandmarkToWritableMap functions have been modified to safely check for and include the visibility and presence values from the Landmark object.
With this update, developers can now access landmark.visibility and landmark.presence directly from the pose detection results.