MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / draw_skeleten

Function draw_skeleten

tools/preprocess/human_visualization.py:1028–1049  ·  view source on GitHub ↗
(meta)

Source from the content-addressed store, hash-verified

1026
1027
1028def 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
1052def draw_skeleten_with_pncc(pncc: np.ndarray, meta: Dict) -> np.ndarray:

Callers

nothing calls this directly

Calls 2

draw_aaposeFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected