conda create -n contrastivefmnet python=3.8 # create new viertual environment
conda activate contrastivefmnet
conda install pytorch cudatoolkit -c pytorch # install pytorch, cuda==11.8!
pip install -r requirements.txt # install other necessary libraries via pipTo train and test datasets used in this paper, please download the datasets from DongliangCao and put all datasets under ../data/
├── data
├── FAUST_r
├── FAUST_a
├── SCAPE_r
├── SCAPE_a
├── SHREC19_r
├── TOPKIDS
├── SMAL_r
├── DT4D_r
├── SHREC20
├── SHREC16
├── SHREC16_testWe thank the original dataset providers for their contributions to the shape analysis community, and that all credits should go to the original authors.
python preprocess_dataset.py To train the model on a specified dataset.
python train.py --opt options/train/faust.yaml You can visualize the training process in tensorboard.
tensorboard --logdir experiments/To test the model on a specified dataset.
python test.py --opt options/test/faust.yaml The qualitative and quantitative results will be saved in results folder.
An example of texture transfer is provided in texture_transfer.py
python texture_transfer.pyYou can find all pre-trained models in checkpoints for reproducibility.
You can find all matching results in results.
The framework implementation is adapted from Unsupervised Learning of Robust Spectral Shape Matching.
The feature learning network implementation is adapted from DiffusionNet
Please cite our paper when using the code. You can use the following bibtex
@inproceedings{luo2026unsupervised,
title={Unsupervised Contrastive Learning for Efficient and Robust Spectral Shape Matching},
author={Luo, Feifan and Chen, Hongyang},
booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
volume={40},
number={9},
pages={7662--7670},
year={2026}
}
