TypeError: 'upper_body_only' is an Unexpected Keyword Argument in mediapipe.Pose
TypeError: 'upper_body_only' is an Unexpected Keyword Argument in mediapipe.Pose
The error "TypeError: init() got an unexpected keyword argument 'upper_body_only'" arises because the mp_pose.Pose class constructor in older versions of Mediapipe doesn't support the 'upper_body_only' parameter. This parameter has been removed in newer versions.
To resolve this, try the following:
-
Remove the
'upper_body_only'parameter: Simply remove this parameter from your code if you're not specifically needing it. -
Upgrade your
mediapipelibrary: Installing the latest version ofmediapipemight introduce the'upper_body_only'parameter in themp_pose.Poseclass. You can upgrade using pip:
pip install --upgrade mediapipe
By implementing one of these solutions, you should be able to use the mp_pose.Pose class effectively for full-body pose tracking in your project.
原文地址: https://www.cveoy.top/t/topic/j87I 著作权归作者所有。请勿转载和采集!