Skip to content

Conversation

@dodokw
Copy link
Contributor

@dodokw dodokw commented Aug 8, 2025

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.

@dodokw dodokw closed this Aug 11, 2025
@dodokw dodokw reopened this Aug 11, 2025
@dodokw
Copy link
Contributor Author

dodokw commented Aug 12, 2025

Hi! @cdiddy77

Can you please review this pr?

Thanks!

@cdiddy77
Copy link
Owner

Hi! @cdiddy77

Can you please review this pr?

Thanks!

Thank you!

@dodokw
Copy link
Contributor Author

dodokw commented Aug 13, 2025

@cdiddy77
i am sorry i missed to import java.util.Optional.(reactnativemediapipe/shared/ConvertHelpers.kt)
so i added it.

@cdiddy77 cdiddy77 merged commit e3428d0 into cdiddy77:main Aug 13, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants