1 backproject_depths_p3d_batch

rendering.unproject.backproject_depths_p3d_batch(
    depths,
    mask_valid,
    cameras,
    *,
    stride=1,
)

Back-project a batch of PyTorch3D depth maps to world-frame points.

1.1 Parameters

Name Type Description Default
depths torch.Tensor Tensor["B", "H", "W"] metric z-depth maps in metres. required
mask_valid torch.Tensor Tensor["B", "H", "W"] boolean masks for usable pixels. required
cameras PerspectiveCameras One pytorch3d.renderer.PerspectiveCameras entry per depth map, carrying world-from-camera extrinsics. required
stride int Pixel subsampling stride. 1

1.2 Returns

Name Type Description
torch.Tensor Pair (padded, lengths) where padded is
torch.Tensor Tensor["B", "Pmax", 3] in world coordinates and lengths is
tuple[torch.Tensor, torch.Tensor] Tensor["B"] with the valid count per candidate.