GithubHelp home page GithubHelp logo

peterzs / dirichletsteklovlandmarkmatching Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mpanine/dirichletsteklovlandmarkmatching

0.0 0.0 0.0 25.94 MB

C++ 46.66% C 2.13% Objective-C 0.09% MATLAB 46.49% XSLT 1.69% M 0.37% CSS 0.36% Makefile 2.21%

dirichletsteklovlandmarkmatching's Introduction

Dirichlet-Steklov Landmark Matching

This repository contains the code for the paper "Non-Isometric Shape Matching via Functional Maps on Landmark-Adapted Bases" by Mikhail Panine, Maxime Kirgo and Maks Ovsjanikov.

In this paper, we propose a principled approach for non-isometric landmark-preserving non-rigid shape matching. Our method is based on the functional maps framework, but rather than promoting isometries we focus instead on near-conformal maps that preserve landmarks exactly. We achieve this, first, by introducing a novel landmark-adapted basis using an intrinsic Dirichlet-Steklov eigenproblem. Second, we establish the functional decomposition of conformal maps expressed in this basis. Finally, we formulate a conformally-invariant energy that promotes high-quality landmark-preserving maps, and show how it can be solved via a variant of the recently proposed ZoomOut method that we extend to our setting. Our method is descriptor-free, efficient and robust to significant mesh variability. We evaluate our approach on a range of benchmark datasets and demonstrate state-of-the-art performance on non-isometric benchmarks and near state of the art performance on isometric ones.

The main steps involved in our method to map a source shape to a target shape is described in Sect. 3 of the paper and illustrated below. The source shape is highlighted in orange and the target shape in blue.

Main Functions

Steklov_settings = compute_steklov_settings(num_landmarks, NN_type,InitialGuess,DS_num_eigs,radii_factor,weight_Orthonormality,weight_Proper,weight_Bijectivity,num_LB_eigs,ZO_start,ZO_step);

% Input:
%	num_landmarks: number of landmarks to use
%	NN_type: whether to use our fast approximation or the principled definition ('principled','fast'), 'fast' is our preferred option
%	InitialGuess: type of initial guess ('normal_derivatives','trivial','landmark_harmonics','conformal_energy'), 'normal_derivatives' is our preferred method
%	DS_num_eigs: number of Dirichlet-Steklov eigen-functions
%	radii_factor: size of radius around each landmark
%	weight_Orthonormality: orthonormality weight
%	weight_Proper: properness weight
%	weight_Bijectivity: bijectivity weight
%	num_LB_eigs: number of Laplace-Beltrami eigenfunctions
%	ZO_start: ZoomOut refinement start
%	ZO_step: number of ZoomOut refinement steps
%
% Output:
%   Steklov_settings: the Settings object used to parameterize our method
[Src_refined,Tar_refined,fullp2pTarSrc, fullp2pSrcTar,fullp2pTarSrc_ZO, fullp2pSrcTar_ZO] = compute_steklov(Src, Src_landmarks, Tar, Tar_landmarks, Steklov_settings);
% Input:
%	Src: the source shape structure (see shape_matching.m)
%	Src_landmarks: the landmarks on the source shape
%	Tar: the target shape structure (see shape_matching.m)
%	Tar_landmarks: the landmarks on the target shape
%	Steklov_settings: the Settings object used to parameterize our method (see function above)
% Output:
%	Src_refined: the source shape structured with circular boundaries at the landmarks
%	Tar_refined: the target shape structured with circular boundaries at the landmarks
%	fullp2pTarSrc: the p2p map from the original (i.e. before introducing circular boundaries) target shape to the original source shape, before ZoomOut refinement
%	fullp2pSrcTar: the p2p map from the original (i.e. before introducing circular boundaries) source shape to the original target shape, before ZoomOut refinement
%	fullp2pTarSrc_ZO: the p2p map from the original (i.e. before introducing circular boundaries) target shape to the original source shape, after ZoomOut refinement
%	fullp2pSrcTar_ZO: the p2p map from the original (i.e. before introducing circular boundaries) source shape to the original target shape, after ZoomOut refinement

Configuration

We tested our setup on Windows 10, with Matlab R2018a. The mex files were compiled using MinGW64.

Setup

  1. Compile the three mex files in utils/Harmonic_testbed/Utils/+core/private/.
  2. Move GetMD5.mex to utils/Harmonic_testbed/Utils/+core/.
  3. Compile ANN in utils/Harmonic_testbed/ann_mwrapper/.

Comments

  • The script shape_matching.m shows how to perform shape matching using our method.
  • The scripts reproduce_fig_12_step[1-3].mat allow to reproduce Fig. 12 left of our paper:
    • Before launching the scripts, clone the Faust remeshed dataset shapes (vtx_5k folder) to the folder ./data/FAUST/vtx_5k/
    • reproduce_fig_12_step1.mat computes the remeshed shapes, wrapped into .mat files;
    • reproduce_fig_12_step2.mat computes the geodesic errors on all shapes;
    • reproduce_fig_12_step3.mat plots the figure using the computed data.

Acknowledgments

  • Parts of this work were supported by the ERC Starting Grants No. 758800 (EXPROTEA), the ANR AI Chair AIGRETTE, the Swiss National Science Foundation (SNSF) under project number 188577 and the Association Nationale de la Recherche et de la Technologie (ANRT) via the Convention industrielle de formation par la recherche (CIFRE) grant No. 2019/0433.
  • The +MESH module was developped by Jing Ren.
  • The getMD5.m script was developped by Jan.
  • The ANN MATLAB Wrapper was developped by Dahua Lin. It is a MATLAB port of the Approximate Nearest Neighbor Library.

Citation

If this code contributes to academic work, please cite:

@inproceedings{panine2022dirichletsteklov,
  title={Non-Isometric Shape Matching via Functional Maps on Landmark-Adapted Bases},
  author={Panine, Mikhail and Kirgo, Maxime and Ovsjanikov, Maks},
  booktitle={Computer Graphics Forum},
  year={2022},
  organization={Wiley Online Library}
}

License: CC BY-NC 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. For any commercial uses or derivatives, please contact us ([email protected], [email protected], [email protected]).

dirichletsteklovlandmarkmatching's People

Contributors

maximekirgo avatar

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.