MCPcopy Create free account
hub / github.com/CUT3R/CUT3R / align_multiple_poses

Function align_multiple_poses

cloud_opt/utils.py:405–416  ·  view source on GitHub ↗
(src_poses, target_poses)

Source from the content-addressed store, hash-verified

403
404
405def align_multiple_poses(src_poses, target_poses):
406 N = len(src_poses)
407 assert src_poses.shape == target_poses.shape == (N, 4, 4)
408
409 def center_and_z(poses):
410 eps = get_med_dist_between_poses(poses) / 100
411 return torch.cat((poses[:, :3, 3], poses[:, :3, 3] + eps * poses[:, :3, 2]))
412
413 R, T, s = roma.rigid_points_registration(
414 center_and_z(src_poses), center_and_z(target_poses), compute_scaling=True
415 )
416 return s, R, T
417
418
419def cosine_schedule(t, lr_start, lr_end):

Callers 1

init_from_pts3dFunction · 0.70

Calls 1

center_and_zFunction · 0.70

Tested by

no test coverage detected