A method for polyp image segmentation and a computer-readable storage medium

By combining a level set edge enhancement module, multi-scale depth-separable convolution, and a dual-branch attention module, the problem of insufficient edge supervision in polyp image segmentation is solved, achieving high-precision and robust polyp segmentation and improving the model's segmentation accuracy and edge localization precision.

CN121213596BActive Publication Date: 2026-03-06SUZHOU UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511776695.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-03-06
Estimated Expiration
2045-11-28

AI Technical Summary

Technical Problem

Existing deep learning networks suffer from difficulties in extracting discriminative target features and insufficient edge supervision in polyp image segmentation, leading to oversegmentation and undersegmentation problems.

Method used

A level set edge enhancement module is used to perform explicit geometric modeling of the edge region. Combined with multi-scale depth separable convolution and adaptive edge enhancement technology, a dual-branch attention module is used to fuse global and local information, and a cross-layer fusion module and a deep feature aggregation module are used to improve the edge localization accuracy. An active contour joint loss function is constructed for training.

Benefits of technology

It effectively alleviates feature confusion caused by high similarity between polyps and the background, improves polyp segmentation accuracy and robustness, enhances the model's generalization ability and segmentation accuracy, and improves the accuracy of edge localization and the smoothness of segmentation boundaries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121213596B_ABST
    Figure CN121213596B_ABST
Patent Text Reader

Abstract

This invention relates to the field of image processing technology and discloses a method for polyp image segmentation and a computer-readable storage medium. First, the polyp image to be segmented is input into a backbone network to extract multi-layer initial feature maps. Then, the initial feature maps are sequentially input into a level set edge enhancement module. Learnable parameters and the geometric properties of the level set function are used to explicitly model and dynamically enhance the edges to suppress feature confusion and obtain an optimized feature map. The optimized feature map is then input into a dual-branch attention module, which coordinates global and local information to adaptively calibrate channel weights. This optimized feature map is then input into a cross-layer fusion module for multi-scale feature complementarity, outputting an attention-enhanced feature map. Based on the cross-layer fusion module, deep feature aggregation, and layer-by-layer feature aggregation, layer-by-layer fusion is performed to obtain the segmentation result map. This invention effectively solves the problems of over-segmentation and under-segmentation of polyp images caused by edge blurring and feature confusion, significantly improving the accuracy of polyp segmentation tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a polyp image segmentation method and a computer-readable storage medium. Background Technology

[0002] Colorectal cancer is one of the leading causes of cancer-related deaths worldwide, with the vast majority of colorectal cancers developing from polyps. Colonoscopy is the preferred method for detecting and diagnosing polyps, and precise automatic polyp image segmentation technology is of great clinical significance in assisting physicians in locating lesions, assessing polyp size and morphology, and achieving early diagnosis and intervention. In polyp image segmentation tasks, sensor noise interference or signal attenuation caused by low-dose scanning weakens the grayscale distinction between lesions and surrounding tissues, causing feature confusion and posing a serious challenge to achieving high-precision target segmentation.

[0003] With breakthroughs in artificial intelligence technology, deep learning-based polyp segmentation methods have gradually become mainstream. In particular, segmentation methods based on convolutional neural networks, such as U-Net and its many variants, effectively extract and fuse multi-scale features through encoder-decoder structures and skip connections, significantly improving segmentation performance. In recent years, researchers have further introduced advanced modules such as attention mechanisms, Transformer architectures, and boundary-aware networks, aiming to make the model more focused on polyp regions and enhance edge feature learning. These methods have demonstrated superior performance on publicly available benchmark datasets, propelling polyp image segmentation technology from theoretical research to clinical applications.

[0004] Despite the significant performance of deep learning-based methods in polyp image segmentation, they still face two key challenges: First, sensor noise during imaging and the inherently weak inter-class differences in tissue structures lead to a high degree of overlap in the grayscale distributions of the target and background regions, resulting in feature confusion and making it difficult for the model to extract discriminative edge features from the image. Second, due to imaging constraints, the transition region between the target and background in such images is often blurred, and the traditional single loss functions commonly used in existing deep learning methods, such as cross-entropy and cross-union ratio, lack targeted supervision and constraints on edges, exacerbating oversegmentation and undersegmentation. Summary of the Invention

[0005] Therefore, the technical problem to be solved by the present invention is to overcome the problems of oversegmentation and undersegmentation caused by the difficulty in extracting discriminative target features and insufficient edge supervision constraints when segmenting polyp images using deep learning networks in the prior art.

[0006] To address the aforementioned technical problems, this invention provides a polyp image segmentation method, comprising:

[0007] The polyp image to be segmented is input into a trained polyp image segmentation network, passed through the backbone network, and outputs... After the initial feature map of the layer, The initial feature maps of each layer are input into the level set edge enhancement module, which outputs optimized feature maps corresponding to the initial feature maps of each layer. The optimized feature map is input into the decoder to obtain the polyp segmentation result map; The number of layers in the backbone network;

[0008] The acquisition of optimized feature maps corresponding to the initial feature maps of each layer includes:

[0009] Perform level set mapping on the initial feature map to obtain the mapped feature map;

[0010] Perform a 1×1 convolution on the mapped feature map to obtain the convolutional mapped feature map;

[0011] By using multiple windows of different sizes, the convolutional mapping feature maps are activated after performing depthwise separable convolution and pointwise convolution, resulting in separable convolutional feature maps corresponding to multiple scales.

[0012] The convolutional mapping feature map is concatenated with multiple separable convolutional feature maps to obtain the concatenated feature map.

[0013] After batch normalization, activation and convolution, the concatenated feature map is connected to the residual of the initial feature map to obtain the residual feature map.

[0014] After adaptive edge enhancement processing is applied to the residual feature map, it is concatenated with the residual of the initial feature map to obtain the optimized feature map.

[0015] Preferably, the first The optimized feature map is represented as follows:

[0016] ;

[0017] in, For the first Initial feature map of the layer, It is the natural logarithm. It is a natural constant. For the absolute value operation, For Hadamard product, ;

[0018] Indicates the first Layer residual feature map, the expression is: , For window as Convolution operations;

[0019] Indicates the first The feature map obtained after batch normalization, activation, and convolution of the layer-concatenated feature map is expressed as follows: , It is the ReLU activation function. For batch normalization operations;

[0020] Indicates the first Layer-by-layer concatenation of feature maps, expressed as follows: , Indicates feature concatenation operation;

[0021] Represents the convolutional mapping feature map, expressed as: ;

[0022] Indicates the first Layer window is The separable convolutional feature map is expressed as follows: , For window as Depth-separable convolution operations, For window as Pointwise convolution operation;

[0023] Indicates the first Layer window is The separable convolutional feature map is expressed as follows: , For window as Expansion rate Depth-separable convolution operations, For window as Pointwise convolution operation, The expansion rate;

[0024] Indicates the first Layer mapping feature map, the expression is: , It is the hyperbolic tangent function. and There are two learnable parameters.

[0025] Preferably, the The layer-optimized feature map is input into the decoder to obtain the polyp segmentation result map, including:

[0026] The optimized feature maps of each layer are input into the dual-branch attention module. Channel branch attention enhancement and compression-excitation branch attention enhancement are performed on each module. The outputs of the two branches are then fused to produce the final output. Layer attention-enhanced feature maps;

[0027] Will Neighboring the first layer of attention-enhanced feature map Layer and First The attention-enhanced feature maps of the first layer are input into the same cross-layer fusion module for feature fusion to obtain the first layer. The fused feature maps of the layers output a total of Layer fusion feature map;

[0028] The first Layer, First Layer and First The attention-enhanced feature map of the first layer is input into the deep feature aggregation module to calculate the first layer's feature map. Layer and First The aggregated feature map of the layer, the convolution output of the first layer Layer segmentation result diagram;

[0029] The first The segmentation result diagram of the layer and the first layer The fused feature map of the layer is input into the layer-by-layer feature aggregation module, and the output is the layer-by-layer feature aggregation module. The segmentation results of each layer are obtained, up to the segmentation result of layer 1, which is used as the segmentation result of the polyp. .

[0030] Preferably, the optimized feature map is input into a dual-branch attention module, and after channel branch attention enhancement and compression-excitation branch attention enhancement, the outputs of the two branches are fused to output an attention-enhanced feature map, including:

[0031] After optimizing the feature map, perform global max pooling and global average pooling respectively, and then perform a weighted summation to obtain the pooled feature map;

[0032] Channel attention enhancement is applied to the pooled feature map to obtain the first enhanced feature map;

[0033] After performing global average pooling on the optimized feature map, attention enhancement is performed through a compression-activation branch to obtain the second enhanced feature map;

[0034] Calculate the Hadamard product of the first and second enhanced feature maps, activate them, and then multiply them with the optimized feature map to obtain the third enhanced feature map.

[0035] The third enhanced feature map is residually connected to the optimized feature map to obtain the attention-enhanced feature map.

[0036] Preferably, the adjacent first Layer and First The attention-enhanced feature maps of the first layer are input into the same cross-layer fusion module for feature fusion to obtain the first layer. The fusion feature map of the layers includes:

[0037] For the Layer attention enhancement feature map and the first After performing RBC operations on the attention-enhanced feature maps, the Hadamard product is calculated to obtain the first edge confidence weights; the RBC operation includes a concatenated convolutional layer, a batch normalization layer, and an activation function layer.

[0038] For the Layer attention enhancement feature map and the first After performing RBC operations on the attention-enhanced feature maps of each layer, the larger value is taken to obtain the second edge confidence weight.

[0039] Convolution and activation are performed on the first edge confidence weights and the second edge confidence weights respectively to obtain the first edge confidence and the second edge confidence.

[0040] Calculate the Shannon entropy of the first edge confidence and the second edge confidence respectively, and obtain the first product feature metric and the second product feature metric;

[0041] Calculate the difference between the identity matrix and the first product feature metric, and multiply it by the Hadamard product of the first edge confidence to obtain the first optimized edge confidence feature map;

[0042] Calculate the difference between the identity matrix and the second product feature metric, and the Hadamard product of the second marginal confidence to obtain the second optimized marginal confidence feature map;

[0043] After concatenating the first optimized edge confidence feature map and the second optimized edge confidence feature map, perform an RBC operation to obtain the first optimized edge confidence feature map. Layer attention enhancement feature map and the first The first layer of attention-enhanced feature map fusion Layer fusion feature map.

[0044] Preferably, based on the first Layer, First Layer and First The attention-enhanced feature map of the layer is calculated to... Layer and First The aggregated feature map of the layer is obtained by convolution. The layer segmentation result diagram includes:

[0045] For the Layer and First The attention-enhanced feature maps of each layer are convolved separately and then concatenated to obtain the first layer. Layer and First Joint attention-enhanced feature map of layers;

[0046] Order No. Layer and First The joint attention-enhanced feature map of the layers is sequentially processed by global average pooling and two perceptron layers to obtain the perceptron feature map;

[0047] Order No. Layer and First Joint attention enhancement feature map of layer and the first After the attention-enhanced feature maps of the layers are concatenated, a Hadamard product is calculated with the perceptual feature map to obtain the product features;

[0048] Combine the product features with the first After concatenating the attention-enhanced feature maps from each layer, an RBC operation is performed to obtain the th layer. Layer and First The aggregated feature map of the layer; the RBC operation includes a concatenated convolutional layer, a batch normalization layer and an activation function layer;

[0049] The first Layer and First The aggregated feature map of the layer and the first Attention-enhanced feature maps from each layer are concatenated to obtain an aggregated feature map. This aggregated feature map is then processed sequentially through global average pooling and two perceptron layers, and finally, a Hadamard product is calculated with the aggregated feature map to obtain the first... The aggregation intermediate of the layer; the aggregation intermediate is compared with the first After the attention-enhanced feature maps of the layers are concatenated, an RBC operation is performed to obtain the th layer. Aggregated feature map of the layer;

[0050] For the Convolution is performed on the aggregated feature map of the layer to obtain the th layer. Image showing the results of layer segmentation.

[0051] Preferably, based on the first The segmentation result diagram of the layer and the first layer The fused feature map of the layer is used to perform layer-by-layer feature aggregation to obtain the first layer. The layer segmentation result diagram includes:

[0052] The first Layer attention enhancement feature map and the first The fused feature map after the attention-enhanced feature map of the first layer is compared with the fused feature map of the second layer. After the segmentation results from each layer are stitched together, they are convolved to output the first layer. The basic feature map of the layer;

[0053] Using multiple RBC operations with different expansion rates to the first The basic feature map of the layer is manipulated to obtain the first layer. Multiple fine edge feature maps of the layer; the RBC operation includes a concatenated convolutional layer, a batch normalization layer, and an activation function layer;

[0054] The first Multiple fine edge feature maps of the layer and the first After the basic feature maps of the layers are concatenated, an RBC operation is performed to obtain the first layer. Layer segmentation result diagram, .

[0055] Preferably, multiple RBC operations with different expansion rates are used to perform the first... The basic feature map of the layer is manipulated to obtain the first layer. Multiple fine edge feature maps of the layer, including:

[0056] Using the RBC operation with the first expansion rate, for the second The basic feature map of the layer is manipulated to obtain the first layer. The first fine edge feature map of the layer;

[0057] Using the RBC operation with the second expansion rate, for the first The feature map obtained by concatenating the base feature map of layer 1 with the first fine edge feature map is processed to obtain the feature map of layer 2. The second fine edge feature map of the layer;

[0058] Using the RBC operation with the third expansion rate, for the first The feature map obtained by concatenating the base feature map of layer 1 with the second fine edge feature map is processed to obtain the feature map of layer 2. The third fine edge feature map of the layer.

[0059] Preferably, obtaining the trained polyp image segmentation network includes:

[0060] Using the Gauss-Laplace operator to obtain the first After the edges of the segmentation result image of the layer are normalized, the first layer is constructed. The length term loss of the segmentation result graph of the layer;

[0061] Based on the The foreground and background regions in the segmentation result image of the layer are used to construct the first layer. Region loss in the segmentation result image of the layer;

[0062] The first The length loss term and the region loss term of the segmentation result map of the layer are added together to obtain the first layer. Active contour loss of the segmentation result map of the layer;

[0063] Based on the The segmentation result image of the layer and the polyp mask label image are used to calculate the first layer. Weighted binary cross-entropy loss and weighted intersection-union ratio loss of the segmentation result graph of the layer;

[0064] The first The active contour loss, weighted binary cross-entropy loss, and weighted intersection-union ratio loss of the segmentation map of the layer result are added together to obtain the first... The total loss of the layer result segmentation graph;

[0065] Will The total loss of the segmentation images of each layer is summed to obtain the active contour joint loss function. The polyp image segmentation network is then trained until the active contour joint loss function converges, thus obtaining the trained polyp image segmentation network.

[0066] This embodiment provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the steps of the polyp image segmentation method described above.

[0067] Compared with the prior art, the above-described technical solution of the present invention has the following advantages:

[0068] The polyp image segmentation method of this invention uses a level set edge enhancement module in the encoder to perform explicit geometric modeling of the edge region, dynamically enhances the edge response of the target region with learnable parameters, and provides accurate edge priors; it uses depthwise separable convolution with windows of different sizes, and the multi-scale design can ensure that the edges of polyps of different sizes can be effectively enhanced; based on adaptive edge enhancement, it accurately amplifies weak edges, effectively alleviates feature confusion caused by high similarity between polyps and background, and improves polyp segmentation accuracy.

[0069] This invention incorporates a dual-branch attention module in the decoder, which collaboratively utilizes global statistical information and local extremum information. Through cross-channel interaction, it achieves dynamic calibration of channel weights, enabling the fusion and utilization of global and local image information. Based on the grayscale distribution of the image region and the target scale, it adaptively highlights target-related features, improves the multi-scale representation balance of the model, further enhances the model's generalization ability, improves the model's robustness, and thus improves the segmentation accuracy of polyp segmentation images in complex backgrounds.

[0070] The cross-layer fusion module of this invention constructs a dual edge confidence based on the complementary strategies of product and maximization. This can suppress false alarms of single-layer edges, improve the accuracy of edge localization, and retain more complete edge information, effectively avoiding the loss or blurring of edge information. By using Shannon entropy to calculate the product feature metric to optimize the edge confidence, unreliable edge responses are automatically weakened, and the information-rich edge structure is enhanced, further ensuring the accuracy of polyp image segmentation.

[0071] This invention obtains the first based on the deep feature aggregation module. The segmentation results of the layer are obtained by using the layer-by-layer feature aggregation module to fuse attention-enhanced feature maps layer by layer, ensuring that the recovered details are the correct polyp structures rather than noise; and by fusing outputs of different scales, it can handle polyps of different sizes, enhancing the robustness and multi-scale segmentation capability of the model.

[0072] This invention, when training a polyp segmentation network, explicitly constrains the geometric smoothness of the segmentation boundary through a length term loss, effectively suppressing jagged edges and irregular contours, improving the model's ability to perceive blurred edges and weakly defined polyp regions, and reducing oversegmentation and undersegmentation. Through a region term loss, the grayscale differences between the foreground and background regions and the true label are calculated separately. By minimizing the variance within the region, the segmentation results are made consistent with the true structure at the region level, enhancing the model's ability to distinguish the overall polyp region from the surrounding mucosa. This invention combines length term loss, region term loss, weighted binary cross-entropy loss, and weighted intersection-union ratio loss to construct an active contour joint loss function, achieving multi-level supervision from pixel level, region level to edge level. This effectively solves the problem of oversegmentation and undersegmentation of polyp images caused by blurred edges and feature confusion, significantly improving the model's robustness and generalization ability in complex polyp structures and blurred boundary scenarios, and improving the smoothness and geometric accuracy of the segmentation boundary, thereby improving the segmentation accuracy of the polyp image segmentation model. Attached Figure Description

[0073] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings, wherein:

[0074] Figure 1 This is a flowchart of the steps of the polyp image segmentation method of the present invention;

[0075] Figure 2 This is a schematic diagram of the polyp image segmentation network;

[0076] Figure 3 This is a schematic diagram of the horizontal set edge enhancement module;

[0077] Figure 4 This is a schematic diagram of the dual-branch attention module;

[0078] Figure 5 This is a structural diagram of the cross-layer fusion module;

[0079] Figure 6 This is a comparison diagram of the segmentation results of the method of this invention and four comparative methods. Detailed Implementation

[0080] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.

[0081] Reference Figure 1 The flowchart shown illustrates the steps of the polyp image segmentation method of the present invention, which specifically include:

[0082] The polyp image to be segmented is input into a trained polyp image segmentation network, passed through the backbone network, and outputs... After the initial feature map of the layer, The initial feature maps of each layer are input into the level set edge enhancement module, which outputs optimized feature maps corresponding to the initial feature maps of each layer. The optimized feature map is input into the decoder to obtain the polyp segmentation result map; The number of layers in the backbone network;

[0083] The acquisition of optimized feature maps corresponding to the initial feature maps of each layer includes:

[0084] Perform level set mapping on the initial feature map to obtain the mapped feature map;

[0085] Perform a 1×1 convolution on the mapped feature map to obtain the convolutional mapped feature map;

[0086] By using multiple windows of different sizes, the convolutional mapping feature maps are activated after performing depthwise separable convolution and pointwise convolution, resulting in separable convolutional feature maps corresponding to multiple scales.

[0087] The convolutional mapping feature map is concatenated with multiple separable convolutional feature maps to obtain the concatenated feature map.

[0088] After batch normalization, activation and convolution, the concatenated feature map is connected to the residual of the initial feature map to obtain the residual feature map.

[0089] After adaptive edge enhancement processing is applied to the residual feature map, it is concatenated with the residual of the initial feature map to obtain the optimized feature map.

[0090] The polyp image segmentation method of this invention uses a level set edge enhancement module in the encoder to perform explicit geometric modeling of the edge region, dynamically enhances the edge response of the target region with learnable parameters, and provides accurate edge priors; it uses depthwise separable convolution with windows of different sizes, and the multi-scale design can ensure that the edges of polyps of different sizes can be effectively enhanced; based on adaptive edge enhancement, it accurately amplifies weak edges, effectively alleviates feature confusion caused by high similarity between polyps and background, and improves polyp segmentation accuracy.

[0091] Based on the above embodiments, in the set of embodiments of the present invention, The layer-optimized feature map is input into the decoder to obtain the polyp segmentation result map, including:

[0092] The optimized feature maps of each layer are input into the dual-branch attention module. Channel branch attention enhancement and compression-excitation branch attention enhancement are performed on each module. The outputs of the two branches are then fused to produce the final output. Layer attention-enhanced feature maps;

[0093] Will Neighboring the first layer of attention-enhanced feature map Layer and First The attention-enhanced feature maps of the first layer are input into the same cross-layer fusion module for feature fusion to obtain the first layer. The fused feature maps of the layers output a total of Layer fusion feature map;

[0094] The first Layer, First Layer and First The attention-enhanced feature map of the first layer is input into the deep feature aggregation module to calculate the first layer's feature map. Layer and First The aggregated feature map of the layer, the convolution output of the first layer Layer segmentation result diagram;

[0095] The first The segmentation result diagram of the layer and the first layer The fused feature map of the layer is input into the layer-by-layer feature aggregation module, and the output is the layer-by-layer feature aggregation module. The segmentation results of each layer are obtained, up to the segmentation result of layer 1, which is used as the segmentation result of the polyp. .

[0096] Specifically, the optimized feature map is input into the dual-branch attention module. After channel branch attention enhancement and compression-excitation branch attention enhancement, the outputs of the two branches are fused to output an attention-enhanced feature map, including:

[0097] After optimizing the feature map, perform global max pooling and global average pooling respectively, and then perform a weighted summation to obtain the pooled feature map;

[0098] Channel attention enhancement is applied to the pooled feature map to obtain the first enhanced feature map;

[0099] After performing global average pooling on the optimized feature map, attention enhancement is performed through a compression-activation branch to obtain the second enhanced feature map;

[0100] Calculate the Hadamard product of the first and second enhanced feature maps, activate them, and then multiply them with the optimized feature map to obtain the third enhanced feature map.

[0101] The third enhanced feature map is residually connected to the optimized feature map to obtain the attention-enhanced feature map.

[0102] This invention incorporates a dual-branch attention module in the decoder, which collaboratively utilizes global statistical information and local extremum information. Through cross-channel interaction, it achieves dynamic calibration of channel weights, enabling the fusion and utilization of global and local image information. Based on the grayscale distribution of the image region and the target scale, it adaptively highlights target-related features, improves the multi-scale representation balance of the model, further enhances the model's generalization ability, improves the model's robustness, and thus improves the segmentation accuracy of polyp segmentation images in complex backgrounds.

[0103] Specifically, the adjacent first Layer and First The attention-enhanced feature maps of the first layer are input into the same cross-layer fusion module for feature fusion to obtain the first layer. The fusion feature map of the layers includes:

[0104] For the Layer attention enhancement feature map and the first After performing RBC operations on the attention-enhanced feature maps, the Hadamard product is calculated to obtain the first edge confidence weights; the RBC operation includes a concatenated convolutional layer, a batch normalization layer, and an activation function layer.

[0105] For the Layer attention enhancement feature map and the first After performing RBC operations on the attention-enhanced feature maps of each layer, the larger value is taken to obtain the second edge confidence weight.

[0106] Convolution and activation are performed on the first edge confidence weights and the second edge confidence weights respectively to obtain the first edge confidence and the second edge confidence.

[0107] Calculate the Shannon entropy of the first edge confidence and the second edge confidence respectively, and obtain the first product feature metric and the second product feature metric;

[0108] Calculate the difference between the identity matrix and the first product feature metric, and multiply it by the Hadamard product of the first edge confidence to obtain the first optimized edge confidence feature map;

[0109] Calculate the difference between the identity matrix and the second product feature metric, and the Hadamard product of the second marginal confidence to obtain the second optimized marginal confidence feature map;

[0110] After concatenating the first optimized edge confidence feature map and the second optimized edge confidence feature map, perform an RBC operation to obtain the first optimized edge confidence feature map. Layer attention enhancement feature map and the first The first layer of attention-enhanced feature map fusion Layer fusion feature map.

[0111] The cross-layer fusion module of this invention constructs a dual edge confidence based on the complementary strategies of product and maximization. This can suppress false alarms of single-layer edges, improve the accuracy of edge localization, and retain more complete edge information, effectively avoiding the loss or blurring of edge information. By using Shannon entropy to calculate the product feature metric to optimize the edge confidence, unreliable edge responses are automatically weakened, and the information-rich edge structure is enhanced, further ensuring the accuracy of polyp image segmentation.

[0112] Specifically, based on the first Layer, First Layer and First The attention-enhanced feature map of the layer is calculated to... Layer and First The aggregated feature map of the layer is obtained by convolution. The layer segmentation result diagram includes:

[0113] For the Layer and First The attention-enhanced feature maps of each layer are convolved separately and then concatenated to obtain the first layer. Layer and First Joint attention-enhanced feature map of layers;

[0114] Order No. Layer and First The joint attention-enhanced feature map of the layers is sequentially processed by global average pooling and two perceptron layers to obtain the perceptron feature map;

[0115] Order No. Layer and First Joint attention enhancement feature map of layer and the first After the attention-enhanced feature maps of the layers are concatenated, a Hadamard product is calculated with the perceptual feature map to obtain the product features;

[0116] Combine the product features with the first After concatenating the attention-enhanced feature maps from each layer, an RBC operation is performed to obtain the th layer. Layer and First The aggregated feature map of the layer; the RBC operation includes a concatenated convolutional layer, a batch normalization layer and an activation function layer;

[0117] The first Layer and First The aggregated feature map of the layer and the first Attention-enhanced feature maps from each layer are concatenated to obtain an aggregated feature map. This aggregated feature map is then processed sequentially through global average pooling and two perceptron layers, and finally, a Hadamard product is calculated with the aggregated feature map to obtain the first... The aggregation intermediate of the layer; the aggregation intermediate is compared with the first After the attention-enhanced feature maps of the layers are concatenated, an RBC operation is performed to obtain the th layer. Aggregated feature map of the layer;

[0118] For the Convolution is performed on the aggregated feature map of the layer to obtain the th layer. Image showing the results of layer segmentation.

[0119] Specifically, based on the first The segmentation result diagram of the layer and the first layer The fused feature map of the layer is used to perform layer-by-layer feature aggregation to obtain the first layer. The layer segmentation result diagram includes:

[0120] The first Layer attention enhancement feature map and the first The fused feature map after the attention-enhanced feature map of the first layer is compared with the fused feature map of the second layer. After the segmentation results from each layer are stitched together, they are convolved to output the first layer. The basic feature map of the layer;

[0121] Using multiple RBC operations with different expansion rates to the first The basic feature map of the layer is manipulated to obtain the first layer. Multiple fine edge feature maps of the layer; the RBC operation includes a concatenated convolutional layer, a batch normalization layer, and an activation function layer;

[0122] The first Multiple fine edge feature maps of the layer and the first After the basic feature maps of the layers are concatenated, an RBC operation is performed to obtain the first layer. Layer segmentation result diagram, .

[0123] Among them, multiple RBC operations with different expansion rates were used to perform the first... The basic feature map of the layer is manipulated to obtain the first layer. Multiple fine edge feature maps of the layer, including:

[0124] Using the RBC operation with the first expansion rate, for the second The basic feature map of the layer is manipulated to obtain the first layer. The first fine edge feature map of the layer;

[0125] Using the RBC operation with the second expansion rate, for the first The feature map obtained by concatenating the base feature map of layer 1 with the first fine edge feature map is processed to obtain the feature map of layer 2. The second fine edge feature map of the layer;

[0126] Using the RBC operation with the third expansion rate, for the first The feature map obtained by concatenating the base feature map of layer 1 with the second fine edge feature map is processed to obtain the feature map of layer 2. The third fine edge feature map of the layer.

[0127] This invention obtains the first based on the deep feature aggregation module. The segmentation results of the layer are obtained by using the layer-by-layer feature aggregation module to fuse attention-enhanced feature maps layer by layer, ensuring that the recovered details are the correct polyp structures rather than noise; and by fusing outputs of different scales, it can handle polyps of different sizes, enhancing the robustness and multi-scale segmentation capability of the model.

[0128] Based on the above embodiments, in this embodiment of the invention, the polyp image segmentation method provided by the present invention is used to train the polyp image segmentation model and segment polyp images. The specific steps include:

[0129] S101: Collect colonoscopy polyp images and polyp mask label datasets, and divide the datasets into training and test sets;

[0130] S102: Construct a polyp image segmentation network based on level set edge enhancement, referring to... Figure 2 The diagram shown illustrates the structure of a polyp image segmentation network. The specific structure includes:

[0131] S102-1: Input the polyp image to be segmented into the backbone network to obtain five initial feature maps, represented as follows:

[0132] ;

[0133] in, As a level of the backbone network, For the first Initial feature map of the layer, For the input image, For Res2Net50 backbone network;

[0134] S102-2: Input the five initial feature maps into the level set edge enhancement module respectively, and output the five optimized feature maps; refer to Figure 3 The diagram shown is a schematic of the horizontal set edge enhancement module; each initial feature map includes:

[0135] Initial feature map The mapped feature map is obtained by processing the level set mapping. , represented as: , It is the hyperbolic tangent function. and There are two learnable parameters;

[0136] Perform a 1×1 convolution on the mapped feature map to obtain the convolutional mapped feature map. , represented as: , For window as Convolution operations;

[0137] After performing depthwise separable convolution and pointwise convolution on the convolutional mapping feature map using a 3×3 convolution kernel, and then activating it with ReLU, the first separable convolutional feature map is obtained. , represented as: , For window as Depth-separable convolution operations, For window as Pointwise convolution operation,

[0138] After performing depthwise separable convolution and pointwise convolution on the convolutional mapping feature map using a 5×5 convolution kernel, and then applying ReLU activation, a second separable convolutional feature map is obtained. , represented as: , For window as Expansion rate Depth-separable convolution operations, For window as Pointwise convolution operation, The expansion rate; in one embodiment of the invention, The range of values ​​for is {2, 3, 4};

[0139] The convolutional mapping feature map, the first separable convolutional feature map, and the second separable convolutional map are concatenated to obtain the concatenated feature map. , represented as: , For splicing operations;

[0140] After the concatenated features are sequentially processed through batch normalization, activation, and convolution, the following steps are taken to obtain... Residual features are obtained by performing residual connections with the input initial feature map. , represented as: ; For the batch normalized activation feature map, It is the ReLU activation function. For batch normalization operations;

[0141] After adaptive edge enhancement processing of the residual features, a residual concatenation is performed with the input initial feature map to output an optimized feature map. , represented as: ; It is the natural logarithm. It is a natural constant. For the absolute value operation, For Hadamard products.

[0142] S102-3: Input the five optimized feature maps into the dual-branch attention module respectively to obtain the five attention-enhanced feature maps; refer to Figure 4 The diagram shown is a schematic of the dual-branch attention module; each optimized feature map layer includes:

[0143] After optimizing the feature map, perform global max pooling and global average pooling respectively, then perform a weighted summation to obtain the pooled feature map. , represented as: ; For window as Global average pooling operation, For window as Global max pooling operation;

[0144] The pooled feature map is then subjected to attention enhancement via channel branching to obtain the first enhanced feature map. , represented as: , The learnable weights for channel branches;

[0145] After performing global average pooling on the optimized feature map, attention enhancement is performed through a compression-activation branch to obtain the second enhanced feature map. ,for , and For the learnable weights of the compression-activation branch, For Dropout regularization operations;

[0146] The first and second enhanced feature maps are dynamically fused in a two-branch process to obtain the attention-enhanced feature map. , represented as: , It is the sigmoid activation function.

[0147] S102-4: Improving the adjacent first-order features in the five-layer attention enhancement feature map Layer and First The attention-enhanced feature maps of each layer are input into the same cross-layer fusion module, which outputs a four-layer fused feature map; (Refer to...) Figure 5 The diagram shown is a structural schematic of the cross-layer fusion module; for any adjacent first layer... Layer and First The attention-enhanced feature maps for each layer include:

[0148] Calculate the first Layer attention enhancement feature map and the first First edge confidence weights of layer attention-enhanced feature maps Weight of the second marginal confidence , represented as:

[0149] ;

[0150] ;

[0151] in, To match the input image identity matrices of the same size This is for retrieving the maximum value. ;

[0152] Convolution and activation are performed on the first edge confidence weights and the second edge confidence weights respectively to obtain the first edge confidence. With the second edge confidence , respectively represented as:

[0153] , ;

[0154] Calculate the Shannon entropy of the first and second edge confidences respectively to obtain the first product feature metric. With the second product feature measure , respectively represented as:

[0155] ; ;

[0156] in, This represents the current number of channels. This represents the total number of channels;

[0157] Based on the first product feature metric and the first edge confidence, and the second product feature metric and the second edge confidence, respectively, the first optimized edge confidence feature map is obtained. With the second optimized edge confidence feature map , represented as:

[0158] ; ;

[0159] The adjacent first Layer and First The first edge confidence and the second edge confidence of the attention-enhanced feature map of the layer are fused across layers to obtain the corresponding fused feature map, represented as: ; ;

[0160] in, For cross-layer fusion operations, This is a combination of operations including 3×3 convolution, batch normalization, and ReLU activation.

[0161] S102-5: Input the attention-enhanced feature maps from the third to fifth layers into the deep feature aggregation module to obtain aggregated feature maps. Perform layer-by-layer feature aggregation calculations based on the aggregated feature maps to obtain five-layer output results, including:

[0162] The attention-enhanced feature maps output by the dual-branch attention modules of the third and fourth layers are concatenated to obtain the joint attention-enhanced feature map of the third and fourth layers. , represented as:

[0163] ;

[0164] Based on the joint attention-enhanced feature map of the third and fourth layers and the attention-enhanced feature map of the fourth layer, the aggregated feature map of the third and fourth layers is calculated and obtained. , represented as:

[0165] ;

[0166] Attention-enhanced feature map based on the fifth layer Aggregated feature maps of the third and fourth layers Calculate the intermediate values ​​of the fourth and fifth aggregated feature maps. , represented as:

[0167] , For two-layer sensor operation;

[0168] Based on the intermediate values ​​between the attention-enhanced feature map of the fifth layer and the aggregated feature maps of the fourth and fifth layers, the aggregated feature maps of the fourth and fifth layers are calculated. , represented as: ;

[0169] Perform 1×1 convolution on the aggregated feature maps of the fourth and fifth layers to obtain the segmentation result map of the fifth layer. , represented as: ;

[0170] Based on the Layer and First Layer fusion feature map and the The segmentation result image of the layer, calculate the first layer. Basic feature map of the layer , represented as:

[0171] ;

[0172] RBC operation based on different expansion rates The process yields fine edge feature maps corresponding to each expansion rate:

[0173] ;

[0174] ;

[0175] ;

[0176] in, , and The expansion rates are respectively , and RBC operation; in embodiments of the present invention The range of values ​​for is {2, 3, 4}. The value range of is {3, 4, 5}. The value range of is {4, 5, 6};

[0177] Fine edge feature maps with different expansion rates , and After RBC and concatenation, the output results of the first to fourth layers of the network are obtained as follows:

[0178] .

[0179] S103: The output of the five layers and the polyp mask label are input into the active contour joint loss function to optimize the network parameters. After continuous iterative training, a well-trained polyp image segmentation network based on level set edge enhancement is obtained, including:

[0180] S103-1: Obtaining the first... using the Gaussian-Laplace operator After the edges of the segmentation result image of the layer are normalized, the first layer is constructed. The length term loss of the segmentation result graph of the layer is expressed as:

[0181] ; For polyp masking labels, and Given the width and height of the input image, For image pixel index, The standard deviation of the image. For the Gaussian-Laplace operator;

[0182] S103-2: Based on the first The foreground and background regions in the segmentation result image of the layer are used to construct the first layer. Region loss in the layer segmentation result graph , represented as:

[0183] ;

[0184] For the output results The pixel grayscale of the mid-foreground area For the output results The pixel grayscale of the background area;

[0185] S103-3: The first The length loss term and the region loss term of the segmentation result map of the layer are added together to obtain the first layer. Active contour loss of the segmentation result map of the layer , represented as:

[0186] ;

[0187] S103-4: Based on the first The segmentation result image of the layer and the polyp mask label image are used to calculate the first layer. Weighted binary cross-entropy loss of the segmentation result graph of the layer Weighted intersection and comparison loss ;

[0188] S103-5: Calculate the joint loss function for active contours based on active contour loss, weighted binary cross-entropy loss, and weighted intersection-over-union loss. , represented as:

[0189] ;

[0190] S104: The trained polyp image segmentation network based on level set edge enhancement is used to test the polyp images in the test set to obtain the polyp segmentation results after testing.

[0191] This invention constructs a polyp image segmentation method based on level set edge enhancement. First, it extracts features from the polyp image to be segmented. An explicit edge modeling module is used to enhance weak edge responses, effectively mitigating feature confusion caused by high similarity between the target and background. Then, a dual-branch attention module dynamically calibrates channel and spatial features, achieving the fusion and utilization of global and local image information to improve the model's multi-scale representation balance. Finally, an active contour joint loss function is constructed to strengthen edge supervision constraints during training, improving the smoothness and accuracy of segmentation boundaries, thereby enhancing the accuracy of the polyp segmentation method for this type of polyp image.

[0192] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the steps of the polyp image segmentation method as described above.

[0193] Based on the above embodiments, in order to further illustrate the effect of the polyp image segmentation method provided by the present invention, this embodiment uses the polyp image segmentation method provided by the present invention and existing MIFNet [Multi-Scale Interaction Fusion Network for Remote Sensing Image Change Detection, IEEE Transactions on Circuits and Systems for Video Technology, 2025, 35 (3):2725–2739], SpecTr [SpecTr: Spectral Transformer for Microscopic Hyperspectral Pathology Image Segmentation, IEEE Transactions on Circuits and Systems for Video Technology, 2024, 34 (6): 4610–4624], GobletNet [GobletNet: Wavelet-Based High-Frequency Fusion Network for Semantic Segmentation of Electron Microscopy Images, IEEE Transactions on Medical Imaging, 2025, 44 (2): 1058–1069] and UHANet [Uncertainty-Aware Hierarchical Aggregation Network for [Medical Image Segmentation, IEEE Transactions on Circuits and Systems for Video Technology, 2024, 34 (8): 7440–7453] Four deep learning methods were used to conduct image segmentation simulation experiments, and the experimental results were compared.

[0194] Specifically, the polyp image segmentation network and comparison method of this invention are both implemented on the Python-based deep learning framework PyTorch 2.4.0. The GPU used for network training is an NVIDIA GeForce RTX 4090, and the network parameters are set as follows: batch size... expansion rate , , , The network's learning rate is 0.001, and the number of training iterations is 100.

[0195] All training set images, test set images, and polyp images used in all experiments were obtained from the CVC-ClinicDB dataset provided by the University of Barcelona and the Center for Computer Vision. In all experiments, the solid yellow line represents the segmentation result. In all experiments, the segmentation accuracy of each model was quantitatively compared using four evaluation metrics: mean Dice Similarity Coefficient (mDSC), mean Intersection of Union (mIoU), mean Precision (mPrecision), and mean Recall (mRecall). The closer the values ​​of these four metrics are to 1, the higher the segmentation accuracy.

[0196] Four polyp images were selected from the CVC-ClinicDB dataset and numbered 1 to 4. These four images were then segmented using the polyp segmentation method described in this invention, MIFNet, SpecTr, GobletNet, and UHANet, respectively. (Refer to...) Figure 6 The figure shown is a comparison of the segmentation results of the method of the present invention and four comparative methods; Figure 6 The first column is the polyp image to be segmented, the second column is the polyp mask label image, the third column is the segmentation result of the polyp segmentation method in this invention, the fourth column is the segmentation result of MIFNet, the fifth column is the segmentation result of SpecTr, the sixth column is the segmentation result of GobletNet, and the seventh column is the segmentation result of UHANet. Figure 6 As can be seen, when segmenting images numbered 1 and 2, the polyp segmentation method of the present invention, GobletNet, and UHANet all achieved ideal segmentation results, while MIFNet and SpecTr showed different degrees of oversegmentation. When segmenting images numbered 3 and 4, the polyp segmentation method of the present invention still achieved ideal segmentation results, while the other comparison models showed different degrees of oversegmentation.

[0197] Furthermore, all images on the CVC-ClinicDB dataset were segmented using MIFNet, SpecTr, GobletNet, UHANet, and the polyp segmentation method described in this invention. The quantitative comparison results are shown in Table 1. As can be seen from Table 1, for all images on the CVC-ClinicDB dataset, the image segmentation method described in this invention has advantages in all four segmentation accuracy metrics.

[0198] Table 1. Comparison of accuracy metrics for segmenting all images on the CVC-ClinicDB dataset using MIFNet, SpecTr, GobletNet, UHANet, and the polyp segmentation method of this invention.

[0199] Average Dice similarity coefficient (%) Average overlap (%) Average accuracy (%) Average recall rate (%) MIFNet 85.68 78.24 88.02 85.72 SpecTr 87.33 79.01 88.23 88.18 GobletNet 91.41 85.12 92.18 91.72 UHANet 91.93 86.33 92.92 92.34 This invention 93.72 88.59 93.79 94.24

[0200] The polyp image segmentation method of this invention uses a level set edge enhancement module in the encoder to perform explicit geometric modeling of the edge region, dynamically enhances the edge response of the target region with learnable parameters, and provides accurate edge priors; it uses depthwise separable convolution with windows of different sizes, and the multi-scale design can ensure that the edges of polyps of different sizes can be effectively enhanced; based on adaptive edge enhancement, it accurately amplifies weak edges, effectively alleviates feature confusion caused by high similarity between polyps and background, and improves polyp segmentation accuracy.

[0201] This invention incorporates a dual-branch attention module in the decoder, collaboratively utilizing global statistical information and local extremum information. Through cross-channel interaction, it dynamically calibrates channel weights, achieving the fusion and utilization of global and local image information. Based on the grayscale distribution of the image region and the target scale, it adaptively highlights target-related features, improving the model's multi-scale representation balance, further enhancing its generalization ability and robustness, and ultimately improving the segmentation accuracy of polyp images in complex backgrounds. The cross-layer fusion module of this invention constructs a dual edge confidence system based on complementary product and maximization strategies. This suppresses false alarms in single-layer edges, improves the accuracy of edge localization, and retains more complete edge information, effectively avoiding the loss or blurring of edge information. By using Shannon entropy to calculate product feature metrics to optimize edge confidence, it automatically weakens unreliable edge responses, enhances information-rich edge structures, and further ensures the accuracy of polyp image segmentation. This invention obtains the first layer feature based on a deep feature aggregation module. The segmentation results of the layer are obtained by using the layer-by-layer feature aggregation module to fuse attention-enhanced feature maps layer by layer, ensuring that the recovered details are the correct polyp structures rather than noise; and by fusing outputs of different scales, it can handle polyps of different sizes, enhancing the robustness and multi-scale segmentation capability of the model.

[0202] This invention, when training a polyp segmentation network, explicitly constrains the geometric smoothness of the segmentation boundary through a length term loss, effectively suppressing jagged edges and irregular contours, improving the model's ability to perceive polyp regions with blurred edges and weak boundaries, and reducing oversegmentation and undersegmentation. Through a region term loss, the grayscale differences between the foreground and background regions and the real labels are calculated separately. By minimizing the variance within the region, the segmentation results are made consistent with the real structure at the region level, enhancing the model's ability to distinguish the overall polyp region from the surrounding mucosa. This invention combines length term loss, region term loss, weighted binary cross-entropy loss, and weighted intersection-union ratio loss to construct an active contour joint loss function, achieving multi-level supervision from pixel level, region level to edge level. This effectively solves the problem of oversegmentation and undersegmentation of polyp images caused by blurred edges and feature confusion, significantly improving the model's robustness and generalization ability in complex polyp structures and blurred boundary scenarios, and improving the smoothness and geometric accuracy of the segmentation boundary, thereby improving the segmentation accuracy of the polyp segmentation model.

[0203] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0204] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0205] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0206] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0207] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A polyp image segmentation method, characterized by, Comprise: The polyp image to be segmented is input into the trained polyp image segmentation network, passes through the backbone network, and outputs After the initial feature maps of the layers are input into the level set edge enhancement module, the optimized feature maps corresponding to the initial feature maps of the layers are output; and After the initial feature maps of the layers are input into the level set edge enhancement module, the optimized feature maps corresponding to the initial feature maps of the layers are output; and The optimized feature maps of the layers are input into the decoder to obtain a polyp segmentation result image by decoding. The number of layers of the backbone network Wherein, the acquisition of the optimization feature map corresponding to each layer initial feature map comprises: Performing level set mapping on the initial feature map to obtain a mapping feature map; Performing 1x1 convolution on the mapping feature map to obtain a convolution mapping feature map; Using multiple windows of different sizes, performing depth separable convolution and point-by-point convolution activation on the convolution mapping feature map to obtain separable convolution feature maps corresponding to multiple scales; Splicing the convolution mapping feature map and the multiple separable convolution feature maps to obtain a spliced feature map; After the spliced feature map is subjected to batch normalization, activation and convolution, it is connected in residual connection with the initial feature map to obtain a residual feature map; After the residual feature map is subjected to adaptive edge enhancement processing, it is connected in residual connection with the initial feature map to obtain an optimization feature map; wherein the method comprises The layer optimization feature map is input into the decoder to obtain a polyp segmentation result map. The optimized feature maps of the layers are respectively input into a double-branch attention module, and after channel branch attention enhancement and compression-excitation branch attention enhancement, the outputs of the two branches are fused, and output layer attention enhanced feature map; The adjacent first layer attention enhanced feature map in the layer is input into the same cross-layer fusion module as the attention enhanced feature map of the first layer, feature fusion is performed, a fusion feature map of the first layer is obtained, and a total of layer fusion feature maps are output. The first layer, the second layer and the third layer are input into the deep feature aggregation module, the aggregation feature maps of the first layer and the second layer are calculated, and the segmentation result map of the third layer is output. The segmentation result map of the first layer is input into the layer-by-layer feature aggregation module together with the fusion feature map of the second layer, and the segmentation result map of the second layer is output, until the segmentation result map of the first layer is obtained as the polyp segmentation result map. The segmentation result map of the first layer is input into the layer-by-layer feature aggregation module together with the fusion feature map of the second layer, and the segmentation result map of the second layer is output, until the segmentation result map of the first layer is obtained as the polyp segmentation result map. The segmentation result map of the first layer is input into the layer-by-layer feature aggregation module together with 2. The polyp image segmentation method according to claim 1, characterized in that, No. The layer-optimized feature map is represented as: ; wherein, is the first layer initial feature map, is the natural logarithm, is the natural constant, is the absolute value operation, is the Hadamard product, ; represents the i-th layer residual feature map, expressed as , is a convolution operation with a window size of . represents the first layer splicing feature map after batch normalization, activation and convolution, and the expression is , ReLU activation function, batch normalization operation; represents the first layer concatenation feature map, expressed as , represents a feature concatenation operation; denotes the convolutional mapping feature map, the expression is ; denotes the th layer window is a separable convolutional feature map with a window of , is a depthwise separable convolutional operation with a window of is a pointwise convolutional operation with a window of ​​ represents the layer window is a separable convolution feature map, the expression is , a depth separable convolution operation with a window size of and a dilation rate of a point-wise convolution operation with a window size of is the dilation rate;​​ represents the first layer mapping feature map, expressed as , is a hyperbolic tangent function, and are two learnable parameters.

3. The polyp image segmentation method of claim 1, wherein, Inputting the optimization feature map into a double-branch attention module, performing channel branch attention enhancement and compression-excitation branch attention enhancement, and then fusing the outputs of the two branches to output an attention enhanced feature map, comprising: After the optimization feature map is subjected to global maximum pooling and global average pooling respectively, performing weighted summation to obtain a pooled feature map; Performing channel attention enhancement on the pooled feature map to obtain a first enhanced feature map; After the optimization feature map is subjected to global average pooling, performing attention enhancement through the compression-excitation branch to obtain a second enhanced feature map; Calculating the Hadamard product of the first enhanced feature map and the second enhanced feature map, and after activation, performing point multiplication with the optimization feature map to obtain a third enhanced feature map; Connecting the third enhanced feature map and the optimization feature map in residual connection to obtain an attention enhanced feature map.

4. The polyp image segmentation method of claim 1, wherein, The attention enhanced feature map of the adjacent first layer is input into the same cross-layer fusion module as the attention enhanced feature map of the first layer, feature fusion is performed, and a fusion feature map of the first layer is obtained, including: For the Layer attention enhancement feature map and the first After performing RBC operations on the attention-enhanced feature maps, the Hadamard product is calculated to obtain the first edge confidence weights; the RBC operation includes a concatenated convolutional layer, a batch normalization layer, and an activation function layer. The first edge confidence weight is obtained by performing RBC operations on the first layer attention enhanced feature map and the second layer attention enhanced feature map respectively, and taking the larger value of the two. The second edge confidence weight is obtained by performing RBC operations on the first layer attention enhanced feature map and the second layer attention enhanced feature map respectively, and taking the larger value of the two. The second edge confidence weight is obtained by performing RBC operations on the first layer attention enhanced feature map and the second layer attention enhanced Respectively performing convolution and activation on the first edge confidence weight and the second edge confidence weight to obtain the first edge confidence and the second edge confidence; Respectively calculating the Shannon entropy of the first edge confidence and the second edge confidence to obtain the first product feature metric and the second product feature metric; Calculating the difference between the unit matrix and the first product feature metric, and the Hadamard product of the first edge confidence, to obtain a first optimized edge confidence feature map; Calculating the difference between the unit matrix and the second product feature metric, and the Hadamard product of the second edge confidence, to obtain a second optimized edge confidence feature map; After the first optimized edge confidence feature map and the second optimized edge confidence feature map are spliced, RBC operation is performed to obtain the first layer attention enhanced feature map and the second layer attention enhanced feature map. The first layer fusion feature map is obtained after the first layer attention enhanced feature map and the second layer attention enhanced feature map are fused.

5. The polyp image segmentation method of claim 1, wherein, Based on the first layer, the second layer and the attention enhanced feature map of the third layer, the aggregated feature map of the fourth layer and the fifth layer is calculated, and the segmentation result map of the sixth layer is obtained by convolution. For the Layer and First The attention-enhanced feature maps of each layer are convolved separately and then concatenated to obtain the first layer. Layer and First Joint attention-enhanced feature map of layers; Let the layer and the joint attention enhanced feature map of the first layer are sequentially subjected to global average pooling and two-layer perceptron operation to obtain a perception feature map; Order No. Layer and First Joint attention enhancement feature map of layer and the first After the attention-enhanced feature maps of the layers are concatenated, a Hadamard product is calculated with the perceptual feature map to obtain the product features; The product feature is concatenated with the feature of the first layer, and the concatenated feature is input into an RBC operation to obtain the aggregated feature of the first layer and the second layer; the RBC operation comprises a convolution layer, a batch normalization layer and an activation function layer connected in sequence. The first Layer and First The aggregated feature map of the layer and the first Attention-enhanced feature maps from each layer are concatenated to obtain an aggregated feature map. This aggregated feature map is then processed sequentially through global average pooling and two perceptron layers, and finally, a Hadamard product is calculated with the aggregated feature map to obtain the first... The aggregation intermediate of the layer; the aggregation intermediate is compared with the first After the attention-enhanced feature maps of the layers are concatenated, an RBC operation is performed to obtain the th layer. Aggregated feature map of the layer; The first layer is a convolutional layer, and the second layer is a pooling layer. The first layer is a convolutional layer, and the second layer is a pooling layer. The first layer is a convolutional layer, and the second layer is a pooling layer.

6. The polyp image segmentation method of claim 1, wherein, Based on the first The segmentation result image of the first layer is fused with the fusion feature map of the first layer, and layer-by-layer feature aggregation is performed to obtain the segmentation result image of the first layer, comprising: The first layer attention enhanced feature map is fused with the first layer attention enhanced feature map, and the fused feature map is spliced with the segmentation result map of the first layer, and then the first layer basic feature map is output after convolution. The first plurality of edge feature maps of the first layer are obtained by operating a plurality of RBC operations with different expansion rates on a base feature map of the first layer The first plurality of edge feature maps of the first layer are obtained by operating a plurality of RBC operations with different expansion rates on a base feature map of the first layer The RBC operation comprises a convolution layer, a batch normalization layer and an activation function layer connected in sequence. The first Multiple fine edge feature maps of the layer and the first After the basic feature maps of the layers are concatenated, an RBC operation is performed to obtain the first layer. Layer segmentation result diagram, .

7. The polyp image segmentation method of claim 6, wherein, The first plurality of edge feature maps of the first layer are obtained by operating on the base feature map of the first layer using a plurality of RBCs with different dilation rates. The first plurality of edge feature maps of the first layer are obtained by operating on the base feature map of the first layer using a plurality of RBCs with different dilation rates. The first plurality of edge feature maps of the first layer are obtained by operating on the base feature map of the The first fine edge feature map of the first layer is obtained by operating the base feature map of the first layer using the first expansion rate of RBC operation. The first fine edge feature map of the first layer is obtained by operating the base feature map of the first layer using the first expansion rate of RBC operation. The first fine edge feature map of the first layer is obtained by operating the base feature map of the The RBC operation with the second expansion rate is performed on the first fine edge feature map to obtain a second fine edge feature map of the first layer. The feature map after splicing the base feature map of the layer and the first fine edge feature map is operated to obtain a second fine edge feature map of the first layer. The feature map after splicing the base feature map of the layer and the first fine edge feature map is operated to obtain a second fine edge feature map of the first layer. The RBC operation with the third expansion rate is performed on the first The feature map after splicing the base feature map of the layer and the second fine edge feature map is operated to obtain the third fine edge feature map of the layer. The feature map after splicing the base feature map of the layer and the second fine edge feature map is operated to obtain the third fine edge feature map of the layer.

8. The polyp image segmentation method of claim 1, wherein, The acquisition of the trained polyp image segmentation network comprises: The Gaussian-Laplacian operator is used to obtain the edge of the segmentation result image of the first layer After the edge of the segmentation result image of the first layer is obtained, normalization is performed to construct the length term loss of the segmentation result image of the first layer After the edge of the segmentation result image of the first layer is obtained, normalization is performed to construct the length term loss of the segmentation result image of the first layer Based on the first The foreground region and the background region in the segmentation result map of the first layer are constructed. The region item loss of the segmentation result map of the first layer is constructed. The length item loss of the segmentation result image of the first layer is added with the region item loss to obtain the active contour loss of the segmentation result image of the first layer. The length item loss of the segmentation result image of the first layer is added with the region item loss to obtain the active contour loss of the segmentation result image of the first layer. The length item loss of the segmentation result image of the first layer is added with the region item loss Based on the first The segmentation result image of the first layer and the polyp mask label image, the weighted binary cross entropy loss and the weighted intersection over union loss of the segmentation result image of the first layer are calculated. The segmentation result image of the first layer and the polyp mask label image, the weighted binary cross entropy loss and the weighted intersection over union loss of the segmentation result image of the first layer are calculated. The first The active contour loss, weighted binary cross-entropy loss, and weighted intersection-union ratio loss of the segmentation map of the layer result are added together to obtain the first... The total loss of the layer result segmentation graph; Will The total loss of the segmentation images of each layer is summed to obtain the active contour joint loss function. The polyp image segmentation network is then trained until the active contour joint loss function converges, thus obtaining the trained polyp image segmentation network.

9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed to realize the steps of the polyp image segmentation method according to any one of claims 1 to 8. The computer program is executed to realize the steps of the polyp image segmentation method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Capsule endoscopy polyp segmentation method based on attention mechanism and multi-scale fusion

    CN117392388A

  • Semi-supervised polyp segmentation method based on dynamic multi-scale perception

    CN118552575A