google-ai-edge / mediapipe

Cross-platform, customizable ML solutions for live and streaming media.
https://ai.google.dev/edge/mediapipe
Apache License 2.0
27.49k stars 5.15k forks source link

@mediapipe/tasks-vision 0.10.0 Pose landmarks is not returning visibility nor presence #4479

Closed hansen1416 closed 1 year ago

hansen1416 commented 1 year ago

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

None

OS Platform and Distribution

Windows10/Ubuntu20.04

Mobile device if the issue happens on mobile device

No response

Browser and version if the issue happens on browser

Google chrome

Programming Language and version

javascript

MediaPipe version

No response

Bazel version

No response

Solution

Pose

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

In the result callback, the items of landmarks and worldLandmarks only contain values of x, y, z coordinates. 
But according to https://developers.google.com/mediapipe/solutions/vision/pose_landmarker/web_js, there shoube be two more keys `visibility` and `presence`.

Describe the expected behaviour

In the result callback, the items of landmarks and worldLandmarks should contain `visibility` and `presence`.

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

Install "@mediapipe/tasks-vision": "^0.10.0" via npm. Download the models needed.

const createPoseLandmarker = async () => {
        const vision = await FilesetResolver.forVisionTasks(
            "/tasks-vision/wasm"
        );
        return await PoseLandmarker.createFromOptions(vision, {
            baseOptions: {
                modelAssetPath: `/tasks-vision/pose_landmarker_lite.task`,
                delegate: "GPU",
            },
            runningMode: "VIDEO",
            numPoses: 1,
            minPoseDetectionConfidence: 0.5,
            minPosePresenceConfidence: 0.5,
            minTrackingConfidence: 0.5,
            outputSegmentationMasks: false,
        });
    };

...

createPoseLandmarker().then((pose) => {
    poseDetector = pose;
});
...

poseDetector.detectForVideo(
    video,
    performance.now(),
    (res) => {
        console.log(res);
    }
);


### Other info / Complete Logs

_No response_
kuaashish commented 1 year ago

Closing this as Duplicate of #4409. Please follow with already raised issue.

google-ml-butler[bot] commented 1 year ago

Are you satisfied with the resolution of your issue? Yes No