1

I try to use MediaPipe in Python.

It works fine, but the result of hands.process() has multi_hand_world_landmarks, and does not have multi_hand_world_landmarks and I get

AttributeError: type object 'SolutionOutputs' has no attribute 'multi_hand_world_landmarks' 

Why?

The comment in the source https://github.com/google/mediapipe/blob/master/mediapipe/python/solutions/hands.py says the result must have this property:

Returns:
  A NamedTuple object with the following fields:
    1) a "multi_hand_landmarks" field that contains the hand landmarks on
       each detected hand.
    2) a "multi_hand_world_landmarks" field that contains the hand landmarks
       on each detected hand in real-world 3D coordinates that are in meters
       with the origin at the hand's approximate geometric center.
    3) a "multi_handedness" field that contains the handedness (left v.s.
       right hand) of the detected hand.

May be it appears in pictures with a special background only?

2 Answers2

0

Hello I met the same problem and then I checked the hands.py in my local files. I found that there is no "multi_hand_world_landmarks" in output definition. I'm trying to update to the latest mediapipe to solve it.

0

I also faced the same issue. Let me tell you how I solved the issue. What I identified, this error is firing because of the attribute 'multi_hand_landmark' was removed in version 0.8.6 of MediaPipe, and was replaced with 'multi_hand_landmarks'.

So please change the old method name and try. Hope this will help you.

Sajith A.K.
  • 716
  • 9
  • 21