PointNetLK: Robust & Efficient Point Cloud Registration using PointNet
Yasuhiro Aoki, Hunter Goforth, Rangaprasad Arun Srivatsan, Simon Lucey
Introduction
Point clouds are inherently unstructured with sample and order permutation ambiguities. This lack of structure makes them problematic for use in modern deep learning architectures. PointNet has been revolutionary from this perspective, as it offers a learnable structured representation for point clouds. One can think of this process as a kind of “imaging” – producing a fixed dimensional output irrespective of the number of samples or ordering of points. This innovation has produced a number of new extensions and variants that are now state-of-the-art in object classification and segmentation on point clouds.
The utility of PointNet for the task of point cloud registration, however, has remained somewhat elusive. In this paper we want to explore further the notion of interpreting the PointNet representation as an imaging function – a direct benefit of which could be the application of image alignment approaches to the problem of point cloud registration. In particular we want to utilize the classical Lucas & Kanade (LK) algorithm . This connection is motivated by a recent innovation that has demonstrated state-of-the-art 2D photometric object tracking performance by reinterpreting the LK algorithm as a recurrent neural network.
The LK algorithm, however, cannot be naively applied to the PointNet representation. This is due to the LK algorithm’s dependence on gradient estimates, which are estimated in practice through convolution. Within a 2D photometric image, or a 3D volumetric image, each element of the representation (i.e. pixel or voxel) has a known local dependency between its neighbors, which can be expressed as 2D- and 3D- grids respectively – from which convolution can be defined. It is also well understood that this dependency does not have to take the form or a D-grid, with the notion of “graph” convolution also being explored. PointNet representations have no such local dependency making the estimation of spatial gradients through convolution ill posed.
We propose a modification to the LK algorithm which circumvents the need for convolution on the PointNet representation. We then demonstrate how this modified LK form can be unrolled as a recurrent neural network and integrated within the PointNet framework – this unified network shall be referred to herein as PointNetLK. Unlike many variants of iterative closest point (ICP), our approach requires no costly computation of point correspondences , which gives rise to substantial advantages in terms of accuracy, robustness to initialization and computational efficiency. PointNetLK exhibits remarkable generalization to unseen object and shape variations, as shown in Fig. 1. This generalization performance can be attributed to the explicit encoding of the alignment process within the network architecture. As a consequence, the network only needs to learn the PointNet representation rather than the task of alignment. Finally, our approach is fully differentiable, unlike most registration approaches in literature, hence allowing for an easy integration with larger DNN systems. An added computational benefit is that our approach can be run directly on GPU as part of a larger neural-network pipeline, unlike most of the comparisons which require a method like ICP or its variants to be run on CPU.
Related Work
PointNet is the first work to propose the use of DNN with raw point clouds as input, for the purposes of classification and segmentation. The architecture achieves state of the art performance on this task despite its simplicity, and provides interesting theoretical insight into processing raw point clouds. PointNet++ was proposed as an improvement over the PointNet, by hierarchically aggregating features in local point sets . Another variant considers aggregates features of nearby points . Wang et al. use a local neighborhood graph and convolution-like operations on the edges connecting neighboring pairs of points.
ICP and variants:
Besl and McKay introduced the iterative closest point (ICP), which is a popular approach for registration, by iteratively estimating point correspondence and performing a least squares optimization. Several variants of the ICP have been developed (see for a review) that incorporate sensor uncertainties , are robust to outliers , use different optimizers , etc. ICP and its variants, however, have a few fundamental drawbacks, namely: (1) explicit estimation of closest point correspondences, which results in the complexity scaling quadratically with the number of points, (2) sensitive to initialization, and (3) nontrivial to integrate them to deep learning framework due to issues of differentiability.
Globally optimal registration:
Since ICP and most of its variants are sensitive to initial perturbation in alignment, they only produce locally optimal estimates. Yang et al. developed Go-ICP, a branch and bound-based optimization approach to obtain globally optimal pose. More recently convex relaxation has been used for global pose estimation using Riemannian optimization , semi-definite programming and mixed integer programming . A major drawback of the above methods is the large computation time, rendering them unsuitable for real time applications.
Interest point methods:
There are works in literature that estimate interest points to help with registration. For instance, scale invariant curvature descriptors , oriented descriptors , extended Gaussian images , fast point feature histograms , color intensity-based descriptors , global point signatures , heat kernels , etc. While interest points have the potential to improve the computationally speed of the registration approaches, they do not generalize to all applications .
Hand-crafted representations:
The discriminative optimization (DO) work of Vongkulbhisal et al. uses a hand-crafted feature vector and learns a set of maps, to estimate a good initial alignment. The alignment is later refined using an ICP. The drawback of this approach is that the features and maps are specific to each object and do not generalize. More recently they developed inverse composition discriminative optimization (ICDO), which generalizes over unseen object shapes. ICDO unfortunately has a complexity which is quadratic in the number of points, making it difficult to use in several real world scenarios. Another issue with ICDO is that both the features and alignment maps are learned, which can result in a compromise on the generalizability of the approach.
Alternate representations:
Voxelization is a method to discretize the space and convert a point clouds to a structured grid. Several methods have been developed that use DNNs over voxels . Major drawbacks of these approaches include computation time and memory requirements. Another popular representation is depth image or range image, which represents the point cloud as a collection of 2D views, which are easily obtained by commercial structured light sensors. Typically convolution operations are performed on each view and the resulting features are aggregated . Some works also combine voxel data with multi-view data . There are several works that directly estimate 3D pose from photometric images. For instance, , directly regress over the Euler angles of object orientations from cropped object images. On the other hand, in applications such as robotic manipulation, pose is often decoupled into rotation and translation components and each is inferred independently .
PointNetLK
In Section 3.1 we introduce notation and mathematics for PointNetLK. In Section 3.2 we provide a derivation of the optimization on PointNet feature vectors used for point cloud alignment. In Section 3.3 we describe aspects of training for our model, including loss functions and possible symmetric operators.
We denote matrices with uppercase bold such as M, constants as uppercase italic such as , and scalar variables with lowercase italic such as .
1 Overview
We formulate an optimization as follows. Let , be template and source point clouds respectively. We will seek to find the rigid-body transform which best aligns source to template . The transform G will be represented by an exponential map as follows:
Another key idea that we can borrow from the LK algorithm is the Inverse Compositional (IC) formulation . The IC formulation is necessitated by the fact that the traditional LK algorithm has a high computational cost for each iteration of the optimization. This cost comes from the re-computation of an image Jacobian on the warped source image, at each step of the optimization. The insight of the IC formulation is to reverse the role of the template and source: at each iteration, we will solve for the incremental warp update to the template instead of the source, and then apply the inverse of this incremental warp to the source. By doing this, the Jacobian computation is performed for the template instead of the source and happens only once before the optimization begins. This fact will be more clearly seen in the following derivation of the warp update.
2 Derivation
Restating the objective, we seek to find G such that . To do this, we will derive an iterative optimization solution.
With the IC formulation in mind, we take an inverse form for the objective:
The next step is to linearize the right-hand side of (2):
Where we define .
Modified LK:
Motivated by these challenges, we instead opt to compute J using a stochastic gradient approach. Specifically, each column of the Jacobian can be approximated through a finite difference gradient computed as
Where are infinitesimal perturbations of the twist parameters . This approach to computing J is what allows the application of the computationally efficient inverse compositional LK algorithm to the problem of point cloud registration using PointNet features. Note that J is computed only once, for the template point cloud, and does not need to be recomputed as the source point cloud is warped during iterative alignment.
For each column of the Jacobian, only the twist parameter has a non-zero value . Theoretically, should be infinitesimal so that J is equal to an analytical derivative. In practice, we find empirically that setting to some small fixed value over all iterations yields the best result.
We can now solve for in (3) as
Where is a Moore-Penrose inverse of J.
In summary, our iterative algorithm consists of a looping computation of the optimal twist parameters using (5), and then updating the source point cloud as
The final estimate is then the composition of all incremental estimates computed during the iterative loop:
The stopping criterion for iterations is based on a minimum threshold for . A graphical representation of our model is shown in Fig. 2.
3 Training
The loss function for training should be targeted at minimizing the difference between the estimated transform and the ground truth transform . This could be expressed as the Mean Square Error (MSE) between the twist parameters and . Instead, we use
which is more computationally efficient to compute as it does not require matrix logarithm operation during training, and follows in a straightforward way from the representation of .
Symmetric pooling operator:
In PointNet, the MLP operation is followed by a symmetric pooling function such as maximum or average pooling, to facilitate point-order permutation invariance (see Fig. 2). In Section 4, we show results using either max or average pooling and make observations about which operator may be more suitable given different scenarios. Particularly, we hypothesize that average pooling would have an advantage over max pooling on the case of noisy point cloud data, which is confirmed in our experiments.
Experiments
We experiment with various combinations of training data, test data, and symmetric operators. We compare with ICP as a baseline at test time. We have used ModelNet40 , a dataset containing CAD models for 40 object categories, for experiments unless otherwise noted.
Our first experiment is to train PointNetLK on the training set for 20 object categories in ModelNet40, and test on the test set for the same 20 object categories. We begin by first training a standard PointNet classification network on ModelNet40, and then initialize the PointNetLK feature extractor using this classification network and fine-tune with the PointNetLK loss function. The point clouds used for registration are the vertices from ModelNet40 shapes. The source point cloud is a rigid transformation of the template. Template points are normalized into a unit box at the origin before warping to create the source. We use random with rotation angles $[0,0.8][0,0.3]$ degrees.
2 Train and test on different object categories
We repeat the experiment from Section 4.1, however, we train on the other 20 categories of ModelNet40. We then test on the 20 categories in ModelNet which have not been seen during training, which are the same categories as used in testing for Section 4.1. We find that PointNetLK has the ability to generalize for accurate alignment on object categories which are unseen during training. The results are shown in Fig. 3 for ModelNet40 test dataset, and Fig. 1 on the Stanford bunny dataset . The result with Stanford bunny dataset is especially impressive as this dataset is significantly different than the ModelNet training data. For the sake of comparison we also repeated the experiments with ICP and Go-ICP . We observe that the rotation and translation errors respectively for ICP are , Go-ICP are and PointNetLK are . While ICP takes 0.36s, and Go-ICP takes 80.78s, PointNetLK takes only 0.2s.
3 Gaussian noise
We explore the robustness of PointNetLK against Gaussian noise on points. The experiment set-up is as follows: a template point cloud is randomly sampled from the faces of the ModelNet shape, and a source is set equal to the template with additive Gaussian noise of certain standard deviation. We use 1000 points during sampling. We hypothesize that the choice of symmetric operator becomes more critical to the performance of PointNetLK in this experiment. As noted in the original PointNet work, using the max pool operator leads to a critical set of shape points which define the global feature vector. With noisy data, this critical set is subject to larger variation across different random noise samples. Therefore we hypothesize that average pooling would be better suited to learning the global features used for alignment on noisy data. This hypothesis is confirmed in the results shown in Fig. 4. We repeat the procedure of Section 4.2, testing on object categories which are unseen during training. Some example alignment pairs are shown in Fig. 5.
4 Partially visible data
We explore the use of PointNetLK on the common registration scenario of aligning 2.5D data. In the real world, oftentimes the template is a full 3D model and the source a 2.5D scan. One approach in this case is to input the 2.5D source and 3D template directly into an alignment algorithm and estimate the correspondence and the alignment. A second approach is to use an initial estimate of camera pose with respect to the 3D model to sample visible points on the model, which can be compared with the 2.5D scan. The camera pose can be iteratively updated until the visible points on the 3D model match the 2.5D scan.
We take the latter approach for testing PointNetLK, because the cost function can tend to be large for input point clouds which are a 3D model and 2.5D scan. Instead, it makes more sense to sample visible points from the 3D model first based on an initial pose estimate, so that the inputs to PointNetLK are both 2.5D. This way, a correct final alignment is more likely to lead to the cost function being close to zero.
Sampling visible points is typically based on simulating a physical sensor model for 3D point sensing, which has a horizontal and vertical field-of-view, and a minimum and maximum depth . We adapt ModelNet40 data for partially visible testing using a simplistic sensor model as follows. We sample faces from ModelNet shapes to create a template, place the template into a unit box , set the template equal to the source, and warp the source using a random perturbation. Next we translate the source and template both by a vector of length in the direction from the origin. Then we assign the visible points of the template as those satisfying . This operation can be thought of a placing a sensor at the origin which faces the direction and samples points on the 3D models which lie in front of it, up to a maximum depth equal to the mean of the point cloud. We set the visible source points in the same manner. This operation returns about half of the points both template and source being visible for any given point cloud. We input the 2.5D visible point sets and into PointNetLK, allowing a single iteration to occur for estimation of the aligning transform . We then warp the original full source model using the single-iteration guess , and re-sample . We repeat the single-iteration update and visibility re-sampling until convergence. We repeat the same procedure for testing ICP.
We test on the ModelNet40 test set, using random translation for all tests. The results are shown in Fig. 6. Notably, we find that PointNetLK is able to learn to register objects using our sensor model, and generalizes well when the sensor model is applied to unseen object categories. Example template and source pairs for partially visible alignment are shown in Fig. 7 for ModelNet test dataset. We observe that our approach generalizes well to unseen shapes as shown in Fig. 1 which is generated from RGBD sensor data .
5 Same category, different object
We hypothesize that PointNetLK features could be useful for registering point clouds of objects which are different but of the same category. An example of this is shown for two airplane models in Fig. 8. We would hope that the registration error for PointNetLK is minimized when the airplane models, despite being different, are aligned in orientation. This reaffirms that the feature vectors learned for alignment are capturing a sense of the object category, and the canonical orientation of that object. The network used for this experiment is trained using max pool on full 3D models. We find that in many cases, such as in the airplane example of Fig. 8, the PointNetLK cost function is globally minimized when the correct orientation is attained, while the ICP cost function is not necessarily minimized. In practice, this approach could work particularly well to identify the correct orientation of objects within a category if the orientation is known up to one or two axes of rotation.
6 Computational efficiency
We plot trends for computation time in Fig. 9, comparing PointNetLK and ICP on an Intel Xeon 2GHz CPU. We argue that PointNetLK is quite competitive in efficiency among current approaches to point cloud registration, due to the fact that it has complexity in number of points. Note that we do not use a d-tree in the ICP for this particular comparison, because in several applications such as pose tracking from 2.5D data, one does not have d-tree information. Further, the computation can be sped up several orders of magnitude with a GPU implementation as PointNetLK is highly parallelizable.
Implementation Details
For the MLP in all experiments we use dimensions . Our early experiments showed that this choice of is suitable for alignment of point clouds containing points on the order of 1000, the number we used in most of our experiments. For setting , the infinitesimal perturbations of twist parameters used to compute the Jacobian in Eq. 4, we find that or similar works well. For the minimum threshold for used to stop iterations of PointNetLK, we use . That is, we condition on the magnitude of individual twist parameters which constitute .
During the fine-tuning stage of training PointNetLK, after training the PointNet classifier, we train for 200 epochs of the ModelNet test set (about one day of training). We find that more epochs are needed to realize good performance for noisy data or partial visibility data (approximately 300 and 400 epochs respectively). When training PointNetLK on 2.5D data, some modifications to the PointNetLK architecture ( as shown in Fig. 2) were necessary in order to maintain differentiability. This includes creating a visible point mask which sets the non-visible points in the 2.5D source and template to zero, and this mask is applied before the max pooling operator. At test time for 2.5D, differentiability is not a concern and therefore these maskings are not necessary. We implement PointNetLK in PyTorch and train using an NVIDIA GeForce GTX Titan X.
Conclusion
We have presented PointNetLK, a novel approach for adapting PointNet for point cloud registration. We modify the classical LK algorithm to circumvent the inherent inability of the PointNet representation to accommodate gradient estimates through convolution. This modified LK framework is then unrolled as a recurrent neural network from which PointNet is then integrated to form the PointNetLK architecture. Our approach achieves impressive precision, robustness to initialization, and computational efficiency. We have also shown the ability to train PointNetLK on noisy data or partially visible data and achieve large performance gains, while maintaining impressive generalization to shapes far removed from the training set. Finally, we believe that this approach presents an important step forward for the community as it affords an effective strategy for point cloud registration that is differentiable, generalizable, and extendable to other deep learning frameworks.