1. Introduction
Segmenting roof plane instances from 3D point clouds is critical for 3D building reconstruction and rooftop photovoltaic installation planning. In fact, 3D point cloud roof plane instance segmentation serves as a key step in many 3D building reconstruction algorithms [
1,
2,
3,
4]. Consequently, accurate roof plane instance segmentation directly contributes to the quality of the resulting models. In addition, this segmentation technology plays a vital role in planning rooftop photovoltaic installations [
5], as accurate instance segmentation of roof planes helps to reduce the need for costly and time-consuming on-site surveys.
Traditional plane instance segmentation methods—such as region growing algorithms [
2,
6], feature clustering-based algorithms [
7,
8], and model fitting-based algorithms [
9,
10,
11,
12]—typically rely on prior knowledge of point cloud characteristics and require manual parameter tuning. These dependencies limit their generalization ability and automation, particularly in complex and diverse real-world building scenarios. In practice, the shortcomings of traditional algorithms become especially evident when facing intricate roof structures.
In contrast, deep learning methods, especially Transformer-based methods, have demonstrated strong capabilities in point cloud segmentation, owing to their powerful feature extraction and representation learning abilities [
13,
14,
15,
16,
17,
18,
19,
20]. Nevertheless, current deep learning models specifically designed for roof plane instance segmentation in 3D point clouds primarily adopt PointNet++ [
21] as the backbone network [
5,
22], which struggles to fully exploit global contextual information. The superpoint Transformer-based 3D point cloud instance segmentation network, SPFormer [
14], was retrained on the RoofNTNU dataset in [
23] and achieved promising results. However, the RoofNTNU dataset contains only 930 roof samples, and its limited scale makes it insufficient to fully validate the effectiveness of SPFormer in the domain of point cloud roof plane segmentation.
In fact, using superpoints as the basic processing units can significantly reduce the number of tokens processed by Transformers, thereby helping alleviate the high computational resource requirements when applying Transformers to large-scale point clouds. However, existing superpoint Transformers, including SPFormer [
14], generally rely on simplistic geometric rules or clustering strategies to construct superpoints. These methods often yield superpoints that include points from multiple instances when handling boundary regions between adjacent instances, resulting in blurred segmentation boundaries and inaccurate segmentation. In addition, superpoints generated by these simplistic methods often vary significantly in size and shape. Such irregularities introduce complex data distributions, which hinder the Transformer from learning stable and discriminative features. This challenge makes model training more difficult and demands larger datasets for adequate performance. Unfortunately, annotating large-scale 3D point cloud datasets is both time-consuming and expensive. Therefore, generating high-quality superpoints has become a critical challenge that must be addressed to fully leverage the capabilities of superpoint Transformers for segmentation tasks.
In this paper, we develop a superpoint Transformer-based method for segmenting plane instances in point clouds. To address the issue of suboptimal superpoints in existing superpoint Transformer models, we propose a set of criteria that high-quality superpoints should meet:
They should have accurate boundaries, and different superpoints should be similar in both size and shape.
Based on the proposed criteria, we introduce a two-stage superpoint generation process that significantly enhances the performance of the superpoint Transformer in segmenting plane instances from 3D point clouds. To address the limited feature extraction capability of our deep learning model—especially in scenarios with small training sets—we incorporate multidimensional handcrafted features and spatial position features at the input stage of our network. To further strengthen the decoder, we adopt the Kolmogorov–Arnold Network (KAN) [
24] for mask feature extraction and combine it with a Transformer module. This hybrid decoder architecture enables direct prediction of instance classes, confidence scores, and mask outputs.
Finally, traditional algorithm-based plane completion and boundary refinement modules are introduced to refine the predictions of our network. Although this conflicts with the end-to-end paradigm pursued by many researchers, we will demonstrate later in this paper that our architecture—consisting of deep learning-based prediction followed by traditional post-processing—offers several important advantages.
Plane completion. Existing datasets for 3D roof plane instance segmentation, such as the RoofN3D dataset [
25], may contain incomplete plane annotations, which can cause trained models to miss valid roof planes during inference. To mitigate this, we propose a self-supervised plane completion strategy that first infers the parameters of missing planes based on already segmented planes and uses this information to guide a region growing algorithm to recover missing plane instances from points that are initially labeled as “nonplane”.
Boundary refinement. While deep learning models often produce inaccurate segmentation boundaries, traditional region growing methods are also prone to boundary inaccuracies due to their sequential nature—early-growing planes may absorb points from neighboring planes. To address this, we apply a plane boundary refinement algorithm to further enhance segmentation accuracy.
For evaluation, we constructed a 3D point cloud roof plane instance segmentation dataset by annotating 10,539 buildings based on wireframe annotations from the Building3D dataset [
26] and corrected annotation errors in the RoofN3D dataset [
25] for samples containing at least 700 points. By integrating our network design with traditional algorithm-based post-processing, our method achieves state-of-the-art (SOTA) performance on the Building3D dataset, as well as on both the original and corrected versions of RoofN3D.
We also disrupted the boundary annotations in the Building3D and RoofN3D training sets—while preserving accurate annotation of plane main bodies—and retrained our model, Point Transformer v3 (PTv3) [
27], and the current SOTA deep learning-based method DeepRoofPlane [
22] using these boundary-degraded training datasets. Remarkably, our method showed almost no performance drop on the test sets, whereas the performance of DeepRoofPlane declined significantly, and PTv3 consistently showed relatively poor performance. In general, neural network-based segmentation models rely heavily on fine annotations of the training set. However, accurately annotating the boundaries between different categories or instances is particularly challenging. Our model, nonetheless, demonstrates strong robustness to inaccurate boundary annotations, thanks to its hybrid structure: a deep neural network predicts plane instances, followed by traditional post-processing algorithms. This design allows for accurate segmentation even when only the main bodies of planes are accurately annotated in the training set, significantly reducing the complexity and cost of creating point cloud datasets for plane instance segmentation.
Additionally, we applied controlled degradations to our annotated Building3D dataset by separately reducing point cloud density, introducing greater density variations, and decreasing point precision—resulting in three distinct degraded datasets. We trained and evaluated models on these variants, and our algorithm significantly outperformed PTv3 [
27] and DeepRoofPlane [
22] across all conditions. More critically, we observed that the segmentation performance of both DeepRoofPlane [
22] and our model dropped noticeably under these degradations. This highlights that data quality factors—especially point cloud density, density variation, and point precision—have a profound impact on the effectiveness of point cloud roof plane instance segmentation. These findings underscore the necessity of incorporating data augmentation strategies that simulate these degradations during training to improve model robustness in real-world and unpredictable scenarios.
In summary, the key contributions of this paper are as follows:
We establish two criteria for generating superpoints that are well-suited for Transformer feature learning, and propose a corresponding superpoint generation procedure. Our experiments demonstrate that simultaneously applying both criteria significantly enhances the performance of the superpoint Transformer, whereas using only one of them leads to a noticeable degradation in model performance. Existing superpoints/superpixels in current superpoint/superpixel Transformers satisfy at most one of the two criteria we propose. Therefore, the proposed superpoint generation criteria in this paper have strong potential to be extended to superpoint Transformers for other 3D tasks and to superpixel Transformers in the 2D domain.
By employing high-quality superpoints, incorporating handcrafted features into our superpoint Transformer, designing a decoder that integrates KAN and Transformer, and applying traditional algorithm-based post-processing, we realize accurate point cloud roof plane instance segmentation. Our model achieves new SOTA results on both the RoofN3D and Building3D datasets. Notably, our model relies primarily on the accurate annotation of the plane main bodies, while being less sensitive to the accuracy of boundary annotations. Therefore, our hybrid architecture—combining neural network-based prediction with traditional algorithm-based post-processing—substantially reduces the annotation burden for point cloud plane instance segmentation training sets.
Additionally, our model shows significant advantages over existing methods when handling data with low point density, large density variations, or low 3D point precision. In these experiments, we also identify the critical factors influencing point cloud plane segmentation performance: in addition to roof structure complexity, point cloud density, density variation, and point precision all significantly affect segmentation results. As such, future research should not only focus on the complexity of roof structures but also consider the impact of data quality on segmentation performance. For instance, incorporating data augmentation techniques targeting point cloud quality—including point cloud density, density variation, and point precision—during training can improve the model’s robustness when handling complex and unseen data.
We have annotated a real-world 3D point cloud roof plane instance segmentation dataset containing 10,539 buildings and corrected labeling errors in the existing RoofN3D dataset for samples containing at least 700 points. We will publicly release both our newly annotated dataset and the corrected RoofN3D samples.
In order to promote research in the field of roof plane instance segmentation from 3D point clouds, we have open-sourced the code and trained models used in this study at
https://github.com/YanMENG-CVRS/SPPSFormer (last accessed: 17 June 2026).
3. Materials and Methods
Figure 1 illustrates the architecture of the proposed superpoint Transformer. The framework begins with a two-stage superpoint generation strategy to produce high-quality superpoints from the input point cloud. Subsequently, the point cloud is voxelized, and multidimensional handcrafted features along with spatial position information are integrated into the initial representation. A 3D U-Net is then employed to extract per-point features from this voxelized input. Using the precomputed superpoints, the per-point features are passed through a superpoint pooling layer, which performs average pooling within each superpoint to produce aggregated superpoint features. These features are then fed into a Transformer decoder, which captures plane instance information from the superpoints. To enhance our model’s discriminative capability, mask-aware features are extracted using FourierKAN [
65,
66]. Finally, the label assignment is formulated as an optimal matching problem. By applying bipartite matching to the predicted superpoint masks, our model supports end-to-end training.
At the prediction stage, our model directly outputs superpoint masks for K plane instances from an input point cloud. Each instance is associated with an IoU-aware score and a corresponding mask confidence score . To derive the final prediction, we compute a combined score , which is then used for ranking and filtering, eliminating the need for non-maximum suppression or other post-processing steps, and thus ensuring fast inference. Given that our network performs plane instance segmentation based on a superpoint Transformer, we name it SPPSFormer (SuperPoint Plane Segmentation transFormer).
While our SPPSFormer adopts a similar architecture to SPFormer [
14], it incorporates several key improvements:
- (1)
We establish a set of criteria for generating superpoints tailored to the superpoint Transformer, and propose a corresponding generation method.
- (2)
We introduce essential handcrafted features, effectively enhancing deep learning features and thus providing the decoder with stronger input features.
- (3)
In the decoder, we combine a Kolmogorov–Arnold Network with a Transformer module to improve instance prediction and mask extraction.
Among these, (1) has the most pronounced impact on performance. In addition to architecture enhancements, we introduce two post-processing techniques to further refine predictions of our network:
- (4)
To mitigate incomplete plane segmentation due to partially annotated training data, we propose a self-supervised plane completion strategy.
- (5)
To refine segmentation at plane boundaries, we design an efficient boundary refinement algorithm.
The details of these contributions are structured as follows.
Section 3.1 defines the criteria of high-quality superpoints for the superpoint Transformer under limited training data and presents a workflow for generating such high-quality superpoints.
Section 3.2 describes the handcrafted features integrated into our neural network.
Section 3.3 details the Transformer–FourierKAN decoder architecture.
Section 3.4 presents the plane completion and boundary refinement methods. The datasets used in this paper are described in
Section 3.5.
3.1. Generation of High-Quality Superpoints for the Superpoint Transformer
In this section, we establish the criteria that superpoints well-suited for Transformer-based feature learning should meet, and introduce a corresponding generation workflow. Superpoints constructed according to these criteria enhance the ability of the superpoint Transformer to learn generalizable features—even under limited training data conditions. As a result, the network’s performance in plane instance segmentation is significantly improved.
3.1.1. Superpoint Generation Criteria for Transformer Feature Learning
Before generating superpoints suitable for Transformer-based processing, we first examine the key characteristics that make superpoints effective as fundamental units in a superpoint Transformer. Based on our analysis, ideal superpoints should satisfy the following two conditions:
Accurate boundaries: Each superpoint should be spatially coherent and contain points from only a single semantic category or instance. This requirement is essential because, once superpoints are formed, the Transformer assumes them as fixed processing units. If a superpoint contains mixed-category or multi-instance points, this error cannot be corrected by the network and will propagate throughout the segmentation process.
Uniform size and shape: Superpoints should exhibit consistent size and geometric shape. Neural networks typically rely on the assumption that similar inputs lead to similar outputs. When superpoints corresponding to the same category or instance vary greatly in size and shape, this assumption breaks down. Consequently, the network requires a significantly larger training set to generalize well—an issue that cannot be easily addressed through standard data augmentation, thereby complicating the training process.
Our experimental results confirm that superpoints adhering to both of these criteria lead to marked improvements in segmentation performance of the superpoint Transformer. In contrast, using only the first or the second criterion results in a significant performance drop. Specifically, if the superpoints in superpoint Transformers satisfy only the requirement of boundary precision but exhibit large variations in size and shape, the model performance remains poor. Likewise, if the superpoints are similar in size and shape but lack accurate boundaries, the performance is also substantially degraded.
3.1.2. Our Superpoint Generation Process
While generating superpoints that meet either of the two criteria outlined in
Section 3.1.1 is relatively straightforward, producing superpoints that simultaneously satisfy both requirements is considerably more challenging. For example, current energy optimization-based methods [
2,
10,
33,
34] are effective at producing superpoints with accurate boundaries. However, the resulting superpoints often exhibit significant variability in size, which, as noted in
Section 3.1.1, undermines the consistency required for effective feature learning in a superpoint Transformer. Conversely, enforcing uniform superpoint size tends to compromise boundary accuracy, as it typically necessitates the generation of small superpoints. This poses a problem because accurate boundary delineation often depends on reliable plane parameter fitting, which, however, becomes unreliable when performed on overly small superpoints.
To address this trade-off, we propose a two-stage superpoint generation process. In the first stage, we generate superpoints with accurate boundaries. In the second stage, we perform size adjustments to enforce greater uniformity in the superpoint scale. This approach allows us to generate superpoints that simultaneously satisfy both criteria, thereby enhancing the performance and generalization ability of the superpoint Transformer, as discussed in
Section 3.1.1.
Accurate boundaries are essential for reliably distinguishing between different categories or instances, thereby preventing the creation of superpoints that span multiple categories or instances. This accuracy lays a solid foundation for downstream processing. However, in real-world point cloud data, complex and ambiguous boundary regions often challenge traditional superpoint generation methods, which tend to blur or misclassify instance boundaries. Therefore, the first stage of our pipeline focuses specifically on generating superpoints with high boundary accuracy.
We begin by applying a region growing algorithm to produce an initial coarse plane segmentation. To preserve boundary integrity, we use strict growth parameters, which help prevent points of different planes from being grouped into a single superpoint. However, due to the sequential nature of region growing, early-segmented planes may inadvertently claim points from adjacent, yet distinct, planes—resulting in inaccurate boundary delineation. To correct such errors, we incorporate the local boundary optimization method proposed by Li et al. [
2], which selectively adjusts point assignments near plane boundaries. Unlike global optimization techniques, this localized refinement is computationally efficient and sufficient for our purpose. Given that our goal is to prevent misassignments at boundaries rather than perform full-scene optimization, a global algorithm is unnecessary.
As illustrated in
Figure 2, this two-step process—initial region growing followed by boundary refinement—produces superpoints with well-defined boundaries (
Figure 2b,c). However, these superpoints still exhibit considerable variation in size and shape, making them unsuitable at this stage as the basic units for the superpoint Transformer.
It is important to highlight that while our implementation uses region growing for the initial segmentation and the local boundary refinement method from [
2] for the second step, this design is not exclusive. In principle, other algorithms—such as RANSAC, the Hough Transform, or watershed-based algorithms—could also be applied during the over-segmentation phase. Similarly, graph cut optimization or other optimization techniques could be used in place of the boundary refinement method adopted in our approach. Nevertheless, we select region growing and local boundary refinement [
2] primarily due to their computational efficiency.
To ensure that the superpoints fed into the Transformer also possess uniform sizes and shapes, we apply the K-means clustering algorithm to partition the coarse-grained superpoints
and the unfitted points. The desired number of clusters is estimated based on Equation (
1).
where
n denotes the desired average number of points per superpoint,
represents the total number of 3D points within a given coarse superpoint or the noise set being processed, and
denotes the ceiling operation, which rounds a real value up to the nearest integer.
K-means clustering is applied to each coarse-grained superpoint based on the 3D spatial coordinates of its constituent points:
where
denotes the clustering algorithm, with the first argument being the input point cloud and the second indicating the number of desired clusters. In practice, situations may arise where
, especially in sparse regions where some coarse-grained superpoints contain few points while covering large spatial space. To address this, we increase the number of clusters in such cases to produce superpoints with a more uniform spatial distribution.
Unfitted points, referred to as NOISE, are treated as a single large superpoint and subjected to K-means clustering. Because the NOISE may contain significant real noise, we use a smaller average superpoint size during the partition process of the NOISE to ensure that each superpoint predominantly contains points from either the same plane or noise. This setting helps reduce the likelihood of mixing plane points with noise points within the same superpoint, thereby improving the network’s performance during feature extraction.
The final set of fine-grained superpoints is formed by dividing the original large-sized superpoints and the unfitted NOISE points, as shown in Equation (
3):
Because K-means uses only the spatial coordinates of 3D points and the cluster size is kept relatively small, the resulting superpoints exhibit similar sizes and shapes.
Ultimately, we generate superpoints that satisfy both criteria introduced in
Section 3.1.1.
Figure 3 presents an illustration of our two-stage superpoint generation strategy. In the first stage, we achieve boundary-accurate superpoint segmentation through a region growing process followed by local boundary refinement (see
Figure 3b). In the second stage, the size and shape of the superpoints are adjusted using K-means clustering, further improving the uniformity of superpoint shapes and sizes (see
Figure 3c). In the experimental section, we will evaluate how superpoint quality affects segmentation performance.
Compared to existing approaches, our method yields superpoints with accurate boundaries, uniform sizes, and geometrically consistent shapes. These characteristics make the superpoints particularly effective for feature extraction of the superpoint Transformer, enabling generalizable feature learning even under limited training data.
3.2. Handcrafted Features
Deep learning algorithms typically require large training datasets to extract robust and generalizable features [
19,
70,
71,
72,
73,
74]. When the training dataset size is limited, the features extracted by deep learning models often have inherent limitations. To address this issue, we provide the network with a set of manually designed features as input, in addition to the raw 3D point coordinates, to enhance the expressiveness of the deep learning features. These handcrafted features include geometric attributes derived from principal component analysis [
75], such as linearity, planarity, scattering, verticality, curvature, and log-transformed local geometric scale descriptors. Additionally, we introduce a roof contour feature based on normal vectors (contour). These handcrafted features may serve as complementary inputs to the raw deep learning features, enhancing the model’s ability to capture more nuanced characteristics of the 3D point cloud, particularly in the context of 3D plane instance segmentation. Our experiments thoroughly validate the effectiveness of these handcrafted features, demonstrating their critical role in improving model performance.
Below is a brief description of the handcrafted features we employ.
Linearity: Regions exhibiting high linearity [
76] typically correspond to edges or straight-line features, which are crucial for identifying and delineating boundaries and linear structures, such as building edges, during the segmentation process. By recognizing these high linearity regions, we can refine boundary detection between planes, improving the accuracy of the segmentation of linear structures.
Planarity: High planarity regions [
76] are indicative of planar structures, which are often associated with building surfaces. Using the planarity feature allows us to enhance the accuracy of identifying and segmenting planar surfaces. In the context of roof plane segmentation, this feature is critical for accurately recognizing roof planes.
Scattering: The scattering [
76] feature helps distinguish between dense areas (e.g., roofs) and dispersed areas (e.g., noise or railing structures). By evaluating the scattering of points, we can better differentiate between valid planar features and noise, thus improving the robustness of segmentation and preventing erroneous classification of sparse noise points as part of the planes.
Verticality: Many important building structures, such as walls, are typically vertical. The verticality [
77] feature enables the model to accurately identify vertical planes and distinguish them from horizontal and oblique surfaces. By leveraging this feature, we can improve segmentation performance for roof planes.
For a detailed explanation of linearity, planarity, and scattering, please refer to reference [
76]. For verticality, please see reference [
77].
Curvature: The curvature feature is used to measure the degree of local surface bending around each point, helping distinguish flat regions (e.g., planar roof surfaces) from curved or edge regions (e.g., roof ridges or roof-plane intersections). It is computed as follows. For each point
in the point cloud, a covariance matrix
is constructed using its
K nearest neighbors. Eigenvalue decomposition is then performed on the covariance matrix, and the resulting eigenvalues are sorted in descending order such that
. The curvature is defined as:
A curvature value closer to 0 indicates a flatter local surface, whereas a larger value indicates a more curved surface.
Log-transformed local geometric scale descriptors: These scale-related features include log-length, log-surface, and log-volume. The length descriptor represents the extent of the local neighborhood along the first principal direction, the surface descriptor represents the area spanned by the first two principal directions, and the volume descriptor represents the volume spanned by the three principal directions. Through these three features, the network can perceive the spatial scale of the neighborhood surrounding each point.
The three scale-related features are computed as follows. For each point
in the point cloud, based on the eigenvalues
obtained from the aforementioned eigenvalue decomposition, the original geometric scale descriptors are first defined as follows:
Since these scale descriptors vary considerably in magnitude, directly using them is not conducive to network training. Therefore, logarithmic transformation is applied to these features.
Contour: The contour feature aids in distinguishing roof planes that are not actually connected in 3D space, such as multilayered roofs. Incorporating this feature into the network is equivalent to performing a connectivity analysis after the network predicts plane instances, but our approach is more efficient.
The contour feature is computed as follows. For each point
in the point cloud, the tangent plane is calculated based on its neighboring points. For each neighboring point
of
, it is projected onto the tangent plane, and this projection is denoted as
. Next, for each neighboring point
of
, we compute the vector
These vectors are then sorted in a counterclockwise order by calculating the angle between each vector and a reference vector within the tangent plane of
(e.g., the X-axis of
’s tangent plane), and the vectors are sorted based on these angles. The maximum angle
between adjacent vectors in the sorted list is computed as follows:
where
represents the angle between vectors
and
.
Finally, we classify as a contour point if exceeds a user-defined angle threshold.
3.3. Decoder Integrating Transformer and KAN
In the original SPFormer [
14] architecture, the query decoder consists of two branches: an instance branch and a mask branch. The instance branch uses Transformer blocks, while the mask branch extracts mask-aware features via an MLP. However, MLPs rely on stacking nonlinear activation functions to approximate complicated mappings. For highly intricate target functions, this requires many network layers. In the original SPFormer, the mask branch employs a two-layer MLP, which is overly simplistic and lacks sufficient representational power. Although a deeper MLP could increase capacity, it would also introduce a substantial increase in parameters, many of which may contribute little to model performance, further increasing both the model complexity and training difficulty.
To address this issue, we replace the MLP with FourierKAN [
65,
66] while keeping the parameter count roughly unchanged, because KANs offer a more parameter-efficient solution for approximating nonlinear functions. Under comparable representational capacity, they have fewer parameters, and offer stronger representational capacity at comparable complexity. Additionally, FourierKAN substitutes the B-spline basis functions used in the vanilla KAN with a one-dimensional Fourier series, providing a smooth and naturally periodic function representation. In contrast, B-splines, while effective locally, lack the same level of global smoothness. As a result, Fourier series make it easier to optimize than B-spline designs, and consequently, FourierKAN exhibits better stability than the vanilla KAN.
Another reason for adopting KAN is to assess its effectiveness in processing 3D point clouds, providing insights for future research. In some computer vision tasks, KANs have demonstrated advantages over MLPs [
65,
66,
78,
79], whereas in other tasks, the opposite has been observed [
68,
69]. As the effectiveness of KANs in computer vision remains an active area of exploration, our investigation into its application for 3D point cloud plane instance segmentation aims to contribute valuable insights, potentially guiding future research in this domain.
3.4. Post-Processing
After obtaining the network’s predictions, we further refine the segmentation results by applying two traditional post-processing modules: plane completion and boundary refinement.
3.4.1. Self-Supervised Plane Completion
Real-world plane instance segmentation datasets may suffer from incomplete annotations. For example, in the RoofN3D dataset [
25], some planes are mistakenly labeled as noise points (see
Figure 4). These erroneous annotations in the training set may result in incomplete plane segmentation by neural networks (see
Figure 4). Therefore, we introduce a plane completion module. However, if the annotation quality of the dataset is sufficiently high, this post-processing step may become unnecessary. For instance, when processing the Building3D dataset created by us, this module is redundant.
Research across various fields has shown that traditional algorithms often struggle in complex scenarios because these algorithms usually need different parameters for different data [
32,
80,
81,
82], or even different parts of the same data sample [
83,
84,
85,
86]. However, in real-world applications, it is challenging to fine-tune parameters for each individual data sample or even for different parts of the same data sample. Fortunately, the plane completion task we address here involves relatively simple scenarios. This is because our neural network has already segmented the majority of the planes from the point cloud, and the remaining nonplane data are minimal. Thus, a single set of global parameters is sufficient to achieve satisfactory results for an individual point cloud. Therefore, with reasonable global parameters, region growing is capable of producing satisfactory segmentation for these simple point cloud data; considering also that region growing is highly efficient, we employ it to segment any real planes missed by our network. However, as mentioned earlier, the challenge remains that different point clouds may require distinct global parameters.
To address the issue of global parameters for region growing in nonplane points across different point cloud data, we propose inferring the necessary parameters from the segmented plane instances. In our region growing approach, we rely on the perpendicular distance from a point to the plane and the cosine distance between the point’s normal and the plane’s normal. Thus, the global parameters that need to be estimated are related to these two features. Given that the precision of plane instances may vary across different data, we infer the required parameters from the existing plane instances in the respective point cloud. First, we assume that the existing plane instances were obtained using our region growing algorithm. Based on this assumption, we can retrospectively infer the optimal segmentation parameters for each individual plane instance with respect to the two features used. Then, we set both needed thresholds for initially missed planes to the most relaxed values of the corresponding thresholds across the existing plane instances within the point cloud, because the planes missed by the network typically have lower precision. It is also important to note that we discard planes containing very few points before performing plane completion, as they are likely false detections.
3.4.2. Efficient Boundary Refinement
When using only neural networks, the resulting segmentation often suffers from inaccurate boundaries, including in our network. Additionally, our region growing algorithm for plane completion, being sequential, struggles to effectively segment 3D points at plane boundaries. As a result, after plane completion, we apply a boundary refinement step. To improve efficiency, we focus solely on the 3D points at plane boundaries and avoid using energy-based optimization. Instead, we utilize a composite distance—defined by both the perpendicular distance from a point to the plane and the cosine distance between the point’s normal and the plane’s normal—to assign boundary points to the closest plane. The composite distance is formulated as follows:
where
represents the perpendicular distance from the point to the plane,
is the cosine distance between the point’s normal and the plane’s normal, and
is the weight of
. We recommend setting
because
is generally more robust than
.
In our model, we utilize two types of boundary refinement algorithms: the local boundary refinement algorithm from reference [
2] used in
Section 3.1.2 and our proposed algorithm used in this section. The key difference between the two lies in the trade-off between efficiency and applicability: the algorithm from reference [
2] is less efficient but applicable to a wide range of scenarios, while our own algorithm is more efficient but is specifically suited for cases where the main bodies of the roof planes have been well segmented. During the superpoint generation phase, the segmentation quality of the roof planes’ main bodies is relatively poor, so we apply the local boundary refinement algorithm from reference [
2]. In contrast, when refining the predictions of our network—where the main bodies of the roof planes are already well segmented—we opt for our own more efficient boundary refinement algorithm.
3.5. Datasets
We evaluated our model on two real-world datasets to assess its generalization capability in practical applications.
The first dataset we used is the RoofN3D dataset [
25], which contains 118,074 buildings from New York City. However, a majority of the data are sparse, and some of the annotations are of low quality [
26]. For our experiments, we selected data samples with at least 700 points, resulting in a total of 11,189 buildings. Among these, 8189 buildings were used for training, 2000 for validation, and 1000 for testing. It is worth noting that 457 samples in the original RoofN3D dataset contain annotation errors. Therefore, we corrected these errors and conducted experiments on both the original and corrected versions of the dataset. We only consider samples in this dataset containing more than 700 points because, for buildings with too few points, it is difficult to visually inspect and verify the accuracy of their plane instance segmentation annotations.
The second dataset we used is the Building3D dataset [
26], which spans over 160,000 buildings across 16 cities in Estonia, covering an area of approximately 998 km
2. To date, approximately 40,000 annotated buildings from this dataset have been released. However, the annotations provided only include meshes and wireframes, lacking plane instance segmentation labels. We annotated the roof plane instances for 10,539 buildings based on the available wireframe annotations. Of these, 7539 buildings were used for training, 2000 for validation, and 1000 for testing.
Each of the two datasets presents unique challenges. The Building3D dataset features relatively high and uniform point cloud density, precise 3D points, and high-quality annotations, but it covers a wide variety of complex roof types. In contrast, the RoofN3D dataset primarily contains three roof types: gable, pyramid, and hip. However, the point cloud density is low and highly variable, with low 3D point precision, making it highly challenging to process. Additionally, as discussed in
Section 3.4.1, this dataset suffers from incomplete plane instance annotations. In the experiments, we will observe that the original RoofN3D dataset is actually more difficult to handle.
Figure 5 provides some samples from both datasets.
5. Discussion
In this section, we first discuss the impact of low-quality data or low-quality annotations on our method and the deep learning-based baseline models, followed by other necessary discussions. From the analyses presented in the first part of this section, it can be observed that our SPPSFormer consistently demonstrates significantly superior performance under various conditions involving low-quality data or imperfect boundary annotations.
Although the roof structures in the RoofN3D dataset are much simpler than those in the Building3D dataset, none of the baseline methods evaluated in
Section 4.3—except for PTv3 [
27]—achieved significantly better quantitative evaluation metrics on RoofN3D with only the test set corrected than on Building3D. In particular, SPFormer [
14], HCBR [
2], and QTPS [
88] show notably lower performance on RoofN3D with only the test set corrected. Regarding the performance of our method, as shown in
Table 19 and
Table 20, without the proposed plane completion and boundary refinement modules, our network also performs significantly worse on RoofN3D with only the test set corrected than on Building3D. Even the results from DeepRoofPlane [
22] suggest that RoofN3D with only the test set corrected is difficult to handle—despite the simpler roof shapes, its performance on RoofN3D with only the test set corrected is only comparable to that on Building3D, even with a slight decline in terms of WCov.
There are two primary challenges in the RoofN3D dataset with only the test set corrected that hinder high-quality plane instance segmentation: (1) the data quality itself is poor (low density, significant density variation, and low point precision), and (2) the annotation quality in the training set is suboptimal. The poor performance of traditional algorithms on the RoofN3D dataset is clearly attributed to the first factor. The experiments in
Section 4.3 have already demonstrated that the suboptimal performance of the deep learning-based models (SPPSFormer and DeepRoofPlane) in
Table 3 can, at least in part, be attributed to the poor annotation quality of the RoofN3D training set.
Regarding the impact of data quality in the RoofN3D dataset on the plane segmentation performance of deep learning-based models, it is challenging to evaluate experimentally. This is because we currently lack effective methods to improve the data quality of the RoofN3D dataset for a controlled comparison. Therefore, we conducted degradation experiments on the higher-quality Building3D dataset to investigate how point density, density variation, and geometric precision of points affect plane instance segmentation performance. We began by reducing the density of the Building3D dataset (including the test set) and retrained and tested our SPPSFormer, PTv3, and DeepRoofPlane. The downsampling process involved randomly removing 50% of the 3D points. The new quantitative results are presented in
Table 24. By comparing the results in
Table 2 and
Table 24, we observe that after reducing the density of the Building3D dataset, the plane instance segmentation performance of all tested methods decreases significantly.
Similarly, the corresponding quantitative evaluation results after introducing density variation and reducing the point precision of the Building3D dataset are presented in
Table 25 and
Table 26, respectively. To increase density variation, a series of evenly spaced center planes parallel to the YZ plane are generated based on the spatial extent of the point cloud along the X-axis. Then, all 3D points are randomly shifted toward their nearest center plane by a small distance to simulate the uneven density characteristics observed in the RoofN3D dataset. To preserve the original point precision, each plane point is moved only along the direction parallel to its associated real plane during the shifting process. For the reduction in point precision, we added a random offset ranging from 0 m to 0.5 m to the XYZ coordinates of each point. By comparing the quantitative results in
Table 2 with those in
Table 25 and
Table 26, we observe that when point cloud density variation increases or point precision degrades, the plane instance segmentation performance of all tested methods drops significantly.
Therefore, we conclude that for roof plane instance segmentation algorithms, in addition to the complexity of the roof structure, the quality of the 3D point cloud has a significant impact on segmentation performance. This suggests that future research on point cloud roof plane segmentation should focus more on the negative effects of low-quality point cloud data. For instance, during network training, data augmentation strategies that target point cloud quality—such as variations in density, density uniformity, and point precision—are essential to ensure robustness in handling complex and unseen real-world data. Notably, in all the quantitative results presented in
Table 24,
Table 25 and
Table 26, our SPPSFormer consistently outperforms PTv3 and DeepRoofPlane. This demonstrates that our method is more effective at handling lower-quality point cloud data than existing state-of-the-art methods.
Our subsequent experiments further reveal that our SPPSFormer primarily relies on accurate annotations of the plane main bodies, while DeepRoofPlane depends heavily on both plane main body and boundary annotations.
Many current deep learning researchers prioritize end-to-end models, whereas our method incorporates traditional algorithms for post-processing. At first glance, this might seem like a limitation of our approach. However, it is precisely this architecture—deep learning-based prediction followed by traditional post-processing—that reduces our model’s reliance on highly accurate plane boundary annotations in the training set. To validate this, we intentionally degraded the plane boundary annotations in the fully corrected RoofN3D and Building3D training sets while keeping the plane main body annotations intact. We then retrained our SPPSFormer, PTv3, and DeepRoofPlane models using these datasets with degraded boundary annotations. Specifically, we perturbed the boundary annotations by randomly swapping labels of points belonging to different planes if the distance between them is less than 0.5 m.
Table 27 presents the quantitative results of the retrained model evaluated on the fully corrected RoofN3D test set (the same as in
Table 4), while
Table 28 shows the results evaluated on the original Building3D test set.
By comparing
Table 2 with
Table 28 and
Table 4 with
Table 27, we observe that when plane boundary annotations in the RoofN3D and Building3D training sets are degraded, the segmentation performance of DeepRoofPlane drops significantly. In contrast, the performance of our SPPSFormer (including the post-processing steps) declines only slightly. This is because our method requires only accurate segmentation of plane main bodies in the network prediction stage, which does not heavily rely on accurate boundary annotations in the training set. Furthermore, the traditional boundary refinement module in our method can effectively refine the segmentation of boundary points as long as the plane main bodies are correctly segmented. Although DeepRoofPlane also includes a boundary refinement module—a post-processing module that combines handcrafted features with deep learning features—it depends on deep learning at every stage of its processing pipeline. As a result, its performance is more sensitive to the quality of training annotations. When boundary annotations are inaccurate, DeepRoofPlane’s generalization ability degrades accordingly. When the annotation quality of plane boundaries in the training set decreases, the performance of PTv3 also does not decline significantly. However, its evaluation metrics remain relatively low both before and after the degradation in annotation quality.
Thus, while our use of traditional algorithms in post-processing may seem at odds with the common end-to-end approach favored by many researchers, it allows our method to function effectively without relying heavily on highly accurate plane boundary annotations. In fact, accurately labeling points near plane intersections is often the most challenging part of annotating point cloud plane segmentation datasets. In contrast, labeling plane main bodies is much easier. As a result, the reduced dependence on accurate boundary annotations in our method significantly reduces the difficulty of creating training datasets for roof plane instance segmentation in 3D point clouds.
In the ablation study of the post-processing modules, our boundary refinement module slightly degrades performance on the fully corrected RoofN3D dataset. To investigate this phenomenon, we compared the coverage values before and after boundary refinement for all samples in the RoofN3D test set. We found that all reductions in coverage were caused by slight boundary degradation introduced by the boundary refinement module. In other words, for some samples, the boundary refinement module does not improve boundary segmentation quality and may instead slightly deteriorate it. When the proportion of such samples becomes sufficiently large, a decrease in the overall evaluation metrics on the test set may occur.
We further analyzed the causes of these boundary degradations and found that they mainly stem from the following two factors:
- (1)
Some samples contain severe noise, which affects the plane-fitting process and leads to inaccurate plane parameters;
- (2)
Errors in network predictions or failures of the plane completion module may introduce spurious planes, which in turn prevent the boundary refinement module from effectively refining the boundaries.
Among these factors, the first is the primary cause of boundary degradation.
Figure 11 presents a representative example in which the first factor causes relatively severe boundary degradation after boundary refinement. It shows the visualization results before and after applying the boundary refinement module. As can be seen, the network prediction is already highly consistent with the ground-truth, leaving very limited room for further improvement. Under such circumstances, even a slight error in the boundary refinement process can easily lead to boundary degradation. However, the plane marked in green contains substantial noise, which can make the plane parameters estimated by the least-squares fitting method inaccurate and consequently adversely affect the subsequent boundary refinement process. Most of the boundary degradation cases observed in the RoofN3D test set are primarily caused by this factor, although the severity of degradation in most samples is less pronounced than that shown in
Figure 11. One possible solution is to use RANSAC to fit the dominant planar region within a plane, thereby reducing the influence of noise. However, how to efficiently obtain optimal plane parameters using RANSAC while remaining robust to noise is still a challenging problem. This will be one of our future research directions.
Figure 12 presents a visualization example of boundary degradation caused by the second factor. As shown in
Figure 12, an over-segmented plane is present in the segmentation result before boundary refinement due to the influence of noise. This over-segmented plane interferes with the normal competition among different planes for boundary points, thereby leading to unpredictable results. A small proportion of the boundary degradation cases observed in the RoofN3D test set can be attributed to this factor.
Although our boundary refinement module may exhibit the aforementioned negative effects, the ablation results indicate that it is capable of refining boundaries in the vast majority of cases. Even when boundary degradation occurs, the degradation is generally minor. Therefore, it can be concluded that our boundary refinement module is highly effective overall.
To quantitatively compare the boundary adherence of our superpoints with those generated by SPFormer, we adopted several evaluation metrics that are commonly used in the image superpixel segmentation literature, including boundary recall (BR), boundary precision (BP), boundary F-score (BF), under-segmentation error (UE), and achievable segmentation accuracy (ASA) [
90,
91,
92,
93,
94,
95,
96]. Since the target of evaluation is superpoint segmentation rather than object segmentation, the primary metrics used in our analysis, consistent with mainstream approaches, are boundary recall, under-segmentation error, and achievable segmentation accuracy, while the remaining metrics are provided for reference. For the neighborhood relationships involved in these metrics, we employed spherical neighborhoods with radii equal to one and two times the average point spacing (APS), respectively. The quantitative results are presented in
Table 29,
Table 30 and
Table 31. It can be observed that our superpoints outperform those generated by SPFormer across all evaluated metrics, demonstrating superior boundary adherence.
We also compared the size consistency of our superpoints with that of SPFormer’s superpoints on the test sets of the two datasets. The quantitative results are presented in
Table 32, where the superpoint size is reported in the form of mean ± standard deviation. We also report the size range, i.e., the difference between the largest and smallest superpoints in the superpoint segmentation result of the same point cloud. It can be observed that our superpoints exhibit more consistent sizes.
Regarding the time overhead compared with SPFormer’s superpoint generation,
Table 32 shows that our superpoint generation algorithm requires substantially more time. In summary, our method generates higher-quality superpoints with more accurate boundaries and more consistent sizes, but its computational efficiency is also significantly lower. However, roof plane instance segmentation generally does not require real-time processing, and a certain amount of latency is fully acceptable in most practical scenarios.
To effectively evaluate the efficiency of our model, we compared it with DeepRoofPlane.
Table 33 and
Table 34 present the comparisons in the training and testing stages, respectively. As can be seen, the training efficiency of our network is lower than that of DeepRoofPlane. This is because our network is based on Transformer, whereas DeepRoofPlane is based on PointNet++. However, the inference efficiency of our network is significantly higher than that of DeepRoofPlane. As for the efficiency of the post-processing modules and the complete processing pipeline, SPPSFormer outperforms DeepRoofPlane on the RoofN3D dataset, whereas the opposite trend is observed on the Building3D dataset. It should be noted that the complete processing pipeline of SPPSFormer includes superpoint generation, handcrafted feature computation, network prediction, and post-processing. However, handcrafted feature computation and superpoint generation can be performed in parallel, and the time required for handcrafted feature computation is much shorter than that required for superpoint generation. Therefore, when evaluating the efficiency of the complete SPPSFormer pipeline, we did not include the time required for handcrafted feature computation. In addition, our superpoint generation module and post-processing modules were designed primarily for academic research and have not undergone extensive efficiency optimization.
The high-quality superpoint generation criteria proposed in this work can, in theory, be directly extended to other point cloud processing tasks, such as point cloud instance segmentation, point cloud semantic segmentation, and point cloud object detection. However, the superpoint generation method designed in this paper, especially the boundary refinement component, is not well-suited to non-planar scenarios, because it is mainly designed for planar or approximately planar surfaces. In addition, the plane completion module and the plane-oriented boundary refinement post-processing strategy proposed in this work are not suitable for handling non-planar objects. Therefore, the applicability of the proposed method to more complex roof structures, such as curved roofs, free-form surfaces, or highly irregular non-planar geometries, may be limited. To extend the proposed algorithm to more general point cloud processing tasks, the main challenge lies in how to satisfy the first criterion of high-quality superpoints proposed in this paper, namely how to generate superpoints with accurate boundaries without assuming that the objects are composed of planar surfaces. This will be one of our important future research directions.
6. Conclusions
In this study, we mainly propose a set of superpoint generation criteria specifically designed for Transformers, and apply them to a superpoint Transformer for 3D point cloud roof plane instance segmentation. By leveraging superpoints as processing units, we significantly reduce the number of tokens the Transformer needs to process. Based on the superpoint generation criteria we propose, we introduce a corresponding generation approach, which substantially enhances the Transformer’s feature learning capability. To further improve segmentation performance, we integrate handcrafted features with spatial position features at the input stage of our network, and employ a decoder that combines KAN with a Transformer. Additionally, we design a self-supervised plane completion module that infers segmentation parameters from segmented plane instances, alongside an efficient boundary refinement module.
We annotated a real-world dataset based on wireframe models in the Building3D dataset and corrected annotation errors in the RoofN3D dataset to enable a quantitative evaluation of our method. Experimental results demonstrate that our approach achieves SOTA performance on both our annotated dataset and the original and corrected versions of the RoofN3D dataset, and that our model exhibits significant performance advantages over existing methods when handling data with low point density, large density variations, or low 3D point precision. Moreover, our model relies predominantly on the accuracy of plane main body annotations in the training set and is far less dependent on accurate plane boundary annotations. This reduces the annotation effort required for training datasets significantly. We also identify key factors influencing point cloud roof plane instance segmentation performance: beyond roof structure complexity, point cloud quality, including factors such as density, density variation, and point precision, greatly impacts segmentation quality. This insight highlights the importance of incorporating data augmentation strategies related to point cloud quality during training to enhance robustness, enabling the network to handle complex and unseen real-world data more effectively.
The superpoint generation criteria we propose have strong potential to be extended to superpoint Transformers designed for other 3D analysis tasks, as well as to superpixel Transformers for 2D analysis tasks. Although the underlying criteria are expected to remain theoretically consistent, the specific generation methods still require further investigation, which will be a key direction for our future work. The superpoint generation method presented in this paper is currently tailored specifically to 3D point cloud roof plane instance segmentation.