NURBS-Diff: A Differentiable Programming Module for NURBS

Abstract Boundary representations (B-reps) using Non-Uniform Rational B-splines (NURBS) are the de facto standard used in CAD, but their utility in deep learning-based approaches is not well researched. We propose a differentiable NURBS module to integrate NURBS representations of CAD models with deep learning methods. We mathematically define the derivatives of the NURBS curves or surfaces with respect to the input parameters (control points, weights, and the knot vector). These derivatives are used to define an approximate Jacobian used for performing the “backward” evaluation to train the deep learning models. We have implemented our NURBS module using GPU-accelerated algorithms and integrated it with PyTorch, a popular deep learning framework. We demonstrate the efficacy of our NURBS module in performing CAD operations such as curve or surface fitting and surface offsetting. Further, we show its utility in deep learning for unsupervised point cloud reconstruction and enforce analysis constraints. These examples show that our module performs better for certain deep learning frameworks and can be directly integrated with any deep-learning framework requiring NURBS.

[1]  Paul D. Orkwis,et al.  Differentiated ML-based Modeling of Structured Grids for Gradient-based Optimization , 2021 .

[2]  Andreas Geiger,et al.  Differentiable Volumetric Rendering: Learning Implicit 3D Representations Without 3D Supervision , 2020, 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).

[3]  Josef Hoschek,et al.  Intrinsic parametrization for approximation , 1988, Comput. Aided Geom. Des..

[4]  Yaron Lipman,et al.  SAL: Sign Agnostic Learning of Shapes From Raw Data , 2020, 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).

[5]  Gershon Elber,et al.  Performing Efficient NURBS Modeling Operations on the GPU , 2009, IEEE Trans. Vis. Comput. Graph..

[6]  Subhransu Maji,et al.  ParSeNet: A Parametric Surface Fitting Network for 3D Point Clouds , 2020, ECCV.

[7]  Olivier Teboul,et al.  Fast Differentiable Sorting and Ranking , 2020, ICML.

[8]  Anders Logg,et al.  The FEniCS Project Version 1.5 , 2015 .

[9]  Adam Kortylewski,et al.  SkelNetOn 2019: Dataset and Challenge on Deep Learning for Geometric Shape Understanding , 2019, 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW).

[10]  Lech M. Grzesiak,et al.  Neural network contour error predictor in CNC control systems , 2016, 2016 21st International Conference on Methods and Models in Automation and Robotics (MMAR).

[11]  Xingchen Zhang,et al.  CAD-based geometry parametrisation for shape optimisation using Non-uniform Rational B-splines , 2018 .

[12]  Jaakko Lehtinen,et al.  Learning to Predict 3D Objects with an Interpolation-based Differentiable Renderer , 2019, NeurIPS.

[13]  Xian Yeow Lee,et al.  Differentiable Programming for Piecewise Polynomial Functions , 2020 .

[14]  G. vanRossum Python reference manual , 1995 .

[15]  Jonas Degrave,et al.  A DIFFERENTIABLE PHYSICS ENGINE FOR DEEP LEARNING IN ROBOTICS , 2016, Front. Neurorobot..

[16]  Alec Jacobson,et al.  Overfit Neural Networks as a Compact Shape Representation , 2020, ArXiv.

[17]  J. Gawroński Amsterdam , 2008, Water in Times of Climate Change.

[18]  Les A. Piegl,et al.  The NURBS Book , 1995, Monographs in Visual Communication.

[19]  Heinrich Müller,et al.  SplineCNN: Fast Geometric Deep Learning with Continuous B-Spline Kernels , 2017, 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition.

[20]  Barak A. Pearlmutter,et al.  Automatic differentiation in machine learning: a survey , 2015, J. Mach. Learn. Res..

[21]  Geoffrey E. Hinton,et al.  Learnable Convex Decomposition , 2020 .

[22]  Richard G. Baraniuk,et al.  A Spline Theory of Deep Learning , 2018, ICML 2018.

[23]  Hao Zhang,et al.  BSP-Net: Generating Compact Meshes via Binary Space Partitioning , 2020, 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).

[24]  Yang Wang,et al.  Geometric continuity constraints of automatically derived parametrisations in CAD-based shape optimisation , 2019, International Journal of Computational Fluid Dynamics.

[25]  Andreas Krause,et al.  Differentiable Learning of Submodular Models , 2017, NIPS 2017.

[26]  Leonidas J. Guibas,et al.  PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation , 2016, 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR).

[27]  Minsu Cho,et al.  InvNet: Encoding Geometric and Statistical Invariances in Deep Generative Models , 2020, AAAI.

[28]  Olga Sorkine-Hornung,et al.  Learning skeletal articulations with neural blend shapes , 2021, ACM Trans. Graph..

[29]  Richard A. Newcombe,et al.  DeepSDF: Learning Continuous Signed Distance Functions for Shape Representation , 2019, 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).

[30]  Matthew Crosby,et al.  Association for the Advancement of Artificial Intelligence , 2014 .

[31]  Soumik Sarkar,et al.  A Deep Learning Framework for Design and Analysis of Surgical Bioprosthetic Heart Valves , 2019, Scientific Reports.

[32]  N. Lörch,et al.  A differentiable programming method for quantum control , 2020, Mach. Learn. Sci. Technol..

[33]  Marc Pollefeys,et al.  Convolutional Occupancy Networks , 2020, ECCV.

[34]  Georg Martius,et al.  Differentiation of Blackbox Combinatorial Solvers , 2020, ICLR.

[35]  Mike Innes ALGORITHMIC DIFFERENTIATION , 2020 .

[36]  Andrea Tagliasacchi,et al.  CvxNet: Learnable Convex Decomposition , 2020, 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).

[37]  Jaakko Lehtinen,et al.  Differentiable Monte Carlo ray tracing through edge sampling , 2018, ACM Trans. Graph..

[38]  Natalia Gimelshein,et al.  PyTorch: An Imperative Style, High-Performance Deep Learning Library , 2019, NeurIPS.

[39]  Jean-Philippe Vert,et al.  Differentiable Ranking and Sorting using Optimal Transport , 2019, NeurIPS.

[40]  Alec Jacobson,et al.  Fast winding numbers for soups and clouds , 2018, ACM Trans. Graph..

[41]  Jim E. Morel,et al.  Accelerating PDE-constrained Inverse Solutions with Deep Learning and Reduced Order Models , 2019, ArXiv.

[42]  Les A. Piegl,et al.  The NURBS book (2nd ed.) , 1997 .

[43]  Alan Edelman,et al.  A Differentiable Programming System to Bridge Machine Learning and Scientific Computing , 2019, ArXiv.

[44]  Jimmy Ba,et al.  Adam: A Method for Stochastic Optimization , 2014, ICLR.

[45]  Les A. Piegl,et al.  Computing the derivative of NURBS with respect to a knot , 1998, Comput. Aided Geom. Des..

[46]  Ludovico Minto,et al.  Deep Learning for 3D Shape Classification based on Volumetric Density and Surface Approximation Clues , 2018, VISIGRAPP.

[47]  Andrea Walther,et al.  NURBS-based and Parametric-based Shape Optimisation with differentiated CAD Kernel , 2017 .

[48]  Mathieu Aubry,et al.  AtlasNet: A Papier-M\^ach\'e Approach to Learning 3D Surface Generation , 2018, CVPR 2018.

[49]  Sebastian Nowozin,et al.  Occupancy Networks: Learning 3D Reconstruction in Function Space , 2018, 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).