1 vin.geometry.pose_batch

vin.geometry.pose_batch

Pose-batch shape helpers for VIN candidate scorers.

VIN scorer inputs use :class:efm3d.aria.pose.PoseTW tensors with explicit candidate and batch axes. These helpers centralize the tolerated shorthand forms before model code computes relative poses, projection grids, or rollout candidate scores.

1.1 Functions

Name Description
ensure_candidate_batch Ensure candidate camera poses are shaped as PoseTW["B N 12"].
ensure_pose_batch Broadcast one pose tensor to the VIN batch size.

1.1.1 ensure_candidate_batch

vin.geometry.pose_batch.ensure_candidate_batch(candidate_poses_world_cam)

Ensure candidate camera poses are shaped as PoseTW["B N 12"].

1.1.1.1 Parameters

Name Type Description Default
candidate_poses_world_cam PoseBatchT Candidate camera poses T_w_c with shape PoseTW["N 12"] for one snippet or PoseTW["B N 12"] for a batch. required

1.1.1.2 Returns

Name Type Description
PoseBatchT Candidate poses with an explicit batch axis.

1.1.1.3 Raises

Name Type Description
ValueError If the pose tensor is neither (N, 12) nor (B, N, 12).

1.1.2 ensure_pose_batch

vin.geometry.pose_batch.ensure_pose_batch(pose, *, batch_size, name)

Broadcast one pose tensor to the VIN batch size.

1.1.2.1 Parameters

Name Type Description Default
pose PoseBatchT Pose tensor with shape PoseTW["12"], PoseTW["1 12"], or PoseTW["B 12"]. required
batch_size int Required batch size B. required
name str Human-readable input name used in validation errors. required

1.1.2.2 Returns

Name Type Description
PoseBatchT pose shaped as PoseTW["B 12"].

1.1.2.3 Raises

Name Type Description
ValueError If pose has an unsupported rank or a non-broadcastable batch dimension.
Back to top