(pose_meta)
| 55 | |
| 56 | @staticmethod |
| 57 | def _get_body_keypoints(pose_meta): |
| 58 | if pose_meta is None: |
| 59 | return None |
| 60 | body_keypoints = pose_meta.get("keypoints_body") |
| 61 | if body_keypoints is None: |
| 62 | return None |
| 63 | try: |
| 64 | body_keypoints = np.asarray(body_keypoints, dtype=np.float32) |
| 65 | except (TypeError, ValueError): |
| 66 | return None |
| 67 | if body_keypoints.ndim != 2 or body_keypoints.shape[1] < 3: |
| 68 | return None |
| 69 | return body_keypoints |
| 70 | |
| 71 | @classmethod |
| 72 | def _get_valid_body_keypoint_mask(cls, pose_meta, keypoint_indices=None): |
no test coverage detected