(meta)
| 1026 | |
| 1027 | |
| 1028 | def draw_skeleten(meta): |
| 1029 | kps = [] |
| 1030 | for i, kp in enumerate(meta["keypoints_body"]): |
| 1031 | if kp is None: |
| 1032 | # if kp is None: |
| 1033 | kps.append([0, 0, 0]) |
| 1034 | else: |
| 1035 | kps.append([*kp, 1]) |
| 1036 | kps = np.array(kps) |
| 1037 | |
| 1038 | kps[:, 0] *= meta["width"] |
| 1039 | kps[:, 1] *= meta["height"] |
| 1040 | pose_img = np.zeros([meta["height"], meta["width"], 3], dtype=np.uint8) |
| 1041 | |
| 1042 | pose_img = draw_aapose( |
| 1043 | pose_img, |
| 1044 | kps, |
| 1045 | draw_hand=True, |
| 1046 | kp2ds_lhand=meta["keypoints_left_hand"], |
| 1047 | kp2ds_rhand=meta["keypoints_right_hand"], |
| 1048 | ) |
| 1049 | return pose_img |
| 1050 | |
| 1051 | |
| 1052 | def draw_skeleten_with_pncc(pncc: np.ndarray, meta: Dict) -> np.ndarray: |
nothing calls this directly
no test coverage detected