Giter VIP home page Giter VIP logo

csdf's Introduction

CSDF

This is my custom signed distance(SDF) computation of points to manifold mesh with PyTorch API on GPU. The code and framework is modified from Kaolin.

Installation

python setup.py install

If encounter circular import, try:

pip install -e .

or manually modify csdf/__init__.py.

Usage

The code provide two function:

  • compute_sdf(pointclouds, face_vertices)
    • input
      • unbatched points with shape (num, 3)
      • unbatched face_vertices with shape (num , 3, 3)
    • returns
      • squared distance
      • normal defined by gradient
      • distance signs (inside -1 and outside 1)
      • closest face indexes
      • distance type (plane, vertices or edges)
  • index_vertices_by_faces(vertices_features, faces): return face_verts reqired by compute_sdf(pointclouds, face_vertices).

Note

  • Sign is defined by sign(dis.dot(face_normal)), check your mesh has perfect normal information.
  • Returned normal is defined by (p - closest_point).normalized() or equally $\frac{\partial d}{\partial p}$, not face normal.
  • The code only run on cuda.
  • Scripts in tests cannnot run independently (requires kaolin api or mesh datasets).

csdf's People

Contributors

wrc042 avatar

Stargazers

Yi-Lin Wei avatar Xinghao Zhu avatar  avatar Puhao Li avatar

Watchers

 avatar

csdf's Issues

CSDF ---identifier "CHECK_EQ" is undefined

Hello, I encountered error when installing CSDF: identifier "CHECK_EQ" is undefined
Error. I used pip install -e . and python setup.py install to install but still failed. Can you help me solve this problem? Or tell me the environment required for compilation. Thank you

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.