Skip to content
/ pyFM Public
forked from RobinMagnet/pyFM

Python implementation of Functional Maps

License

Notifications You must be signed in to change notification settings

AntoineHX/pyFM

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

pynndescent (see here) is an optional package which is only required if one wish to use Approximate Nearest Neighbor. Else it is not required.

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.

About

Python implementation of Functional Maps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 94.2%
  • Jupyter Notebook 5.8%