emmi_inference.models.pipelines.anchor_point_sampling_precollator

WARNING This file is a 1:1 duplicate from the tutorial folder.

It is here to avoid installation of a tutorial as a package and keep it isolated.

Classes

AnchorPointSamplingPreCollator

Randomly subsamples points from a pointcloud.

Module Contents

class emmi_inference.models.pipelines.anchor_point_sampling_precollator.AnchorPointSamplingPreCollator(items, num_points, to_prefix_and_postfix, to_prefix_midfix_postfix, keep_queries=False, seed=None)

Bases: ksuit.data.SampleProcessor

Randomly subsamples points from a pointcloud.

Initializes the point sampling precollator.

Parameters:
  • items (set[str]) – Which pointcloud items should be subsampled (e.g., input_position, output_position, …). If multiple items are present, the subsampling will use identical indices for all items (e.g., to downsample output_position and output_pressure with the same subsampling).

  • num_points (int) – Number of points to sample.

  • seed (int | None) – Random seed for deterministic sampling for evaluation. Default None (i.e., no seed). If not None, requires sample index to be present in batch.

  • to_prefix_and_postfix (collections.abc.Callable[[str], tuple[str, str]])

  • to_prefix_midfix_postfix (collections.abc.Callable[[str], tuple[str, str, str]])

  • keep_queries (bool)

items
num_points
keep_queries = False
to_prefix_and_postfix
to_prefix_midfix_postfix
seed = None