Self-Point-Flow: Self-Supervised Scene Flow Estimation from Point Clouds with Optimal Transport and Random Walk

Ruibo Li, Guosheng Lin, Lihua Xie

Introduction

Scene flow estimation aims to obtain a 3D vector field of points in dynamic scenes, and describes the motion state of each point. Recently, with the popularity of 3D sensors and the great success of deep learning in 3D point cloud tasks, directly estimating the scene flow from point clouds by deep neural networks (DNNs) is an active research topic. DNNs are data-driven, and the supervised training of DNNs requires a large amount of training data with ground truth labels. However, for the scene flow estimation task, no sensor can capture optical flow ground truth in complex environments , which makes real-world scene flow ground truth hard to obtain. Due to the scarcity of the ground truth data, recent deep learning based point cloud scene flow estimation methods turn to synthetic data, e.g.e.g. the FlyingThings3D dataset , for supervised training. However, the domain gap between synthetic data and realistic data is much likely to make the trained models perform poorly in real-world scenes.

To circumvent the dependence on expensive ground truth data, we target self-supervised scene flow estimation from point clouds. Mittal et al. and Wu et al. make the first attempt. These methods search for the closest point in the other point cloud as the corresponding point and use the coordinate difference between each correspondence to approximate the ground truth scene flow. Although achieving promising performance, two issues exist in these methods: (1) searching for correspondences relies only on 3D point coordinates but ignores other measures, such as color and surface normal, which often bring fruitful clues for accurate matching; and (2) the unconstrained search may lead to a degenerated solution, where multiple points match with the same point in the other point cloud, i.e.i.e. a many-to-one problem. An example of nearest neighbor search is shown in Fig. 1(a).

In this paper, we assume that an object’s geometric structure and appearance remain unchanged as it moves and the correct corresponding points could be found in its neighborhood. Thus, when searching for point correspondences, we adopt 3D point coordinate, surface normal, and color as measures and encourage each point to be matched with a unique one in the next frame, i.e.i.e. one-to-one matching. Naturally, the searching problem can be formulated as an optimal transportation , where the transport cost is defined on the three measures, the mass equality constraints are built to encourage one-to-one matching, and the produced optimal assignment matrix indicates the optimal correspondences between the two point clouds. Removing some invalid correspondences with far distance, the coordinate differences between valid correspondences can be treated as the pseudo ground truth flow vectors for training.

Neighboring points in an object often share a similar movement pattern. However, the optimal transport module generates pseudo labels by point-wise matching without considering the local relations among neighboring points, resulting in conflicting pseudo labels in each local region, as shown in Fig. 1(b). To address this issue, we introduce a random walk module to refine the pseudo labels by encouraging local consistency. Viewing each point as a node, we build a graph on the point cloud to propagate and smooth pseudo labels. Specifically, we apply the random walk algorithm in the graph. Using distance on 3D point coordinates as a measure, we build an affinity matrix to describe the similarity between two nodes. In the affinity matrix, closer nodes will be assigned a higher score to ensure local consistency. Normalizing the affinity matrix, we acquire the random walk transition matrix to guide the propagation among the nodes. Through the propagation on the graph, we obtain locally consistent pseudo scene flow labels for scene flow learning.

Our main contributions can be summarized as follows:

We propose a novel self-supervised scene flow learning method in point clouds (Self-Point-Flow) to generate pseudo labels by point matching and perform pseudo label refinement by encouraging the local consistency of the pseudo labels;

Converting the pseudo label generation problem into a point matching task, we propose an optimal transport module for pseudo label generation by considering multiple clues (3D coordinates, colors and surface normals) and explicitly encouraging one-to-one matching;

Neighboring points in an object often share a similar movement pattern. Building a graph on the point cloud, we propose a random walk module to refine the pseudo labels by encouraging local consistency.

Our proposed Self-Point-Flow achieves state-of-the-art performance among self-supervised learning methods. Our self-supervised method even performs on par with some supervised learning approaches, although we do not need any ground truth flow for training.

Related Work

Supervised scene flow from point clouds Scene flow is first proposed in to represent the 3D motion of points in a scene. Many works have been proposed to recover scene flow from multiple types of data. Recently, directly estimating scene flow from point cloud data using deep learning has become a new research direction. Some approaches learn scene flow in point clouds in a fully supervised manner. Puy et al. first introduce the optimal transport into this field. Added into DNNs, this optimal transport module uses learned features to regress scene flow under full supervision. Different from , we focus on unsupervised learning, and our optimal transport module leverages low-level clues to match points for pseudo label generation.

Unsupervised scene flow from point clouds To circumvent the need for expensive ground truth, some approaches target self-supervised learning. Mittal et al. introduce a nearest neighbor loss and an anchored cycle loss. Wu et al. use the Chamfer distance as the main proxy loss. For both the nearest neighbor loss and the Chamfer distance, the nearest neighbor in the other point cloud is regarded as the corresponding point to provide supervision signals. Unlike , when building correspondences, we utilize multiple descriptors as clues and leverage global mass constraints to explicitly encourage one-to-one matching in optimal transport.

Unsupervised optical/scene flow from images Other relative topics are unsupervised optical flow from images and unsupervised scene flow from images . In these scopes, the photometric consistency is widely used as a proxy loss to train flow estimation networks by penalizing the photometric differences. Different from these works that directly use the differences as the supervision signal, our method produces pseudo ground truth, which enables our self-supervised method to cooperate with any point-wise loss function.

Optimal transport Optimal transport has been studied in various fields, such as few-shot learning , pose estimation , semantic correspondence , and etc. Most of them embed the optimal transport into DNNs to find correspondences with learnable features. In this paper, we apply optimal transport to self-supervised scene flow learning.

Random walk Random walk is a widely known graphical model , which has been used in image segmentation and person re-ID . Bertasius et al. use pixel-to-pixel relations to regularize the pixel prediction results. Shen et al. use inter-image relations to improve image affinity ranking. In this paper, based on the local consistency assumption, we focus on leveraging point-to-point relations for pseudo label smoothness and generation.

Method

In this section, we first introduce the theory of optimal transport, and then we discuss the relationship between scene flow labels and point correspondences. Based on the relationship, we solve the pseudo label generation problem by finding point correspondences in an optimal transport framework. Finally, we introduce the details of our proposed pseudo label refinement module that produces dense and locally consistent pseudo labels by the random walk theory. The overview of our method is illustrated in Fig. 2.

where Hij≥0\bm{H}_{ij}\geq 0 is the transport cost from sample ii to sample jj, U∗\bm{U}^{*} is the optimal assignment matrix and each element Uij∗\bm{U}_{ij}^{*} describes the optimal amount of mass transported from sample ii to sample jj.

2 Pseudo Label Generation by OT

Unlike fully supervised scene flow learning, where scene flow labels are available, the self-supervised scene flow learning should produce pseudo labels or design self-supervised losses for training. In this paper, we study how to generate effective pseudo labels for scene flow learning.

Extracting pseudo labels via point matching Scene flow describes the motion between two consecutive point clouds. Ideally, if no viewpoint shift and occlusions exist, following the ground truth scene flow labels D\bm{D}, the first point cloud P\bm{P} can be projected into the next frame and fully occupy the second point cloud Q\bm{Q}:

where π∈{0,1}n×n{\bm{\pi}}\in\{0,1\}^{n\times n} is a permutation matrix to indicate the point correspondences between the two point clouds. Therefore, for a pair of consecutive point clouds P\bm{P} and Q\bm{Q}, if we can accurately match points in the two point clouds, i.e.i.e. accurately computing the permutation matrix π\bm{\pi}, the correspondences derived from π\bm{\pi} can help us recover the ground truth scene flow labels D\bm{D}. In other words, we can solve the pseudo label generation problem by finding point correspondences.

When building correspondences, a straightforward way is to directly match the points from P\bm{P} to Q\bm{Q}. However, for the self-supervised scene flow estimation task, given predicted scene flow F\bm{F}, we propose a pre-warping operation to warp the first point cloud P\bm{P} by the predicted scene flow F\bm{F}, and then find correspondences by matching points from the pre-warped first point cloud, denoted as P^\bm{\hat{P}}, to the second point cloud Q\bm{Q}. Although the predicted scene flow is inaccurate at the beginning of the training, the predictions will be gradually improved as the training continues, which makes the matching from P^\bm{\hat{P}} to Q\bm{Q} easier than the matching from P\bm{P} to Q\bm{Q}. In Sec. 4.3, we show that the matching from P^\bm{\hat{P}} to Q\bm{Q} can make our self-supervised method achieve better performance.

Building optimal transport problem Using 3D point coordinate, color, and surface normal as measures to compute the matching cost and formulating one-to-one matching as the mass equality constraints, we build an optimal transport problem from P^\bm{\hat{P}} to Q\bm{Q},

T∗\bm{T}^{*} is the optimal assignment matrix from P^\bm{\hat{P}} to Q\bm{Q}. Cij\bm{C}_{ij} is the transport cost from the ii-th point in P^\bm{\hat{P}} to the jj-th point in Q\bm{Q}. The transport cost Cij\bm{C}_{ij} is obtained by computing the pairwise difference between p^i\bm{\hat{p}_{i}} and qj\bm{q_{j}} in the three measures. The coordinate cost Cijd\bm{C}_{ij}^{d} and the color cost Cijc\bm{C}_{ij}^{c} are defined on a Gaussian function:

where ∥⋅∥\|\cdot\| denotes the L2L^{2} norm of a vector, θd\theta_{d} and θc\theta_{c} are user defined parameters, p^i\bm{\hat{p}}_{i} and qj\bm{q}_{j} represent the coordinates of the ii-th point and the jj-th point, kp^,ic\bm{k}_{{\hat{p}},i}^{c} and kq,jc\bm{k}_{q,j}^{c} are the colors of the two points. The surface normal cost is calculated using the cosine similarity:

where kp^,is\bm{k}_{{\hat{p}},i}^{s} and kq,js\bm{k}_{q,j}^{s} are the surface normals of the two points. The final transport cost is the sum of the three individual costs:

In order to encourage one-to-one matching, in the equality constraints of Eq. 3, we set μp^=1n1n{\bm{\mu}_{\hat{p}}}=\frac{1}{n}{\bm{1}}_{n} and μq=1n1n{\bm{\mu}_{q}}=\frac{1}{n}{\bm{1}}_{n}. In this case, the row sum and the column sum of assignment matrix T\bm{T} are constrained to be a uniform distribution, which will alleviate the many-to-one matching problem.

Efficiently solving with the Sinkhorn algorithm To efficiently solve the optimal transport problem, we smooth the above problem with an entropic regularization term:

ε\varepsilon is the regularization parameter. The Sinkhorn algorithm can be employed to solve this entropy-regularized formulation. The details are presented in Algorithm 1.

3 Pseudo Label Refinement by Random Walk

The optimal transport module generates pseudo labels by point-wise matching but lacks in capturing the local relations among neighboring points, resulting in conflicting pseudo labels in each local region. Moreover, after the pseudo label generation module, there are still some points without valid pseudo labels. To address the issues, we propose a pseudo label refinement module to encourage the local consistency of pseudo labels and infer new pseudo labels for those unlabeled points.

Building graph on the point cloud Viewing each point as a node, we build a graph G(V,E)G(V,E) on the first point cloud P\bm{P}, shown in Fig. 3. According to the labeling state of each point, the nodes are separated into two sets, the labeled nodes associated with PM\bm{P}_{M} and the unlabeled nodes associated with PS\bm{P}_{S}. Vm={1,2,...,nm}V_{m}=\{1,2,...,n_{m}\} and Vs={1,2,...,ns}V_{s}=\{1,2,...,n_{s}\} represent the labeled node set and the unlabeled node set, respectively. nmn_{m} and nsn_{s} are the number of nodes in the two sets. Subsequently, the entire graph G(V,E)G(V,E) can be divided into two suggraphs: 1) a fully-connected undirected subgraph G1(Vm,Em)G_{1}(V_{m},E_{m}) on labeled nodes VmV_{m} to smooth the pseudo labels of the labeled points; 2) a directed subgraph G2(V,Es)G_{2}(V,E_{s}) from labeled nodes VmV_{m} to unlabeled nodes VsV_{s} to generate new pseudo labels for the unlabeled points. In this procedure, the pseudo labels of the unlabeled points are entirely dependent on those of the labeled points. Therefore, we can first propagate pseudo labels on the undirected subgraph and then on the directed subgraph. The propagation operation can be achieved by the random walk algorithm .

Propagating on the undirected subgraph The fully-connected undirected subgraph is constructed to improve the local consistency of pseudo labels for the labeled point set PM\bm{P}_{M}. The random walk operation on this subgraph can be modeled with a nm×nmn_{m}\times n_{m} transition matrix A1\bm{A}^{1}. Aij1 ∈ \bm{A}^{1}_{ij}~{}\in~{} denotes the transition probability between ii-th and jj-th nodes with constraints ∑jAij1=1\sum_{j}\bm{A}^{1}_{ij}=1 for all jj.

To encourage the local consistency, we use the nearness among nodes as the measure to build the transition matrix so that the closer nodes will be assigned a higher transition probability. Firstly, we denote a symmetric nm×nmn_{m}\times n_{m} affinity matrix W1\bm{W}^{1}, where each element Wij1\bm{W}^{1}_{ij} describes how near the nodes ii and jj are,

where θr\theta_{r} is a hyperparameter, pi\bm{p}_{i} and pj\bm{p}_{j} are point coordinates associated with nodes ii and jj. Then, we normalize the affinity matrix W1\bm{W}^{1} to obtain the transition matrix A1\bm{A}^{1}, where each element Aij1\bm{A}_{ij}^{1} is written as:

The tt-th iteration of random walk refinements on the pseudo labels can be expressed as

When applying the random walk procedure until convergence, i.e.i.e. t=∞t=\infty, according to , the final random walk refinements can be written as

Propagating on the directed subgraph The undirected subgraph is built to infer new pseudo labels for the unlabeled point set PS\bm{P}_{S} based on the refined pseudo labels of the labeled point set, D^M{\bm{\widehat{D}}}_{M}. Similar to the propagation process on the undirected subgraph, we first define a ns×nmn_{s}\times n_{m} affinity matrix W2\bm{W}^{2} to describe the nearness between each point in PS\bm{P}_{S} and each point in PS\bm{P}_{S}. Then we obtain a ns×nmn_{s}\times n_{m} transition matrix A2\bm{A}^{2} by normalizing the affinity matrix W2\bm{W}^{2}. The calculation of W2\bm{W}^{2} and A2\bm{A}^{2} is the same as that of W1\bm{W}^{1} and A1\bm{A}^{1}, shown in Eq. 10 and Eq. 11. Based on the transition matrix A2\bm{A}^{2} and the refined pseudo labels D^M{\bm{\widehat{D}}}_{M}, we obtain the new pseudo labels D^S{\bm{\widehat{D}}}_{S} for the unlabeled points:

Training with pseudo labels Combining the refined pseudo labels D^M{\bm{\widehat{D}}}_{M} and the new pseudo labels D^S{\bm{\widehat{D}}}_{S}, we obtain the final refined pseudo labels D^\bm{\widehat{D}} for the entire point cloud P\bm{P} in self-supervised learning. The training loss in our self-supervised learning method can be computed by:

where flossf_{loss} is any per-point loss function, F\bm{F} is the predicted scene flow. Specifically, we set flossf_{loss} to per-point L2L_{2}-norm loss function for scene flow learning in this paper.

Experiments

We first compare our method with two state-of-the-art self-supervised scene flow estimation methods in Sec. 4.1. Then, we compare our self-supervised models with state-of-the-art fully-supervised models in Sec. 4.2. Finally, we conduct ablation studies to analyze the effectiveness of each component in Sec. 4.3. In this section, we adopt the FlowNet3D as our default scene flow estimation model with only point coordinates as input. Experiments will be conducted on FlyingThings3D and KITTI 2015 datasets. Point clouds are not directly provided in the two original datasets. Following , we denote the two processed point cloud datasets provided by as FT3Ds and KITTIs. And we denote the two processed datasets provided by as FT3Do and KITTIo.

Evaluation metrics. We adopt four evaluation metrics used in , , . Let Y\bm{Y} denote the predicted scene flow, and D\bm{D} be the ground truth scene flow. The evaluate metrics are computed as follows. EPE(m): the main metric, ∥Y∗−Ygt∥2\|\bm{Y}^{*}-\bm{Y}_{gt}\|_{2} average over each point. AS(%): the percentage of points whose EPE << 0.05m or relative error <5%<5\%. AR(%): the percentage of points whose EPE << 0.1m or relative error <10%<10\%. Out(%): the percentage of points whose EPE >> 0.3m or relative error >10%>10\%.

Comparison with PointPWC-Net . Wu et al. introduce Chamfer distance, smoothness constraint, and Laplacian regularization for self-supervised learning. Following the experimental settings of , we first train the FlowNet3D model with our self-supervised method on FT3Ds and then evaluate on FT3Ds and KITTIs. During training, we use the whole training set in FT3Ds for training. Besides, we also try to add the cycle-consistency regularization into our training loss. The detailed experimental setting could be found in supplementary.

The results are shown in Table 1. Our method outperforms self-supervised PointPWC-Net on all metrics and shows significantly better generalization ability on KITTI, although the network capacity of our used FlowNet3D is worse than that of their PointPWC-Net. Adding the cycle-consistency regularization to the loss function, our model gains a further improvement.

Comparison with JGF . Mittal et al. propose a nearest neighbor loss and an anchored cycle loss for self-supervised training. In , they split the KITTIo into two sets, 100 pairs of point clouds for training, denoted as KITTIv, and the remaining 50 pairs for testing, denoted as KITTIt. Moreover, they also leverage an additional real-world outdoor point cloud dataset, nuScenes , to augment their training data. In , all networks are initialized with a Flownet3D model pre-trained on FlyingThing3D.

In our experiment, we use the raw data from KITTI to produce point clouds as our training data. Because the point clouds in KITTIo belong to 29 scenes in KITTI, to avoid the overlap of training data and test data, we produce training point clouds from the remaining 33 scenes. Extracting a pair of point clouds at every five frames, we build a self-supervised training set containing 6,068 pairs, denoted as KITTIr. For comparison, we test our model on the same KITTIt with 50 test pairs. In each test pair, our model is evaluated by processing 2,048 random points. The detailed experimental setting is in supplementary.

The results are shown in Table 2. Our model trained on KITTIr outperforms their model by 18.3% in EPE, which is pre-trained on FT3D and then trained on KITTIv, although training from scratch is much more challenging than fine-tuning a pre-trained model for self-supervised learning. After further fine-tuned on KITTIv, our model achieves comparable performance to their model, which is pre-trained on FT3D and then trained on nuScenes and KITTIv. When using the parameters of self-supervised models as initial weights and performing fully-supervised training on KITTIv, our model outperforms theirs on all metrics. Fig. 5 displays our produced pseudo ground truth for some examples in KITTIv.

2 Comparison with fully-supervised methods

In Table 1, we compare our self-supervised model with some fully-supervised methods, which are also trained on FT3Ds and tested on FT3Ds and KITTIs. As shown in Table 1, adding a cycle-consistency regularization, our self-supervised method outperforms SPLATFlowNet on FT3Ds and generalizes better on KITTIs than SPLATFlowNet , original BCL , and HPLFlowNet , although we do not use any ground truth flow for training. Qualitative results are shown in Fig. 4.

In Table 3, using KITTIo as test set, we compare our self-supervised model trained on KITTIr with some fully-supervised methods trained on FT3Do, following the test procedure of FLOT . Despite using the same scene flow estimation model, our self-supervised FlowNet3D trained on KITTIr outperforms supervised FlowNet3D trained on FT3Do by 39.3% in the metric of EPE. It demonstrates that, for the FlowNet3D model, self-supervised learning on KITTI with our method is much more effective than supervised learning on FlyingThings3D in real-world scenes. Furthermore, as shown in Table 3, our self-supervised method has achieved a close performance to the state-of-the-art supervised method, FLOT , on KITTIo dataset. Fig. 4 provides some example results.

3 Ablation studies

In this section, we conduct ablation studies to analyze the effectiveness of each component. All models are trained on KITTIr and evaluated on KITTIo.

Ablation study for pseudo label generation module. In this module, for good point matching, we adopt color and surface normal as additional measures to build the transport cost matrix and establish the global constraints to enforce one-to-one marching. To verify the effectiveness of our module, we design a baseline method, named greedy search, which directly finds the point with the lowest transport cost in another point cloud as the corresponding point without any constraints.

Firstly, we analyze the impact of the color measure and the surface normal measure. As shown in Table 4, for both greedy search method and optimal transport method, adding color and surface normal as measures can boost AS by around 10 to 17 points. Compared with the original optimal transport with only 3D point coordinate as a measure, our proposed pseudo label generation module brings a 139% improvement on AS, which demonstrates the discriminative ability of color and surface normal in finding correspondences.

Secondly, we analyze the impact of the global constraints. As shown in Table 4, for all three kinds of measure combinations, adding the global constraints can increase AS by about 5 to 9 points, which means that addressing the many-to-one problem in point matching can greatly improve the quality of produced pseudo labels.

Thirdly, we compare different matching strategies in our module. In our optimal transport, we search for correspondences by matching from the pre-warped first point cloud to the second point cloud, denoted as P^ → Q\bm{\widehat{P}}~{}\to~{}\bm{Q}, and regard the point with the highest transport score as the corresponding point, denoted as Hard matching. To evaluate the effectiveness of our matching strategy, as shown in Table 5, we design two baseline methods: 1) baseline1 matches from the first point cloud to the second one, denoted as P → Q\bm{P}~{}\to~{}\bm{Q}, 2) baseline 2 produces a soft corresponding point by using the transport score as the weight to perform a weighted summation of all candidate points. This process is denoted as Soft matching. As shown in Table 5, our method outperforms baseline1 and baseline2 by about 10 points on AS, which demonstrates the effectiveness of our matching strategy.

Ablation study for pseudo label refinement module. This module employs random walk operations to improve the local consistency of pseudo labels. In this module, we build two subgraphes: an undirected one for label smoothness and a directed one for new label generation in unlabeled points. To verify the effectiveness of our module, we design a naive smoothing unit (NS) that finds neighboring points by KNN search and outputs the average label of the neighboring points as the refined label. As show in Table 6, smoothing labels by random walk operation on the undirected subgraph (UG) improves AS from 24.36 to 40.88. And the improvement from UG is significantly greater than that from the naive smoothing unit (NS). By further generating new labels for the unlabeled points via random walk operation on the directed subgraph (DG), we achieve another improvement on AS by 0.86. The great improvement demonstrates the effectiveness of our pseudo label refinement module. And the impact of different random walk steps on our method is shown in Table 7.

Time consumption of our pseudo-label generation process. To process a scene containing 2,048 points in KITTIr, the pseudo label generation module takes about 3.2ms and the pseudo label refinement module takes about 75.6ms on a single 2080ti GPU. Thus, the total time consumption for a scene is 78.8ms.

Conclusions

In this paper, we propose a novel self-supervised scene flow learning method in point clouds to produce pseudo labels via point matching and perform pseudo label refinement by encouraging the local consistency. Comprehensive experiments show that our method achieves state-of-the-art performance among self-supervised learning methods. Our self-supervised method even performs on par with some supervised learning approaches, although we do not need any ground truth flow for training.

Acknowledgements

This research was conducted in collaboration with SenseTime. This work is supported by A*STAR through the Industry Alignment Fund - Industry Collaboration Projects Grant. This work is also supported by the National Research Foundation, Singapore under its AI Singapore Programme (AISG Award No: AISG-RP-2018-003), and the MOE Tier-1 research grants: RG28/18 (S) and RG22/19 (S).

References