GithubHelp home page GithubHelp logo

craigleili / srfeat Goto Github PK

View Code? Open in Web Editor NEW
11.0 3.0 2.0 7.02 MB

SRFeat: Learning Locally Accurate and Globally Consistent Non-Rigid Shape Correspondence (3DV 2022)

Python 19.75% MATLAB 56.02% M 0.62% Objective-C 0.09% C++ 23.21% C 0.30% Mathematica 0.01%

srfeat's Introduction

SRFeat: Learning Locally Accurate and Globally Consistent Non-Rigid Shape Correspondence

By Lei Li, Souhaib Attaiki, Maks Ovsjanikov. (3DV 2022)

In this work, we present a novel learning-based framework that combines the local accuracy of contrastive learning with the global consistency of geometric approaches, for robust non-rigid matching. We first observe that while contrastive learning can lead to powerful point-wise features, the learned correspondences commonly lack smoothness and consistency, owing to the purely combinatorial nature of the standard contrastive losses. To overcome this limitation we propose to boost contrastive feature learning with two types of smoothness regularization that inject geometric information into correspondence learning. With this novel combination in hand, the resulting features are both highly discriminative across individual points, and, at the same time, lead to robust and consistent correspondences, through simple proximity queries. Our framework is general and is applicable to local feature learning in both the 3D and 2D domains. We demonstrate the superiority of our approach through extensive experiments on a wide range of challenging matching benchmarks, including 3D non-rigid shape correspondence and 2D image keypoint matching.

teaser

Link

Paper

Citation

@inproceedings{li2022srfeat,
  title={{SRFeat}: Learning Locally Accurate and Globally Consistent Non-Rigid Shape Correspondence},
  author={Li, Lei and Attaiki, Souhaib and Ovsjanikov, Maks},
  booktitle={International Conference on 3D Vision (3DV)},
  year={2022},
  organization={IEEE}
}

3D Shape Matching

Dependencies

  • CUDA 11
  • Python 3.8
  • Pytorch 1.8.1

Other used Python packages are listed in requirements.txt. It is preferable to create a new conda environment for installing the packages.

The docker image that has a complete running environment can be found here.

Data

The data and pretrained models can be found here. Extract the content of the zipped file to the root directory of the code.

Training & Testing

python trainer_srfeatd.py skip_train=False config=exp/srfeatd_***.yml 

python trainer_srfeats.py skip_train=False config=exp/srfeats_***.yml

Use Pretrained Model

python <<trainer_srfeatd.py/trainer_srfeats.py>> skip_train=True test_ckpt=<<exp/../ckpt_latest.pth>> path_prefix=. log_dir=exp/log data.data_root=exp/data

Evaluation

First, compute geodesic distance matrices by running scripts/computeGeoDistMat.m.

Then,

python eval_corr.py --data_root exp/data --test_roots exp/log/<<FolderName>> ...

Image Keypoint Matching

Please check the branch dgmc.

References

  1. Donati et al. Deep Geometric Maps: Robust Feature Learning for Shape Correspondence. CVPR 2020.
  2. Xie et al. PointContrast: Unsupervised Pre-training for 3D Point Cloud Understanding. ECCV 2020.
  3. Sharp et al. DiffusionNet: Discretization Agnostic Learning on Surfaces. TOG 2022.
  4. Fey et al. Deep Graph Matching Consensus. ICLR 2020.

Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

srfeat's People

Contributors

craigleili avatar

Stargazers

 avatar Youngjo Min avatar  avatar Jeonghwan Kim avatar  avatar 爱可可-爱生活 avatar 个人公众号 Hypochondira avatar Snow avatar Pupa avatar Zhang Handuo avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

peterzs sshuster

srfeat's Issues

Hello, I made an error when running. Can you give me some suggestions

Hello, I made an error when running. Can you give me some suggestions

/home/y20/anaconda3/envs/SRFeat-main/bin/python /media/y20/MyPassport/nj/SRFeat-main/trainer_srfeats.py skip_train=False config=exp/srfeats_faust_scape.yml
/home/y20/anaconda3/envs/SRFeat-main/lib/python3.6/site-packages/torch/cuda/init.py:52: UserWarning: CUDA initialization: The NVIDIA driver on your system is too old (found version 9000). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver. (Triggered internally at /pytorch/c10/cuda/CUDAFunctions.cpp:109.)
return torch._C._cuda_getDeviceCount() > 0
Traceback (most recent call last):
File "/media/y20/MyPassport/nj/SRFeat-main/trainer_srfeats.py", line 308, in
run_trainer(Trainer)
File "/media/y20/MyPassport/nj/SRFeat-main/utils/misc.py", line 148, in run_trainer
trainer.train()
File "/media/y20/MyPassport/nj/SRFeat-main/trainer_srfeats.py", line 255, in train
self._init_train()
File "/media/y20/MyPassport/nj/SRFeat-main/trainer_srfeats.py", line 93, in _init_train
num_workers=cfg.data.num_workers)
File "/media/y20/MyPassport/nj/SRFeat-main/data/init.py", line 120, in get_data_loader
DATASETS[dname](mode, data_root, num_eigenbasis, augments) for dname in data_names
File "/media/y20/MyPassport/nj/SRFeat-main/data/init.py", line 120, in
DATASETS[dname](mode, data_root, num_eigenbasis, augments) for dname in data_names
File "/media/y20/MyPassport/nj/SRFeat-main/data/init.py", line 32, in get_faust_set
transforms=tsfm)
File "/media/y20/MyPassport/nj/SRFeat-main/data/faustscape.py", line 68, in init
normals=vertex_normals_th,
File "/media/y20/MyPassport/nj/SRFeat-main/diffusion_net/geometry.py", line 583, in get_operators
normals=normals)
File "/media/y20/MyPassport/nj/SRFeat-main/diffusion_net/geometry.py", line 335, in compute_operators
L, M = robust_laplacian.point_cloud_laplacian(verts_np)
File "/home/y20/anaconda3/envs/SRFeat-main/lib/python3.6/site-packages/robust_laplacian/core.py", line 33, in point_cloud_laplacian
L, M = rlb.buildPointCloudLaplacian(points, mollify_factor, n_neighbors)
RuntimeError: GC_SAFETY_ASSERT FAILURE from /tmp/pip-req-build-3e9g8ei8/deps/geometry-central/src/surface/surface_mesh.cpp:139 - unreferenced vertex 0
Start training
[*] Loading FAUST_r data
Read geometry::TriangleMesh failed: unknown file extension.

Problems with visualizing results

Hello, I performed a color rendering of the code results and found that the results were not very good, and all the results had such spots.
1679983497189
I use matlab to write visual code, the code is as follows
close all; clear all; M = load_off('D:\wuy\doc\code\SRFeat\exp\data\SHREC_r\shapes\12.off'); M.surface = construct_surface(M); N = load_off('D:\wuy\doc\code\SRFeat\exp\data\SHREC_r\shapes\1.off'); N.surface = construct_surface(N); load('D:\wuy\doc\code\SRFeat\exp\log\SRFeat-D_dfn_faust_scape\test_shrec19_22-04-15_22-34-40_eval\1-12.mat'); figure; visualize_map_on_source(N); title('Model'); figure; visualize_map_on_target(M, N, matches); title('Target');

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.