Wormhole: A Novel Loss for Partial Shape Matching [Paper]
When matching parts of a surface to its whole, a fundamental question arises: Which points should be included in the matching process? The issue is intensified when using isometry to measure similarity, as it requires the validation of whether distances measured between pairs of surface points should influence the matching process. The approach we propose treats surfaces as manifolds equipped with geodesic distances, and addresses the partial shape matching challenge by introducing a novel criterion to meticulously search for consistent distances between pairs of points. The new criterion explores the relation between intrinsic geodesic distances between the points, geodesic distances between the points and surface boundaries, and extrinsic distances between boundary points measured in the embedding space. It is shown to be less restrictive compared to previous measures and achieves state-of-the-art results when used as a loss function in training networks for partial shape matching.
-
Clone the repository
git clone https://github.com/ABracha/Wormhole.git cd wormhole -
Install dependencies
conda create -n wormhole python=3.8 # create new viertual environment conda activate wormhole conda install pytorch cudatoolkit -c pytorch # install pytorch pip install -r requirements.txt
-
Download the Data
Download the datasets from the provided link into this directory. You can download only PFAUST data or SHREC16 data, but you need to keep the directory structrue. Otherwise, you will need to adjust theoptions/{train,test}json files accordingly.
To evaluate our Wormhole method on benchmark datasets, follow these steps:
- Run Evaluation
Use the provided scripts to start the evaluation:
Replace
python evaluate.py --config options/test/option_file.json
option_file.jsonwith the appropriate configuration file for your dataset.
- Training: Train the Wormhole model with your data using:
python train.py --config options/train/option_file.json
To generate new masks for a dataset, run the preprocess.py file with the appropriate parameters for your dataset, ensuring that the preprocess_mask line is uncommented. Note that our mask generation implementation is overly simple and scales with the cube of the number of vertices, which can lead to slower performance for shapes with a large number of vertices (e.g., more than 8000 vertices). Consider using Dijkstra's algorithm twice for a considerable speed-up (see paper, we do not provide this implementation).
A significant portion of the code in this repository is directly taken from the RobustFMNet Repo of Cao et al. Unsupervised Learning of Robust Spectral Shape Matching, Transactions on Graphics (2023). which offers a very user-friendly framework for shape matching.
This project is licensed under the MIT License. See the LICENSE file for details.
The Wormhole paper completes our previous paper tackling shape matching with partial shapes. Thus, if you use Wormhole in your research, please cite both of our papers:
@article{bracha2024wormhole,
title={Wormhole loss for partial shape matching},
author={Bracha, Amit and Dag{\`e}s, Thomas and Kimmel, Ron},
journal={arXiv preprint arXiv:2410.22899},
year={2024}
}@article{bracha2023partial,
title={On partial shape correspondence and functional maps},
author={Bracha, Amit and Dages, Thomas and Kimmel, Ron},
journal={arXiv preprint arXiv:2310.14692},
year={2023}
}