A medical image segmentation method based on multi-attention and gated dynamic scaling
By constructing a U-shaped network based on multi-attention and gated dynamic scaling, combined with depth enhancement blocks, gated attention blocks and feature fusion blocks, the problems of large parameters and low efficiency in existing medical image segmentation methods are solved, and high-precision and lightweight medical image segmentation effects are achieved.
Patent Information
- Application Number
- CN202510099093.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2045-01-22
AI Technical Summary
Existing medical image segmentation methods ignore the number of model parameters when pursuing high segmentation accuracy, resulting in low efficiency and excessive computing resource requirements, making it difficult to apply in clinical and edge devices.
A medical image segmentation method based on multi-attention and gated dynamic scaling is adopted. By constructing a U-shaped network, combining depth enhancement blocks, gated attention blocks, dynamic scaling blocks and feature fusion blocks, and using lightweight modules and loss functions to optimize model parameters, the segmentation accuracy is enhanced and the number of parameters is reduced.
It achieves high-precision medical image segmentation while reducing the number of model parameters. It is suitable for image segmentation of edge devices and complex diseases, and improves segmentation efficiency and computational efficiency.
Smart Images

Figure CN120031824B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image segmentation, and in particular to a medical image segmentation method based on multi-attention and gated dynamic scaling. Background Art
[0002] The representative CNN-based medical image segmentation method is UNet, which has a U-shaped structure containing a decoder and an encoder, and both are composed of different convolutional blocks. Convolution performs downsampling and upsampling. Its advantage is its strong ability to extract local information, but its disadvantage is insufficient ability to extract global information and segmentation accuracy needs to be improved. The representative Transformer-based medical image segmentation method is Swinunet, which also has a U-shaped structure containing a decoder and an encoder, but its decoder and encoder are composed of self-attention blocks. Its advantage is strong ability to extract global information, but its disadvantage is insufficient ability to extract local information and a large number of parameters. Transunet, a representative hybrid segmentation architecture method based on CNN and Transformer, has a more diverse structure, not limited to a U-shaped structure. Convolutional blocks and self-attention blocks jointly perform the segmentation task. Its advantage is strong ability to extract both local and global information and high segmentation accuracy, but its disadvantage is a large number of parameters.
[0003] While current medical image segmentation methods have made some progress, improving segmentation accuracy is crucial if they are to replace manual segmentation by doctors or experts. Furthermore, most existing segmentation models have a large number of parameters and low segmentation efficiency, making them difficult to apply to clinical settings and edge devices. This presents an urgent challenge, necessitating a lightweight model design.
[0004] Most current medical image segmentation models are also built on a U-shaped structure, such as the classic lightweight segmentation network UNeXt. Current lightweight medical image segmentation models primarily focus on designing efficient model structures, including network architecture optimization, knowledge distillation, pruning and quantization, depthwise separable convolutions, and transfer learning. However, in pursuit of higher segmentation accuracy, some models often overlook the size of the model parameters. This can lead to low efficiency and high computational resource requirements in practical applications, which runs counter to the medical field's demand for efficient and real-time models. Therefore, how to effectively control the number of model parameters while maintaining high segmentation accuracy remains a key challenge facing current lightweight medical image segmentation models.
[0005] Therefore, it is an urgent problem for those skilled in the art to propose a medical image segmentation method based on multi-attention and gated dynamic scaling to solve the difficulties existing in the existing technology. Summary of the Invention
[0006] In view of this, the present invention provides a medical image segmentation method based on multi-attention and gated dynamic scaling, which can improve the segmentation accuracy and reduce model parameters, thereby achieving a lightweight effect.
[0007] In order to achieve the above object, the present invention adopts the following technical solutions:
[0008] A medical image segmentation method based on multi-attention and gated dynamic scaling, comprising the following steps:
[0009] S1. Acquire medical images and preprocess them to obtain image datasets;
[0010] S2. Construct a U-shaped network including an encoder and a decoder as a medical image segmentation model;
[0011] S3. Inputting the image dataset into the medical image segmentation model to obtain a segmented medical image, performing error analysis between the segmented medical image and the actual image segmentation boundary using a loss function, updating the model parameters, obtaining a trained medical image segmentation model, and performing verification to obtain a verified medical image segmentation model;
[0012] S4. Segment the medical image to be segmented using the verified medical image segmentation model to obtain a segmented medical image.
[0013] Optionally, the U-shaped network in S2 is a 5-layer structure, and the U-shaped network consists of an encoder, a decoder, and a skip connection channel;
[0014] The upper two layers of the encoder consist of depth enhancement blocks, and the upper two layers of the decoder consist of feature fusion blocks;
[0015] The bottom three layers of the model are jointly composed of gated attention blocks and dynamic scaling blocks;
[0016] The first to fourth layers of the model are connected via skip connection channels.
[0017] Optionally, the depth enhancement block uses a 5×5 large kernel convolution combined with the SE channel attention mechanism to dynamically extract image information, expressed as:
[0018] f l '=SE(BN(σ1{DC(f l-1 )}))+f l-1 ,
[0019] f l =BN(σ1{PC(BN(σ1{PC(f l ')}))}),
[0020] Among them, f l' represents the output feature map after the SE channel attention mechanism, f l-1 represents the output feature map of layer l-1 in the depth enhancement block, σ1 represents GELU activation, DC represents depth convolution, and f l ″ represents the output feature map of the DEA module, BN represents the batch normalization layer, and PC represents the point-by-point convolution.
[0021] Optionally, the gated attention block uses the attention mechanism and the gating mechanism to enhance the expressiveness of the input feature map. The expression is:
[0022] x reshaped =reshape(OC(x)),
[0023] x2=Linear1(Linear0(x reshpeed )×σ(x reshaped )),
[0024] Out1=GN(OC(reshape -1 (x2)))+x,
[0025] Among them, x reshaped It represents the feature map after the reshaping operation, x2 represents the output feature map after linear layer 1, Linear1 represents linear layer 1, Linear0 represents linear layer 0, σ represents Sigmiod function, OC represents ordinary convolution, x is the input of the gated attention block, and Out1 represents the output of the gated attention block.
[0026] Optionally, the dynamic scaling block introduces an attention scaling mechanism to highlight key information and suppress areas of unimportant information. The expression is:
[0027] x1,x2,x3,x4=Chunk(X),
[0028] X'=W(Concat(W1(x1),W2(x2),W5(x3),W7(x4))),
[0029] Am=Scaling(σ(DW(X'))),
[0030] Out2=DW(DW(A')⊙Am)+W(X'),
[0031] Among them, X represents the dynamic scaling block input, Chunk represents dividing the feature map into four parts along the channel dimension, x1, x2, x3, x4 represent the dilated convolution outputs of four different dilation rates, and W iDenotes depthwise separable convolution with dilation rate i, Concat denotes concatenation operation, X' denotes the output feature after concatenating four dilated convolutions with different dilation rates, W denotes ordinary convolution operation, σ is the Sigmoid function, DW denotes depthwise separable convolution, Scaling denotes attention scaling, ⊙ denotes element-wise dot product, and Out2 denotes dynamic scaling block output.
[0032] Optionally, the feature fusion block introduces a lightweight module to reduce the number of parameters. The expression is as follows:
[0033] f cancat =Concat(BN{GM(f ε )},BN{GM(f θ )}),
[0034] f fusion =BN(σ{PC(BN(σ{PC(f concat )}))}),
[0035] Among them, f cancat Represents the output features after the concatenation of the encoder and decoder features, f fusion represents the output fusion feature map in the Skip-Fusion block, f ε and f θ denote encoder and decoder features respectively, GM denotes ghost module, and σ denotes Sigmoid function.
[0036] Optionally, the loss function in S3 is a combination of binary cross entropy and dice loss, expressed as:
[0037]
[0038] in, is the probability value predicted by the model, indicating the probability that the sample belongs to the positive class, y is the actual label, BCELoss(·) is the binary cross entropy function, and Dice Loss(·) is the dice loss function.
[0039] It can be seen from the above technical solution that compared with the existing technology, the present invention provides a medical image segmentation method based on multi-attention and gated dynamic scaling, which has the following beneficial effects: 1) The present invention uses a gating mechanism and an attention scaling mechanism to use a model to focus on key information while suppressing non-key information, thereby achieving the effect of most specific area segmentation, enhancing the accuracy of segmentation and meeting the lightweight requirements; 2) The present invention can achieve high-precision segmentation of medical images and greatly reduce the number of model parameters; 3) The present invention can be widely used in a variety of medical images, especially for diseases with fuzzy and complex edges, such as skin diseases, and can also be used for general tumor segmentation, such as breast tumors. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0041] Figure 1 This is a flow chart of a medical image segmentation method based on multi-attention and gated dynamic scaling disclosed in the present invention;
[0042] Figure 2 This is a network structure diagram of the medical image segmentation model disclosed in this embodiment;
[0043] Figure 3 This is a schematic diagram of the depth enhancement block disclosed in the present invention;
[0044] Figure 4 Schematic diagram of the gated attention block disclosed in the present invention;
[0045] Figure 5 This is a schematic diagram of the dynamic scaling block disclosed in the present invention;
[0046] Figure 6 This is a schematic diagram of the feature fusion block disclosed in the present invention. DETAILED DESCRIPTION
[0047] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0048] Reference Figure 1 As shown, a medical image segmentation method based on multi-attention and gated dynamic scaling includes the following steps:
[0049] A medical image segmentation method based on multi-attention and gated dynamic scaling, comprising the following steps:
[0050] S1. Acquire medical images and preprocess them to obtain image datasets;
[0051] S2. Construct a U-shaped network including an encoder and a decoder as a medical image segmentation model;
[0052] S3. Inputting the image dataset into the medical image segmentation model to obtain a segmented medical image, performing error analysis between the segmented medical image and the actual image segmentation boundary using a loss function, updating the model parameters, obtaining a trained medical image segmentation model, and performing verification to obtain a verified medical image segmentation model;
[0053] S4. Segment the medical image to be segmented using the verified medical image segmentation model to obtain a segmented medical image.
[0054] Further, refer to Figure 2 As shown, the U-shaped network in S2 is a 5-layer structure, which consists of an encoder, a decoder and a skip connection channel;
[0055] The upper two layers of the encoder consist of depth enhancement blocks, and the upper two layers of the decoder consist of feature fusion blocks;
[0056] The bottom three layers of the model are jointly composed of gated attention blocks and dynamic scaling blocks;
[0057] The first to fourth layers of the model are connected via skip connection channels.
[0058] Specifically, the feature map first undergoes a preliminary extraction of information through the depth enhancement attention block, and then the extracted information is passed to the gated attention block and the dynamic scaling block to enhance the segmentation ability of edge information and dynamically control the information extraction strength of the feature area. Finally, the extracted information is passed to the feature fusion block for upsampling to restore the features, and depth-wise separable convolution is used to reduce the number of parameters, and finally the segmentation result is obtained.
[0059] Further, refer to Figure 3 As shown in Figure 2, the depth enhancement block uses a 5×5 large kernel convolution combined with the SE channel attention mechanism to dynamically extract image information. The expression is:
[0060] f l '=SE(BN(σ1{DC(f l-1 )}))+f l-1 ,
[0061] f l =BN(σ1{PC(BN(σ1{PC(f l ')}))}),
[0062] Among them, f l ' represents the output feature map after the SE channel attention mechanism, f l-1 represents the output feature map of layer l-1 in the depth enhancement block, σ1 represents GELU activation, DC represents depth convolution, and f l ″ represents the output feature map of the DEA module, BN represents the batch normalization layer, and PC represents the point-by-point convolution.
[0063] Specifically, many models propose using large kernel convolutions to extract global information, but this results in the loss of detailed information. Therefore, we propose using the SE channel attention mechanism. By dynamically adjusting the weights of each channel, the network can focus more on important detail feature channels. Then, a large 5×5 kernel convolution is used to better extract global information, combining it with the local information extracted by channel attention. The channel attention module also has the function of adjusting parameters to control computational cost while maintaining performance. Furthermore, the depth enhancement block also designs an inverted bottleneck structure, deeply mixing spatial and channel information through two point-by-point convolutions. GELU activation and BatchNorm layers are applied after each convolution step.
[0064] Further, refer to Figure 4 As shown in Figure 2, the gated attention block uses the attention mechanism and the gating mechanism to enhance the expressive power of the input feature map. The expression is:
[0065] x reshaped =reshape(OC(x)),
[0066] x2=Linear1(Linear0(x reshaped )×σ(x reshaped )),
[0067] Out1=GN(OC(reshape -1 (x2)))+x,
[0068] Among them, x reshaped It represents the feature map after the reshaping operation, x2 represents the output feature map after linear layer 1, Linear1 represents linear layer 1, Linear0 represents linear layer 0, σ represents Sigmiod function, OC represents ordinary convolution, x is the input of the gated attention block, and Out1 represents the output of the gated attention block.
[0069] Specifically, after receiving the information extracted by the depth enhancement block as input image data, the input image data is subjected to preliminary feature extraction through a 1×1 convolutional layer. This step helps to simplify the complexity of the input data and lays the foundation for subsequent processing. The module uses a one-dimensional convolutional layer (or regarded as a linear layer) to calculate the preliminary attention weights, and adjusts the weights through a gating mechanism (composed of a convolutional layer gate and a Sigmiod activation function) so that the model can focus on important features in the input data while suppressing irrelevant features; the attention weights adjusted by the gating mechanism are normalized by the Softmax function to ensure that the sum of all weights is 1, and additional numerical stabilization processing is performed to avoid potential computational problems; the feature maps are weighted summed using the adjusted attention weights, and further processed through another 1x1 convolutional layer to extract higher-level features; finally, the processed feature maps are added to the original input through a jump connection, and the GELU activation function is applied to obtain the final output of the module. This step helps to retain the original information of the input data and introduces nonlinear characteristics, thereby improving the stability and performance of the model.
[0070] Furthermore, the dynamic scaling block introduces an attention scaling mechanism to highlight key information and suppress areas of unimportant information. The expression is:
[0071] x1,x2,x3,x4=Chunk(X),
[0072] X'=W(Concat(W1(x1),W2(x2),W5(x3),W7(x4))),
[0073] Am=Scaling(σ(DW(X'))),
[0074] Out2=DW(DW(X')⊙Am)+W(X'),
[0075] Among them, X represents the dynamic scaling block input, Chunk represents dividing the feature map into four parts along the channel dimension, x1, x2, x3, x4 represent the dilated convolution outputs of four different dilation rates, and W i Denotes depthwise separable convolution with dilation rate i, Concat denotes concatenation operation, X' denotes the output feature after concatenating four dilated convolutions with different dilation rates, W denotes ordinary convolution operation, σ is the Sigmoid function, DW denotes depthwise separable convolution, Scaling denotes attention scaling, ⊙ denotes element-wise dot product, and Out2 denotes dynamic scaling block output.
[0076] Specifically, refer to Figure 5As shown in the figure, in the dynamic scaling block, the feature map is evenly divided into four subsets, each of which undergoes depthwise separable convolution processing with different dilation rates to capture global and local feature information. The processed subsets are reassembled into a complete feature map through channel splicing, and then a convolution operation is applied to promote the communication and fusion of global and local features, enhancing feature representation capabilities. This process effectively integrates global and local features, improving the network's understanding and processing capabilities of image content. The attention scaling mechanism is then used to adjust the scale of the dot product results, affecting the distribution of attention weights, allowing the model to more sensitively capture key information in the input data. Furthermore, the data often contains a large amount of redundant noise and interference information. The attention scaling mechanism can effectively suppress the interference of this unimportant information. Finally, a residual connection operation is applied to obtain the output.
[0077] Further, refer to Figure 6 As shown, the feature fusion block introduces a lightweight module to reduce the number of parameters. The expression is as follows:
[0078] f cancat =Concat(BN{GM(f ε )},BN{GM(f θ )}),
[0079] f fusion =BN(σ{PC(BN(σ{PC(f concat )}))}),
[0080] Among them, f cancat Represents the output features after the concatenation of the encoder and decoder features, f fusion represents the output fusion feature map in the Skip-Fusion block, f ε and f θ denote encoder and decoder features respectively, GM denotes ghost module, and σ denotes Sigmiod function.
[0081] Specifically, during the upsampling process, the present invention uses a feature fusion module that can greatly reduce the number of parameters. The feature fusion module introduces a lightweight module GhostModule. During the feature extraction process, this module first extracts a small amount of intrinsic feature maps with key information from the input feature map through a streamlined main convolution layer, and compresses the feature map, thereby achieving preliminary parameter reduction; GhostModule uses depthwise separable convolution as a "cheap operation" to further process the main convolution output, and after multiple different linear transformations, generates new feature maps equivalent to the original number; these new maps are spliced with the main output to form a feature map set containing rich information. Subsequently, the slicing operation adjusts the output quantity, significantly reducing the model complexity and computational complexity; finally, the upsampling module is used to gradually restore the resolution of the feature map, and the feature fusion module then fuses the feature maps from different sources, and then extracts the final features through a series of convolution, activation and normalization operations.
[0082] Furthermore, the loss function in S3 is a combination of binary cross entropy and dice loss, expressed as:
[0083]
[0084] in, is the probability value predicted by the model, indicating the probability that the sample belongs to the positive class, y is the actual label, BCELoss(·) is the binary cross entropy function, and Dice Loss(·) is the dice loss function.
[0085] Specifically, binary cross entropy is used to measure the difference between two probability distributions, one of which usually represents the probability distribution of model predictions, and the other represents the probability distribution of true labels. The binary cross entropy (BCELoss) is defined as:
[0086]
[0087] Among them, BCELoss represents the loss value, n is the total number of samples, and log represents the natural logarithm.
[0088] Dice Loss is a loss function based on the Dice Coefficient. The Dice Coefficient is an indicator to measure the similarity between two sets and is defined as follows:
[0089]
[0090] Where A and B are two binary sets, |A∩B| represents the number of elements in the intersection of sets A and B, and |A| and |B| represent the number of elements in sets A and B, respectively. In image segmentation, set A usually represents the segmentation result predicted by the model, and set B represents the segmentation result of the actual label;
[0091] The purpose of the Dice loss function is to minimize the Dice coefficient (or maximize its negative value) to improve the similarity between the segmentation result and the true label. The definition of the Dice loss function is as follows:
[0092] Dice Loss(A,B)=1-Dice(A,B),
[0093] Substituting the Dice coefficient into the equation gives:
[0094]
[0095] In actual calculations, continuous probability values are usually used instead of binary results, so the Dice loss function can also be generalized to the following form:
[0096]
[0097] Among them, p represents the probability value predicted by the model, t represents the binary value of the true label (0 or 1), and p i and t i They represent the predicted value and true value of the i-th pixel respectively.
[0098] In order to avoid division by zero, a small smoothing term ∈ is usually added to the formula:
[0099]
[0100] Furthermore, the performance of different segmentation models is comprehensively evaluated using the widely accepted Mean Intersection over Union (mIoU) and DSC scores as well as the number of parameters (in M) and computational complexity (in GFLOPs).
[0101] Specifically, Mean Intersection over Union (mIoU) is a commonly used image segmentation model evaluation metric. It measures the segmentation accuracy of the model by calculating the ratio between the intersection and union of the predicted result and the true label. Dice Similarity Coefficient (DSC), also known as the Dice coefficient, is a commonly used image segmentation model evaluation metric. The mIoU and DSC scores of this application on the BUSI breast ultrasound dataset are 74.27 and 82.77, respectively, and the mIoU and DSC scores on the ISIC2018 skin disease dataset are 83.90 and 90.41, respectively. The number of parameters and computational complexity of the model are 2.62 and 5.95, respectively, that is, this application enhances the accuracy of segmentation and achieves a lightweight effect.
[0102] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A medical image segmentation method based on multi-attention and gated dynamic scaling, characterized in that The following steps are involved: S1. Acquire medical images and preprocess them to obtain image datasets; S2. Construct a U-shaped network including an encoder and a decoder as a medical image segmentation model; S3. Inputting the image dataset into the medical image segmentation model to obtain a segmented medical image, performing error analysis between the segmented medical image and the actual image segmentation boundary using a loss function, updating the model parameters, obtaining a trained medical image segmentation model, and performing verification to obtain a verified medical image segmentation model; S4. Segmenting the medical image to be segmented using the verified medical image segmentation model to obtain a segmented medical image; The U-shaped network in S2 is a 5-layer structure consisting of an encoder, a decoder, and a skip connection channel; The upper two layers of the encoder consist of depth enhancement blocks, and the upper two layers of the decoder consist of feature fusion blocks; The bottom three layers of the model are jointly composed of gated attention blocks and dynamic scaling blocks; The first to fourth layers of the model are connected via skip connection channels; The gated attention block uses the attention mechanism and the gating mechanism to enhance the expressiveness of the input feature map. The expression is: x reshaped =reshape(OC(x)), x2=Linear1(Linear0(x reshped )×σ(x reshaped )), Out1=GN(OC(reshape -1 (x2)))+x, Among them, x reshaped It represents the feature map after the reshaping operation, x2 represents the output feature map after linear layer 1, Linear1 represents linear layer 1, Linear0 represents linear layer 0, σ represents Sigmiod function, OC represents ordinary convolution, x is the input of the gated attention block, and Out1 represents the output of the gated attention block; The feature fusion block introduces a lightweight module to reduce the number of parameters. The expression is as follows: f cancat =Concat(BN{GM(f ε )},BN{GM(f θ )}), f fusion =BN(σ{PC(BN(σ{PC(f concat )}))}), Among them, f cancat Represents the output features after the concatenation of the encoder and decoder features, f fusion represents the output fusion feature map in the Skip-Fusion block, f ε and f θ denote encoder and decoder features respectively, GM denotes ghost module, and σ denotes Sigmiod function.
2. The medical image segmentation method based on multi-attention and gated dynamic scaling according to claim 1, characterized in that: The depth enhancement block uses a 5×5 large kernel convolution combined with the SE channel attention mechanism to dynamically extract image information. The expression is: f l ′=SE(BN(σ1{DC(f l-1 )}))+f l-1 , f l ″=BN(σ1{PC(BN(σ1{PC(f l ′)}))}), Among them, f l ′ represents the output feature map after the SE channel attention mechanism, f l-1 represents the output feature map of layer l-1 in the depth enhancement block, σ1 represents GELU activation, DC represents depth convolution, and f l ″ represents the output feature map of the DEA module, BN represents the batch normalization layer, and PC represents the point-by-point convolution.
3. The medical image segmentation method based on multi-attention and gated dynamic scaling according to claim 1, characterized in that: The dynamic scaling block introduces an attention scaling mechanism to highlight key information and suppress areas of unimportant information. The expression is: x1,x2,x3,x4=Chunk(X), X′=W(Concat(W1(x1),W2(x2),W5(x3),W7(x4))), Am=Scaling(σ(DW(X′))), Out2=DW(DW(X′)⊙Am)+W(X′), Among them, X represents the dynamic scaling block input, Chunk represents dividing the feature map into four parts along the channel dimension, x1, x2, x3, x4 represent the dilated convolution outputs of four different dilation rates, and W i Denotes depthwise separable convolution with dilation rate i, Concat denotes concatenation operation, X' denotes the output feature after concatenating four dilated convolutions with different dilation rates, W denotes ordinary convolution operation, σ is the Sigmoid function, DW denotes depthwise separable convolution, Scaling denotes attention scaling, ⊙ denotes element-wise dot product, and Out2 denotes dynamic scaling block output.
4. The medical image segmentation method based on multi-attention and gated dynamic scaling according to claim 1, characterized in that: The loss function in S3 is a combination of binary cross entropy and dice loss, expressed as: in, is the probability value predicted by the model, indicating the probability that the sample belongs to the positive class, y is the actual label, BCELoss(·) is the binary cross entropy function, and Dice Loss(·) is the dice loss function.