Medical Image Segmentation Method Based on Edge Feature Capture and Multi-Scale Feature Fusion
Through the neural network of edge feature capture and multi-scale feature fusion, the problems of unclear edges and noise interference in polyp image segmentation are solved, and efficient and automated polyp segmentation is achieved, which improves segmentation accuracy and efficiency.
Patent Information
- Application Number
- CN202510542267.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2045-04-28
AI Technical Summary
The existing medical image segmentation model is difficult to achieve high-precision polyp segmentation when the polyp edge is unclear, the intestinal light leads to the invisibility of the polyp and the poor contrast between the polyp tissue and surrounding tissues. The traditional method relies on manual operation inefficient and error-prone.
A neural network based on edge feature capture and multi-scale feature fusion is adopted to enhance edge features through edge feature capture module, combine multi-scale feature fusion module and dual attention mechanism to improve the accuracy of edge positioning of polyp images, and remove noise through post-processing operations to generate the final polyp segmentation result.
It improves the accuracy of edge positioning of polyp images, reduces background noise interference, reduces manual intervention costs, and significantly improves segmentation efficiency and accuracy.
Smart Images

Figure CN120070477B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical image processing, and particularly to a medical image segmentation method based on edge feature capture and multi-scale feature fusion. Background Art
[0002] As a classic medical image segmentation model, the U-Net network structure has now been widely used in the field of medical images. Its U-shaped structure solves the deficiency of the FCN in losing non-local feature information. In recent years, researchers have continuously improved the U-Net network to enhance the medical image segmentation effect. Swin-Unet, Transformer-Unet, and UTNet all improve and enhance the model segmentation performance based on the U-Net structure. Although numerous related improvement methods have emerged, once faced with tasks that require extremely high precision, especially when the tasks involve complex spatial features and fuzzy edge details, these methods still cannot meet the needs. In fact, more accurate image segmentation results often rely on context information and edge features. Therefore, many studies have focused on exploring related methods. For example, CO-Net and T-Net obtain regional significant information by fusing cross-layer features. Among various deep learning architectures, the PraNet model has shown significant advantages in fusing high-level semantic features and extracting edge information. BDGNet provides a new perspective for boundary modeling by introducing the concept of a boundary distribution map. The MISSFormer model has achieved further achievements in capturing global dependencies and local context information. DANet strengthens the capture of extensive global context information by introducing a dual attention mechanism. The enhanced deep neural network, which fuses the shape reconstruction (SR) and spatial constraint (SC) mechanisms, effectively handles complex problems in segmentation. Another study shows that introducing star convex constraints can ensure accurate segmentation while preserving the topological structure.
[0003] Although existing studies have proposed effective polyp segmentation network models, the polyp segmentation field still faces many challenges. Such as Figure 1 shown, in the figure, they respectively represent (a) the polyp edge is unclear; (b) the polyp is not obvious due to dim light in the intestine; (c) the contrast between the polyp tissue and the surrounding tissue is poor. The challenges faced in locating the polyp boundary in medical images are multi-faceted. This article addresses these challenges through the following key contributions based on previous studies.
[0004] In medical images of gastrointestinal polyps, the polyp lesion area and the surrounding normal tissues usually have low contrast in endoscopic images. The color of the polyp, the texture of the surrounding environment, and the mucosal color are similar, resulting in very unclear boundaries. In the case of manual annotation, it is very easy to miss detections or misdiagnose, which will have a negative impact on the treatment effect of patients and even endanger the lives of patients. However, the technology of medical image segmentation has overcome this problem. The emergence of medical image segmentation technology can clearly divide the lesion area. For doctors, it helps to improve the accuracy of doctor diagnosis and can easily distinguish the lesion area from the surrounding normal physiological tissues through the segmented results. Traditional image segmentation methods mainly rely on manual operations by doctors. This method is not only inefficient but also prone to errors. When faced with a large amount of medical image data, doctors need to spend a lot of time and energy to process them one by one, resulting in an increased workload. At the same time, the results of manual segmentation may affect the accuracy of diagnosis due to subjective factors. Therefore, it is urgent to explore more efficient and automated image segmentation technologies to improve the efficiency of medical image processing, reduce human errors, and thus improve the overall quality of medical services. Summary of the Invention
[0005] The purpose of the present invention is to provide a medical image segmentation method based on edge feature capture and multi-scale feature fusion, which not only improves the accuracy of polyp image edge localization but also solves the background noise problem that appears in the feature fusion process and reduces the influence of image artifacts such as light halos and reflections.
[0006] To achieve the above object, the present invention is realized through the following technical solutions:
[0007] A medical image segmentation method based on edge feature capture and multi-scale feature fusion includes the steps of:
[0008] (1) Preprocess the endoscopic image of gastrointestinal polyps to be segmented;
[0009] (2) Read the preprocessed endoscopic image of gastrointestinal polyps to obtain the digital information of the image;
[0010] (3) Input the obtained digital image information into a neural network for edge feature capture and multi-scale feature fusion to obtain the edge features and multi-scale features of the input image and form a feature map;
[0011] (4) Based on the multi-scale features, fuse the features of different scales and levels together, and based on the features of the segmentation results, perform post-processing operations to generate the final segmentation result of gastrointestinal polyps.
[0012] Further, the steps for the neural network of edge feature capture and multi-scale feature fusion to form a feature map include:
[0013] The input image is divided into blocks and multiple stages, and downsampling is performed before the start of each stage;
[0014] The downsampled input image passes through the backbone network of the Swim Transformer to obtain a feature map with halved height and width, generating multi-scale features;
[0015] The edge feature information is strengthened through an edge feature capture module between the encoder and the decoder;
[0016] A multi-scale feature fusion module is used to fuse multiple layers and output a prediction map.
[0017] Furthermore, the steps of the multi-scale feature fusion module for fusing the image include:
[0018] Use convolution operations to unify the number of feature channels;
[0019] The image features are first enhanced and then fused through a preposed dual attention enhancement module.
[0020] Furthermore, the dual attention enhancement module includes a channel attention mechanism and a spatial attention mechanism. First enhancing and then fusing includes the steps:
[0021] Dynamically learn the importance of each channel feature through the channel attention mechanism;
[0022] Focus on the features of key spatial regions through the spatial attention mechanism to achieve feature enhancement;
[0023] Use the Cat operation for feature splicing to achieve feature fusion and dimensionality reduction.
[0024] Furthermore, the edge feature capture module includes erosion, dilation operations, element addition operations for edge features, and element multiplication operations for retaining local features.
[0025] Furthermore, the steps for the edge feature capture module to strengthen the edge feature information include:
[0026] The input encoder feature map X1 is divided into four branches;
[0027] The first branch includes Softmax binarization, Maxpooling max pooling, and Tanh activation. X1 is binarized through the Softmax function to obtain , and then erosion and dilation are achieved through Maxpooling max pooling to obtain , and the is obtained through the Tanh activation function;
[0028] The second branch includes Softmax binarization, Maxpooling maximum pooling, and Sigmoid activation. Maxpooling maximum pooling realizes erosion and dilation to obtain , and through the Sigmoid activation function, is obtained;
[0029] The third branch includes a linear layer and Sigmoid activation. The original feature map X1 and the eroded feature map are added together to obtain and input into the linear layer. The output of the linear layer passes through the Sigmoid activation function to obtain ;
[0030] The fourth branch retains X1;
[0031] The final single output is .
[0032] Furthermore, the post-processing operation includes the steps of:
[0033] Evaluating the quality of the result of image segmentation;
[0034] Selecting a post-processing method according to the quality evaluation of the segmentation result;
[0035] Using Gaussian filtering for denoising, calling a two-dimensional discrete Gaussian function to remove noise and retain edge details.
[0036] Furthermore, the training process of the neural network for edge feature capture and multi-scale feature fusion includes:
[0037] (1) Preprocessing the endoscopic image of gastrointestinal polyps to be segmented;
[0038] (2) Reading the preprocessed endoscopic image of gastrointestinal polyps to obtain the digital information of the image;
[0039] (3) Inputting the obtained digital image information into the neural network for edge feature capture and multi-scale feature fusion to obtain the edge features and multi-scale features of the input image, and forming a feature map;
[0040] (4) Based on the multi-scale features, fusing features of different scales and levels together, and based on the segmentation result features, performing post-processing operations; [[ID=5I]]
[0041] (5) Optimizing the feature extraction and segmentation module of the model based on the judgment result and the true result of the model;
[0042] Repeating steps (3) to (5) until the result is optimal;
[0043] To evaluate the segmentation effect of the network model on gastroscopy polyp images, it can be judged by evaluating the change trend of the accuracy rate when using the validation set and other evaluation indicators during testing.
[0044] The evaluation indicators used are the Intersection-Over-Union and weighted binary cross-entropy. The IoU is used as the evaluation indicator to measure the similarity between the segmentation result and the true label.
[0045] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor implements the steps of the above-mentioned medical image segmentation method based on edge feature capture and multi-scale feature fusion when executing the computer program.
[0046] A computer-readable storage medium stores a computer program. The computer program implements the steps of the above-mentioned medical image segmentation method based on edge feature capture and multi-scale feature fusion when executed by a processor.
[0047] The advantages of the present invention are as follows:
[0048] The deep learning framework established by the present invention features edge feature capture and multi-scale feature fusion. The edge feature capture module enhances the edge features, thereby improving the accuracy of polyp image edge localization. The multi-scale feature fusion module uses a feature processing method of first enhancing and then fusing, aiming to precisely fuse shallow features and deep features, which helps to establish the context information between segmentation target objects, solve the background noise problem that occurs during the feature fusion process, and the module adds dual attention to strengthen the perception of detailed information (including texture and color), thereby reducing the impact of image artifacts such as halos and reflections. Using a neural network with edge feature capture and multi-scale feature fusion can make the features of the image edge more obvious during training and extract more scale feature information.
[0049] Based on the method of deep learning, the present invention greatly reduces the labor cost. By relying on the design and construction of the model framework, the computer can learn the standard for segmenting gastroscopy images by itself during multiple training and learning processes. Thus, the computer can segment gastroscopy image objects by itself without manual intervention. Moreover, the present invention can shorten the time for segmenting images and greatly improve the efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 Problems existing in polyp images in the prior art;
[0051] Figure 2 Structural diagram of the neural network for edge feature capture and multi-scale feature fusion in Embodiment 1 of the present invention;
[0052] Figure 3 Schematic diagram of the edge capture module in Embodiment 1 of the present invention;
[0053] Figure 4 Schematic diagram of the channel attention in Embodiment 1 of the present invention;
[0054] Figure 5 Schematic diagram of the spatial attention in Embodiment 1 of the present invention;
[0055] Figure 6 Schematic diagram of the structure of the multi-scale feature fusion module in Embodiment 1 of the present invention;
[0056] Figure 7 Schematic diagram of the segmentation result in Embodiment 1 of the present invention. Detailed implementation manners
[0057] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention.
[0058] Embodiment 1
[0059] This embodiment discloses a medical image segmentation method based on edge feature capture and multi-scale feature fusion, including the steps of: preprocessing the endoscopic image of gastrointestinal polyps to be segmented; reading the preprocessed endoscopic image of gastrointestinal polyps to obtain the digital information of the image; inputting the obtained digital information of the image into a neural network for edge feature capture and multi-scale feature fusion to obtain the edge features and multi-scale features of the input image, forming a feature map; based on the multi-scale features, fusing the features of different scales and levels together, and based on the segmentation result features, performing post-processing operations to generate the final segmentation result of gastrointestinal polyps.
[0060] Specifically, it includes the following steps.
[0061] S1. The image preprocessing module performs preprocessing operations on medical image data. Different from conventional data sets, the acquisition method of medical image data is relatively special. Its acquisition depends on hospital cooperation channels, and the annotation work is completed by professional physicians. During the image acquisition process, the manifestations of different types of medical images affected by noise interference are different. For example, the lesion area in the gastrointestinal endoscope image is often blurred with the surrounding tissue boundary. To improve the segmentation accuracy, the image is optimized.
[0062] The threshold processing for brightness equalization is the core part of the image preprocessing module to eliminate noise and interference in the image and improve the quality of gastrointestinal polyp endoscopic images. Through comparative analysis of the scoring results when the thresholds are 2, 4, 8, 16, and 32 respectively, this study finally determined the scheme with 16 as the threshold for subsequent experiments. This process effectively suppresses other noise interference and enhances the features of the region to be segmented.
[0063] S2. By using a computer to read the image, the digital conversion of the image can be achieved, that is, it is converted into a three-dimensional numerical form in the RGB color space. Given the computing characteristics of the computer itself and the artificially set standards, the value ranges of the three components (red, green, blue) of the image in the RGB color space are all limited between 0 and 255.
[0064] To improve the efficiency and accuracy of subsequent data processing and calculation, during the process of reading the image, the normalization processing is synchronously performed on the RGB three-component values corresponding to each pixel point in the image. The specific normalization method is: divide the RGB component value of each pixel point by 127.5, and then subtract 1. After such processing, the numerical range of the image is successfully mapped to the interval [-1, 1], which is more convenient for subsequent analysis and calculation work.
[0065] S3. The edge feature capture module strengthens the edge feature information between the encoder and the decoder through the edge feature capture module to distinguish the target area and the background and improve the performance of the segmentation model. For gastroscope polyp endoscopic images, due to the influence of factors such as the endoscopic shooting angle, illumination, and shadow, a large amount of detailed information will be ignored when extracting image features at a single scale. Therefore, the main function of the multi-scale feature fusion module is to fuse local features and global features at different levels, significantly improving the feature quality. This scheme designs a feature extraction module mainly composed of edge feature capture and multi-scale feature fusion.
[0066] The overall details of the image feature extraction module are as follows: The backbone network based on Swin Transformer is used to extract features from the input image. First, the input image is divided into blocks, with every 4*4 adjacent pixels forming a patch. After flattening, the dimension is changed to a value acceptable by the Transformer through a linear embedding layer. Then, through four stages, downsampling is performed before each stage. The input image passes through the backbone network of Swin Transformer to obtain a feature map with halved height and width, generating multi-scale features. Between the encoder and the decoder, the edge feature capture module is used to strengthen the edge feature information to distinguish the target area and the background, so as to improve the performance of the segmentation model. The lower part of the model is an upsampling decoder. During the upsampling process, a prediction map is output for each layer. In the output of the last three layers, a multi-scale feature fusion module is added, and the outputs of the last three layers are fused in a way of first enhancing and then fusing to output a prediction map.
[0067] To obtain information from high-level features, an edge feature capture module and a multi-scale feature fusion module are used to retain multi-scale features and more image detail information, simplify the model, and retain more fine features.
[0068] Please refer to the edge feature capture module Figure 3 , in the U-Net network architecture, the input image is passed layer by layer through the encoder-decoder structure, and its feature map is directly passed from the encoder to the decoder through skip connections, so as to achieve multi-level feature fusion and restore the original image information during the reconstruction process. Since polyp medical images contain complex edge details and spatial characteristics, it is difficult to accurately segment the lesion area relying only on traditional skip connections. Therefore, this paper proposes an optimized module specifically for extracting edge features. This module is single-input and single-output, and is divided into four branches, namely erosion, dilation operation, element addition operation of edge features, and element multiplication operation of retaining local features.
[0069] First, the encoder feature map X1 is binarized through the Softmax function. The Softmax function can map each pixel value in the feature map to a probability value between 0 and 1, thereby enhancing the contrast of the features. The first branch X1 is binarized through the Softmax function to obtain .
[0070] Then, erosion and dilation are achieved through Maxpooling. MaxPooling (maximum pooling) is a commonly used pooling operation in convolutional neural networks (CNNs). It retains the most prominent features by taking the maximum value of the local area of the input feature map. This module uses the MaxPooling operation with a kernel size k of 7 to implement the erosion and dilation process. During the dilation step, for the normalized feature map Using the MaxPooling operation, the maximum value within a local region can be captured, thereby obtaining an expanded foreground region.
[0071] During the erosion step, for the inverted and normalized feature map Using the MaxPooling operation, the minimum value within a local region can be captured, thereby obtaining an expanded background region. In this paper, we use the MaxPooling operation with a stride s of 1 and a padding p of 3 to ensure that the size of the feature map remains unchanged. The first and second branches are obtained through the following formulas respectively:
[0072]
[0073]
[0074] Apply the Tanh and Sigmoid activation functions to the eroded and dilated feature maps respectively. The Tanh function can map the pixel values of the feature map to a range between -1 and 1, while the Sigmoid function maps the pixel values to a range between 0 and 1.
[0075] The first branch is obtained through the Tanh activation function , For the normalized feature map Data obtained using the MaxPooling operation;
[0076] The second branch is obtained through the Sigmoid activation function , For the inverted and normalized feature map Data obtained using the MaxPooling operation.
[0077] Multiply the activated feature maps element-wise to obtain the similarity matrix V. The similarity matrix can reflect the similarity degree between different features, thereby helping the network better distinguish the target region and the background.
[0078] The third branch adds the original feature map X1 to the eroded feature map to obtain and inputs it into the linear layer. The output of the linear layer is obtained through the Sigmoid activation function .
[0079] The fourth branch retains X1, and finally obtains the enhanced similarity matrix:
[0080] . [[ID=�5]]
[0081] Details of the multi-scale feature fusion module are as follows: The DCFF (Deep Cross-Feature Fusion) multi-scale feature fusion module is introduced in the article. The results output by the last three layers in the network model are used as the input of the multi-scale feature fusion module. The input scales of the three-level features are 56×56, 112×112, and 224×224 respectively. Convolution operations are used to unify the number of feature channels, and then the image features are enhanced and fused through the preposed dual attention enhancement module, significantly improving the feature quality. First, the channel attention mechanism is used to dynamically learn the importance of each channel feature. The channel attention structure is as Figure 4 shown.
[0082] Then, the spatial attention mechanism is used to focus on the features in the key spatial regions to achieve feature enhancement. The spatial attention structure is as Figure 5 shown.
[0083] Next, feature concatenation is performed. The Cat operation is adopted, and feature fusion and dimensionality reduction are achieved through 3×3 convolution. This module adopts a lightweight design, significantly reducing the computational complexity. 1×1 convolution is used for compression, and finally, 1×1 convolution generates the prediction result. The structure of this module is as Figure 6 shown.
[0084] S4. Before post-processing, it is necessary to evaluate the quality of the image segmentation results. According to the quality evaluation of the segmentation results, the post-processing method is selected. Gaussian filtering is used for denoising. A two-dimensional discrete Gaussian function is called to remove noise, which can retain more edge details, making the image clearer and the smoothing effect softer, to help doctors determine the size, location, and shape of the polyp, so as to know the formulation of surgical and treatment plans.
[0085] Example 2
[0086] This example also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. It is characterized in that when the processor executes the computer program, the steps of the above-mentioned medical image segmentation method based on edge feature capture and multi-scale feature fusion are realized.
[0087] During the training process of the network model, it is recommended to use GPU because the amount of calculation required for network model training is large, the calculation is relatively complex, and it also involves image processing. Using GPU can greatly accelerate the training process. However, it should be noted that when using GPU, the corresponding running framework needs to be selected, such as the GPU version of the TensorFlow framework.
[0088] For the process of processing computer instructions, the type of processor is not limited. In this embodiment, the processor can be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), or an application-specific integrated circuit (ASIC), etc. The memory can include a read-only memory (ROM) and a random access memory (RAM), and provide instructions and data to the processor. Software modules can be stored in mature storage media in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers, etc. These storage media are located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps of the above method. In the implementation process, each step of the above method can be completed by the integrated logic circuit in the processor or instructions in the form of software.
[0089] Embodiment 3
[0090] This embodiment proposes a model training process, the process of which is as follows: preprocess the medical images with labels, read the preprocessed images, extract the feature information of the images through different weights, segment different structures or tissues of the images, evaluate the accuracy of the image segmentation algorithm, calculate the result error, and update the weights according to the error, that is, optimize the feature extraction and segmentation module. Through continuous iteration, continuously optimize the accuracy of image feature extraction and segmentation until the optimal result is achieved.
[0091] The following are the relevant settings of the experiment:
[0092] (1) Experimental environment
[0093] All models are implemented in Pytorch with two NVIDIA TITAN RTX 24GB GPUs.
[0094] (2) Optimization and iteration
[0095] Use the Adam optimizer, and the initial learning rate of all models is 0.0001. Use dice loss and cross entropy as the loss function, and at the same time use dice similarity coefficient (DSC) and intersection over union (IoU) as performance metrics.
[0096] To train the model, perform deep supervision on the output feature map. Before calculating the loss, upsample the output to the same size as the ground truth label. The total loss can be expressed as:
[0097]
[0098] where G is the ground truth label, Si is the output on the i side, Sg is the global feature, L is the loss function, and i is the layer of the network.
[0099] In the dataset used, CVC-ClinicDB is a colonoscopy image dataset, including a total of 612 annotated images. Kvasir-SEG is a polyp segmentation dataset with 1000 annotated images. Subsequently, 80% of the CVC-ClinicDB and Kvasir-Seg datasets were randomly divided into a training dataset and a 20% test dataset. The image sizes of all datasets were resized to 224 × 224. For the CVC-ClinicDB and Kvasir-Seg datasets, the batch was set to 4.
[0100] Denoising the divided training set and validation set images is the core part of the image preprocessing module to eliminate noise and interference in the images and improve the quality of gastrointestinal polyp endoscopic images. By comparing and analyzing the scoring results when the thresholds are 2, 4, 8, 16, and 32 respectively, this embodiment finally determines the scheme with 16 as the threshold for subsequent experiments. This process effectively suppresses other noise interference and enhances the features of the area to be segmented.
[0101] After the model architecture is confirmed, the weights of the model are trained using a graphics processor. The hyperparameters of the model can be adjusted through the training accuracy change curve and validation accuracy change curve, as well as the training loss change curve and validation loss change curve (usually already tuned to the optimal by the experimenter). After multiple iterative trainings, the obtained weight values are most suitable for medical image segmentation.
[0102] The model testing process is as follows: load the trained weights and use the test set to perform the performance test of the model. The entire testing process is roughly the same as the training process, except that the segmentation result is directly obtained in the testing process without iteration. Finally, the effectiveness of the model is confirmed through comparison and relevant evaluation metrics.
[0103] In the experiment, to evaluate the segmentation effect of the network model on gastroscope polyp images, it can be judged by evaluating the accuracy change trend when using the validation set and other evaluation metrics during testing.
[0104] The evaluation metrics used are Intersection-Over-Union and weighted binary cross-entropy. In image segmentation, MIoU is usually used as an evaluation metric to measure the similarity between the segmentation result and the true label. The calculation formula is:
[0105]
[0106] The calculation formula for the Dice coefficient is:
[0107]
[0108] Among them, k is the number of categories, that is, the number of target categories to be distinguished in the dataset. MIoU represents the mean intersection over union, true positive (TP), false positive (FP), true negative (TN), and false negative (FN). TP refers to accurately predicting the target area that is actually an organ or lesion; FP means misjudging the area that originally belongs to the background as the target category; TN represents the successful and correct identification of the background area; FN refers to misjudging the area that should actually be classified as an organ or lesion as the background.
[0109] Finally, it should be noted that the above are only the preferred embodiments of the present invention and are not used to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A medical image segmentation method based on edge feature capture and multi-scale feature fusion, characterized in that: Including steps: (1) Preprocessing the segmented gastrointestinal polyp endoscopic images; (2) Reading the pre-processed endoscopic image of gastrointestinal polyps and obtaining digital information of the image; (3) Inputting the obtained image digitization information into the neural network for edge feature capture and multi-scale feature fusion to obtain the edge features and multi-scale features of the input image and form a feature map; (4) Based on multi-scale features, features of different scales and levels are fused together, and post-processing operations are performed based on the segmentation result features to generate the final gastrointestinal polyp segmentation results; The step of forming a feature map by a neural network of edge feature capture and multi-scale feature fusion includes: The input image is divided into blocks and multiple stages, and downsampling is performed before each stage starts; The downsampled input image is passed through the Swim Transformer backbone network to obtain a feature map with half the height and width, generating multi-scale features; The edge feature information is enhanced through the edge feature capture module between the encoder and the decoder; Use a multi-scale feature fusion module to fuse multiple layers and output a prediction map; The edge feature capture module includes erosion and dilation operations, element addition operations of edge features, and element multiplication operations that retain local features; The edge feature capture module strengthens the edge feature information including the steps of: Divide the input encoder feature map X1 into four branches; The first branch includes Sofmax binarization, Maxpooling, and Tanh activation. X1 is binarized by the Softmax function to obtain , and then use Maxpooling to achieve erosion and expansion, and get , obtained through the Tanh activation function ; The second branch includes Softmax binarization, Maxpooling, and Sigmoid activation. Maxpooling implements erosion and expansion to obtain , obtained by Sigmoid activation function ; The third branch includes a linear layer and a Sigmoid activation layer, which combines the original feature map X1 with the eroded feature map Add together to get And input to the linear layer, the output of the linear layer Obtained through Sigmoid activation function ; The fourth branch retains X1; The final single output is .
2. The medical image segmentation method based on edge feature capture and multi-scale feature fusion according to claim 1, characterized in that: The step of fusing images by the multi-scale feature fusion module includes: Use convolution operation to unify the number of feature channels; The image features are first enhanced and then fused through the front-end dual attention enhancement module.
3. The medical image segmentation method based on edge feature capture and multi-scale feature fusion according to claim 2, characterized in that: The dual attention enhancement module includes a channel attention mechanism and a spatial attention mechanism, and the enhancement and fusion steps include: Dynamically learn the importance of each channel feature through the channel attention mechanism; Focusing on the features of key spatial regions through the spatial attention mechanism to achieve feature enhancement; Cat operation is used for feature splicing to achieve feature fusion and dimensionality reduction.
4. The medical image segmentation method based on edge feature capture and multi-scale feature fusion according to claim 1, characterized in that: The post-processing operation comprises the steps of: Perform quality assessment on image segmentation results; Select post-processing methods based on the quality assessment of the segmentation results; Use Gaussian filtering to denoise, call a two-dimensional discrete Gaussian function to remove noise and retain edge details.
5. The medical image segmentation method based on edge feature capture and multi-scale feature fusion according to claim 1, characterized in that: The training process of the neural network for edge feature capture and multi-scale feature fusion includes: (1) Preprocessing the segmented gastrointestinal polyp endoscopic images; (2) Reading the pre-processed endoscopic image of gastrointestinal polyps and obtaining digital information of the image; (3) Inputting the obtained image digitization information into the neural network for edge feature capture and multi-scale feature fusion to obtain the edge features and multi-scale features of the input image and form a feature map; (4) Based on multi-scale features, features of different scales and levels are integrated together, and post-processing operations are performed based on the segmentation result features; (5) Based on the model’s judgment results and actual results, optimize the model’s feature extraction and segmentation module; Repeat steps (3) to (5) until the result is optimal; The performance of the network model in segmenting gastrointestinal polyp images can be evaluated by evaluating the accuracy trend when using the validation set and other evaluation indicators during testing. The evaluation indicators used are Intersection-Over-Union and weighted binary cross entropy, and IoU is used as the evaluation indicator to measure the similarity between the segmentation result and the true label.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the medical image segmentation method based on edge feature capture and multi-scale feature fusion as described in any one of claims 1 to 5 are implemented.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the medical image segmentation method based on edge feature capture and multi-scale feature fusion as described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Polyp segmentation method and equipment based on colonoscope image and medium
CN117197470A