GmmSupervoxelizer

Note

This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.

class GmmSupervoxelizer(n_supervoxels: int = 50, max_iter: int = 300, n_init: int = 10, covariance_type: str = 'full')[source]

Bases: object

Partition the ROI by a Gaussian mixture over voxel features.

Soft-assignment counterpart of KMeansSupervoxelizer; each voxel takes the component of highest posterior probability.

Parameters:
  • n_supervoxels – Requested number of supervoxels, clamped to the ROI voxel count.

  • max_iter – Maximum EM iterations.

  • n_init – Number of EM restarts.

  • covariance_type – scikit-learn covariance parameterisation ("full", "tied", "diag", "spherical").

__init__(n_supervoxels: int = 50, max_iter: int = 300, n_init: int = 10, covariance_type: str = 'full') → None[source]
property spec: Spec

Return the algorithm specification.

set_random_state(seed: int) → None[source]

Set the seed applied to mixture initialisation.

__call__(field: VoxelFeatureField) → Supervoxelization[source]

Cluster the subject’s voxels into supervoxels.

Parameters:

field – Per-voxel features for one subject.

Returns:

The supervoxel partition summarised by feature means.