(poses)
| 262 | |
| 263 | |
| 264 | def convert_poses(poses): |
| 265 | # poses: [B, 4, 4] |
| 266 | # return [B, 3], 4 rot, 3 trans |
| 267 | out = torch.empty(poses.shape[0], 6, dtype=torch.float32, device=poses.device) |
| 268 | out[:, :3] = matrix_to_euler_angles(poses[:, :3, :3]) |
| 269 | out[:, 3:] = poses[:, :3, 3] |
| 270 | return out |
| 271 | |
| 272 | |
| 273 |