## 2 Materials and Methods
### Data Analysis  
#### 2.3.1 Deep Learning Algorithm  
In this study, we used the U-Net algorithm, which is a popular CNN used for semantic segmentation tasks, where the goal is to classify each pixel in an image to its appropriate class. The U-Net architecture was originally developed by [PERSON] et al. (2015) [35] for biomedical image segmentation, but it has since been widely adopted for many applications, including forestry, as described in Section 1. In particular, the U-Net has been widely used in forestry sector because of its ability to capture intricate details and hierarchical features from high-resolution satellite or aerial imagery, which are essential for improving the accuracy of tasks such as vegetation analysis, land cover classification, forest-type classification, tree species identification, and so on. The U-Net has a distinctive U-shaped structure. The left side of the U-Net, called the encoder, consists of a series of convolutional and pooling layers that reduce the spatial resolution of the input image while increasing the number of feature channels. Meanwhile, the right side of the U-Net, decoder, includes up-sampling and concatenation operations to gradually increase the spatial resolution. This helps to recover detailed information lost during the down-sampling process. At the center of the network is a bottleneck connecting the encoder to the decoder that serves to capture high-level features and provides a context for segmentation. In forestry, where objects of interest may vary in size, it is essential to have a network that can understand features at different levels of granularity. The U-Net architecture allows it to capture features at multiple scales through its encoder and decoder [16]. Moreover, the U-Net incorporates skip connections that can preserve spatial information during down-sampling and up-sampling steps [36], which is important for accurately delineating the boundaries of individual trees. However, the U-Net can face the problem of vanishing gradients [13], especially in the decoder part where gradients need to be backpropagated over a long sequence of layers. On the other hand, ResNet proposed by [PERSON] et al. (2016) [37], is a deep neural network architecture that plays an important role in computer vision problems. The key innovation of ResNet is its use of residual learning blocks. Each residual block consists of a residual connection that allows the flow of gradients more easily along the deep layers in the network during both forward and backward propagation. As a result, the ResNet mitigates the vanishing gradient problem encountered by the U-Net [13; 21; 22]. Therefore, the combination of the two state-of-the-art architectures of U-Net and ResNet was used for the prediction of Japanese oak crowns in the present study. Specifically, we used the U-Net model available in the \"segmentation_models\" library, a Python library of neural networks for image segmentation based on Keras and TensorFlow ([[https://github.com/qubvel/segmentation_models](https://github.com/qubvel/segmentation_models)]([https://github.com/qubvel/segmentation_models](https://github.com/qubvel/segmentation_models)), accessed on 30 November 2023). When used together with this library, the U-Net model can be easily instantiated for different pretrained backbones such as VGG16, VGG19, ResNet, and MobileNet. As mentioned above, we chose ResNet, which was weight-trained on the 2012 ILSVRC ImageNet dataset, as the backbone of the U-Net model. In particular, ResNet101, which has more deep layers than other ResNet architectures, was used because the increased deep layers enable the network to learn more complex and hierarchical features [38]. This can be beneficial for the Japanese oak crown segmentation task, which requires a more detailed understanding of the input data. Specifically, ResNet101 was used as the encoder of the U-Net model (Figure 3).