## 3 Results  
In order to perform the binary classification of the collected images, an additional decision dense layer consisting of two neurons was added. For the purposes of this article, two approaches were tested. In the first approach, the 10 last layers of the base model were unfrozen for model finetuning. In the second approach, the whole base model was frozen first, with only the decision layer available for training. After the initial training for 100 epochs, the 10 last layers of the base model were unfrozen for retraining. For both approaches, an early stopping callback with patience of 15 epochs was implemented, with validation loss as a target for improvement.  
The results for the first approach are shown in Figure 5. In this case, evidence of significant model overtraining is observed. The training accuracy reaches a very high value close to 100% in the early epochs of the training. At the same time, the validation accuracy shows much poorer values, reaching only 80%. In this case, the early stoppage callback has been activated after the 26 epochs, as no validation loss improvements were observed after epoch 10.  
The results of model training for the second approach are shown in Figure 6. In the initial phase of training, no signs of model overtraining are observed. In this case, both training and validation accuracy increase gradually throughout the whole training and the early stoppage callback has not been activated. The values of training and validation accuracies are much closer, with both exceeding a promising 95%. After revealing the last ten layers of the base model, an additional 1-2% accuracy is gained for both the training and the validation samples. Due to better accuracy, the model trained within the second approach was selected for further validation on a test image.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Layer Type** & **Output Shape** & **Number of Parameters** \\ \hline Input layer & (100, 100, 3) & 0 \\ Sequential & (100, 100, 3) & 0 \\ True Divide & (100, 100, 3) & 0 \\ Subtract & (100, 100, 3) & 0 \\ Functional—MobileNetV2 & (4, 4, 1280) & 2,257,984 \\ Global Average Pooling 2D & (1280) & 0 \\ Dropout & (1280) & 0 \\ Dense & (1) & 1281 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Model architecture.  
The results of applying the model to a test image are shown in Figures 7 and 8. Figure 7 shows nine sample fragments classified as either water or beach. Figure 8 shows the entire test image, where the fragments, identified as beach, are marked with yellow color, while the fragments corresponding to water are marked with blue. The accuracy value for the test image is 96%. The model deals with the identification of water almost perfectly, while for the beach, some false water detections are observed. These individual errors may be caused by, for example, a change in environmental illumination or texture alignment. The  
Figure 5: Training and validation loss and accuracy for the case of the base model with the 10 last layers being unfrozen.  
Figure 6: Training and validation loss and accuracy for the case of frozen based model training, followed by finetuning of the last 10 layers of the base model.  
majority of them occur as single fragments, thus morphological transformation may be useful to eliminate such artifacts.  
Table 2 shows the confusion matrix of the classification result of fragments from the training sample. The result omits fragments located at the edge of the image.  
\begin{table}
\begin{tabular}{c c c} \hline \hline  & **beach** & **water** \\ \hline
**beach** & 348 & 3 \\
**water** & 39 & 665 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Confusion matrix obtained for the test sample.  
Figure 8: Application of the developed algorithm to a test image.  
Figure 7: Examples of fragments of the test sample with the classification result.