## 3 Datasets and Preparations
### Dataset Preparation  
The semantic segmentation of damaged buildings from satellite images is a complicated task due to the unbalanced nature of the xBD dataset. Most of the image area is considered to be background pixels, and only a small portion is covered by buildings. From the total area covered by building regions, the majority of the buildings are categorized as no-damage class, and only a small portion of buildings are assigned to other categories of damage classes. Moreover, cloud occlusions, sun elevation and illumination changes, and different satellite viewing angles make the assessment process more challenging. Thus, in order to boost the performance of the models, add more regularizations to the model, and reduce the risk of overfitting, researchers usually utilize  
Figure 4: Overview of pre-disaster image acquired from the study area (**left**) and three samples of pre-disaster (**left squares**) and post-disaster (**middle squares**) images along with their corresponding ground truth data (**right squares**). Green and red show the buildings with no-damage and damaged, respectively.  
a data augmentation step in every round of the training procedure [58]. Augmentation tries to expand the size of the training dataset or increase its diversity by applying simple and random mathematical, geometrical, or image processing operations on the images. The randomly augmented images could be stored on the disk drive or could be used on the fly during the training procedure. We implemented the second way, in which some probabilities were defined, and the images were augmented based on those probabilities, while they were inserted into the model. The implemented augmentations consisted of random cropping (\(p=1\), which means that this augmentation was applied on all of the images), horizontal and vertical flipping (\(p=0.5\), i.e., only half of the images, 50%, were treated by this operation), rotations (\(p=0.5\)) and transposes (\(p=0.5\)), brightness and contrast manipulations (\(p=0.2\)), and blurring operations (\(p=0.7\)). Furthermore, in order to apply more regularization to the models, an image Cutout technique (\(p=0.6\)) was added, which randomly masked out square regions from the input images to improve the robustness and overall performance of the network [41]. Figure 6 visualizes these operations performed on a single sample image. On the left, the original input image is shown, and the outputs of the augmentation process are illustrated in other columns.  
It is worth mentioning that our augmentation process did not produce new images to be stored on the disk drive. In particular, every time an image was fed into the network, a random number was generated, and if the random number was within the limits of  
Figure 5: Ground truth map of the study area, along with six zoomed patches for better visualization. Buildings in red, green, and black demonstrate damaged, not damaged, and unclassified classes, respectively.  
the specific thresholds, the augmentations were applied; otherwise, the image would be fed into the network without any changes. This augmentation technique was performed randomly, and thus, the dataset imbalance was not taken into account.