## 2 Materials and Methods
### Workflow and Model Implementation
#### 2.4.3 U-Net Training and Validation  
Here, we followed the classical U-Net architecture (Figure 4), the CNN encoder-decoder [11], for the model design in the training. The network architecture consists of a contracting path (left side) and an expansive path (right side). The contracting path follows the typical architecture of a convolutional network, which is composed of Rectified Linear Units--i.e., the ReLU activation function--to avoid vanishing gradients and to improve the training speed [29], as well as of max-pooling layers. In total, the network has 23 convolutional layers. The final convolutional layer is used to map each 64-component feature vector to the 4 classes of our semantic segmentation task. Readers are referred to [11] for the details of the U-Net architecture. We up-scaled the 256 \(\times\) 256 \(\times\) 8 preprocessed images to 572 \(\times\) 572 \(\times\) 8 as input layers in U-Net. The input images and their corresponding segmentation masks were used to train the network. Binary cross-entropy was selected as the loss function to evaluate the  
Figure 5: Example of label masks for a satellite image. The four classes are floating, emergent, water, and land’. Pixels are assigned a value of 1 (white color) if they belong to the assigned class, and a value of 0 (black color) otherwise. model weights of the CNN, and an accuracy metric was applied to measure how close the predicted mask was to the manually annotated masks pixel by pixel, namely:  
\[\text{Pixel accuracy}=(\text{TP}+\text{TN})/(\text{TP}+\text{TN}+\text{FP}+ \text{FN})\ (\%) \tag{1}\]  
where TP is true positive, TN is true negative, FP is false positive, and FN is false negative. The accuracy metric is defined by the number of pixels labeled correctly divided by the total number of pixels. During the training, the loss function was used to evaluate the performance of the U-Net by comparing the input data to the output values predicted. Stochastic gradient descent was implemented to iteratively adjust the weights, allowing the network to best approximate the training data output. At each iteration (i.e., epoch), a backpropagation algorithm estimated the partial derivatives of the loss function with respect to the incremental changes in all the weights to determine the gradient descent directions for the next iteration. The network weights were initialized randomly, and an adaptive learning rate gradient-descent back-propagation algorithm [29] was used to update model weights [8]. The model was trained with 80% of the training set and tested on the remaining images not used for training. Note that the test set was randomly selected for each epoch and was not used in the optimization or backpropagation algorithms. Instead, the loss function was evaluated over the hold-out validation data, and this served as an independent tuning metric of the performance of the U-Net. Data augmentation and batch normalization were applied in the training. Data augmentation is essential to teach the network the desired invariance and robustness properties, when only a few training samples are available, especially for segmentation tasks [11]. In the model, we generated image transformations by randomly reversing and transposing first and second image dimensions. Dropout layers at the end of the contracting path were used for further implicit data augmentation. In practice, the random transformation allowed us to increase the size of the dataset without deteriorating its quality. Batch normalization is used for addressing internal covariate shift and is widely used in image segmentation [30]. In our model, we applied batch normalization after the convolution and before the activation. Data augmentation and batch normalization used here are expected to further improve the datasets and prediction performance. We experimented with a set of hyperparameters for the learning algorithm, which included training epoch, batch size, and learning rate. We utilized these parameters to obtain a final accuracy after every run.