# Comparing Three Machine Learning Techniques for Building Extraction from a Digital Surface Model
## 2 Materials and Methods
### Dataset Description  
The data used in this study were obtained from the International Society for Photogrammetry and Remote Sensing (ISPRS) \"Test Project on Urban Classification, 3-D Building Reconstruction, and Semantic Labeling\". The sets consisting of airborne images and laser scanner data were made publicly available to evaluate and compare different urban object extraction methods, providing benchmark datasets with ground truth [13,53], more updated and complete than the existing ones [54, 55, 56]. For the sake of generalizability, the available datasets were chosen covering three urban areas that differ in terms of urban morphology. The first part of the dataset was captured over the city of Vaihingen an der Enz (Germany) and originally obtained from the digital aerial cameras tests carried out by the German Association of Photogrammetry and Remote Sensing (Deutsche Gesellschaft fur Photogrammetrie, Fernerkundung und Geoinformation, DGPF) [57]. Each of the 33 different-sized patches (Figure 2) of the Vaihingen dataset contained a labeled true orthophoto (TOP) paired with a DSM [58] with a ground sampling distance of 9 cm. The publishers of the dataset provided a train/test split (30 patches for training, outlined with red, and 3 for testing, outlined with green). The morphology of Vaihingen presents the characteristics of a relatively small Central European village with many detached buildings and small multi-story buildings. It encompasses slightly different urban fabrics: relatively dense patterns formed by historic buildings with complex shapes and sparse trees, loose patterns formed by few high-rising residential buildings surrounded by trees, and regular patterns formed by small detached houses. The second part of the dataset was captured over the city of Potsdam (Germany) and was originally obtained from the DGPF tests [58]. The Potsdam dataset consisted of 38 patches containing a labeled TOP paired with a DSM with a 6000 \(\times\) 6000 pixel size and a ground-sampling distance of 5 cm. The provided train/test split for the Potsdam dataset (Figure 3) consisted of 35 patches for training (outlined with red) and 3 for testing (outlined with green). The morphology of Potsdam represents a typical Central European historic city with large building blocks, narrow streets, and a dense settlement structure. Figure 1: Overview of the study workflow steps: data retrieval and preparation (labeling, resizing, and train/test split), model implementation and training (building extraction), and test performance evaluation. The third part of the dataset covered the city of Toronto (Canada) and consisted of 3 different-sized patches containing a TOP and a DSM interpolated from the airborne laser scanner point cloud with a grid width of 25 cm. The given train/test split ratio for the Toronto dataset (Figure 4) was 2:1. The urban morphology of downtown Toronto exhibits the characteristics of a typical modern North American megacity as the presence of different urban objects and urban fabrics formed by a mixture of low- and high-story buildings with various degrees of shape complexity in rooftop structures and streets, including clusters of high-rise buildings that cast fairly large shadows [59]. The final database retrieved from the different ISPRS challenges was representative of the typical Central European and North American cities with respect to urban complexity, dimensions, and fabric density, especially suitable for method evaluation and comparison. Figure 3: Digital surface model (DSM) patches of the Potsdam dataset: training (red) and test (green) subsets. Figure 2: Digital surface model (DSM) patches of the Vaihingen an der Enz dataset: training (red) and test (green) subsets. The supervised learning models require a labeled set of data to learn, during the training process, the underlying patterns that can be used to make predictions on novel data.