Skip to content

Latest commit

 

History

History
47 lines (38 loc) · 2.42 KB

README.md

File metadata and controls

47 lines (38 loc) · 2.42 KB

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)