Densemaps : Abstract Correspondence Maps for 3D Geometry
Welcome to the documentation of densemaps !
A lightweight library that offers:
- Unified correspondence representation for 3D objects (surfaces, point clouds) with NumPy and PyTorch support
- Memory-efficient dense matrix operations for large-scale geometric maps, based on our recent research Memory-Scalable and Simplified Functional Map Learning.
Installing
Clone the repository and install it with pip:
git clone https://github.com/RobinMagnet/ScalableDenseMaps.git
cd ScalableDenseMaps
pip install . # NumPy backend only (numpy, scipy, scikit-learn, tqdm)
pip install ".[torch]" # + PyTorch backend
pip install ".[torch,keops]" # + memory-scalable KernelDistMap (pykeops)
pip install ".[all]" # everything
The NumPy backend has no PyTorch dependency; install the torch / keops extras only if
you need the PyTorch backend or the memory-scalable KernelDistMap.
Shape Correspondence Representations
Note: Throughout this documentation, maps $T$ go from surface $S_2$ to surface $S_1$ (not the reverse).
This library unifies three common ways to represent correspondences between 3D surfaces $S_1$ and $S_2$ (with $n_1$ and $n_2$ vertices):
- Vertex-to-Vertex Maps: Direct mapping between vertices, represented as either:
- An array
p2p_21$\in [0, \dots, n_1]^{n_2}$, wherep2p_21[i]indicates which vertex in $S_1$ corresponds to vertex $i$ in $S_2$ - A binary matrix $\Pi\in{0,1}^{n_2\times n_1}$ where $\Pi_{ij}=1$ means vertex $i$ maps to vertex $j$
- An array
- Vertex-to-Barycentri Maps: Maps vertices to arbitrary points on surface faces, described by barycentric coordinates:
- Represented by $\Pi\in[0,1]^{n_2\times nc_1}$ with $\sum_j \Pi_{ij} = 1$
- Maximum 3 non-zero entries per row, which correspond to vertices of a face
- More details can be found for example in this paper
- Soft Maps: Dense correspondence matrices:
- $\Pi\in[0,1]^{n_2\times n_1}$ from softmax over similarity scores
- Example: $\Pi_{ij} = \frac{\exp(S_{ij})}{\sum_j \exp(S_{ij})}$ where $S_{ij}$ measures similarity between embeddings
The common operations across all representations are:
- Converting to vertex-to-vertex maps
- Function transfer via $\Pi f$
- Map composition: $\Pi_{13}=\Pi_{12} \Pi_{23}$
The library implements these representations with both NumPy and PyTorch (CUDA-compatible) backends.
Example Code
from densemaps.torch import maps
emb1 = # Use some per-vertex embedding for object 1. (N1, p)
emb2 = # Use some per-vertex embedding for object 2. (N2, p)
P21 = maps.KernelDistMap(emb1, emb2, blur=1e-1) # A "dense" kernel map, not used in memory
# If my embeddings were not on CUDA, I can send them easily and come back to cpu
P21.cuda()
P21.cpu()
uv1 = # Get uv-coordinates on mesh1 (N1, 2)
uv2 = P21 @ uv1 # Transfered uv coordinates (n2, 2)
P21_dense = P21._to_dense() # I can get the (N2, N1) map back
p2p_21 = P21.get_nn() # I can get the (N2,) vertex to vertex map
Example of usage
The densemaps package is used for instance in the following github repositories:
- Reversible Harmonic Maps implementation in python
- Memory Scalable and Simplified Functional Map Learning implementation
Citing this work
If you use this work, please cite
@inproceedings{magnetMemoryScalable2024,
title = {Memory Scalable and Simplified Functional Map Learning},
booktitle = {2024 {{IEEE}}/{{CVF Conference}} on {{Computer Vision}} and {{Pattern Recognition}} ({{CVPR}})},
author = {Magnet, Robin and Ovsjanikov, Maks},
year = {2024},
publisher = {IEEE},
}
Metadata
Release files for densemaps 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| densemaps-0.1.0.tar.gz | 42.2 kB | With provenance | Details for densemaps-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| densemaps-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for densemaps-0.1.0-py3-none-any.whl |
Total release size: 79.7 kB
Release files / densemaps-0.1.0.tar.gz
| Download URL | densemaps-0.1.0.tar.gz |
|---|---|
| Size | 42.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7c0269300d7d2efa4ac28e84c5a8fbc34ba61b395057624e1387a4a299d6bb4
|
|
BLAKE2b-256 checksum How to use checksums |
1427bb8cf558a21a00a1472fd82896620c802023de378f7c3cdb56f4496ca86b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 25, 2026.
Transparency logRelease files / densemaps-0.1.0-py3-none-any.whl
| Download URL | densemaps-0.1.0-py3-none-any.whl |
|---|---|
| Size | 37.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d491a7c1b8a3d02ec455f15ae10ee78c2dc861a4524029640864b32e075df0ae
|
|
BLAKE2b-256 checksum How to use checksums |
086ccc09a87eda6e514bc21fa77510791a7e7a2b0e21a600958435730299a643
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 25, 2026.
Transparency logSecurity for densemaps 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for densemaps-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.