A polyp segmentation method based on a morphology-guided boundary enhanced network

By constructing the MGBE-Net model and combining multi-scale feature extraction and morphological boundary enhancement, the problems of missed detection of small polyps and blurred boundaries in polyp segmentation are solved, achieving high-precision polyp segmentation and adapting to the segmentation needs of polyps of different shapes and sizes.

CN121305070BActive Publication Date: 2026-05-19HARBIN NORMAL UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HARBIN NORMAL UNIVERSITY
Filing Date
2025-10-15
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing polyp segmentation methods are insufficient in capturing the complete outline and regional features, fine boundary structure, morphological features and complex relationships of small polyps, resulting in inaccurate and incomplete segmentation, which is difficult to meet clinical needs.

Method used

We employ the morphology-guided boundary enhancement network MGBE-Net, which combines multi-scale feature extraction, morphological boundary extraction, and boundary feature enhancement through a PVT-v2 encoder, MFEB, MBEM, and BFEM modules. We use a combination loss function of weighted intersection and union loss and weighted binary cross-entropy loss for deep supervised training to generate refined polyp segmentation results.

Benefits of technology

It effectively reduces the missed detection of small polyps and the incomplete segmentation of large polyps, improves segmentation accuracy and boundary fineness, adapts to the segmentation needs of polyps of different shapes, meets the high-precision requirements of clinical morphological assessment, and has good robustness and generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121305070B_ABST
    Figure CN121305070B_ABST
Patent Text Reader

Abstract

The application discloses a polyp segmentation method based on a morphological boundary enhancement network, comprising the following steps: step one, model construction; step two, initial feature extraction; step three, multi-scale feature enhancement; step four, morphological boundary extraction; step five, boundary feature enhancement; and step six, segmentation result generation; the MGBE-Net model proposed in the application takes PVT-v2 as an encoder, is matched with the multi-branch dilated convolution of MFEB and CBAM attention, fully extracts multi-scale features, adapts to polyps of different sizes and morphologies, and reduces the missed detection of small polyps and the incomplete segmentation of large polyps; the MBEM generates polyp internal and boundary masks through morphological erosion and expansion, introduces morphological priori, and improves the consistency between the segmentation result and the real morphology of the polyp; the BFEM screens background, boundary and internal features, balances local details and global semantics in combination with a GLA module, strengthens boundary fineness, and solves the problem of fuzzy boundaries.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical image processing technology, specifically to a polyp segmentation method based on a morphology-guided boundary enhancement network. Background Technology

[0002] As a precancerous lesion of colorectal cancer, accurate segmentation of colorectal polyps is crucial for the early diagnosis, treatment planning, and prognostic assessment of colorectal cancer. However, the highly diverse morphology of polyps in medical images, their low contrast with surrounding mucosal tissue, and their blurred boundaries pose a significant challenge to automatic segmentation.

[0003] In existing polyp segmentation methods, traditional image processing methods rely on manually designed features, which have poor adaptability to complex clinical scenarios and limited generalization ability, making it difficult to meet clinical needs. While deep learning-based methods, represented by convolutional neural networks (CNNs), are superior to traditional image processing methods, they still have the following drawbacks: 1. Limitations in feature extraction: When CNNs extract global contextual information, the receptive field depends on the stacking depth of convolutional layers, which easily leads to the loss of long-distance semantic associations. For polyps with irregular shapes such as lobed, stalked, or small sizes, it is difficult to accurately capture their complete contours and regional features, resulting in missed detection of small polyps and incomplete segmentation of large polyps; 2. Insufficient boundary enhancement ability: The fine structure of polyp boundaries, such as delicate stalks and blurred edges, are difficult to detect. Clinical assessment is crucial, but existing methods lack explicit modeling of boundary features, relying heavily on implicit feature propagation. This leads to blurred segmentation boundaries and significant deviations from the true boundaries, affecting the accuracy of morphological assessment. 3. One-sided attention mechanisms: Some methods introduce attention mechanisms to enhance features, but they often focus on a single dimension of attention. When dealing with complex relationships between polyps and background, or between polyps and adjacent tissues, they cannot accurately distinguish between the target and interference areas, reducing the specificity of segmentation. 4. Lack of morphological guidance: The morphological features of polyps are an important basis for clinical interpretation, but existing methods lack explicit guidance and utilization of morphological information, making it difficult to adaptively adjust segmentation strategies for polyps of different shapes, further limiting the improvement of segmentation performance. Summary of the Invention

[0004] The purpose of this invention is to provide a polyp segmentation method based on morphology-guided boundary enhancement networks to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, this invention provides the following technical solution: a polyp segmentation method based on a morphology-guided boundary enhancement network, comprising the following steps: Step 1, model construction; Step 2, initial feature extraction; Step 3, multi-scale feature enhancement; Step 4, morphological boundary extraction; Step 5, boundary feature enhancement; Step 6, segmentation result generation.

[0006] In step one above, the MGBE-Net model is constructed. The MGBE-Net model consists of PVT-v2, MFEB, MBEM and BFEM.

[0007] In step two above, a pre-trained PVT-v2 is used as the encoder to extract features from the input polyp image at four different scales, resulting in initial feature maps at four different scales. ;

[0008] In step three above, the initial feature maps at each scale obtained in step two are... The MFEB function is input separately, and information from different receptive fields is fused through multi-branch dilated convolution. An attention mechanism is then used to enhance the features of the polyp region, and an enhanced feature map is output. ;

[0009] In step four above, MBEM is used to enhance all the feature maps output in step three. The images are then fused together, and an initial segmentation map is generated through convolution. Morphological erosion and dilation operations are then performed on the initial segmentation map sequentially to obtain the internal masks. With boundary mask ;

[0010] In step five above, BFEM will use the enhanced feature map output from step three. Compare with the internal mask obtained in step four. Boundary mask and background-related masks Element-wise multiplication yields the boundary features. Internal characteristics Background features After cascading and convolutionally fusing the three types of features, the input is given to the GLA module to optimize the context representation, and the output is a boundary-enhanced feature map. ;

[0011] In step six above, the boundary enhancement feature map output from step five is used. A segmentation map is generated, and a cascaded summation strategy is used to aggregate multi-stage features. The aggregated features are then upsampled to the resolution of the input polyp image to obtain the final polyp segmentation result.

[0012] Preferably, in step one, the MGBE-Net model uses a combination of weighted intersection and union loss and weighted binary cross-entropy loss as the total loss function to perform deep supervised training of the network, as shown in the following formula:

[0013]

[0014]

[0015] in For weighted intersection and union loss, For weighted binary cross-entropy loss, For the total loss function, Indicates from the Each decoder outputs an upsampled prediction to match the original image resolution. This represents the corresponding real mask.

[0016] Preferably, in step two, the initial feature map It is expressed by the following formula:

[0017]

[0018] in , and These represent the number of image channels, height, and width, respectively, and the index. And the channel size is .

[0019] Preferably, in step three, the multi-branch dilated convolution specifically consists of three parallel 3×3 dilated convolutions, with dilation rates of 3, 5, and 7, respectively. Each dilated convolution branch is followed by a batch normalization layer and a ReLU activation function, as expressed by the following formula:

[0020]

[0021] in This indicates a kernel size of 3×3 and an expansion rate of 100%. dilated convolution, This indicates the BatchNorm operation. This represents the activation function.

[0022] Preferably, in step three, the attention mechanism is CBAM, specifically: first, the importance of the channel dimension of the feature map is weighted by the CA module, and then the importance of the spatial region of the feature map is weighted by the SA module, sequentially strengthening the polyp-related channels and spatial features. This process can be expressed by the following formula:

[0023]

[0024] in Indicates spatial attention, This indicates channel attention.

[0025] Preferably, in step four, the fusion method is as follows: the enhanced feature maps at each scale are upsampled to the same spatial resolution, and then stitched together along the channel dimension; the convolution operation is a 1×1 convolution, used to compress the stitched multi-channel features into a single channel to generate an initial segmentation map. This process can be represented by the following formula:

[0026]

[0027] in This represents a convolution operation with a kernel size of 1.

[0028] Preferably, in step four, the morphological erosion and dilation operations can be represented by the following formula:

[0029]

[0030] in This indicates an internal mask, while Represents boundary mask, erosion operator and expansion operator Apply the same number of iterations .

[0031] Preferably, in step five, the background-related mask From internal mask Generated through the reverse attention mechanism, it can be represented by the following formula:

[0032]

[0033] in, This represents the inverse operation of subtracting the input from the reference matrix E;

[0034] Obtain boundary features Internal characteristics Background features The process can be represented by the following formula:

[0035]

[0036] The fusion of concatenation and convolution can be expressed by the following formula:

[0037]

[0038] in This represents a convolution operation with a kernel size of 1. This indicates a cascade operation.

[0039] Preferably, in step five, the operation of BFEM can be represented by the following formula:

[0040]

[0041] in This represents the Sigmoid activation function. This indicates the GLA module.

[0042] Preferably, in step five, the operation process of the GLA module is as follows:

[0043] a) Local attention branch: The fused feature map is divided into four non-overlapping local blocks along the height and width dimensions; each local block is sequentially passed through the CA module and the SA module to obtain the attention-weighted local block. This process can be represented by the following formula:

[0044]

[0045] Each block This corresponds to one-quarter of the spatial dimension of the input feature map; then, the four weighted local blocks are concatenated along the feature map depth to reconstruct a local perceptual feature map. This process can be represented by the following formula:

[0046]

[0047] b) Global Attention Branch: The fused feature map is directly input into the CA and SA modules to obtain the globally perceived feature map. This process can be represented by the following formula:

[0048]

[0049] c) Attention fusion: integrating local perceptual feature maps Globally perceptive feature map Compared with the original input feature map Add them together to obtain the boundary enhancement feature map. This process can be represented by the following formula:

[0050] .

[0051] Compared with existing technologies, the beneficial effects of this invention are as follows: The MGBE-Net model proposed in this invention uses PVT-v2 as the encoder, combined with MFEB's multi-branch dilated convolution and CBAM attention, to fully extract multi-scale features, adapt to polyps of different sizes and shapes, and reduce the missed detection of small polyps and the incomplete segmentation of large polyps; MBEM generates polyp interior and boundary masks through morphological erosion and dilation, introduces morphological priors, and improves the consistency between the segmentation results and the real morphology of polyps; BFEM filters background, boundary, and interior features, and combines the GLA module to balance local details and global semantics, enhances boundary fineness, and solves the problem of blurred boundaries. Attached Figure Description

[0052] Figure 1 This is a flowchart of the method of the present invention;

[0053] Figure 2 Here is a diagram of the MGBE-Net model architecture;

[0054] Figure 3 Generate masks of different sizes for different morphological operators;

[0055] Figure 4 This is a diagram of the BFEM architecture.

[0056] Figure 5 Visualization of feature maps corresponding to boundaries, interiors, and background regions;

[0057] Figure 6 Qualitative results of different polyp segmentation methods are shown in the figure.

[0058] Figure 7 For Grad-CAM thermal visualization of ablation experiments;

[0059] Figure 8 The image shows the ablation experiment results on MBEM. Detailed Implementation

[0060] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0061] Please see the appendix Figure 1 - Appendix Figure 5 This invention provides an embodiment of a polyp segmentation method based on a morphology-guided boundary enhancement network, comprising the following steps: Step 1, model construction; Step 2, initial feature extraction; Step 3, multi-scale feature enhancement; Step 4, morphological boundary extraction; Step 5, boundary feature enhancement; Step 6, segmentation result generation.

[0062] In step one above, the MGBE-Net model is constructed. The MGBE-Net model consists of PVT-v2, MFEB, MBEM, and BFEM. The MGBE-Net model uses a combination of weighted intersection and union loss and weighted binary cross-entropy loss as the total loss function to perform deep supervised training on the network, as shown in the following formula:

[0063]

[0064]

[0065] in For weighted intersection and union loss, For weighted binary cross-entropy loss, For the total loss function, Indicates from the Each decoder outputs an upsampled prediction to match the original image resolution. This represents the corresponding real mask;

[0066] In step two above, a pre-trained PVT-v2 is used as the encoder to extract features from the input polyp image at four different scales, resulting in initial feature maps at four different scales. Among them, the initial feature map It is expressed by the following formula:

[0067]

[0068] in , and These represent the number of image channels, height, and width, respectively, and the index. And the channel size is ;

[0069] In step three above, the initial feature maps at each scale obtained in step two are... The MFEB function is input separately, and information from different receptive fields is fused through multi-branch dilated convolution. An attention mechanism is then used to enhance the features of the polyp region, and an enhanced feature map is output. Specifically, the multi-branch dilated convolution consists of three parallel 3×3 dilated convolutions, with dilation rates of 3, 5, and 7, respectively. Each dilated convolution branch is followed by a batch normalization layer and a ReLU activation function, as represented by the following formula:

[0070]

[0071] in This indicates a kernel size of 3×3 and an expansion rate of 100%. dilated convolution, This indicates the BatchNorm operation. Indicates the activation function;

[0072] The attention mechanism is CBAM (Convolutional Block Attention Module). Specifically, it works as follows: first, the CA module weights the importance of the channel dimension of the feature map; then, the SA module weights the importance of the spatial region of the feature map, sequentially strengthening the polyp-related channels and spatial features. This process can be represented by the following formula:

[0073]

[0074] in Indicates spatial attention, Indicates channel attention;

[0075] In step four above, MBEM is used to enhance all the feature maps output in step three. The images are then fused together, and an initial segmentation map is generated through convolution. Morphological erosion and dilation operations are then performed on the initial segmentation map sequentially to obtain the internal masks. With boundary mask The fusion method involves upsampling the enhanced feature maps at each scale to the same spatial resolution, and then concatenating them along the channel dimension. A 1×1 convolution operation is used to compress the concatenated multi-channel features into a single channel, generating an initial segmentation map. This process can be represented by the following formula:

[0076]

[0077] in This represents a convolution operation with a kernel size of 1;

[0078] Morphological erosion and dilatation operations can be represented by the following formula:

[0079]

[0080] in This indicates an internal mask, while Represents boundary mask, erosion operator and expansion operator Apply the same number of iterations ;

[0081] In step five above, BFEM will use the enhanced feature map output from step three. Compare with the internal mask obtained in step four. Boundary mask and background-related masks Element-wise multiplication yields the boundary features. Internal characteristics Background features After cascading and convolutionally fusing the three types of features, the input is given to the GLA module to optimize the context representation, and the output is a boundary-enhanced feature map. Among them, background-related masks From internal mask Generated through the reverse attention mechanism, it can be represented by the following formula:

[0082]

[0083] in, This represents the inverse operation of subtracting the input from the reference matrix E;

[0084] Obtain boundary features Internal characteristics Background features The process can be represented by the following formula:

[0085]

[0086] The fusion of concatenation and convolution can be expressed by the following formula:

[0087]

[0088] in This represents a convolution operation with a kernel size of 1. Indicates a cascade operation;

[0089] The operation of BFEM can be represented by the following formula:

[0090]

[0091] in This represents the Sigmoid activation function. Indicates the GLA module;

[0092] The specific operation process of the GLA module is as follows:

[0093] a) Local attention branch: The fused feature map is divided into four non-overlapping local blocks along the height and width dimensions; each local block is sequentially passed through the CA module and the SA module to obtain the attention-weighted local block. This process can be represented by the following formula:

[0094]

[0095] Each block This corresponds to one-quarter of the spatial dimension of the input feature map; then, the four weighted local blocks are concatenated along the feature map depth to reconstruct a local perceptual feature map. This process can be represented by the following formula:

[0096]

[0097] b) Global Attention Branch: The fused feature map is directly input into the CA and SA modules to obtain the globally perceived feature map. This process can be represented by the following formula:

[0098]

[0099] c) Attention fusion: integrating local perceptual feature maps Globally perceptive feature map Compared with the original input feature map Add them together to obtain the boundary enhancement feature map. This process can be represented by the following formula:

[0100] ;

[0101] In step six above, the boundary enhancement feature map output from step five is used. A segmentation map is generated, and a cascaded summation strategy is used to aggregate multi-stage features. The aggregated features are then upsampled to the resolution of the input polyp image to obtain the final polyp segmentation result.

[0102] Experimental Example 1:

[0103] The learning ability of the proposed MGBE-Net model in the embodiments was verified through comparative experiments on the Kvasir-SEG and CVC-ClinicDB datasets. The experimental results are shown in Tables 1 and 2, where bold indicates the best results. For the indicators marked with upward arrows, the higher the value, the better the performance; for the indicators marked with downward arrows, the lower the value, the better the performance. The evaluation metrics are mDic (mean Dice coefficient) and mIoU (mean intersection-union ratio). (weighted F-measure), S α (S-measure) (maximum E-measure), MAE (Mean Absolute Error); experimental results show that the MGBE-Net model outperforms other comparative models in key performance indicators; Appendix Figure 6 The qualitative comparison with other models in various challenging scenarios shows that the MGBE-NEt model can effectively segment boundaries and identify polyps of different sizes.

[0104] Experimental Example 2:

[0105] The generalization ability of the proposed MGBE-Net model was verified through comparative experiments on the CVC-T, CVC-ColonDB, and ETIS-LaribPolypDB datasets. The experimental results are shown in Tables 3, 4, and 5, where bold indicates the best results. For the indicators marked with upward arrows, higher values ​​indicate better performance, and for the indicators marked with downward arrows, lower values ​​indicate better performance. The experimental results demonstrate the strong generalization ability of the MGBE-Net model in different clinical scenarios.

[0106] Experimental Example 3:

[0107] A quantitative comparison of the segmentation accuracy and computational efficiency of the MGBE-Net model proposed in the existing methods and embodiments is presented in Table 6. The bold text indicates the best results. For the indicators marked with an upward arrow, the higher the value, the better the performance. For the indicators marked with a downward arrow, the lower the value, the better the performance. The experimental results show that the MGBE-Net model effectively balances segmentation accuracy and computational cost, making it very suitable for deployment in real-time or resource-constrained situations.

[0108] Experiment Example 4:

[0109] To verify the effectiveness of each module in the MGBE-Net model proposed in the embodiments, the following ablation experiments were conducted: MFEB was removed to obtain a variant model w / oMFEB; MBEM was removed to obtain a variant model w / oMBEM; BFEM was removed to obtain a variant model w / oBFEM. The experimental results are shown in Table 7, where bold indicates the best results. For the indicators marked with upward arrows, higher values ​​indicate better performance, and for the indicators marked with downward arrows, lower values ​​indicate better performance. The visualization of the ablation experiments is attached. Figure 7 As shown, MFEB effectively enhances the semantic representation of multi-scale features through multi-branch dilated convolution and CBAM attention, which is key to the model's adaptation to polyps of different sizes. After removal, the false negative rate of small polyps increases significantly. The morphological mask generated by MBEM provides structural priors for segmentation and is the core of optimizing boundary fineness. After removal, the boundary segmentation accuracy and continuity decrease significantly. BFEM balances local details and global semantics through feature selection and the GLA module. After removal, background interference increases and segmentation specificity decreases. Figure 8 The effects of different morphological operators and structuring elements on the overall model results are shown, and these values ​​are the average mDic of five benchmark datasets.

[0110] Table 1 Performance metrics of Kvasir-SEG

[0111]

[0112] Table 2 Performance metrics of ClinicDB

[0113]

[0114] Table 3 Performance Indicators of CVC-T

[0115]

[0116] Table 4 Performance metrics of CVC-ColonDB

[0117]

[0118] Table 5 Performance metrics of ETIS-LaribPolypDB

[0119]

[0120] Table 6 Comparison of Segmentation Index and Computational Complexity

[0121]

[0122] Table 7 Ablation Experiment Results

[0123]

[0124]

[0125]

[0126] Based on the above, the advantage of this invention is that, when used, it comprises PVT-v2 (Pyramid VisionTransformer v2), MFEB (Multi-scale Feature Extraction Block), MBEM (Morphological Boundary Extraction Module), and BFEM (Boundary Feature Enhancement Module) to form MGBE-Net (Morphology-Guided Boundary Enhancement). The Network (morphology-guided boundary enhancement network) model, through the collaborative work of a pre-trained PVT-v2 encoder and MFEB, fully extracts and enhances multi-scale features of polyps, effectively compensating for the lack of global semantic association in existing methods. It can accurately capture complete features of polyps of different shapes and sizes, significantly reducing the missed detection of small polyps and the incomplete segmentation of large polyps, thus improving segmentation accuracy. It explicitly extracts polyp interior and boundary masks using morphological erosion and dilation operations of MBEM, introducing a morphology-guided mechanism that adapts to the segmentation needs of polyps of different shapes, avoiding over-segmentation or under-segmentation, and ensuring consistency between the segmentation results and the true polyp morphology. It utilizes BFEM combined with interior, boundary, and background masks for refined feature selection, and GLA (Global and Local Image Enhancement)... The Attention (Global-Local Attention) module balances and integrates local details with global semantics, accurately enhancing polyp boundary features and solving the problem of blurred boundaries in existing methods. This makes the segmentation boundaries clearer and more refined, meeting the high-precision requirements of clinical morphological assessment. By using a loss function combining weighted intersection-union ratio and weighted binary cross-entropy, along with a deep supervised training strategy, the method effectively alleviates the class imbalance problem and improves network optimization efficiency. This allows the method to maintain stable and excellent segmentation performance in different clinical scenarios, enhancing its robustness and generalization ability.

[0127] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

Claims

1. A polyp segmentation method based on morphology-guided boundary enhancement networks, comprising the following steps: Step 1: Model building; Step 2: Initial feature extraction; Step 3: Multi-scale feature enhancement; Step four, morphological boundary extraction; Step five, boundary feature enhancement; Step six, segmentation result generation; characterized in that: In step one above, the MGBE-Net model is constructed. The MGBE-Net model consists of PVT-v2, MFEB, MBEM and BFEM. In step two above, a pre-trained PVT-v2 is used as the encoder to extract features from the input polyp image at four different scales, resulting in initial feature maps at four different scales. ; In step three above, the initial feature maps at each scale obtained in step two are... The MFEB function is input separately, and information from different receptive fields is fused through multi-branch dilated convolution. An attention mechanism is then used to enhance the features of the polyp region, and an enhanced feature map is output. ; In step four above, MBEM is used to enhance all the feature maps output in step three. The images are then fused together, and an initial segmentation map is generated through convolution. Morphological erosion and dilation operations are then performed on the initial segmentation map sequentially to obtain the internal masks. With boundary mask ; In step five above, BFEM will use the enhanced feature map output from step three. Compare with the internal mask obtained in step four. Boundary mask and background-related masks Element-wise multiplication yields the boundary features. Internal characteristics Background features After cascading and convolutionally fusing the three types of features, the input is given to the GLA module to optimize the context representation, and the output is a boundary-enhanced feature map. ; In step six above, the boundary enhancement feature map output from step five is used. A segmentation map is generated, and a cascaded summation strategy is used to aggregate multi-stage features. The aggregated features are then upsampled to the resolution of the input polyp image to obtain the final polyp segmentation result. In step five, the background-related mask From internal mask Generated through the reverse attention mechanism, it can be represented by the following formula: , in, This represents the inverse operation of subtracting the input from the reference matrix E; Obtain boundary features Internal characteristics Background features The process can be represented by the following formula: , The fusion of concatenation and convolution can be expressed by the following formula: , in This represents a convolution operation with a kernel size of 1. Indicates a cascade operation; In step five, the operation of BFEM is represented by the following formula: , in This represents the Sigmoid activation function. This indicates the GLA module.

2. The polyp segmentation method based on morphology-guided boundary enhancement networks according to claim 1, characterized in that: In step one, the MGBE-Net model uses a combination of weighted intersection and union loss and weighted binary cross-entropy loss as the total loss function to perform deep supervised training of the network, as shown in the following formula: , , in For weighted intersection and union loss, For weighted binary cross-entropy loss, For the total loss function, Indicates from the Each decoder outputs an upsampled prediction to match the original image resolution. This represents the corresponding real mask.

3. The polyp segmentation method based on morphology-guided boundary enhancement networks according to claim 1, characterized in that: In step two, the initial feature map It is expressed by the following formula: , in , and These represent the number of image channels, height, and width, respectively, and the index. And the channel size is .

4. The polyp segmentation method based on morphology-guided boundary enhancement networks according to claim 1, characterized in that: In step three, the multi-branch dilated convolution specifically consists of three parallel 3×3 dilated convolutions, with dilation rates of 3, 5, and 7, respectively. Each dilated convolution branch is followed by a batch normalization layer and a ReLU activation function, as expressed by the following formula: , in This indicates a kernel size of 3×3 and an expansion rate of 100%. dilated convolution, This indicates the BatchNorm operation. This represents the activation function.

5. The polyp segmentation method based on morphology-guided boundary enhancement networks according to claim 1, characterized in that: In step three, the attention mechanism is CBAM, which specifically involves: first, weighting the channel dimension importance of the feature map using the CA module, and then weighting the spatial region importance of the feature map using the SA module, sequentially strengthening the polyp-related channels and spatial features. This process can be represented by the following formula: , in Indicates spatial attention, This indicates channel attention.

6. The polyp segmentation method based on morphology-guided boundary enhancement networks according to claim 1, characterized in that: In step four, the fusion method is as follows: the enhanced feature maps at each scale are upsampled to the same spatial resolution, and then stitched together along the channel dimension; the convolution operation is a 1×1 convolution, used to compress the stitched multi-channel features into a single channel to generate an initial segmentation map. This process can be represented by the following formula: , in This represents a convolution operation with a kernel size of 1.

7. The polyp segmentation method based on morphology-guided boundary enhancement network according to claim 1, characterized in that: In step four, the morphological erosion and dilation operations can be represented by the following formula: , in This indicates an internal mask, while Represents boundary mask, erosion operator and expansion operator Apply the same number of iterations .

8. The polyp segmentation method based on morphology-guided boundary enhancement network according to claim 1, characterized in that: In step five, the operation process of the GLA module is as follows: a) Local attention branch: The fused feature map is divided into four non-overlapping local blocks along the height and width dimensions; each local block is sequentially passed through the CA module and the SA module to obtain the attention-weighted local block. This process can be represented by the following formula: , Each block This corresponds to one-quarter of the spatial dimension of the input feature map; then, the four weighted local blocks are concatenated along the feature map depth to reconstruct a local perceptual feature map. This process can be represented by the following formula: , b) Global Attention Branch: The fused feature map is directly input into the CA and SA modules to obtain the globally perceived feature map. This process can be represented by the following formula: , c) Attention fusion: integrating local perceptual feature maps Globally perceptive feature map Compared with the original input feature map Add them together to obtain the boundary enhancement feature map. This process can be represented by the following formula: 。