# PCCAU-Net: A Novel Road Extraction Method Based on Coord Convolution and a DCA Module
## 2 Methods
### Loss Function  
The loss function is a function used to calculate the error between the predicted values of a deep learning model and its true values. A smaller loss indicates a smaller discrepancy between the model's output and the target values. During the model training process, the changes in the loss function provide a basis for the backpropagation process, guiding parameter optimization and helping the model's output to more closely approximate the target values. Dice loss is particularly suitable for addressing class imbalance issues. The Dice coefficient is used to measure the consistency between the predicted segmentation area and the actual segmentation area. The spatial relationship between positive samples and negative samples represented by Dice loss effectively handles the problem of sample imbalance [40]. However, when there is very little or no overlap between the predicted and true labels, the gradient of Dice loss can be difficult to handle. Binary Cross-Entropy (BCE) usually exhibits a stable gradient descent process, which aids in effective model training. Yet, when dealing with imbalanced data, BCE might cause the model to be biased towards the majority class and insufficient to capture the characteristics of the minority class. If only pixel-wise cross-entropy loss is used, the model may be biased towards predicting classes with more samples. The calculation formula for the Dice loss function and cross-entropy loss function is shown as follows:  
\[\text{Dice Loss}=1-\frac{2|X\cap Y|}{|X|+|Y|} \tag{1}\]  
\[\text{BCE Loss}=-\frac{1}{N}\sum_{i=1}^{N}[y_{i}\text{log}\left(y_{i}\right)+ \left(1-y_{i}\right)\text{log}(1-\hat{y_{i}})] \tag{2}\]  
In the formula 1, \(|X|\) represents the the number of pixels in the predicted image, \(|Y|\) represents the number of pixels in the true label, and \(|X\cap Y|\) represents the intersection between the predicted image and the true label. In the formula 2, \(y\) represents the true pixel label value, \(y_{i}\) represents the predicted label pixel value by the model, and \(N\) represents the number of pixels.  
The model in this study was a binary classification problem that performed pixel-wise classification to determine whether each pixel was a road or background. Roads constituted  
Figure 4: Schematic diagram of the fusion attention module structure.  
approximately 10% of the total area in the remote sensing image. To balance the advantages and drawbacks of different loss functions, this paper combines Dice loss with Binary Cross-Entropy (BCE) to propose a new Combined Loss function. In the early stages of prediction, when the prediction results are significantly different from the true labels, the BCE loss can provide a considerable gradient to help the model converge quickly. As the prediction approaches the actual label, the gradient of the BCE loss decreases. In contrast, Dice loss can provide consistent gradients at this stage, leading to better optimization of the model. This feature helps to optimize the model globally and locally, improves the handling of class imbalance problems, and enhances the generalization ability and robustness of the model. The Combined Loss function is formulated as follows:  
\[\text{Combined Loss}=0.5\times\text{BCE}+0.5\times\text{Dice} \tag{3}\]