Medical image segmentation method based on edge enhancement and multi-feature fusion
By employing edge enhancement and multi-feature fusion methods, the problems of inaccurate lesion boundary localization and insufficient scale adaptability in deep learning medical image segmentation are solved, achieving high-precision lesion region segmentation and improving the robustness and accuracy of the segmentation algorithm.
Patent Information
- Application Number
- CN202610033352.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-12
- Publication Date
- 2026-04-21
AI Technical Summary
Existing deep learning-based medical image segmentation methods lack accuracy in lesion boundary localization, are prone to spiculation or oversegmentation, and are less adaptable to lesion areas with large scale differences, making it difficult to capture both subtle lesions and large lesions simultaneously.
We employ an edge enhancement and multi-feature fusion approach, extracting multi-scale local features through an encoder, combining differential convolution and visual MLP to capture boundary information from a global perspective, integrating high-level semantics and low-level details in skip connections, and introducing mask information to assist feature alignment, thus constructing a lightweight U-shaped architecture network.
It significantly improves the accuracy and boundary fit of medical image segmentation, reduces interference from complex backgrounds, effectively addresses tissue edge blurring and lesion scale changes, and enhances the segmentation accuracy of lesion areas.
Smart Images

Figure CN121904090A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of medical image processing technology, specifically relating to a medical image segmentation method based on edge enhancement and multi-feature fusion. Background Technology
[0002] Medical image segmentation plays a crucial role in clinical diagnosis, treatment planning, and disease monitoring, such as lesion screening, surgical pathway planning, and treatment efficacy evaluation. Due to variations in medical image acquisition equipment, the complexity of human tissue anatomy, imaging noise, and organ motion artifacts, clinically acquired medical images often suffer from uneven quality and blurred details. The purpose of medical image segmentation is to accurately separate lesion areas, normal tissue areas, and background areas within an image, providing quantitative analysis for clinical diagnosis and treatment. The accuracy of the segmentation method directly impacts diagnostic precision, treatment plan formulation, and other clinical application outcomes.
[0003] Traditional medical image segmentation algorithms typically require image preprocessing to enhance features, followed by the establishment of segmentation rules for the target region through thresholding, edge detection, or morphological operations. The segmentation results are then optimized through manual parameter tuning to achieve the desired medical image segmentation. However, these algorithms are often sensitive to image quality, tissue morphology differences, and imaging modal variations. With the development of deep learning, researchers have attempted to utilize deep neural networks to learn the features and segmentation rules of medical images. Deep learning-based medical image segmentation algorithms can address the problems of low segmentation accuracy and poor adaptability to complex medical image data inherent in traditional methods.
[0004] With the continuous growth of computing power and the scale of available labeled data, convolutional neural networks have been widely used in the field of biomedical image segmentation. Since Ronneberger et al. proposed the U-Net model in 2015, its simple and efficient U-shaped structure and excellent segmentation accuracy have made it a core target for researchers to optimize and improve. Many algorithms have been extensively explored around optimizing the U-shaped architecture, resulting in a series of improved models. Most researchers have adopted multiple improvement methods, such as introducing attention mechanisms, improving multi-scale feature fusion, and optimizing loss functions. However, many existing studies suffer from two key problems: first, insufficient accuracy in lesion boundary localization, leading to spiculation or oversegmentation in the segmentation results; and second, weak adaptability to lesion regions with large scale differences, making it difficult to simultaneously capture subtle lesions and large lesions. Summary of the Invention
[0005] The technical problem this invention aims to solve is to address the shortcomings of the aforementioned deep learning-based image segmentation methods by providing a medical image segmentation method based on edge enhancement and multi-feature fusion. First, an encoder extracts multi-scale local features from the image. Then, in the bottleneck layer of the edge enhancement module, differential convolution and visual MLP are combined to capture boundary information from a global perspective, ensuring accurate transmission of edge details in low-level features. Simultaneously, a multi-feature fusion module embedded in skip connections integrates high-level semantics and low-level details, and introduces mask information to assist feature alignment, taking into account both the local structure and overall context of the image. Next, the decoder gradually restores spatial resolution and enhances boundary feature responses. This invention can generate accurate segmentation masks, effectively reducing the interference of complex backgrounds on segmentation results, improving the algorithm's segmentation accuracy for lesion regions, effectively addressing challenges such as blurred tissue edges and varying lesion scales in medical images, and significantly suppressing background noise interference, thus achieving superior performance in both segmentation accuracy and boundary fit.
[0006] To achieve the above objectives, the specific technical solution adopted by the present invention is as follows: A medical image segmentation method based on edge enhancement and multi-feature fusion, the method comprising the following: Acquire medical images and their corresponding labels, and preprocess the images; A medical image segmentation model is constructed, including a three-stage hierarchical encoder, a bottleneck layer, a three-stage hierarchical decoder symmetrical to the encoder, and a three-level multi-feature fusion module that realizes skip connections between the encoder and the decoder. The bottleneck layer consists of two layers, each containing an edge extraction module. The first edge extraction module is followed by a max pooling layer, and the second edge extraction module is followed by a bilinear interpolation layer. The output of the first layer is connected to the three-level multi-feature fusion module from bottom to top. The output of the second layer is convolved by 1×1 to generate the first-level prediction mask. The outputs of the double convolution operations of the first and second layers of the decoder are processed by 1×1 convolution to generate the second-level prediction mask and the third-level prediction mask, respectively. Each multi-feature fusion module receives three types of inputs: first, low-level features output from the corresponding encoder layer; second, high-level features, where the high-level features of the first-level multi-feature fusion module come from the output of the first layer of the bottleneck layer, and the high-level features of the other two-level multi-feature fusion modules come from the output of their superior multi-feature fusion modules; and third, a prediction mask. The labels are subjected to max pooling operations of different scales to obtain real labels of the same dimension as the three-level output of the decoder and the final output of the decoder; During training, the total loss function of the medical image segmentation model is a weighted combination of the three levels of decoder output and the loss between the final output of the decoder and the corresponding real labels. After training, a trained medical image segmentation model is obtained and used for medical image segmentation.
[0007] Furthermore, the encoder comprises three coding layers, each consisting of two consecutive 3×3 convolutional blocks and a subsequent max pooling layer; the input of the first coding layer is the pathological image, the input of the next coding layer is the output of the previous coding layer; the output of the last coding layer is processed by a bottleneck layer and then used as the input of the first layer of the decoder, and the feature maps of each coding layer are passed to the corresponding decoding layer through skip connections.
[0008] Furthermore, the decoder comprises three layers, each consisting of two consecutive 3×3 convolutional blocks and subsequent bilinear interpolation; the input of the first decoding layer is the output of the last layer of the bottleneck layer and the output of the corresponding skip connection; the input of the next decoding layer is the result of concatenating the output of the previous decoding layer after processing by the bilinear interpolation layer and the output of the corresponding skip connection; and the output of the last decoding layer is the output of the decoder.
[0009] Furthermore, the total loss function loss for: Among them, BCE and Let these represent the binary cross-entropy loss and the Dice loss, respectively. λ i These are the weights at different stages; i = 0, 1, 2, 3, representing the final output of the decoder, the output of the third decoding layer of the decoder, the output of the second decoding layer of the decoder, and the output of the first decoding layer of the decoder, respectively. l i Juntong represents the loss function for the i-th part.
[0010] Furthermore, for i=0 to i=3 λ i Set them to 1, 0.5, 0.3, and 0.2 respectively.
[0011] Furthermore, the edge enhancement module is implemented as follows: after the input is processed by dual 3×3 standard convolutional blocks, four differential convolutions and one ordinary convolution are trained through a convolutional parallel structure. Then, after reparameterization, the five convolutional kernels are equivalent to one convolutional kernel. The output processed by the convolutional parallel structure is concatenated with its input and then input into a three-branch parallel structure. Subsequently, feature fusion is performed using the three-branch parallel structure. One branch extracts local information through depthwise separable convolution (DC) and pointwise convolution (Pointwise Conv), while the other two branches perceive global features through visual MLP. Finally, the features are mixed in the channel direction, and the mixed global features and local information are integrated through the concatenation operation (Cat) to achieve a unified representation of multi-scale features. Finally, the enhanced edge features processed by the edge enhancement module are output through the channel mixing operation. The four differential convolutions include central differential convolution (CDC), angular differential convolution (ADC), horizontal differential convolution (HDC), and vertical differential convolution (VDC).
[0012] The present invention also protects a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, can implement the method.
[0013] Compared with the prior art, the present invention has at least the following beneficial effects: (1) The medical image segmentation model constructed in this invention adopts a lightweight architecture, which requires only a few parameters while ensuring high segmentation accuracy, which is superior to most existing advanced methods. This lightweight feature makes it have good deployment flexibility and can be adapted to scenarios with limited computing resources (such as mobile terminals and clinical embedded devices), which significantly improves the practical application value and promotion potential of the technology, and has good engineering practicality.
[0014] (2) This invention constructs a lightweight U-shaped architecture network for medical image segmentation, and innovatively designs an edge enhancement module located in the bottleneck layer and a multi-feature fusion module located in the skip connection to accurately solve the core defect of the existing technology that ignores boundary information. The edge enhancement module can enhance the network's ability to acquire edge detail information, and the multi-feature fusion module can achieve deep fusion of low-level and high-level features. The synergistic effect of the two significantly improves the utilization rate of boundary information and multi-level feature information, thereby effectively improving the accuracy of medical image segmentation.
[0015] (3) In the training process, the present invention calculates the error between the output predicted by the model and the label of the corresponding scale, reduces the error by gradient descent, backpropagates the error, optimizes the network model parameters, and improves the model prediction accuracy. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of the structure of the medical image segmentation model in this invention.
[0017] Figure 2 This is a schematic diagram of the edge enhancement module according to an embodiment of the present invention.
[0018] Figure 3 This is a schematic diagram of the feature fusion module in an embodiment of the present invention.
[0019] Figure 4 This is a comparison chart of the prediction results of the method of the present invention and existing methods on the ISIC2018 dataset.
[0020] Figure 5 This is a comparison chart of the prediction results of the BUSI dataset using the method of this invention and existing methods. Detailed Implementation
[0021] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0022] It should be understood that the embodiments described in this invention are exemplary, and the specific parameters used in the embodiment description are only for the purpose of describing this invention and are not intended to limit this invention.
[0023] Example 1 This invention presents a lightweight medical image segmentation method based on edge enhancement and multi-feature fusion, the specific steps of which are as follows: Step 1: Read medical images from the dataset, divide them into training and testing sets, preprocess them, and then input them into the segmentation network for training and testing.
[0024] Preprocessing includes operations such as rotation, flipping, and numerical normalization, which are used to perform a series of enhancement operations on the loaded image to improve the learning effect of the network.
[0025] Step 2: As Figure 1 As shown, a medical image segmentation model is constructed, including: An encoder is used to characterize pathological images and obtain feature maps of those images. The bottleneck layer is used to integrate encoder features and pass key semantic information to the decoder. Skip connections are used to pass feature maps carrying rich spatial details from the encoder to the decoder to assist the decoding process and effectively make up for the details lost during downsampling. The decoder is used to decode the feature maps of the bottleneck layer and skip connections to reconstruct the lesion region prediction mask.
[0026] Specifically, the encoder adopts a three-stage hierarchical architecture, with each stage integrating dual 3×3 standard convolutional blocks and max pooling operation MP to perform hierarchical feature extraction on the input medical image. While compressing the feature map scale and expanding the receptive field, it generates multi-scale features containing low-level detailed features, denoted as low-level features, which provide core feature input for subsequent segmentation tasks.
[0027] The decoder adopts a three-stage hierarchical architecture symmetrical to the encoder. Each stage integrates dual 3×3 standard convolutional blocks and bilinear interpolation upsampling operation (BI). It receives multi-scale feature sets from the encoder and enhanced edge features from the edge enhancement module. Through hierarchical feature recovery and semantic information deepening, it improves the spatial resolution of the feature map while fusing the integrated features output by the multi-feature fusion module in the skip connection. This accurately restores the spatial structure and boundary information of the lesion region and generates accurate prediction results that meet the needs of medical image segmentation.
[0028] Skip connections are used to build a feature transfer bridge between the encoder and decoder using a multi-feature fusion module. On the one hand, skip connections enable cross-level transmission of low-level detailed features between the encoder and the corresponding decoding layer of the decoder. On the other hand, the multi-feature fusion module integrates low-level features, high-level features, and prediction masks generated by 1*1 convolutions at the corresponding levels in multiple dimensions. Through feature alignment, multi-scale context capture, and redundancy suppression, the complementarity and effectiveness of feature representation are enhanced, providing optimized integrated feature support for feature recovery and accurate segmentation of the decoder, and improving the model's segmentation performance for lesion boundaries and multi-scale lesion regions.
[0029] The bottleneck layer employs an edge enhancement module to strengthen the edge feature extraction and effective filtering process. Its core utilizes a convolutional parallel structure (including central, angular, horizontal, and vertical differential convolutions, as well as ordinary convolutions) to accurately extract lesion boundary information. This is then combined with a visual MLP to filter and enhance boundary features from a global perspective. This avoids noise and redundancy introduced by local operators and achieves deep fusion of local boundary information with the global context. Simultaneously, without increasing the number of model parameters or computational load, the enhanced edge features are passed to the decoder, compensating for the lack of detail loss in the encoder's hierarchical feature extraction. This provides core edge feature support for the decoder to accurately locate lesion boundaries and solve the problems of spurs or oversegmentation in the segmentation results, significantly improving the model's ability to perceive and locate lesion boundaries.
[0030] Step 3: Construct the total loss function for the medical image segmentation model; Step 4: Supervised training of the medical image segmentation model using the training set, and performance testing of the trained medical image segmentation model using the test set.
[0031] Example 2 This invention presents a lightweight medical image segmentation method based on edge enhancement and multi-feature fusion, the specific steps of which are as follows: Step 1: Read medical images from the dataset, preprocess them, and then input them into the segmentation network for training and testing.
[0032] This embodiment uses the ISIC2018 and BUSI datasets. The ISIC2018 dataset consists of 2594 images and their corresponding labels, with 2076 training images and 518 validation images randomly selected in an 8:2 ratio. The BUSI dataset includes 200 images, with 160 randomly selected for training and 40 for validation, also in an 8:2 ratio. The network should accurately distinguish the same target under various conditions, including different shooting angles, varying lighting conditions, partial occlusion, positional movement, and shooting distances. Image enhancement mimics this process. Therefore, in the data preprocessing stage, the training set images are sequentially subjected to random 90-degree rotation and random flipping for data enhancement. Then, all images are resampled to 256×256 resolution and numerically normalized. The validation set images are directly resampled to 256×256 resolution and numerically normalized, serving as the network input.
[0033] Step 2: Construct a medical image segmentation model.
[0034] The medical lesion image is first input into an encoder that combines hierarchical feature extraction. It then undergoes three layers of double convolution max pooling operations (double 3×3 standard convolutional blocks + MP) to obtain feature maps containing low-level details in the first to third layers. Specifically, the input of the first layer is the lesion image, which is processed by double convolution (double 3×3 standard convolutional blocks) and then outputs a feature map containing low-level details through max pooling. The input of each subsequent layer is the output feature map of the previous double convolution max pooling operation. Each layer extracts features through double convolution and compresses the scale through max pooling, finally outputting a feature map containing low-level details of the corresponding layer.
[0035] The bottleneck layer, combined with the edge enhancement module, receives the encoder's output as input. This bottleneck layer contains a two-layer processing structure: the first-layer edge enhancement module receives the encoder's output feature map as input through a convolutional parallel structure, extracts the initial lesion boundary features, and then combines a depthwise separable convolutional branch and two visual MLP branches to perform global filtering and enhancement on the initial boundary features. After channel mixing, the enhanced edge features are output; and after max pooling, the output of the first-layer processing structure is obtained. The edge enhancement module of the second layer receives the output of the first layer processing structure as input, and performs deep fusion of local edge information and global context to improve feature representation capability. The output of the edge enhancement module of the second layer is output by bilinear interpolation (BI) to the output of the second layer processing structure, which is the feature map output by the bottleneck layer. This feature map serves as the initial input of the first decoding layer of the decoder, completing the feature connection between the encoder and the decoder.
[0036] The core function of skip connections is to achieve multi-level feature fusion. There are three levels of skip connections from bottom to top. Each level of multi-feature fusion module receives three types of input: first, low-level features from the corresponding encoder layer output; second, high-level features (the high-level features of the first-level module come from the output of the first layer of the bottleneck layer, while the high-level features of the other two levels come from the output of their respective higher-level modules); and third, a prediction mask. The prediction masks for each level are generated as follows: the prediction mask of the first-level module is generated by a 1×1 convolution from the output of the second layer of the bottleneck layer; the prediction masks of the second and third levels are generated by a 1×1 convolution from the outputs of the dual 3×3 standard convolutional blocks of the first and second decoding layers of the decoder, respectively. The output of each level of multi-feature fusion module serves as the input to the corresponding level of decoder, thus realizing skip connections.
[0037] The decoder has three decoding layers: the input of the first decoding layer is the bottleneck layer output and the first layer skip connection output, which are then processed by bilinear interpolation and input to the second decoding layer; at the same time, the second layer skip connection output is also used as the input of the second decoding layer, which is then processed by bilinear interpolation and input to the third decoding layer; at the same time, the third layer skip connection output is also used as the input of the third decoding layer, and the output of the third decoding layer is processed by bilinear interpolation to obtain the final output of the decoder.
[0038] In one specific embodiment of the present invention, the structure diagram of the edge enhancement module constituting the bottleneck layer is as follows: Figure 2 As shown: The edge enhancement module is implemented as follows: After the input is processed by dual 3×3 standard convolutional blocks, four types of differential convolutions (Central Differential Convolution CDC, Angle Differential Convolution ADC, Horizontal Differential Convolution HDC, and Vertical Differential Convolution VDC) and one type of ordinary convolution (VC, 3×3 convolutional kernel, padding 1) are trained through a convolutional parallel structure. Then, the above five convolutional kernels are converted into one convolutional kernel through reparameterization technology. Therefore, the edge feature extraction capability is improved without increasing the model parameters and computational cost. The output processed by the convolutional parallel structure is concatenated with its input and then input into a three-branch parallel structure. Subsequently, the three-branch parallel structure is used for feature fusion. One branch extracts local information through depthwise separable convolution DC and pointwise convolution Pointwise Convolution, while the other two branches perceive global features through visual MLP. Finally, the features are mixed in the channel direction, and the mixed global features and local information are integrated through the concatenation operation Cat to achieve a unified representation of multi-scale features. Finally, the enhanced edge features processed by the edge enhancement module are output through the channel mixing operation.
[0039] The input is then subjected to max pooling and fed into the next edge enhancement module or used as the initial input of the decoder to achieve the connection of encoding and decoding features.
[0040] In one specific embodiment of the present invention, the structural diagram of the skip connection multi-feature fusion module is as follows: Figure 3 As shown: The implementation process of the multi-feature fusion module is as follows: It receives three types of inputs: low-level features X_ (output of the corresponding layer of the encoder), high-level features X_ (output of the bottleneck layer or the upper-level multi-feature fusion module), and a prediction mask. First, the size alignment of each input feature map is completed by depthwise separable convolution and bilinear interpolation. Then, the low-level and high-level features are divided into four groups along the channel direction, and each group of features is concatenated with the mask. Next, parallel 3×3 dilated convolutions with dilation rates of {1,2,5,7} are used to process the above four groups of concatenated features. After that, the outputs of the four groups of dilated convolutions are concatenated, and feature interaction is achieved through 1×1 convolution to generate preliminary fused features. Simultaneously, this module further processes the data through a built-in parallel substructure network. This substructure network includes 3×3 convolutional branches to capture local details and dual 1×1 convolutional branches to encode global spatial information through one-dimensional global average pooling (XAvgPool, YAvgPool) in the horizontal and vertical directions. The first-level multi-feature fusion module receives the feature map output from the first processing structure of the bottleneck layer as input and the prediction mask generated by 1×1 convolution of the features output from the second processing structure as input, and outputs the final feature map as an initial input to the corresponding layer of the decoder. The second-level multi-feature fusion module receives the output of the previous multi-feature fusion module, the second-layer feature map output from the encoder, and the prediction mask. The output of the second-level multi-feature fusion module is used as an initial input to the second decoding layer of the decoder. The third-level multi-feature fusion module receives the output of the previous multi-feature fusion module, the first-layer feature map output from the encoder, and the prediction mask. The output of the third-level multi-feature fusion module is used as an initial input to the third decoding layer of the decoder, thus realizing the connection between encoding and decoding features.
[0041] Step 3: Construct the loss function for the medical image segmentation model; The model's total loss function consists of four parts, each with a loss. l i All are constructed using a weighted combination of BCE loss and Dice loss. Therefore, the total loss function of the segmentation model... loss As shown in the following formula.
[0042] in, , i Representing the actual value and the predicted value respectively; BCE and Let these represent the binary cross-entropy loss and the Dice loss, respectively. λ i These are the weights for different stages. In this article, we assume that the weights from i=0 to i=3 are... λ i The values are set to 1, 0.5, 0.3, and 0.2 respectively; i=0 represents the final output of the decoder, which performs max pooling operations on the real labels at four different scales to obtain the pooled label GT. At this time, the pooled label represents the real value, which has the same dimension as the predicted value; i=0, 1, 2, and 3 represent the final output of the decoder, the output of the third decoding layer of the decoder, the output of the second decoding layer of the decoder, and the output of the first decoding layer of the decoder, respectively.
[0043] Step 4: Train the medical image segmentation model using the training set, and verify the effectiveness of the segmentation model using the test set; The medical image segmentation model was trained using the training set partitioned in step 1. The model was implemented using the PyTorch deep learning framework, and the neural network parameters were optimized using the Adam optimizer with an initial learning rate of 10. -4 The default learning rate scheduling strategy is cosine annealing, which will gradually increase the learning rate from the initial 10% over a total of 400 training epochs. -4 Smoothly decays to a minimum value of 10. -5 The training run consisted of 400 epochs. The trained medical image segmentation model was directly used to predict the test set segmented in step 1. To make the effectiveness and advantages of this invention clearer, UNet, UCtransnet, ACCUNet, and VmUNet were compared with this invention. The effectiveness of the four methods on the ISIC2018 and BUSI datasets was evaluated, as shown in Tables 1 and 2, respectively. To more intuitively demonstrate the superior performance of this invention, the model performance was evaluated using the following metrics: model parameter count (Parmas), model computational cost, Intersection over Union (IoU) between predicted and true values, Dice index, and Precision. One dataset from each test set was selected for visualization of the segmentation results, as shown below. Figure 4 and Figure 5 As shown.
[0044] Table 1 Results of the ISIC2018 dataset
[0045] Table 2 Results of the BUSI dataset
[0046] As can be seen from Tables 1 and 2 and the segmentation visualization results, the method of this invention, compared with existing methods, innovatively embeds an edge enhancement module and a multi-feature fusion module into the network architecture. The edge enhancement module extracts low-level boundary information through differential convolution and uses visual MLP to globally filter effective boundary features, which accurately improves the localization accuracy of lesion boundaries and avoids spurs or oversegmentation in the segmentation results. At the same time, the multi-feature fusion module integrates high and low-level features of different scales and preliminary prediction masks, which effectively enhances the model's adaptability to lesion regions with large scale differences, and achieves simultaneous and accurate capture of subtle lesions and larger lesions. Therefore, this invention exhibits higher segmentation accuracy and stronger robustness.
[0047] Any aspects not covered in this invention are applicable to existing technologies.
Claims
1. A medical image segmentation method based on edge enhancement and multi-feature fusion, characterized in that, The method includes the following: Acquire medical images and their corresponding labels, and preprocess the images; A medical image segmentation model is constructed, including a three-stage hierarchical encoder, a bottleneck layer, a three-stage hierarchical decoder symmetrical to the encoder, and a three-level multi-feature fusion module that realizes skip connections between the encoder and the decoder. The bottleneck layer consists of two layers, each containing an edge extraction module. The first edge extraction module is followed by a max pooling layer, and the second edge extraction module is followed by a bilinear interpolation layer. The output of the first layer is connected to the three-level multi-feature fusion module from bottom to top. The output of the second layer is convolved by 1×1 to generate the first-level prediction mask. The outputs of the double convolution operations of the first and second layers of the decoder are processed by 1×1 convolution to generate the second-level prediction mask and the third-level prediction mask, respectively. Each multi-feature fusion module receives three types of inputs: first, low-level features output from the corresponding encoder layer; second, high-level features, where the high-level features of the first-level multi-feature fusion module come from the output of the first layer of the bottleneck layer, and the high-level features of the other two-level multi-feature fusion modules come from the output of their superior multi-feature fusion modules; and third, a prediction mask. The labels are subjected to max pooling operations of different scales to obtain real labels of the same dimension as the three-level output of the decoder and the final output of the decoder; During training, the total loss function of the medical image segmentation model is a weighted combination of the three levels of decoder output and the loss between the final output of the decoder and the corresponding real labels. After training, a trained medical image segmentation model is obtained and used for medical image segmentation.
2. The method according to claim 1, characterized in that, The preprocessing includes rotation, flipping, and numerical normalization operations, which are used to perform a series of enhancement operations on the loaded image.
3. The method according to claim 1, characterized in that, The encoder comprises three coding layers, each consisting of two consecutive 3×3 convolutional blocks and a subsequent max pooling layer. The input to the first coding layer is a pathological image, and the input to the next coding layer is the output of the previous coding layer. The output of the last coding layer is processed by a bottleneck layer and then used as the input to the first layer of the decoder. The feature maps of each coding layer are passed to the corresponding decoding layer through skip connections.
4. The method according to claim 1, characterized in that, The decoder consists of three layers, each consisting of two consecutive 3×3 convolutional blocks and subsequent bilinear interpolation. The input of the first decoding layer is the output of the last layer of the bottleneck layer and the output of the corresponding skip connection. The input of the next decoding layer is the result of concatenating the output of the previous decoding layer after processing by the bilinear interpolation layer and the output of the corresponding skip connection. The output of the last decoding layer is the output of the decoder.
5. The method according to claim 1, characterized in that, Total loss function loss for: , Among them, BCE and Let these represent the binary cross-entropy loss and the Dice loss, respectively. λ i These are the weights at different stages; i = 0, 1, 2, 3, representing the final output of the decoder, the output of the third decoding layer of the decoder, the output of the second decoding layer of the decoder, and the output of the first decoding layer of the decoder, respectively. l i Juntong represents the loss function for the i-th part.
6. The method according to claim 5, characterized in that, i=0 to i=3 λ i Set them to 1, 0.5, 0.3, and 0.2 respectively.
7. The method according to claim 1, characterized in that, The edge enhancement module is implemented as follows: After the input is processed by dual 3×3 standard convolutional blocks, four differential convolutions and one ordinary convolution are trained through a convolutional parallel structure. Then, after reparameterization, the five convolutional kernels are equivalent to one convolutional kernel. The output processed by the convolutional parallel structure is concatenated with its input and then input into a three-branch parallel structure. Subsequently, feature fusion is performed using the three-branch parallel structure. One branch extracts local information through depthwise separable convolution (DC) and pointwise convolution (Pointwise Conv), while the other two branches perceive global features through visual MLP. Finally, the features are mixed in the channel direction, and the mixed global features and local information are integrated through the concatenation operation (Cat) to achieve a unified representation of multi-scale features. Finally, the enhanced edge features processed by the edge enhancement module are output through the channel mixing operation. The four differential convolutions include central differential convolution (CDC), angular differential convolution (ADC), horizontal differential convolution (HDC), and vertical differential convolution (VDC).
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program can implement the method described in any one of claims 1-7.