## 2 Related Work
### The Loss Function for Networks Optimization  
During the process of neural network training, the loss functions play an essential role in optimizing network parameters. Researchers can obtain higher segmentation accuracy by selecting the appropriate loss functions to optimize the network model. According to the derivation of the loss function [46], they can be divided into four categories: distribution-based loss, region-based loss, boundary-based loss and compound loss. Cross-entropy is a common distribution-based loss and it optimized the networks by minimizing dissimilarity between two distributions. Focal loss [47] is derived from cross-entropy. [PERSON] et al. proposed the focal loss for target scene detection, which can effectively solve the imbalance between foreground and background in the training process. However, the focal loss function is very sensitive to relevant parameters, and it requires repeated adjustment to find an appropriate value. Dice loss is a region-based loss and it can optimize the networks by minimizing the mismatch. In essence, Tversky loss [48] is a generalization of the Dice loss, which can achieve an improved tradeoff between precision and recall by weighting the relevant parameters. Hausdorff distance loss [49] a boundary-based loss and aims to minimize the distance between ground truth and predicted segmentation. Compound loss is the (weighted) combination between the above loss functions, such as the combination of Dice loss and cross-entropy loss [50]. To better describe the proposed boundary loss function, we first briefly introduce the other three loss functions used in this paper--the cross-entropy loss function [19], similarity coefficient loss function [18; 43] and contour loss function [21]. They are all representative loss functions in medical image segmentation. In the following expressions, the marked image and the predicted image are represented as \(T,P\in[0,1]^{w\times h}\), where \(0\) and \(1\) represent the pixels in the background and foreground, respectively; \(w\) and \(h\) represent the width and height of the image, respectively; \(n\) represents the index of pixel space of the image; and \(N\) is the pixel space of the image. \(T_{n}\) and \(P_{n}\) represent the value of \(0\) or \(1\) at the position index \(n\), respectively. **Cross-entropy loss** Cross-entropy is an important concept in [PERSON] information theory. Cross-entropy is used to measure the difference between two probability distributions. Cross-entropy can be used as a loss function in deep learning networks. The cross-entropy loss function is a widely used pixel-level metric [19; 20] to evaluate classification or segmentation model performance. For the sake of description, let us take a binary problem as an example, then, the binary cross-entropy loss function \(L_{b}\) can be expressed as follows:  
\[L_{b}(T,P)=-\frac{1}{N}\sum_{n=1}^{N}[T_{n}\times\log(P_{n})+(1-T_{n})\times \log(1-P_{n})]. \tag{1}\]  
Cross-entropy is sufficient to address most segmentation problems. However, in the case of category imbalance, it is necessary to choose the category weight reasonably well to achieve effective segmentation results. **Dice loss** Dice coefficient is a set similarity measurement function, which is usually used to calculate the similarity of two samples. The similarity coefficient can be a common index to evaluate the segmentation performance. [PERSON] et al. [43] and [PERSON] et al. [18] demonstrated that the similarity coefficient could also be used as a useful loss function. The similarity coefficient measures the overlap rate between the labelled image and the predicted image. Its range is \([0,1]\), where \(1\) represents complete overlapping, \(0\) represents no overlapping, and other values represent partial overlapping.