geomfum.descriptor package#
Submodules#
geomfum.descriptor.learned module#
Implementation of the learned descriptor.
The learned descriptor is a descriptor that uses a neural network to compute features.
- class geomfum.descriptor.learned.BaseFeatureExtractor[source]#
Bases:
ABCAbstract base class for neural network feature extractors.
- class geomfum.descriptor.learned.Descriptor[source]#
Bases:
ABCAbstract base class for shape descriptors.
- class geomfum.descriptor.learned.FeatureExtractor(*args, **kwargs)[source]#
Bases:
WhichRegistryMixinsFactory for creating feature extractors from registry.
- class geomfum.descriptor.learned.FeatureExtractorRegistry[source]#
Bases:
Registry- MAP = {'diffusionnet': ('DiffusionnetFeatureExtractor', None), 'pointnet': ('PointnetFeatureExtractor', None), 'transformer': ('TransformerFeatureExtractor', None)}#
- default = 'diffusionnet'#
- class geomfum.descriptor.learned.LearnedDescriptor(feature_extractor=None)[source]#
Bases:
Descriptor,ABC,ModuleDescriptor computed using neural network feature extractors.
- Parameters:
feature_extractor (Feature Extractor) – Feature extractor to use.
geomfum.descriptor.pipeline module#
Descriptor pipeline.
- class geomfum.descriptor.pipeline.ArangeSubsampler(subsample_step=1, axis=0)[source]#
Bases:
SubsamplerSubsampler using uniform stride-based indexing.
- Parameters:
subsample_step (int) – Arange step.
axis (int) – Axis from which to subsample.
- class geomfum.descriptor.pipeline.Descriptor[source]#
Bases:
ABCAbstract base class for shape descriptors.
- class geomfum.descriptor.pipeline.DescriptorPipeline(steps)[source]#
Bases:
objectSequential pipeline for computing and processing shape descriptors.
- Parameters:
steps (list or tuple) – Steps to apply. Include: descriptor, subsampler, normalizer.
- class geomfum.descriptor.pipeline.L2InnerNormalizer[source]#
Bases:
NormalizerNormalizer using L2 inner product with mass matrix.
- class geomfum.descriptor.pipeline.LearnedDescriptor(feature_extractor=None)[source]#
Bases:
Descriptor,ABC,ModuleDescriptor computed using neural network feature extractors.
- Parameters:
feature_extractor (Feature Extractor) – Feature extractor to use.
geomfum.descriptor.spectral module#
Spectral descriptors.
- class geomfum.descriptor.spectral.HeatKernelFilter[source]#
Bases:
SpectralFilterHeat kernel filter computing exp(-t * λ) coefficients for HKS.
- class geomfum.descriptor.spectral.HeatKernelSignature(scale=True, n_domain=3, domain=None, k=None)[source]#
Bases:
WhichRegistryMixins,SpectralDescriptorHeat Kernel Signature descriptor using heat diffusion over time.
- Parameters:
scale (bool) – Whether to scale weights to sum to one.
n_domain (int) – Number of domain points. Ignored if
domainis not None.domain (callable or array-like, shape=[n_domain], optional) – Method to compute time domain points (
f(shape)) or time domain points.k (int, optional) – Number of eigenfunctions to use. If None, all eigenfunctions are used.
- class geomfum.descriptor.spectral.HeatKernelSignatureRegistry[source]#
Bases:
Registry- MAP = {'pyfm': ('PyfmHeatKernelSignature', None)}#
- default = 'pyfm'#
- has_internal = True#
- class geomfum.descriptor.spectral.LandmarkHeatKernelSignature(scale=True, n_domain=3, domain=None, k=None)[source]#
Bases:
WhichRegistryMixins,SpectralDescriptorHeat Kernel Signature computed from landmark points.
- Parameters:
scale (bool) – Whether to scale weights to sum to one.
n_domain (int) – Number of domain points. Ignored if
domainis not None.domain (callable or array-like, shape=[n_domain], optional) – Method to compute time domain points (
f(shape)) or time domain points.k (int, optional) – Number of eigenfunctions to use.
- class geomfum.descriptor.spectral.LandmarkHeatKernelSignatureRegistry[source]#
Bases:
Registry- MAP = {'pyfm': ('PyfmLandmarkHeatKernelSignature', None)}#
- default = 'pyfm'#
- has_internal = True#
- class geomfum.descriptor.spectral.LandmarkWaveKernelSignature(scale=True, sigma=None, n_domain=3, domain=None, k=None)[source]#
Bases:
WhichRegistryMixins,SpectralDescriptorWave Kernel Signature computed from landmark points.
- Parameters:
scale (bool) – Whether to scale weights to sum to one.
sigma (float) – Standard deviation for the Gaussian.
n_domain (int) – Number of domain points. Ignored if
domainis not None.domain (callable or array-like, shape=[n_domain], optional) – Method to compute energy domain points (
f(shape)) or energy domain points.k (int, optional) – Number of eigenfunctions to use.
- class geomfum.descriptor.spectral.LandmarkWaveKernelSignatureRegistry[source]#
Bases:
Registry- MAP = {'pyfm': ('PyfmLandmarkWaveKernelSignature', None)}#
- default = 'pyfm'#
- has_internal = True#
- class geomfum.descriptor.spectral.SpectralDescriptor(spectral_filter=None, domain=None, sigma=1, scale=True, landmarks=False, k=None)[source]#
Bases:
Descriptor,ABCSpectral descriptor computed from Laplacian eigenfunctions with spectral filters.
- Parameters:
spectral_filter (SpectralFilter) – Spectral filter.
domain (callable or array-like, shape=[n_domain]) – Method to compute domain points (
f(basis, n_domain)) or domain points.sigma (float) – Standard deviation for the Gaussian.
scale (bool) – Whether to scale weights to sum to one.
landmarks (bool) – Whether to compute landmarks based descriptors.
k (int, optional) – Number of eigenvalues and eigenvectors to use. If None, basis.use_k is used.
- class geomfum.descriptor.spectral.SpectralFilter[source]#
Bases:
ABCAbstract base class for computing spectral filter coefficients from eigenvalues.
- class geomfum.descriptor.spectral.WaveKernelFilter[source]#
Bases:
SpectralFilterWave kernel filter using Gaussian weighting in log-eigenvalue space for WKS.
- class geomfum.descriptor.spectral.WaveKernelSignature(scale=True, sigma=None, n_domain=3, domain=None, k=None)[source]#
Bases:
WhichRegistryMixins,SpectralDescriptorWave Kernel Signature descriptor using quantum mechanical wave propagation.
- Parameters:
scale (bool) – Whether to scale weights to sum to one.
sigma (float) – Standard deviation for the Gaussian.
n_domain (int) – Number of domain points. Ignored if
domainis not None.domain (callable or array-like, shape=[n_domain], optional) – Method to compute energy domain points (
f(shape)) or energy domain points.k (int, optional) – Number of eigenfunctions to use. If None, all eigenfunctions are used.
- class geomfum.descriptor.spectral.WaveKernelSignatureRegistry[source]#
Bases:
Registry- MAP = {'pyfm': ('PyfmWaveKernelSignature', None)}#
- default = 'pyfm'#
- has_internal = True#
- class geomfum.descriptor.spectral.WhichRegistryMixins(*args, **kwargs)[source]#
Bases:
objectMixin enabling registry-based instantiation via ‘which’ parameter.
- class geomfum.descriptor.spectral.WksDefaultDomain(n_domain, sigma=None, n_overlap=7, n_trans=2)[source]#
Bases:
objectDefault domain generator for Wave Kernel Signature using logarithmic energy sampling.
- Parameters:
shape (Shape.) – Shape with basis.
n_domain (int) – Number of energy points to use.
n_overlap (int) – Controls Gaussian overlap. Ignored if
sigmais not None.n_trans (int) – Number of standard deviations to translate energy bound by.
Module contents#
Descriptors Module. This module contains various shape descriptors used in Geomfum. Including spectral descriptors, distance from landmarks, and feature extractors.
- class geomfum.descriptor.DistanceFromLandmarksDescriptor[source]#
Bases:
DescriptorDescriptor computing geodesic distances from landmark points.
- class geomfum.descriptor.SpectralDescriptor(spectral_filter=None, domain=None, sigma=1, scale=True, landmarks=False, k=None)[source]#
Bases:
Descriptor,ABCSpectral descriptor computed from Laplacian eigenfunctions with spectral filters.
- Parameters:
spectral_filter (SpectralFilter) – Spectral filter.
domain (callable or array-like, shape=[n_domain]) – Method to compute domain points (
f(basis, n_domain)) or domain points.sigma (float) – Standard deviation for the Gaussian.
scale (bool) – Whether to scale weights to sum to one.
landmarks (bool) – Whether to compute landmarks based descriptors.
k (int, optional) – Number of eigenvalues and eigenvectors to use. If None, basis.use_k is used.