1 vin.geometry.frustum
vin.geometry.frustum
Frustum point sampling helpers for VIN geometry diagnostics.
The legacy experimental VIN variants and plotting diagnostics sample fixed metric-depth grids inside PyTorch3D cameras. This module owns that camera-space math so model classes only describe when frustum samples are needed.
1.1 Functions
| Name | Description |
|---|---|
| build_frustum_points_world_p3d | Unproject a square image grid at fixed depths into world points. |
| frustum_points_world_from_cameras | Generate per-candidate frustum sample points in world coordinates. |
1.1.1 build_frustum_points_world_p3d
vin.geometry.frustum.build_frustum_points_world_p3d(
cameras,
*,
grid_size,
depths_m,
)Unproject a square image grid at fixed depths into world points.
1.1.1.1 Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| cameras | PerspectiveCameras |
PyTorch3D camera batch with pixel image_size and principal_point parameters. |
required |
| grid_size | int | Number of image samples per side. | required |
| depths_m | list[float] | Positive metric depths to sample along each image ray. | required |
1.1.1.2 Returns
| Name | Type | Description |
|---|---|---|
| Tensor | Tensor["Nc G*G*D 3"] of world-frame points, where Nc is the |
|
| Tensor | camera count and D is len(depths_m). |
1.1.2 frustum_points_world_from_cameras
vin.geometry.frustum.frustum_points_world_from_cameras(
poses_world_cam,
*,
p3d_cameras,
grid_size,
depths_m,
)Generate per-candidate frustum sample points in world coordinates.
1.1.2.1 Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| poses_world_cam | PoseTW |
Candidate poses shaped as PoseTW["B N 12"]. The tensor supplies the desired B and N layout; projection uses the aligned p3d_cameras batch. |
required |
| p3d_cameras | PerspectiveCameras |
PyTorch3D cameras aligned with candidates. The camera batch must be N when B == 1 or B * N otherwise. |
required |
| grid_size | int | Number of image samples per side. | required |
| depths_m | list[float] | Positive metric depths sampled along each image ray. | required |
1.1.2.2 Returns
| Name | Type | Description |
|---|---|---|
| Tensor | Tensor["B N K 3"] world-frame frustum points. |