googlesamples / googlesamples/mlkit

[Bug report] pose.landmarks does not return expected Landmark when retrieved through index

Open
#609 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
4.3k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Retrieving a Pose Landmark by index from `pose.landmarks` does not give expected values.

**To Reproduce**
Example Steps to reproduce the behavior in sample app:
```
let wrist = pose.landmark(ofType: PoseLandmarkType.leftWrist)
print("wrist.x = \(wrist.position.x), .y = \(wrist.position.y)")
print("wrist.x = \(pose.landmarks[15].position.x), .y = \(pose.landmarks[15].position.y)")
```

Running the above should print the same values.

**Expected behavior**
Expected behaviour is that `.landmarks` array in Pose would use same indices as in Documentation (Android uses correct indices). Printing out position values for `pose.landmarks[15]` should give values for LeftWrist as seen in Landmarks image overview from MLKit docs:

![](https://developers.google.com/static/ml-kit/images/vision/pose-detection/landmarks-fixed.png)


**SDK Info:**
- 'GoogleMLKit/PoseDetection', '3.2.0'

**Smartphone:**
- Device: iPhone 11
- iOS Version: 16.1.1

**Development Environment:**
- IDE Eversion: Xcode 14.2
- Laptop/Desktop: MacBook M1 Pro
- OS: MacOS 13.0.1 (22A400)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.