BuildSeg: A General Framework for the Segmentation of Buildings

Lei Li, Tianfang Zhang, Stefan Oehmcke, Fabian Gieseke, Christian Igel

Introduction

Accurate building segmentation from aerial and satellite imagery is a cornerstone of modern geospatial analysis. It provides the foundational data necessary for urban planning, population estimation, and rapid disaster response. Despite its importance, automated segmentation remains a significant challenge due to the immense variability in architectural styles, roofing materials, and environmental contexts across different geographic regions. Furthermore, standard deep learning models often struggle with generalization—failing when applied to cities outside their training set—and frequently produce "blobby" or rounded footprints that do not reflect the sharp, rectangular geometry of human-made structures.

To address these challenges, the BuildSeg framework was developed. BuildSeg is a flexible, high-performance pipeline designed to streamline building segmentation by integrating modern neural architectures, multi-modal data fusion (RGB and LiDAR), and geometry-aware post-processing. This paper details the methodology and results of the BuildSeg framework, which achieved top-tier performance in the MapAI competition.

Methodology

BuildSeg adopts a "U-Net" style encoder-decoder architecture but replaces traditional convolutional backbones with state-of-the-art encoders to better capture both local textures and global spatial relationships.

Modern Encoders

The framework evaluates two primary types of encoders:

  • SegFormer (Transformer-based): Utilizes a hierarchical Transformer structure to capture long-range dependencies, which is particularly useful for distinguishing large building footprints from complex backgrounds.
  • ConvNeXt (Modernized CNN): A convolutional approach that incorporates modern design choices (such as larger kernels and inverted bottlenecks) to compete with Transformer performance while maintaining the efficiency of CNNs.

Data Fusion and LiDAR Integration

A core feature of BuildSeg is its ability to incorporate 3D information. When available, LiDAR (Light Detection and Ranging) height data is concatenated with standard RGB or multi-spectral imagery. This provides the model with an unambiguous signal regarding the elevation of structures, helping it distinguish between visually similar features like grey rooftops and asphalt parking lots.

Rectangle-Aware Post-processing

Recognizing that most buildings follow a rectangular footprint, the researchers implemented a post-processing sequence involving morphological operations (opening and closing). This step is specifically designed to sharpen boundaries and filter out noise that does not align with a rectangular hypothesis, thereby improving the geometric fidelity of the final maps.

Training Strategy

To enhance generalization, the models were pre-trained on ImageNet and subjected to heavy data augmentation, including random flipping, cropping, and color jittering. This ensures the encoders are robust to variations in lighting and orientation.

Experimental Setup and Datasets

The framework was validated using two major benchmarks:

  1. MapAI Competition Dataset: This dataset includes high-resolution aerial imagery and LiDAR data from various cities in Norway and Denmark.
  2. Inria Aerial Image Labeling Benchmark: A large-scale dataset covering diverse international cities (e.g., in France and the United States). A subset of 5,000 images from Inria was used to supplement the MapAI data, providing the model with exposure to a wider variety of architectural styles.

Results and Discussion

Performance was measured using Intersection over Union (IoU) and Boundary IoU (BIOU), the latter of which specifically penalizes errors along the edges of the predicted shapes.

The Impact of 3D Data

The most significant performance gains were observed when integrating LiDAR data. Using aerial imagery alone, the SegFormer-B5 model achieved an IoU of 0.7902. However, with the addition of LiDAR height data, the IoU jumped to 0.8506, and the BIOU rose from 0.6185 to 0.7461. This confirms that height data acts as a powerful discriminator in urban environments.

Architectural Comparisons

The Transformer-based SegFormer-B5 consistently outperformed the CNN-based ConvNeXt. This suggests that the global attention mechanism inherent in Transformers is highly effective at resolving the ambiguities present in high-resolution remote sensing data. Additionally, the rectangle-aware post-processing provided a measurable boost to boundary accuracy, refining the "blobby" outputs of the raw neural network into sharper, more usable map features.

Conclusion and Future Work

BuildSeg demonstrates that combining modern encoders with multi-modal data and geometric priors can significantly advance the state-of-the-art in building segmentation. The framework's success in the MapAI competition highlights the critical role of 3D data in achieving high-fidelity results.

Future research will focus on improving the computational efficiency of the SegFormer-B5 backbone to allow for real-time processing. Additionally, while the rectangular hypothesis is effective for the majority of urban structures, the researchers aim to develop more flexible geometric priors to better accommodate complex architectural shapes, such as circular stadiums or non-orthogonal designs. Finally, addressing the limited global availability of high-resolution LiDAR data remains a priority for scaling these high-accuracy models to a global level.

Summary updated

Abstract

Building segmentation from aerial images and 3D laser scanning (LiDAR) is a challenging task due to the diversity of backgrounds, building textures, and image quality. While current research using different types of convolutional and transformer networks has considerably improved the performance on this task, more precise and accurate segmentation methods for buildings are desirable for applications such as automatic mapping. In this study, we propose a general framework termed BuildSeg employing a generic approach that can be quickly applied to segment buildings. Different data sources were combined to increase generalization performance.
 The approach yields good results for different data sources as shown by experiments on high-resolution multi-spectral and LiDAR imagery of cities in Norway, Denmark, and France.
 We applied ConvNeXt and SegFormer-based models on the high-resolution aerial image dataset from the MapAI-competition. The methods achieved an IoU of 0.7902 and a boundary IoU of 0.6185 on the test set. We used post-processing to account for the rectangular shape of the objects.This increased the boundary IOU from 0.6185 to 0.6189. The code is publicly available.
 
BibTeX
@inproceedings{li2023buildseg,
  author = {Lei Li and Tianfang Zhang and Stefan Oehmcke and Fabian Gieseke and Christian Igel},
  title = {{BuildSeg: A General Framework for the Segmentation of Buildings}},
  booktitle = {Nordic},
  year = {2023},
  doi = {10.5617/nmi.10152},
}
Figure