NEW API Documentation is available here
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.
The package is now in v1.0.0 as it has been stable for quite a long time. It had been released on PyPI.
It can be unstalled using
pip install pyfmaps
- 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 :
- The Heat Method for Distance Computation
- A Concise and Provably Informative Multi-Scale Signature Based on Heat Diffusion
- The Wave Kernel Signature: A Quantum Mechanical Approach To Shape Analysis
- ZoomOut: Spectral Upsampling for Efficient Shape Correspondence, with MatLab implementation here
- Deblurring and Denoising of Maps between Shapes, with Matlab implementation here
- Functional Maps: A Flexible Representation of Maps Between Shapes
- Informative Descriptor Preservation via Commutativity for Shape Matching
- Continuous and Orientation-preserving Correspondences via Functional Maps, only the orientation preserving / reversing term, matlab implementation can be found here
- Map-Based Exploration of Intrinsic Shape Differences and Variability
- An Optimization Approach to Improving Collections of Shape Maps
- Limit Shapes – A Tool for Understanding Shape Differences and Variability in 3D Model Collections
- CONSISTENT ZOOMOUT: Efficient Spectral Map Synchronization, with Matlab implementation here
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.
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.
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
)
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.
See the Example Notebook for example of code.