Skip to content

Torch layer for NURBS evaluation for a given control points and parametrization

License

Notifications You must be signed in to change notification settings

idealab-isu/NURBSDiff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NURBSDiff

This repo contains code for fitting curves and surfaces to any input point cloud.

Requirements and Install dependencies

Dependencies

  1. Pytorch: Installation command can be generated from here.
  2. Pytorch 3D:
    • For CPU only install pip install pytorch3d should do
    • For macOS running on Apple Silicon MACOSX_DEPLOYMENT_TARGET=10.14 CC=clang CXX=clang++ pip install "git+https://github.com/facebookresearch/pytorch3d.git"
    • For GPU support, we would need to install pytorch3d using the following process TBD pip install "git+https://github.com/facebookresearch/pytorch3d.git"
  • Geomdl: pip install geomdl

Usage of NURBSDiff

  • Curve Evaluation (curve_eval.py)
    1. The evaluation kernels for curve_eval.py are written under torch_nurbs_eval/csrc/curve_eval.cpp
    2. To run curve_eval.py, provide input control points, input point cloud and set the number of evaluation points under out_dim in CurveEval.
    3. To generate random distribution of control points, use data_generator.gen_control_points()
    4. Input Size parameters:
      • control points : (No of curves, no of control points, [(x,y,weights) or (x,y,z,weights)] )
      • point cloud : (No of point clouds, no of points in point cloud,3)
      • Parameters to vary: degree, number of control points, number of evaluation points.
    5. To run the curve evaluation, cd into torch_nurbs_eval.
    6. To run python curve_eval.py

(Will add details for Surface Fitting soon)

About

Torch layer for NURBS evaluation for a given control points and parametrization

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published