Skip to content

octree

Transforms that build an octree and its features.

Classes:

  • BuildOctree –

    Build an octree from positions stored in a dictionary.

  • OctreeFeatures –

    Extract per-node features from an octree via octree.get_input_feature.

BuildOctree [source] ΒΆ

BuildOctree(
    *,
    pos_key: str,
    dst_octree_key: str,
    depth: int,
    full_depth: int = 2,
    batch_size: int = 1,
    normal_key: str | None = None,
    feature_key: str | None = None,
    label_key: str | None = None,
    batch_key: str | None = None,
    dst_points_key: str | None = None,
)

Bases: DictTransform

Build an octree from positions stored in a dictionary.

BuildOctree on an object

BuildOctree on a room

Parameters:

  • pos_key (str) –

    Key holding the point positions.

  • dst_octree_key (str) –

    Key under which the octree is stored.

  • depth (int) –

    Octree depth.

  • full_depth (int, default: 2 ) –

    Full depth of the octree.

  • batch_size (int, default: 1 ) –

    Batch size.

  • normal_key (str | None, default: None ) –

    Key holding surface normals.

  • feature_key (str | None, default: None ) –

    Key holding point features.

  • label_key (str | None, default: None ) –

    Key holding per-point labels.

  • batch_key (str | None, default: None ) –

    Key holding batch indices.

  • dst_points_key (str | None, default: None ) –

    Key under which the octree points are stored.

OctreeFeatures [source] ΒΆ

OctreeFeatures(
    keys: KeyCollection,
    features_type: str,
    nempty: bool = False,
    dst_keys: Optional[KeyCollection] = None,
    allow_missing_keys: bool = False,
)

Bases: DictTransform

Extract per-node features from an octree via octree.get_input_feature.

OctreeFeatures on an object

OctreeFeatures on a room

Parameters:

  • keys (KeyCollection) –

    Keys holding Octree instances to extract features from.

  • features_type (str) –

    Feature spec passed to octree.get_input_feature (e.g. "ND" for normals + depth, "NDFP" for normals + depth + features + position).

  • nempty (bool, default: False ) –

    If True, return features only for non-empty nodes; otherwise include empty-node padding.

  • dst_keys (Optional[KeyCollection], default: None ) –

    Where to store the extracted feature tensors. Defaults to keys.

  • allow_missing_keys (bool, default: False ) –

    If True, silently skip absent keys.