## 3 Materials and Methods
### Establish the DL Model  
Mask R-CNN, introduced in 2017, is currently the most potent instance segmentation technique known [37]. It is widely used for instance segmentation, which is a precise delineation of objects in an image. Previous DL models, such as Single Shot Detector, RetinaNet, and YOLO, can recognize buildings [38,39]; they all produce a bounding box to show the location of a building on an image, which is insufficient for a BCR calculation. For the BCR calculations, a pixel-based output mask is necessary to identify building boundary so that the building area can be computed, which is fit with the ability of the Mask RCNN model. Therefore, it was used to extract the building footprint in this study. Mask RCNN is an extension of Faster R-CNN that predicts segmentation masks for each Region of Interest (RoI). The architecture of Faster R-CNN consists of two networks, backbone (ResNet, Inception, etc.) and the region proposal network. Region proposals are regions that contain the object on the feature map. Using either the RoI pool or the RoIAlign method, the proposed region sizes are fixed. The output of the RoIAlign layer is then fed to the mask head, which is comprised of two convolution layers. It generates a mask for each RoI, thereby pixel-by-pixel segmenting an image (Figure 3). Using a ResNet backbone for feature extraction improves accuracy and speed when used with Mask R-CNN [40]. There are several versions of ResNet, depending on the number of layers contained (either 18, 34, 50, 101, or 152); the ResNet versions containing 18 and 34 layers have lower accuracy than those with more layers [41]. Therefore, three types of residual networks (those containing 50, 101, and 152 layers) are tested in this study. Besides, the size of the training picture affects the accuracy of localization and the contextual information it can receive [42]. Choosing the right size for the training photos is critical in the building detection process. The best picture size was chosen by comparing model performance with different training image sizes, as shown in Figure 4.  
In order to choose an optimal backbone model and a suitable size of training data for the DL model in the building footprint extraction task, the performance of Mask R-CNN with various backbones and training picture sizes was evaluated. Three residual networks were trained on three data sets to find the optimal combination. Each training dataset has  
Figure 4: The receptive field of input image sizes: (**a**) 256 \(\times\) 256, (**b**) 512 \(\times\) 512, and (**c**) 768 \(\times\) 768 pixels. Figure 3: The mask RCNN framework for instance segmentation. 4402 picture chips of 256, 512, and 768 pixels each. Popular accuracy measurement methods for object detection and semantic segmentation, namely _Precision_, _Recall_, _F1-score_, and _Average Precision_ (AP), were used to measure the model performance [20]. Mask R-CNN provides both a bounding box and mask. Precision recall values were calculated from the bounding box output. Generally, if the Intersection over Union (IoU) value is greater than 0.5, the predicted bound box is True; otherwise, the output is False. IoU metric in object detection evaluates the degree of ground truth and prediction overlap (Equation (1)). The results extracted from the bounding box are calculated as the precision-recall value, where _Precision_ is the ratio of the number of true positives to the total number of predictions (Equation (2)) and _Recall_ is defined as the ratio of the number of true positives to the total number of positive predictions (Equation (3)). The _F1 Score_ is the weighted average of the precision and the recall, and the values range from 0 to 1, with 1 denoting the highest level of precision (Equation (4)). A precision-recall curve is summarized by _Average Precision_ as the weighted mean of precisions at each threshold, with the increase in recall from the previous threshold serving as the weight (Equation (5)).