RandLA-Net in Tensorflow
We study the problem of efficient semantic segmentation for large-scale 3D point clouds. By relying on expensive sampling techniques or computationally heavy pre/post-processing steps, most existing approaches are only able to be trained and operate over small-scale point clouds. In this paper, we introduce RandLA-Net, an efficient and lightweight neural architecture to directly infer per-point semantics for large-scale point clouds. The key to our approach is to use random point sampling instead of more complex point selection approaches. Although remarkably computation and memory efficient, random sampling can discard key features by chance. To overcome this, we introduce a novel local feature aggregation module to progressively increase the receptive field for each 3D point, thereby effectively preserving geometric details. Extensive experiments show that our RandLA-Net can process 1 million points in a single pass with up to 200X faster than existing approaches. Moreover, our RandLA-Net clearly surpasses state-of-the-art approaches for semantic segmentation on two large-scale benchmarks Semantic3D and SemanticKITTI.READ FULL TEXT VIEW PDF
In this paper, we present the PS^2-Net -- a locally and globally aware d...
Deep learning approaches have made tremendous progress in the field of
In this paper, we present a conceptually simple and powerful framework,
State-of-the-art segmentation methods rely on very deep networks that ar...
Deep models are capable of fitting complex high dimensional functions wh...
Analyzing the geometric and semantic properties of 3D point clouds throu...
Point Pair Features is a widely used method to detect 3D objects in poin...
RandLA-Net in Tensorflow
Efficient semantic segmentation of large-scale 3D point clouds is a fundamental and essential capability for real-time intelligent systems, such as autonomous driving and augmented reality. A key challenge is that the raw point clouds acquired by depth sensors are typically irregularly sampled, unstructured and unordered. Although deep convolutional networks show excellent performance in structured 2D computer vision tasks, they cannot be directly applied to this type of unstructured data.
Recently, the pioneering work PointNet [qi2017pointnet]
has emerged as a promising approach for directly processing 3D point clouds. It learns per-point features using shared multilayer perceptrons (MLPs). This is computationally efficient but fails to capture wider context information for each point. To learn richer local structures, many dedicated neural modules have been subsequently and rapidly introduced. These modules can be generally categorized as: 1) neighbouring feature pooling[qi2017pointnet++, so-net, RSNet, pointweb, zhang2019shellnet], 2) graph message passing [dgcnn, KCNet, local_spectral, GACNet, clusternet, HPEIN, Agglomeration], 3) kernel-based convolution [su2018splatnet, hua2018pointwise, wu2018pointconv, octree_guided, ACNN, Geo-CNN, thomas2019kpconv, mao2019interpolated], and 4) attention-based aggregation [xie2018attentional, PCAN, Yang2019ModelingPC, AttentionalPointNet]. Although these approaches achieve impressive results for object recognition and semantic segmentation, almost all of them are limited to extremely small 3D point clouds (e.g., 4k points or 11 meter blocks) and cannot be directly extended to larger point clouds (e.g., millions of points and up to 200200 meters). The reasons for this limitation are three-fold. 1) The commonly used point-sampling methods of these networks are either computationally expensive or memory inefficient. For example, the widely employed farthest-point sampling [qi2017pointnet++] takes over 200 seconds to sample 10% of 1 million points. 2) Most existing local feature learners usually rely on computationally expensive kernelisation or graph construction, thereby being unable to process massive number of points. 3) For a large-scale point cloud, which usually consists of hundreds of objects, the existing local feature learners are either incapable of capturing complex structures, or do so inefficiently, due to their limited size of receptive fields.
A handful of recent works have started to tackle the task of directly processing large-scale point clouds. SPG [landrieu2018large]
preprocesses the large point clouds as super graphs before applying neural networks to learn per super-point semantics. Both FCPN[rethage2018fully] and PCT [PCT] combine voxelization and point-level networks to process massive point clouds. Although they achieve decent segmentation accuracy, the preprocessing and voxelization steps are too computationally heavy to be deployed in real-time applications.
In this paper, we aim to design a memory and computationally efficient neural architecture, which is able to directly process large-scale 3D point clouds in a single pass, without requiring any pre/post-processing steps such as voxelization, block partitioning or graph construction. However, this task is extremely challenging as it requires: 1) a memory and computationally efficient sampling approach to progressively downsample large-scale point clouds to fit in the limits of current GPUs, and 2) an effective local feature learner to progressively increase the receptive field size to preserve complex geometric structures. To this end, we first systematically demonstrate that random sampling is a key enabler for deep neural networks to efficiently process large-scale point clouds. However, random sampling can discard key semantic information, especially for objects with low point densities. To counter the potentially detrimental impact of random sampling, we propose a new and efficient local feature aggregation module to capture complex local structures over progressively smaller point-sets.
Amongst existing sampling methods, farthest point sampling and inverse density sampling are the most frequently used for small-scale point clouds [qi2017pointnet++, wu2018pointconv, li2018pointcnn, pointweb, Groh2018flexconv]. As point sampling is such a fundamental step within these networks, we investigate the relative merits of different approaches in Section 3.2, both by examining their computational complexity and empirically by measuring their memory consumption and processing time. From this, we see that the commonly used sampling methods limit scaling towards large point clouds, and act as a significant bottleneck to real-time processing. However, we identify random sampling as by far the most suitable component for large-scale point cloud processing as it is fast and scales efficiently. Random sampling is not without cost, because prominent point features may be dropped by chance and it cannot be used directly in existing networks without incurring a performance penalty. To overcome this issue, we design a new local feature aggregation module in Section 3.3, which is capable of effectively learning complex local structures by progressively increasing the receptive field size in each neural layer. In particular, for each 3D point, we firstly introduce a local spatial encoding (LocSE) unit to explicitly preserve local geometric structures. Secondly, we leverage attentive pooling to automatically keep the useful local features. Thirdly, we stack multiple LocSE units and attentive poolings as a dilated residual block, greatly increasing the effective receptive field for each point. Note that all these neural components are implemented as shared MLPs, and are therefore remarkably memory and computational efficient.
Overall, being built on the principles of simple random sampling and an effective local feature aggregator, our efficient neural architecture, named RandLA-Net111Code and data are available at: https://github.com/QingyongHu/RandLA-Net, not only is up to 200 faster than existing approaches on large-scale point clouds, but also surpasses the state-of-the-art semantic segmentation methods on both Semantic3D [Semantic3D] and SemanticKITTI [behley2019semantickitti] benchmarks. Figure 1 shows qualitative results of our approach. Our key contributions are:
We analyse and compare existing sampling approaches, identifying random sampling as the most suitable component for efficient learning on large-scale point clouds.
We propose an effective local feature aggregation module to automatically preserve complex local structures by progressively increasing the receptive field for each point.
We demonstrate significant memory and computational gains over baselines, and surpass the state-of-the-art semantic segmentation methods on multiple large-scale benchmarks.
To extract features from 3D point clouds, traditional approaches usually manually hand-craft features [point_signatures, fast_hist]. Recent learning based approaches mainly include projection-based, voxel-based and point-based schemes which are outlined here.
(1) Projection and Voxel Based Networks. To leverage the success of 2D CNNs, many works [li2016vehicle_rss, chen2017multi, PIXOR, pointpillars] project/flatten 3D point clouds onto 2D images to address the task of object detection. However, many geometric details are lost during the projection. Alternatively, point clouds can be voxelized into 3D grids and then powerful 3D CNNs are applied as in [sparse, pointgrid, 4dMinkpwski, vvnet, Fast_point_rcnn]. Although they achieve leading results on semantic segmentation and object detection, their primary limitation is the heavy computation cost, especially when processing large-scale point clouds.
(2) Point Based Networks. Inspired by PointNet/PointNet++ [qi2017pointnet, qi2017pointnet++]
, many recent works introduced sophisticated neural modules to learn per-point local features. These modules can be generally classified as 1) neighbouring feature pooling[so-net, RSNet, pointweb, zhang2019shellnet], 2) graph message passing [dgcnn, KCNet, local_spectral, GACNet, clusternet, HPEIN, Agglomeration], 3) kernel-based convolution [su2018splatnet, hua2018pointwise, wu2018pointconv, octree_guided, ACNN, Geo-CNN, thomas2019kpconv, mao2019interpolated], and 4) attention-based aggregation [xie2018attentional, PCAN, Yang2019ModelingPC, AttentionalPointNet]. Although these networks have shown promising results on small point clouds, most of them cannot directly scale up to large scenarios due to their high computational and memory costs. Compared with them, our proposed RandLA-Net is distinguished in three ways: 1) it only relies on random sampling within the network, thereby requiring much less memory and computation; 2) the proposed local feature aggregator can obtain successively larger receptive fields by explicitly considering the local spatial relationship and point features, thus being more effective and robust for learning complex local patterns; 3) the entire network only consists of shared MLPs without relying on any expensive operations such as graph construction and kernelisation, therefore being superbly efficient for large-scale point clouds.
(3) Learning for Large-scale Point Clouds. SPG [landrieu2018large] preprocesses the large point clouds as super graphs to learn per super-point semantics. The recent FCPN [rethage2018fully] and PCT [PCT] apply both voxel-base and point-based networks to process the massive point clouds. However, both the graph partitioning and voxelisation are computationally expensive. In constrast, our efficient RandLA-Net is end-to-end trainable without requiring any additional pre/post-processing steps.
As illustrated in Figure 2, given a large-scale point cloud with millions of points spanning up to hundreds of meters, to process it with a deep neural network inevitably requires those points to be progressively and efficiently downsampled in each neural layer, without losing the useful point features. In our RandLA-Net, we propose to use the simple and fast approach of random sampling to greatly decrease point density, whilst applying a carefully designed local feature aggregator to retain prominent features. This allows the entire network to achieve an excellent trade-off between efficiency and effectiveness.
Existing point sampling approaches [qi2017pointnet++, li2018pointcnn, Groh2018flexconv, learning2sample, concrete, wu2018pointconv]
can be roughly classified into heuristic and learning-based approaches. However, there is still no standard sampling strategy that is suitable for large-scale point clouds. Therefore, we analyse and compare their relative merits and complexity as follows.
(1) Heuristic Sampling
Farthest Point Sampling (FPS): In order to sample points from a large-scale point cloud with points, FPS returns a reordering of the metric space , such that each is the farthest point from the first points. FPS is widely used in [qi2017pointnet++, li2018pointcnn, wu2018pointconv] for semantic segmentation of small point sets. Although it has a good coverage of the entire point set, its computational complexity is . For a large-scale point cloud (), FPS takes up to 200 seconds to process on a single GPU. This shows that FPS is not suitable for large-scale point clouds.
Inverse Density Importance Sampling (IDIS): To sample points from points, IDIS reorders all points according to the density of each point, after which the top points are selected [Groh2018flexconv]. Its computational complexity is approximately . Empirically, it takes 10 seconds to process
points. Compared with FPS, IDIS is more efficient, but also more sensitive to outliers. However, it is still too slow for use in a real-time system.
Random Sampling (RS): Random sampling uniformly selects points from the original points. Its computational complexity is , which is agnostic to the total number of input points, i.e., it is constant-time and hence inherently scalable. Compared with FPS and IDIS, random sampling has the highest computational efficiency, regardless of the scale of input point clouds. It only takes 0.004s to process points.
(2) Learning-based Sampling
Generator-based Sampling (GS): GS [learning2sample] learns to generate a small set of points to approximately represent the original large point set. However, FPS is usually used in order to match the generated subset with the original set at inference stage, incurring additional computation. In our experiments, it takes up to 1200 seconds to sample 10% of points.
Continuous Relaxation based Sampling (CRS): CRS approaches [concrete, Yang2019ModelingPC]
use the reparameterization trick to relax the sampling operation to a continuous domain for end-to-end training. In particular, each sampled point is learnt based on a weighted sum over the full point clouds. It results in a large weight matrix when sampling all the new points simultaneously with a one-pass matrix multiplication, leading to an unaffordable memory cost. For example, it is estimated to take more than a 300GB memory footprint to sample 10% ofpoints.
Policy Gradient based Sampling (PGS):
PGS formulates the sampling operation as a Markov decision process[show_attend]
. It sequentially learns a probability to sample each point. However, the learnt probability has high variance due to the extremely large exploration space when the point cloud is in large scale. For example, to sample 10% ofpoints, the exploration space is and it is unlikely to learn an effective sampling policy. We empirically find that the network is difficult to converge if PGS is used for large point clouds.
Overall, FPS, IDIS and GS are too computationally expensive to be applied for large-scale point clouds. CRS approaches have an excessive memory footprint and PGS is hard to learn. By contrast, random sampling has the following two advantages: 1) it is remarkably computational efficient as it is agnostic to the total number of input points, 2) it does not require extra memory for computation. Therefore, we safely conclude that random sampling is by far the most suitable approach to process large-scale point clouds compared with all existing alternatives. However, random sampling may result in many useful point features being dropped. To overcome it, we propose a powerful local feature aggregation module as presented in below Section 3.3.
As shown in Figure 3, our local feature aggregation module is applied to each 3D point in parallel and it consists of three neural units: 1) local spatial encoding (LocSE), 2) attentive pooling, and 3) dilated residual block.
(1) Local Spatial Encoding
Given a point cloud together with per-point features (e.g., raw RGB, or intermediate learnt features), this local spatial encoding unit explicitly embeds the x-y-z coordinates of all neighbouring points, such that the corresponding point features are always aware of their relative spatial locations. This allows the LocSE unit to explicitly observe the local geometric patterns, thus eventually benefiting the entire network to effectively learn complex local structures. In particular, this unit includes the following steps:
Finding Neighbouring Points. For the point, its neighbouring points are firstly gathered by the simple
-nearest neighbours (KNN) algorithm for efficiency. Note that, the KNN is based on the point-wise Euclidean distances.
Relative Point Position Encoding. For each of the nearest points of the center point , we explicitly encode the relative point position as follows:
where and are the x-y-z positions of points, is the concatenation operation, and calculates the Euclidean distance between the neighbouring and center points. It seems that is encoded from redundant point position information. Interestingly, this tends to aid the network to learn local features and obtains good performance in practice.
Point Feature Augmentation. For each neighbouring point , the encoded relative point positions are concatenated with its corresponding point features
, obtaining an augmented feature vector.
Eventually, the output of LocSE unit is a new set of neighbouring features , which explicitly encodes the local geometric structures for the center point . We notice that the recent work [liu2019relation] also uses point positions to improve semantic segmentation. However, the positions are used to learn point scores in [liu2019relation], while our LocSE explicitly encodes the relative positions to augment the neighbouring point features.
(2) Attentive Pooling
This neural unit is used to aggregate the set of neighbouring point features . Existing works [qi2017pointnet++, li2018pointcnn] typically use max/mean pooling to hard integrate the neighbouring features, resulting in the majority of the information being lost. By contrast, we turn to the powerful attention mechanism to automatically learn important local features. In particular, inspired by [Yang_ijcv2019], our attentive pooling unit consists of the following steps.
Computing Attention Scores. Given the set of local features , we design a shared function to learn a unique attention score for each feature. Basically, the function consists of a shared MLP followed by . It is formally defined as follows:
where is the learnable weights of a shared MLP.
Weighted Summation. The learnt attention scores can be regarded as a soft mask which automatically selects the important features. Formally, these features are weighted summed as follows:
To summarize, given the input point cloud , for the point , our LocSE and Attentive Pooling units learn to aggregate the geometric patterns and features of its nearest points, and finally generate an informative feature vector .
(3) Dilated Residual Block
Since the large point clouds are going to be substantially downsampled, it is desirable to significantly increase the receptive field for each point, such that the geometric details of input point clouds are more likely to be reserved, even if some points are dropped. As shown in Figure 3, inspired by the successful ResNet [he2016deep] and the effective dilated networks [DPC], we stack multiple LocSE and Attentive Pooling units together with a skip connection as a dilated residual block.
To further illustrate the capability of our dilated residual block, Figure 4 shows that the red 3D point observes neighbouring points after the first LocSE/Attentive Pooling operation, and then is able to receive information from up to neighbouring points i.e. its two-hop neighbourhood after the second. This is a cheap way of dilating the receptive field and expanding the effective neighbourhood through feature propagation. Theoretically, the more units we stack, the more powerful this block as its sphere of reach becomes greater and greater. However, more units would inevitably sacrifice the overall computation efficiency. In addition, the entire network is likely to be over-fitted. In our RandLA-Net, we simply stack two sets of LocSE and Attentive Pooling as the standard residual block, achieving a satisfactory balance between efficiency and effectiveness.
Overall, our local feature aggregation module is designed to effectively preserve complex local structures via explicitly considering neighbouring geometries and significantly increasing receptive fields. Moreover, this module only consists of feed-forward MLPs, thus being computationally efficient.
We implement RandLA-Net by stacking multiple local feature aggregation modules and random sampling layers. The detailed architecture is presented in the Appendix. We use the Adam optimizer with default parameters. The initial learning rate is set as 0.01 and decreases by 5% after each epoch. The number of nearest pointsis set as 16. To train our RandLA-Net in parallel, we sample a fixed number of points () from each point cloud as the input. During testing, the whole raw point cloud is fed into our network to infer per-point semantics without any pre/post-processing. All experiments are conducted on an NVIDIA RTX2080Ti GPU.
In this section, we empirically evaluate the efficiency of existing sampling approaches including FPS, IDIS, RS, GS, CRS, and PGS, which have been discussed in Section 3.2. In particular, we conduct the following 4 groups of experiments.
Group 1. Given a small scale point cloud ( points), we use each sampling approach to progressively downsample it. Specifically, the point cloud is downsampled by five steps with only 25% points being retained in each step on a single GPU i.e. a four-fold decimation ratio. This means that there are only points left in the end. This downsampling strategy emulates the procedure used in PointNet++ [qi2017pointnet++]. For each sampling approach, we sum up its time and memory consumption for comparison.
Group 2/3/4. The total number of points are increased towards large-scale, i.e., around and points respectively. We use the same five sampling steps as in Group 1.
Analysis. Figure 5 compares the total time and memory consumption of each sampling approach to process different scales of point clouds. It can be seen that: 1) For small scale point clouds (), all sampling approaches tend to have similar time and memory consumption, and are unlikely to incur a heavy or limiting computation burden. 2) For large-scale point clouds (), FPS/IDIS/GS/CRS/PGS are either extremely time-consuming or memory-costly. By contrast, random sampling has superior time and memory efficiency overall. This result clearly demonstrates that most existing networks [qi2017pointnet++, li2018pointcnn, wu2018pointconv, liu2019relation, pointweb, Yang2019ModelingPC] are only able to be optimized on small blocks of point clouds primarily because they rely on the expensive sampling approaches. Motivated by this, we use the efficient random sampling strategy in our RandLA-Net.
In this section, we systematically evaluate the overall efficiency of our RandLA-Net on real-world large-scale point clouds for semantic segmentation. Particularly, we evaluate RandLA-Net on SemanticKITTI [behley2019semantickitti] dataset, obtaining the total time consumption of our network on Sequence 08 which has 4071 frames of point clouds in total. We also evaluate the time consumption of recent representative works [qi2017pointnet, qi2017pointnet++, li2018pointcnn, landrieu2018large, thomas2019kpconv] on the same dataset. For a fair comparison, we feed the same number of points (i.e., 81920) from each scan into each neural network.
In addition, we also evaluate the memory consumption of RandLA-Net and the baselines. In particular, we not only report the total parameters of each network, but also measure the maximum number of 3D points each network can take as input in a single pass to infer per-point semantics. Note that, all experiments are conducted on the same machine with an AMD 3700X @3.6GHz CPU and an NVIDIA RTX2080Ti GPU.
Analysis. Table 1 quantitatively shows the total time and memory consumption of different approaches. It can be seen that, 1) SPG [landrieu2018large] has the lowest number of network parameters, but takes the longest time to process the point clouds due to the expensive geometrical partitioning and super-graph construction steps; 2) PointNet++ [qi2017pointnet++] and PointCNN [li2018pointcnn] are also computationally expensive mainly because of the FPS sampling operation; 3) PointNet [qi2017pointnet] and KPConv [thomas2019kpconv] are unable to take extremely large-scale point clouds (e.g. points) in a single pass due to their memory inefficient operations. 4) Thanks to the simple random sampling together with the efficient MLP based local feature aggregator, our RandLA-Net takes the shortest time (translating to 23 frames per second) to infer the semantic labels for each large-scale point cloud (up to points).
|PointNet (Vanilla) [qi2017pointnet]||192||0.8||0.49|
|PointNet++ (SSG) [qi2017pointnet++]||9831||0.97||0.98|
|mIoU (%)||OA (%)||man-made.||natural.||high veg.||low veg.||buildings||hard scape||scanning art.||cars|
In this section, we evaluate the semantic segmentation of our RandLA-Net on three large-scale public datasets: the Semantic3D [Semantic3D], SemanticKITTI [behley2019semantickitti], and S3DIS [2D-3D-S].
|PointNet [qi2017pointnet]||50K pts||14.6||3||61.6||35.7||15.8||1.4||41.4||46.3||0.1||1.3||0.3||0.8||31.0||4.6||17.6||0.2||0.2||0.0||12.9||2.4||3.7|
|RandLA-Net (Ours)||50K pts||50.3||0.95||90.4||67.9||56.9||15.5||81.1||94.0||42.7||19.8||21.4||38.7||78.3||60.3||59.0||47.5||48.8||4.6||49.7||44.2||38.1|
(1) Evaluation on Semantic3D. The Semantic3D dataset [Semantic3D] consists of 15 point clouds for training and 15 for online testing. Each point cloud has up to points, covering up to 16024030 meters in real-world 3D space. The raw 3D points belong to 8 classes and contain 3D coordinates, RGB information, and intensity. We only use the 3D coordinates and color information to train and test our RandLA-Net. Mean Intersection of Union (mIoU) and Overall Accuracy (OA) of all classes are used as the standard metrics. For fair comparison, we only include the results of recently published strong baselines [snapnet, tchapmi2017segcloud, RF_MSSF, msdeepvoxnet, zhang2019shellnet, GACNet, landrieu2018large] and the current state-of-the-art approach KPConv [thomas2019kpconv].
Table 2 presents the quantitative results of different approaches. RandLA-Net clearly outperforms all existing methods in terms of both mIoU and OA. Notably, RandLA-Net also achieves superior performance on six of the eight classes, except low vegetation and scanning artifact.
(2) Evaluation on SemanticKITTI. SemanticKITTI [behley2019semantickitti] consists of 43552 densely annotated LIDAR scans belonging to 21 sequences. Each scan is a large-scale point cloud with points and spanning up to 16016020 meters in 3D space. Officially, the sequences 0007 and 0910 (19130 scans) are used for training, the sequence 08 (4071 scans) for validation, and the sequences 1121 (20351 scans) for online testing. The raw 3D points only have 3D coordinates without color information. The mIoU score over 19 categories is used as the standard metric.
Table 3 shows a quantitative comparison of our RandLA-Net with two families of recent approaches, i.e. 1) point-based methods [qi2017pointnet, landrieu2018large, su2018splatnet, qi2017pointnet++, tangentconv] and 2) projection based approaches [wu2018squeezeseg, wu2019squeezesegv2, behley2019semantickitti], and Figure 6 shows some qualitative results of RandLA-Net on the validation split. It can be seen that our RandLA-Net surpasses all point based approaches [qi2017pointnet, landrieu2018large, su2018splatnet, qi2017pointnet++, tangentconv] by a large margin. We also outperform all projection based methods [wu2018squeezeseg, wu2019squeezesegv2, behley2019semantickitti], but not significantly, primarily because DarkNet [behley2019semantickitti] achieves much better results on the small object category such as traffic-sign. However, our RandLA-Net has far fewer network parameters than DarkNet [behley2019semantickitti] and is more computationally efficient as it does not require the costly steps of pre- and post- projection processing.
(3) Evaluation on S3DIS. The S3DIS dataset [2D-3D-S] consists of 271 rooms belonging to 6 large areas. Each point cloud is a medium-sized single room ( 20155 meters) with dense 3D points. To evaluate the semantic segmentation of our RandLA-Net, we use the standard 6-fold cross-validation in our experiments. The mean IoU (mIoU), mean class Accuracy (mAcc) and Overall Accuracy (OA) of the total 13 classes are compared.
As shown in Table 4, our RandLA-Net achieves on-par or better performance than state-of-the-art methods. Note that, most of these baselines [qi2017pointnet++, li2018pointcnn, pointweb, zhang2019shellnet, dgcnn, chen2019lsanet] tend to use sophisticated but expensive operations or samplings to optimize the networks on small blocks (e.g., 11 meter) of point clouds, and the relatively small rooms act in their favours to be divided into tiny blocks. By contrast, RandLA-Net takes the entire rooms as input and is able to efficiently infer per-point semantics in a single pass.
Since the impact of random sampling is fully studied in Section 4.1, we conduct the following ablation studies for our local feature aggregation module. All ablated networks are trained on sequences 0007 and 0910, and tested on the sequence 08 of SemanticKITTI dataset [behley2019semantickitti].
(1) Removing local spatial encoding (LocSE). This unit enables each 3D point to explicitly observe its local geometry. After removing locSE, we directly feed the local point features into the subsequent attentive pooling.
(24) Replacing attentive pooling by max/mean/sum pooling. The attentive pooling unit learns to automatically combine all local point features. By comparison, the widely used max/mean/sum poolings tend to hard select or combine features, therefore their performance may be sub-optimal.
(5) Simplifying the dilated residual block. The dilated residual block stacks multiple LocSE units and attentive poolings, substantially dilating the receptive field for each 3D point. By simplifying this block, we use only one LocSE unit and attentive pooling per layer, i.e. we don’t chain multiple blocks as in our original RandLA-Net.
Table 5 compares the mIoU scores of all ablated networks. From this, we can see that: 1) The greatest impact is caused by the removal of the chained spatial embedding and attentive pooling blocks. This is highlighted in Figure 4, which shows how using two chained blocks allows information to be propagated from a wider neighbourhood, i.e. approximately points as opposed to just . This is especially critical with random sampling, which is not guaranteed to preserve a particular set of points. 2) The removal of the local spatial encoding unit shows the next greatest impact on performance, demonstrating that this module is necessary to effectively learn local and relative geometry context. 3) Removing the attention module diminishes performance by not being able to effectively retain useful features. From this ablation study, we can see how the proposed neural units complement each other to attain our state-of-the-art performance.
|(1) Remove local spatial encoding||45.1|
(2) Replace with max-pooling
|(3) Replace with mean-pooling||45.2|
|(4) Replace with sum-pooling||45.7|
|(5) Simplify dilated residual block||41.5|
|(6) The Full framework (RandLA-Net)||52.0|
In this paper, we demonstrated that it is possible to efficiently and effectively segment large-scale point clouds by using a lightweight network architecture. In contrast to most current approaches, that rely on expensive sampling strategies, we instead use random sampling in our framework to significantly reduce the memory footprint and computational cost. A local feature aggregation module is also introduced to effectively preserve useful features from a wide neighbourhood. Extensive experiments on multiple benchmarks demonstrate the high efficiency and the state-of-the-art performance of our approach. It would be interesting to extend our framework for the end-to-end 3D instance segmentation on large-scale point clouds by drawing on the recent work [3dbonet] and also for the real-time dynamic point cloud processing [liu2019meteornet].
We provide the implementation details of different sampling approaches evaluated in Section 4.1. To sample points (point features) from a large-scale point cloud with points (point features):
Farthest Point Sampling (FPS): We follow the implementation 222https://github.com/charlesq34/pointnet2 provided by PointNet++ [qi2017pointnet++], which is also widely used in [li2018pointcnn, wu2018pointconv, liu2019relation, chen2019lsanet, pointweb]. In particular, FPS is implemented as an operator running on GPU.
Inverse Density Importance Sampling (IDIS): Given a point , its density is approximated by calculating the summation of the distances between and its nearest points [Groh2018flexconv]. Formally:
where represents the coordinates (i.e. x-y-z) of the point of the neighbour points set , is set to 16. All the points are ranked according to the inverse density of points. Finally, the top points are selected.
Random Sampling (RS): We implement random sampling with the python numpy package. Specifically, we first use the numpy function numpy.random.choice() to generate indices. We then gather the corresponding spatial coordinates and per-point features from point clouds by using these indices.
Generator based Sampling (GS): The implementation follows the code333https://github.com/orendv/learning_to_sample provided by [learning2sample]. We first train a ProgressiveNet [learning2sample] to transform the raw point clouds into ordered point sets according to their relevance to the task. After that, the first points are kept, while the rest discarded.
Continuous Relaxation based Sampling (CRS): CRS is implemented with the self-attended gumbel-softmax sampling [concrete][Yang2019ModelingPC]. Given a point cloud with 3D coordinates and per point features, we firstly estimate a probability score vector through a score function parameterized by a MLP layer, i.e., , which learns a categorical distribution. Then, with the Gumbel noise drawn from the distribution . Each sampled point feature vector is calculated as follows:
where and indicate the element in the vector and respectively, represents the row vector in the input matrix . is the annealing temperature. When , Equation 5 approaches the discrete distribution and samples each row vector in with the probability .
Policy Gradients based Sampling (PGS): Given a point feature set with 3D coordinates and per point features, we first predict a score for each point, which is learnt by a MLP function, i.e., , where is a zero-mean Gaussian noise with the variance for random exploration. After that, we sample vectors in with the top scores. To properly update the score function, we apply REINFORCE algorithm [sutton2000policy] as the gradient estimator. By modeling the entire sampling operation as a sequential Markov Decision Process (MDP), we formulate the policy function as:
where is the binary decision of whether to sample the vector in , is the network parameter of the MLP. Then we apply the segmentation accuracy R as the reward value for the entire sampling process and maximize our reward function with the following estimated gradients:
where is the batch size, and are two control variates [mnih2014neural] for alleviating the high variance problem of policy gradients.
Figure 7 shows the detailed architecture of RandLA-Net. The network follows the widely-used encoder-decoder architecture with skip connections. The input point cloud is first fed to a shared MLP layer to extract per-point features. Four encoding and decoding layers are then used to learn features for each point. At last, three fully-connected layers and a dropout layer are used to predict the semantic label of each point. The details of each part are as follows:
Network Input: The input is a large-scale point cloud with a size of (the batch dimension is dropped for simplicity), where is the number of points, is the feature dimension of each input point. For both S3DIS [2D-3D-S] and Semantic3D [Semantic3D] datasets, each point is represented by its 3D coordinates and color information (i.e., x-y-z-R-G-B), while each point of the SemanticKITTI [behley2019semantickitti] dataset is only represented by 3D coordinates.
Encoding Layers: Four encoding layers are used in our network to progressively reduce the size of the point clouds and increase the per-point feature dimensions. Each encoding layer consists of a local feature aggregation module (Section 3.3) and a random sampling operation (Section 3.2). The point cloud is downsampled with a four-fold decimation ratio. In particular, only 25% of the point features are retained after each layer, i.e., . Meanwhile, the per-point feature dimension is gradually increased each layer to preserve more information, i.e., .
Decoding Layers: Four decoding layers are used after the above encoding layers. For each layer in the decoder, we first use the KNN
algorithm to find one nearest neighboring point for each query point, the point feature set is then upsampled through a nearest-neighbor interpolation. Next, the upsampled feature maps are concatenated with the intermediate feature maps produced by encoding layers through skip connections, after which a shared MLP is applied to the concatenated feature maps.
Final Semantic Prediction: The final semantic label of each point is obtained through three shared fully-connected layers (N, 64) (N, 32) (N, ) and a dropout layer. The dropout ratio is 0.5.
Network Output: The output of RandLA-Net is the predicted semantics of all points, with a size of , where is the number of classes.
In Section 3.3, we encode the relative point position based on the following equation:
We further investigate the effects of different spatial information in our framework. Particularly, we conduct the following more ablative experiments for LocSE:
1) Encoding the coordinates of the point only.
2) Encoding the coordinates of neighboring points only.
3) Encoding the coordinates of the point and its neighboring points .
4) Encoding the coordinates of the point , the neighboring points , and Euclidean distance .
5) Encoding the coordinates of the point , the neighboring points , and the relative position .
|(6) (The Full Unit)||52.0|
Table 6 compares the mIoU scores of all ablated networks. We can see that: 1) Explicitly encoding all spatial information leads to the best mIoU performance. 2) The relative position plays an important role in this component, primarily because the relative point position enables the network to be aware of the local geometric patterns. 3) Only encoding the point position or is unlikely to improve the performance, because the relative local geometric patterns are not explicitly encoded.
In our RandLA-Net, we stack two LocSE and Attentive Pooling units as the standard dilated residual block to gradually increase the receptive field. To further evaluate how the number of aggregation units in the dilated residual block impact the entire network, we conduct the following two more groups of experiments.
1) We simplify the dilated residual block by using only one LocSE unit and attentive pooling.
2) We add one more LocSE unit and attentive pooling, i.e., there are three aggregation units chain together.
|Dilated residual block||mIoU(%)|
|(1) one aggregation unit||41.9|
|(2) three aggregation units||48.7|
|(3) two aggregation units (The Standard Block )||52.0|
Table 7 shows the mIoU scores of different ablated networks on the validation split of SemanticKITTI [behley2019semantickitti] dataset. It can be seen that: 1) Only one aggregation unit in the dilated residual block leads to a significant drop in segmentation performance, due to the limited receptive field. 2) Three aggregation units in each block do not improve the accuracy as expected. This is because the significantly increased receptive fields and the large number of trainable parameters tend to be overfitted.
To better understand the attentive pooling, it is desirable to visualize the learned attention scores. However, since the attentive pooling operates on a relatively small local point set (i.e., =16), it is hardly able to recognize meaningful shapes from such small local regions. Alternatively, we visualize the learned attention weight matrix defined in Equation 2 in each layer. As shown in Figure 8, the attention weights have large values in the first encoding layers, then gradually become smooth and stable in subsequent layers. This shows that the attentive pooling tends to choose prominent or key point features at the beginning. After the point cloud being significantly downsampled, the attentive pooling layer tends to retain the majority of those point features.
More qualitative results of RandLA-Net on Semantic3D [Semantic3D] dataset (reduced-8) are shown in Figure 9.
Figure 10 shows more qualitative results of our RandLA-Net on the validation set of SemanticKITTI [behley2019semantickitti]. The red boxes showcase the failure cases. It can be seen that, the points belonging to other-vehicle are likely to be misclassified as car, mainly because the partial point clouds without colors are extremely difficult to be distinguished between the two similar classes. In addition, our approach tends to fail in several minority classes such as bicycle, motorcycle, bicyclist and motorcyclist, due to the extremely imbalanced point distribution in the dataset. For example, the number of points for vegetation is 7000 times more than that of motorcyclist.