Skip to content

This is the repository for the paper "Improving Neural Network Surface Processing with Principal Curvatures"

Notifications You must be signed in to change notification settings

Inria-Asclepios/shape-nets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Shape-nets

This is the repository for the experiments from the paper: "Improving Network Surface Processing with Principal Curvatures". You can find the paper here

Models

Most of the code comes from the repositories of the models that we used. For anyone wanting to use them, we strongly suggest to go straight to these implementations:

Data

We followed the instructions from the Diffusion-net repo to get all three datasets.

Shape representations

For principal curvatures (kmin, kmax), and gaussian curvature, we suggest following implementations from libigl:

import igl
import pyvista as pv

mesh = pv.read('\path\to\mesh.vtk') # We use pyvista for loading and visualisation
vertices = mesh.points
faces = mesh.faces.reshape(-1, 4)[:, 1:]

_, _, kmin, kmax = igl.principal_curvature(verts, faces)
k = igl.gaussian_curvature(verts, faces)

For the Heat Kernel Signature, we follow the implementation using the Robust-laplacian :

import numpy as np
import scipy
import scipy.sparse.linalg as sla
import robust_laplacian

L, M = robust_laplacian.mesh_laplacian(verts, faces)
massvec = M.diagonal()
L_eigsh = (L + scipy.sparse.identity(L.shape[0]) * eps).tocsc()
Mmat = scipy.sparse.diags(massvec)
evals, evecs = sla.eigsh(L_eigsh, k=128, M=Mmat, sigma=eps) # k=number of eigenvectors
evals = np.clip(evals, a_min=0., a_max=float('inf'))
scales = np.logspace(-2, 0, num=16)  # num=dimension of the HKS
power_coefs = np.exp(-evals * scales)
hks = power_coefs * (evecs * evecs)

For the SHOT Descriptors, we used the implementation proposed by Point Cloud Library. To be found here

Installation

If you wish to install the same environment and use shapecentral directly:

git clone https://github.com/Inria-Asclepios/shape-nets
cd shape-nets
pip install -e .

About

This is the repository for the paper "Improving Neural Network Surface Processing with Principal Curvatures"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages