mediapipe: poseWorldLandmarks missing from holistic js api

Please make sure that this is a solution issue.

System information (Please provide as much relevant information as possible)

Describe the expected behavior:

holistic.onResults should also provide poseWorldLandmarks in the same way as pose.onResults

Actually I wish holistic.setOption should provide option to let us enable and enable/disable each feature. And worldPosition should be boolean option to change every landmarks into world position. So we could have hand and face mesh in world position too

Standalone code you may have used to try to get what you need :


  const pose = new Pose({
    locateFile: (file) => {
      if(file.startsWith("pose"))
        return `https://cdn.jsdelivr.net/npm/@mediapipe/pose/${file}`;
      return `https://cdn.jsdelivr.net/npm/@mediapipe/holistic/${file}`; // by unknown reason. Sometimes holistic file would trying to be loaded in here
    }
  });

  pose.setOptions({
    modelComplexity: 1,
    smoothLandmarks: true,
    enableSegmentation: false,
    smoothSegmentation: false,
    refineFaceLandmarks: true,
    minDetectionConfidence: 0.2,
    minTrackingConfidence: 0.2
  });

  pose.onResults((result) => {
     result.poseWorldLandmarks; // exist
  });


  const holistic = new Holistic({
    locateFile: (file) => {
      if(file.startsWith("pose"))
        return `https://cdn.jsdelivr.net/npm/@mediapipe/pose/${file}`;
      return `https://cdn.jsdelivr.net/npm/@mediapipe/holistic/${file}`;
    }
  });

  holistic.setOptions({
    modelComplexity: 1,
    smoothLandmarks: true,
    enableSegmentation: false,
    smoothSegmentation: false,
    refineFaceLandmarks: true,
    minDetectionConfidence: 0.2,
    minTrackingConfidence: 0.2
  });

  holistic.onResults((results) => {
     result.poseWorldLandmarks; // missing
  });

Other info / Complete Logs :

undefined

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 33

Most upvoted comments

@Thaina,

This needs to be checked with new solutions available. For now, We do not have any such documentation where the changes done compare to old legacy with upgraded one are available. Our new solution has been improved and performance increased. Further, We will let you know if any relevant document will be available from our end. However, We would like you to explore upgraded solution and revert back if the poseWorldLandmarks are missing from it. Thank you!

@Thaina,

This is already in our roadmap(Check here). We will let you know once becomes available from our end. For now we can not provide any timeline about the release date. Thank you!

Is this already fixed?

@Thaina Yes, the way around this would be to simply use ea for now if you are using the CDN version. I unfortunately cannot improve the docs because I am not part of google and figured this out via logging. @sureshdagooglecom would you mind exposing ea in the type definition for the holistic npm package. I did this locally and resolved the issue for me.

@Thaina The cdn version does contain the world landmark, but it is result.ea instead of result.poseWorldLandmarks. However, poseWorldLandmarks is indeed missing in the npm package export. @sureshdagooglecom Would you mind taking a look at the missing poseWorldLandmarks in @mediapipe/holistic npm package? I believe this is a bug because result.poseWorldLandmarks is available in @mediapipe/pose and result.poseWorldLandmarks is not in any version of holistic in the npm package. It looks like a type error in which the poseWorldLandmarks is not defined in the type declaration but nevertheless exists, which leads to typescript error unless you override the result type with an additional ea field.