MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / visualize_smpl_vibe

Function visualize_smpl_vibe

detrsmpl/core/visualization/visualize_smpl.py:1117–1148  ·  view source on GitHub ↗

Simplest way to visualize pred smpl with origin frames and predicted cameras.

(orig_cam=None,
                        pred_cam=None,
                        bbox=None,
                        output_path='sample.mp4',
                        resolution=None,
                        aspect_ratio=1.0,
                        bbox_scale_factor=1.25,
                        bbox_format='xyxy',
                        **kwargs)

Source from the content-addressed store, hash-verified

1115
1116
1117def visualize_smpl_vibe(orig_cam=None,
1118 pred_cam=None,
1119 bbox=None,
1120 output_path='sample.mp4',
1121 resolution=None,
1122 aspect_ratio=1.0,
1123 bbox_scale_factor=1.25,
1124 bbox_format='xyxy',
1125 **kwargs) -> None:
1126 """Simplest way to visualize pred smpl with origin frames and predicted
1127 cameras."""
1128 assert resolution is not None
1129 if pred_cam is not None and bbox is not None:
1130 orig_cam = torch.Tensor(
1131 convert_crop_cam_to_orig_img(pred_cam, bbox, resolution[1],
1132 resolution[0], aspect_ratio,
1133 bbox_scale_factor, bbox_format))
1134 assert orig_cam is not None, '`orig_cam` is required.'
1135
1136 func = partial(
1137 render_smpl,
1138 projection='weakperspective',
1139 convention='opencv',
1140 in_ndc=True,
1141 )
1142 for k in func.keywords.keys():
1143 if k in kwargs:
1144 kwargs.pop(k)
1145 return func(orig_cam=orig_cam,
1146 output_path=output_path,
1147 resolution=resolution,
1148 **kwargs)
1149
1150
1151def visualize_T_pose(num_frames,

Callers

nothing calls this directly

Calls 2

keysMethod · 0.45

Tested by

no test coverage detected