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)
| 1115 | |
| 1116 | |
| 1117 | def 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 | |
| 1151 | def visualize_T_pose(num_frames, |
nothing calls this directly
no test coverage detected