1 rendering.candidate_pointclouds

rendering.candidate_pointclouds

Vectorised depth-to-point-cloud conversion for candidate renders.

Consumes a single EfmSnippetView and matching CandidateDepths to produce padded per-candidate point clouds, fused clouds with the collapsed semi-dense SLAM reconstruction, and a combined occupancy extent for cropping.

This module owns vectorized unprojection, padding, semidense fusion, and bounds assembly in CandidatePointClouds. Depth rasterization, candidate feasibility, target matching/cropping policy, and RRI scoring remain with their respective renderer, generator, and metric layers.

The output is world-frame oracle evidence. Scene-level RRI uses the combined snippet/candidate extent; target-level RRI may further crop both candidate points and mesh geometry with the matched GT target OBB. Empty target crops or unusable candidate depth should surface as invalidity, not as a low score.

1.1 Classes

Name Description
CandidatePointClouds Batched candidate point clouds plus fused semi-dense reconstruction.
PreparedSampleGeometry Device-local sample geometry reused across candidate batches.

1.1.1 CandidatePointClouds

rendering.candidate_pointclouds.CandidatePointClouds(
    points,
    lengths,
    semidense_points,
    semidense_length,
    occupancy_bounds,
)

Batched candidate point clouds plus fused semi-dense reconstruction.

1.1.1.1 Attributes

Name Description
points Padded candidate points Tensor["C P 3", float] in world metres.
lengths Valid point counts Tensor["C", int64] for each padded row.
semidense_points Collapsed observed SLAM points Tensor["K 3", float] in world metres.
semidense_length Observed point count Tensor["1", int64] for serialization symmetry.
occupancy_bounds World bounds Tensor["6", float] ordered xmin/xmax/ymin/ymax/zmin/zmax.

1.1.1.2 Methods

Name Description
to_serializable Serialize this point-cloud batch into a cache-friendly CPU payload.
from_serializable Reconstruct one point-cloud batch from a serialized payload.
1.1.1.2.1 to_serializable
rendering.candidate_pointclouds.CandidatePointClouds.to_serializable()

Serialize this point-cloud batch into a cache-friendly CPU payload.

1.1.1.2.2 from_serializable
rendering.candidate_pointclouds.CandidatePointClouds.from_serializable(
    payload,
    *,
    device,
)

Reconstruct one point-cloud batch from a serialized payload.

1.1.1.2.2.1 Parameters
Name Type Description Default
payload dict[str, object] Serialized payload produced by to_serializable. required
device torch.device Destination device for tensors. required
1.1.1.2.2.2 Returns
Name Type Description
'CandidatePointClouds' Reconstructed candidate-pointcloud batch.

1.1.2 PreparedSampleGeometry

rendering.candidate_pointclouds.PreparedSampleGeometry(
    _source_sample,
    semidense_points,
    semidense_length,
    static_bounds,
)

Device-local sample geometry reused across candidate batches.

1.1.2.1 Attributes

Name Description
semidense_points Collapsed observed points Tensor["K 3", float] in world metres.
semidense_length Observed point count Tensor["1", int64].
static_bounds Snippet and semidense bounds Tensor["6", float] in world metres.

1.2 Functions

Name Description
build_candidate_pointclouds Convert stacked depth maps into batched point clouds and fuse with SLAM.
prepare_sample_geometry Collapse and transfer sample-static geometry once for repeated renders.

1.2.1 build_candidate_pointclouds

rendering.candidate_pointclouds.build_candidate_pointclouds(
    sample,
    batch,
    *,
    stride=1,
    prepared_sample=None,
)

Convert stacked depth maps into batched point clouds and fuse with SLAM.

1.2.2 prepare_sample_geometry

rendering.candidate_pointclouds.prepare_sample_geometry(
    sample,
    *,
    device,
    dtype,
)

Collapse and transfer sample-static geometry once for repeated renders.

Back to top