# DANet: A Semantic Segmentation Network for Remote Sensing of Roads Based on Dual-ASPP Structure
## 2 Materials and Methods
### Encoder Network  
#### 2.2.1 DarkNet  
The YOLO series networks were the first to use the DarkNet network for target detection. This network structure includes convolutional and pooling layers that can extract features at different scales, making it ideal for processing road information in remote-sensing images. Additionally, DarkNet's faster network operation results in better model robustness and speed. In this paper, we aim to apply DarkNet to the semantic segmentation network to extract semantic information about roads in remote-sensing images. The DarkNet network structure efficiently extracts essential road features from remote-sensing images, such as shape, texture, and edges. Additionally, DarkNet employs a convolutional neural network structure to extract high-level semantic features of roads in multiple convolutional layers. This enables contextual information perception of road information in remote-sensing images and captures the association information between roads and their surroundings, ultimately improving the accuracy of semantic segmentation.  
In order to perform semantic segmentation, a convolution operation is typically used to extract features from an image with a higher resolution and generate a feature map with a lower resolution. To improve the accuracy of segmentation, researchers have attempted to increase the depth of the network. However, as the network depth increases, the issues of gradient disappearance and gradient explosion become more prominent. To address this problem, the DarkNet network utilizes the residual structure found in the ResNet [30] network, which has proven to be effective. The main concept behind the residual network is expressed through Equation (1):  
\[y=F(x,\{W_{i}\})+x(1), \tag{1}\]  
The formula for the ordinary residual network structure is represented by Equation (1), where \(y\) is the output, \(x\) is the input, and \(W_{i}\) is the coefficient matrix of the ith layer. However, for convolutional networks, a linear mapping needs to be added, as shown in Equation (2):  
\[y=F(x,\{W_{i}\})+W_{s}x, \tag{2}\]  
Similarly, \(W_{s}\) is also the coefficient matrix.  
The DarkNet network framework is characterized by its simplicity, independence from libraries, clear network structure, and easily modifiable source code. Additionally, the framework can be easily deployed to end machines for operation and can utilize either CPU or GPU computing, depending on the machine's capabilities. Figure 2 illustrates the residual structure of each module within the DarkNet network.  
Figure 2: DarkNet.  
The DarkNet module utilizes a residual structure in which the first convolutional layer reduces the feature map size using 1 \(\times\) 1 convolutional kernels, while the second convolutional layer extracts features using 3 \(\times\) 3 convolutional kernels. The residual module, as illustrated in the figure, comprises two branches. One branch represents the output of the previous layer's feature map for the convolution operation, while the other branch represents the output of the previous layer's feature map constant mapping. These two branches are then added together element by element, completing the convolution operation of the feature map. It is important to note that the number of channels in both branches must be equal.  
Based on the principles of convolution, the input image undergoes a reduction in size by half upon entering the first convolution layer. However, upon entering the second convolution layer, the image is restored to its original size.  
In the DarkNet network, the encoder network passes through multiple residual structure modules. The original structure includes 5 groups of encoder structures with a total of 53 network layers. However, for better feature extraction, we only utilize the first 4 groups of encoder structures, comprising 43 network layers.