Skip to main content

Python bindings for functional maps

Project description

V 1.0 is coming very soon, with release on PyPi

Expected pyFM.torch version

pyFM - Python bindings for functional maps

pyFM is a pure python implementation of multiple tools used for Functional Maps computations. Namely, it implements shape signatures, functional map optimization and refinement algorithm, and above all an easy-to-use interface for using functional maps.

Features

  • A TriMesh class incuding many standard geometric measures with python code, including geodesic distances (using the heat method), normals, projection on the LBO basis, export of .off or .obj files with textures.
  • A pure Python (fast) implementation of Laplace-Beltrami Operator.
  • Implementation of HKS and WKS (and their version for landmarks) with multiple level of automation for parameters selection (from full automatic to total control)
  • Implementation of icp and ZoomOut on Python
  • Fast conversion from Functional Map to vertex to vertex map or precise map using p-dimensional vertex to mesh projection
  • A FunctionalMapping class for straightforward computation of Functional Maps mixing all the previous features
  • Functions for evaluating functional maps.
  • Support for Functional Map Networks : Consistent Latent Basis, Canonical Consistent Latent Basis, consistency weights, Consistent ZoomOut

In particular this codebade contains python implementations of the following papers :

Incoming features

Python code for Discrete Optimization and Reversible Harmonic Map should be released soon. Don't hesitate to reach out at <rmagnet@> <lix.polytechnique.fr> for requests.

Dependencies

Hard dependencies are numpy, scipy, tqdm, scikit-learn for its KDTree implementation.

The main non-standard (optional) dependencies are potpourri3d for its robust geodesic distance computation and robust_laplacian which provide an implementation of both intrinsic delaunay and tufted Laplacian. If these functionalities are not needed one can remove the imports here and here.

I did not build on the trimesh package which has some strange behaviour with vertex reordering.

Remark on Code notations

In the whole codebase, we consider pairs of meshes mesh1 and mesh2. Functional maps always go from mesh1 to mesh2 (denoted FM_12) and pointwise maps always from mesh2 to mesh1 (denoted p2p_21)

Example Code

Running the example notebook gives you an overview of the package functions. Note that this notebook requires the meshplot package, which is an easy to use interface for pythreejs, which allows to display mesh in an easy fashion on notebooks.

All functions in the package are documented, with a descriptions of parameters and output.

Example Code for shape matching

See the Example Notebook for example of code.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyfmaps-1.0.0.tar.gz (343.1 kB view hashes)

Uploaded Source

Built Distribution

pyfmaps-1.0.0-py3-none-any.whl (56.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page