# Mapping of Kill Erosion of the Middle Volga (Russia) Region Using Deep Neural Network
## 3 Materials and Methods
### Training a Deep Neural Network  
A convolutional neural network is a class of artificial neural network that uses convolutional layers to filter inputs for useful information. The convolution operation involves combining input data (feature map) with a convolution kernel (filter) to form a transformed feature map. The filters in the convolutional layers (conv layers) are modified based on learned parameters to extract the most useful information for a specific task.  
Figure 3: Example of a satellite image patch (**A**) and a binary mask (**B**) of fill erosion.  
Figure 2: Fragment of a fill erosion ground truth data (GT).  
Convolutional networks adjust automatically to find the best feature based on the task. Applications of convolutional neural networks include various image (image recognition, image classification, video labeling, text analysis) and speech (speech recognition, natural language processing, and text classification) processing systems, along with state-of-the-art AI systems, such as robots, virtual assistants, and self-driving cars.  
LinkNet (Figure 4), a fully convolutional neural network for semantic image segmentation, was chosen as a neural network architecture [64]. In contrast to the well-known and well-proven U-NET architecture [57], which has been used for semantic segmentation of satellite images in geomorphological studies [65], LinkNet uses residual blocks instead of convolutional blocks in its encoder and decoder networks. The LinkNet deep neural network architecture efficiently exchanges the information received by the encoder with the decoder after each downsampling block. This turns out to be better than using pooling indices in the decoder, or just using fully convolutional networks in the decoder. This feature transfer technique not only gives good accuracy, but also allows a small number of parameters to be used in the decoder.  
The initial block contains a convolution layer with a kernel size of 7 \(\times\) 7 and a stride of 2, then a max-pool layer with a window size of 2 \(\times\) 2 and a stride of 2. Similarly, the last block performs a full convolution, taking feature maps from 64 to 32, then a 2D convolution. Finally, a full convolution is used as a classifier with a kernel size of 2 \(\times\) 2. As practice has shown, this allows for better semantic aggregation, including dendro-like constructions (tree-like patterns on the landscape) and rill networks. By trial-and-error method, it became clear that the best results in decoding rills can be achieved using transfer learning, a deep neural network learning method that allows using the knowledge obtained about one deep learning problem and applying it to another, but with a similar problem. The encoders used for DenseNet image classification [66] were used in our case. In contrast to similar models, the features are not summed up but concatenated (channel-wise concatenation) into a single tensor before passing them to the next layer. The model learning and implementation algorithm was performed in the Python 3.7 programming environment using the Tensorflow library. The input of the neural network was a stack of image-mask pairs prepared in the previous step. EarlyStopping monitoring was used to prevent overtraining of the model, and the IOU Score metric, Jaccard's coefficient, was used to check the model's learning capability [67].  
Figure 4: DNN LinkNet architecture scheme [64].