A medical image segmentation method and system based on a space-profile attention network

By introducing an edge contour extraction module and a spatial-contour attention module into the U-shaped network, the focus on vessel edges and spatial information is enhanced, solving the problems of discontinuity and insufficient accuracy in coronary angiography image segmentation in the prior art, and achieving more efficient vessel segmentation results.

CN120147351BActive Publication Date: 2026-01-06HOHAI UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510460406.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-14
Publication Date
2026-01-06
Estimated Expiration
2045-04-14

AI Technical Summary

Technical Problem

Existing deep learning methods lack sufficient segmentation accuracy for the terminal and small branches of blood vessels in coronary angiography images, easily resulting in missed detections and blurred edges. Furthermore, existing attention mechanisms cannot effectively capture high-level semantic information, leading to inconsistent segmentation results.

Method used

A spatial-contour attention network was designed. By adding an edge contour extraction module and a spatial-contour attention module to the U-shaped network, the attention to the edge and spatial information of blood vessels is enhanced. The edge contour features are fused with the features of different layers in the network to generate adaptive weights for blood vessels, thereby improving the segmentation performance of the network.

Benefits of technology

It improves the integrity and continuity of vessel segmentation in coronary angiography images, reduces fragmentation, and enhances segmentation accuracy and robustness, especially in complex regions and low-contrast images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120147351B_ABST
    Figure CN120147351B_ABST
Patent Text Reader

Abstract

The application discloses a medical image segmentation method and system based on a space-contour attention network, and designs an image segmentation model based on a U-shaped network, adds an edge contour extraction module in an encoder, and replaces a skip connection module in the original U-shaped network with a space-contour attention module. The edge contour extraction module models edge information of blood vessels and extracts significant edge features, and the edge features are taken as key attention areas in a network segmentation process; the space-contour attention module enables the network to pay attention to spatial information and edge contour information of the blood vessels when performing a segmentation task, focuses on isolation of the blood vessels and the background, suppresses background features, thereby improving representation capability of the network, reducing a phenomenon of front and back disconnection during blood vessel segmentation, and strengthening overall segmentation effect of the blood vessels. Experiments show that, compared with existing methods, the application can effectively improve performance of coronary angiography image segmentation.
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 medical image segmentation method and system based on spatial-contour attention networks. Background Technology

[0002] With increasing emphasis on the diagnosis and prevention of cardiovascular diseases, digital subtraction angiography (DSA) has gained growing attention as an accurate diagnostic tool. Automatically extracting a clear and complete vascular tree structure from coronary angiography images plays a crucial role in the study of coronary artery disease. High-precision vessel segmentation results aid in calculating coronary artery stenosis length, blood flow velocity, and other data in scientific research, while also facilitating subsequent 3D modeling and analysis of the affected area. In clinical applications, it assists physicians in diagnosing patient lesions and developing subsequent treatment plans. Therefore, coronary artery segmentation is of paramount importance for the accurate quantification and diagnosis of coronary artery disease.

[0003] Currently, coronary artery segmentation still relies on subjective annotation by experts. This annotation process is labor-intensive and time-consuming, and the results are subject to individual differences, which can easily affect doctors' diagnoses. In recent years, the rapid development of big data and artificial intelligence technologies in China has laid a solid foundation for computer-automated coronary artery segmentation technology. Compared to manual annotation by medical experts, computer-automated segmentation technology has unparalleled advantages: firstly, it is not affected by subjective human factors; secondly, automatic segmentation can reduce time and economic costs.

[0004] Traditional segmentation methods typically divide an image into regions based on its inherent color, texture, and shape features, highlighting the differences between regions to remove the background and ultimately obtaining a single-color vascular tree. In contrast, deep learning methods approximate the labels through continuous training and iteration, ensuring higher segmentation accuracy. As the training set expands, the training accuracy continuously improves, exhibiting strong robustness to images with uniform characteristics. Compared to the time-consuming nature of traditional methods, deep learning-based methods are computationally fast, highly adaptable, and capable of batch image processing.

[0005] In deep learning, Attention-UNet, by introducing an attention mechanism, can enhance the model's focus on important regions to some extent, especially when dealing with complex vascular intersections, reducing the interference of background noise. However, Attention-UNet's limitation lies in the fact that its attention mechanism is mainly based on weighted global information, lacking sufficient attention to local details (such as vascular terminals or small branches). Especially for more complex vascular terminals and small branches, Attention-UNet often falls short in segmentation accuracy, easily resulting in missed detections or blurred edges.

[0006] SA-UNet (Spatial Attention U-Net) further enhances the utilization of spatial information by using a spatial attention mechanism to mine spatial features in vascular regions. SA-UNet demonstrates good segmentation results when processing most vascular regions, especially in the recognition of vessel boundaries and contours. However, SA-UNet's spatial attention mechanism mainly relies on the spatial information of shallow features and often fails to capture the higher-level semantic information of vessels. At the same time, SA-UNet's segmentation processing of vessel terminals and smaller branches remains insufficient, especially in complex regions or low-contrast images, easily leading to fragmented or discontinuous segmentation results. Summary of the Invention

[0007] Purpose of the invention: The purpose of this invention is to provide a medical image segmentation method and system based on a spatial-contour attention network. A spatial-contour attention module is designed specifically for the characteristics of coronary angiography vessels to improve the semantic segmentation effect of the original U-shaped network or its improvement on coronary angiography images.

[0008] Technical solution: To achieve the above-mentioned objectives, the present invention adopts the following technical solution:

[0009] In a first aspect, the present invention provides a medical image segmentation method based on a spatial-contour attention network, comprising the following steps:

[0010] Edge contour extraction is performed on the segmentation labels of coronary angiography images to generate edge contour labels;

[0011] A spatial-contour attention network is constructed based on a U-shaped network framework. An edge contour extraction module is added to the encoder module of the U-shaped network, and the skip connection module of the original U-shaped network is replaced by the spatial-contour attention module. The edge contour extraction module generates blood vessel edge contour features by extracting features from different layers in the main network. The edge contour features and features from different layers in the main network are added to the spatial-contour attention module to generate blood vessel adaptive weights.

[0012] A spatial-contour attention network is trained on a dataset that includes segmentation labels and edge contour labels to obtain a converged network model. The trained network model is then input into a test coronary angiography image to obtain the segmentation result.

[0013] Preferably, the edge contour extraction module is used to assimilate the scale of shallow and deep feature layers, fuse the assimilated feature layers through convolution, and generate edge contour features unique to the current segmentation instance through contour label supervision; the edge contour features are used to fuse with the feature layers of different levels of the encoder in the spatial-contour attention module.

[0014] Preferably, the U-shaped network encoder contains four layers. The edge contour extraction module selects the first and third feature layers in the encoder, performs upsampling and activation operations on the third feature layer to double its size and halve its number of channels, and repeats this operation until the size of the third feature layer is the same as that of the first feature layer. The two feature layers are then concatenated and convolved to form a new feature layer with edge contour features. This new feature layer is then subjected to two convolution and ReLU activation operations, followed by convolution and Sigmoid activation to form a mapping map of edge contour features.

[0015] Preferably, the spatial-contour attention module consists of spatial attention and edge contour attention. Spatial attention is obtained by fusing convolutions after performing max pooling and average pooling on the feature layers in the encoder in the channel dimension. The edge attention weight map is the edge contour features generated by the edge contour extraction module, which undergoes the same pooling operation as the feature layers in the encoder, and its size is consistent with the feature layers. The spatial-contour attention module is connected to the encoder and decoder, and its input is the edge contour features generated by different feature layers in the encoder and the edge contour extraction module. The output is the feature layer with spatial-contour feature information. The spatial attention weight map and the edge attention weight map are weighted, summed, and then normalized to obtain the spatial-contour attention weight map.

[0016] As a preferred option, the training steps for the spatial-contour attention network mainly include two paths: the main path is for training the blood vessel segmentation path, and the auxiliary path is for training the edge segmentation path. The training of the main path and the auxiliary path are in the same training cycle. The training of the auxiliary path is completed first, and the edge contour features are used to assist the training of the main path.

[0017] Auxiliary path training process: The input image undergoes multiple convolution, ReLU activation, and pooling operations in the encoder to obtain a deep feature layer. The feature layer is upsampled to restore the spatial resolution of the image and convolved with the shallow feature layer. The predicted edge contour labels are obtained after training through the activation function and compared with the input edge contour labels. The loss function used is binary cross-entropy loss.

[0018] Main path training process: The input image is processed by the encoder to extract local features at the bottom layer and global features at the top layer. The edge contour features generated in the auxiliary path are pooled together with the feature layer to maintain the same size. In the decoder stage, the spatial resolution of the image is gradually restored by upsampling. At the same time, the spatial-contour attention module combines the feature layer in the encoder with the edge contour features and fused them with the feature layer in the decoder through convolution. Finally, the predicted segmentation label after training is obtained through the activation function and compared with the input label. The loss function used is binary cross-entropy loss.

[0019] In a second aspect, the present invention provides a medical image segmentation system based on a spatial-contour attention network, comprising:

[0020] The preprocessing module is used to extract the edge contours of the segmentation labels in the coronary angiography images and generate edge contour labels.

[0021] The network model construction module allows users to build a spatial-contour attention network based on a U-shaped network framework. An edge contour extraction module is added to the encoder module of the U-shaped network, and the spatial-contour attention module replaces the skip connection module of the original U-shaped network. The edge contour extraction module generates blood vessel edge contour features by extracting features from different layers in the main network. These edge contour features and features from different layers in the main network are added to the spatial-contour attention module to generate blood vessel adaptive weights.

[0022] The network training and testing module is used to train the spatial-contour attention network based on a dataset that includes segmentation labels and edge contour labels, to obtain a converged network model. The trained network model is then input into a test coronary angiography image to obtain the segmentation result.

[0023] Thirdly, the present invention provides a computer system including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the medical image segmentation method based on a spatial-contour attention network.

[0024] Fourthly, the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the medical image segmentation method based on a spatial-contour attention network.

[0025] Beneficial Effects: This invention provides a medical image segmentation method based on a spatial-contour attention network. It uses an improved U-shaped network as the segmentation model, incorporating an edge contour extraction module into the encoder module and replacing the skip connection module of the original U-shaped network with a spatial-contour attention module. The edge contour extraction module models the edge information of blood vessels and extracts significant edge features, which are then used as key attention regions during network segmentation, providing the conditions for the spatial-contour attention module. The spatial-contour attention module enables the network to focus on the spatial and edge contour information of blood vessels during segmentation, emphasizing the isolation between blood vessels and the background, reducing disconnections between segments, and improving the overall segmentation effect. Compared with existing technologies, this invention has the following advantages:

[0026] 1. To address the breaks and discontinuities that occur during vessel segmentation in coronary angiography images, a spatial-contour attention mechanism is proposed. This mechanism enhances the network's attention to vessel edge contours during segmentation, increases the weight of vessel edge features in the network, and suppresses background features, which is beneficial to the integrity and continuity of vessel segmentation in coronary angiography images.

[0027] 2. By adding an edge contour extraction module to the U-shaped network, the network can spontaneously generate edge contour features, and the edge contour features are input into the spatial-contour attention module to improve the segmentation performance of coronary angiography images. Attached Figure Description

[0028] Figure 1 This is a flowchart illustrating the implementation of this invention;

[0029] Figure 2 This is a schematic diagram of the network structure of the present invention;

[0030] Figure 3 This is a schematic diagram of the spatial-contour attention module structure;

[0031] Figure 4 This is a graph showing the comparison between the present invention and existing methods on a dataset. Detailed Implementation

[0032] The technical solution and effects of the present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0033] This invention discloses a medical image segmentation method based on a spatial-contour attention network, the implementation flowchart of which is shown below. Figure 1 As shown, the specific steps include the following:

[0034] Step 1: Image preprocessing: Cropping the coronary angiography image and its corresponding segmentation labels to remove redundant background, extracting the edge contours of the segmentation labels to generate new edge contour labels, which are used to train edge contour features in the network.

[0035] Step 2: Constructing a spatial-contour attention network: First, construct a U-shaped network framework. Based on the U-shaped network framework, add an edge contour extraction module and a spatial-contour attention module. The edge contour extraction module extracts features from different layers in the main network to generate blood vessel edge contour features. The edge contour features and features from different layers in the main network are added to the spatial-contour attention module to generate more effective blood vessel adaptive weights.

[0036] Specifically, in this embodiment, the spatial-contour attention network includes an encoding network, a decoding network, an edge contour extraction module, and a spatial-contour attention module. The encoding network extracts features from the image, and the edge contour extraction module decodes the features in the encoder to generate an edge contour feature map. The edge contour feature map and the features of different scales in the encoder are combined in the spatial-contour attention module to generate new features of different scales that focus on the edge contour of the blood vessel. The features of different scales are fed into the decoding network and organically combined with the feature map in the decoding network in a convolutional manner to fully extract the edge spatial information of the blood vessel.

[0037] like Figure 2 As shown, in this embodiment, the encoding network contains four layers, each consisting of convolutions, and the layers are generated through pooling operations; the decoding network contains four layers, each corresponding to the encoding network, and the layers are generated through deconvolution operations; the encoding network and the decoding network are connected by a spatial-contour attention module, which is also divided into four layers, connecting the corresponding layers of the encoding network and the decoding network respectively.

[0038] The edge contour extraction module consists of two layers. The layers are connected to the first and third layers of the encoding network through deconvolution operations. The resulting edge contour feature maps are then connected to the spatial-contour attention module.

[0039] The edge contour extraction module mainly involves scale assimilation of shallow and deep feature layers, fusion of the assimilated feature layers through convolution, and supervision by contour labels to generate edge contour features unique to the current segmentation instance. These edge contour features are then fused with different levels of feature layers from the encoder in the spatial-contour attention module, assisting the network in focusing on edge contours during segmentation and strengthening the constraint of edge contours on the segmentation results.

[0040] The specific process is as follows: In the encoder, a feature layer with 64 channels and a deep feature layer with 256 channels are selected. The deep feature layer is upsampled and ReLU activated, doubling its size and halving its channel count. This process is repeated until the feature layer size is the same as the shallow feature layer. The two feature layers are then concatenated and convolved to create a new feature layer with rich edge contour features. This new feature layer undergoes two 3x3 convolutions with ReLU activation, followed by a 1x1 convolution with Sigmoid activation to form a mapping of edge contour features.

[0041] This process is represented by the following formula:

[0042]

[0043] Where C (1) Indicates a shallow feature layer. Indicates a deep feature layer. This represents a convolution operation for deep features, where θ is the convolution parameter, φ() represents the ReLU activation function, and Up(*; C (1) This indicates that upsampling transforms * into a form similar to C. (1) Feature layers of the same size.

[0044] like Figure 3 As shown, the spatial-contour attention module consists of spatial attention and edge contour attention. Spatial attention is obtained by performing max pooling and average pooling on the feature layers in the encoder in the channel dimension and then fusing them into a convolution to obtain the spatial attention weight map; the edge attention weight map is the edge contour feature generated by the edge contour extraction module. The edge contour attention weight map uses the same pooling operation as the feature layers in the encoder, and its size is consistent with the feature layers, with 1 channel.

[0045] The spatial-contour attention module is connected to the encoder and decoder. Its input is the edge contour features generated by different feature layers in the encoder and the edge contour extraction module. Its output is a feature layer with spatial-contour feature information.

[0046] The spatial attention weight map and the edge attention weight map are weighted, summed, and then normalized to obtain the spatial-contour attention weight map. This weight map contains the spatial information of the image and important features of the edge contour. The weight map is fused with the feature layer generated in the encoder to obtain a feature layer with edge contour and spatial features. These feature layers are finally sent to the decoder.

[0047] The spatial-contour attention module is shown in the following figure:

[0048] F ESA =F·σ(f 7×7([MaxPool(F);AvgPool(F)])+αF E )

[0049] In the formula F ESA For the generated spatial-contour feature layer, F is the feature layer in the original encoder, f 7×7 This is a 7x7 convolution operation. MaxPool(F) and AvgPool(F) are the max pooling and average pooling operations, respectively. E The edge contour features are generated in the edge contour extraction module, where α is the weight value and σ is the sigmoid activation function.

[0050] Step 3: Training the network: Divide the data processed in Step 1 into training set, test set and validation set, and use the data to train the network model to obtain a converged network model; During the training process, the image data fed into the network generates not only segmented images but also edge contour images of blood vessels compared to the original U-shaped network. The generated edge contour feature images are fed into the spatial-contour attention module to assist in the final generation of segmented images.

[0051] The training steps for the spatial-contour attention network mainly involve two paths: the main path for training the blood vessel segmentation path and the auxiliary path for training the edge segmentation path. The training of the main and auxiliary paths occurs within the same training cycle. The auxiliary path is trained first to obtain edge contour features that assist in training the main path. The loss function used is binary cross-entropy loss.

[0052] Auxiliary path training process: The input image and its corresponding edge contour labels are fed into the network for training along the edge segmentation path. The input image undergoes three convolutions, ReLU activations, and pooling operations in the encoder to obtain a deep feature layer. This feature layer is then upsampled twice to restore the spatial resolution of the image and convolved with the shallow feature layer using a sigmoid activation function to obtain the predicted edge contour labels. These labels are then compared with the input labels, and the loss function used is binary cross-entropy loss.

[0053]

[0054] Where y edge,i It is an edge outline label. is the probability value of the edge region output by the network, and N is the number of samples.

[0055] Main path training process: The input image and corresponding segmentation labels are fed into the network. The encoder in the network is responsible for extracting low-level local features and high-level global features from the input image. This stage includes multiple convolution and pooling operations. The edge contour features generated in the auxiliary path are pooled together with the feature layers, maintaining the same size. In the decoder stage, the network gradually restores the spatial resolution of the image through upsampling. At the same time, the spatial-contour attention module in the decoder combines the feature layers in the encoder with the edge contour features and convolves them with the feature layers in the decoder to improve the network's attention to blood vessel contours. Finally, the predicted segmentation labels after training are obtained through the sigmoid activation function and compared with the input labels. The loss function used is the binary cross-entropy loss.

[0056]

[0057] Where y i It is a separator tag. It is the probability value of the blood vessel region output by the network.

[0058] Step 4: Coronary angiography image segmentation: Input the coronary angiography image to be processed into the network for fully automatic coronary artery segmentation.

[0059] The performance of the network model is evaluated using the metrics Precision, Recall, F1-score, Intersection over Union (IOU), and Dice-Score.

[0060] Precision represents the percentage of samples correctly predicted (with a true positive label) out of all samples predicted as positive by the model, and it represents the accuracy of the model during segmentation.

[0061] Recall represents the percentage of samples with positive true labels that are predicted; that is, for blood vessels in the true label, how many of the samples are classified as blood vessels in the model segmentation results.

[0062] The F1 score is the harmonic mean of precision and recall, which takes into account the effects of both and provides a balanced evaluation metric. It is suitable for situations where there is a trade-off between precision and recall.

[0063] Intersection over Union (IOU) is the intersection-over-union ratio of predicted samples and actual samples. Dice-Score is a metric used to evaluate the similarity between predicted segmentation maps and ground truth labels in image segmentation tasks. It is defined as twice the intersection of two sets divided by the sum of the two sets.

[0064] Dice-Score is a metric used to evaluate the similarity between predicted segmentation maps and ground truth labels in image segmentation tasks. It is defined as twice the intersection of two sets divided by the sum of the two sets.

[0065] To objectively demonstrate the performance of the proposed method in coronary angiography image segmentation, the network is compared and evaluated with other representative medical segmentation models, such as U-Net-DB, Attention-UNet, and SA-UNet. Experimental data for the network models are shown in Table 1.

[0066] Table 1 Comparison of evaluation metrics for algorithm segmentation results

[0067] Model IOU Dice Precision Recall F1 U-Net 0.810 0.686 0.914 0.877 0.895 U-Net-DB 0.827 0.697 0.921 0.890 0.905 Attention-UNet 0.835 0.704 0.926 0.894 0.909 SA-UNet 0.817 0.693 0.917 0.881 0.898 This method 0.862 0.718 0.936 0.915 0.925

[0068] As shown in Table 1, Figure 4 As stated above, in comparison tests with other methods on the JMA dataset, the method of the present invention achieved the best performance.

[0069] This invention also discloses a medical image segmentation system based on a spatial-contour attention network, comprising: a preprocessing module for extracting edge contours from segmentation labels of coronary angiography images to generate edge contour labels; a network model construction module, wherein the user constructs a spatial-contour attention network based on a U-shaped network framework, adds an edge contour extraction module to the encoder module of the U-shaped network, and replaces the skip connection module of the original U-shaped network with the spatial-contour attention module; the edge contour extraction module generates vascular edge contour features by extracting features from different layers in the main network, and the edge contour features and features from different layers in the main network are added to the spatial-contour attention module to generate vascular adaptive weights; and a network training and testing module, used to train the spatial-contour attention network based on a dataset including segmentation labels and edge contour labels to obtain a converged network model, and inputting a test coronary angiography image into the trained network model to obtain segmentation results. Specific implementation details of each module are described in the above method embodiments and will not be repeated here.

[0070] This invention also discloses a computer system, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the medical image segmentation method based on a spatial-contour attention network.

[0071] This invention also discloses a computer program product, including a computer program that, when executed by a processor, implements the steps of the medical image segmentation method based on a spatial-contour attention network.

[0072] The program code used to implement the method of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the steps of the method of the present invention to be performed. The program code can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a standalone software package, or entirely on a remote machine or server. All aspects not detailed in this invention are well-known to those skilled in the art.

Claims

1. A medical image segmentation method based on a spatial-contour attention network, characterized in that, The method comprises the following steps: Edge contour extraction is performed on the segmentation label of the coronary angiography image to generate an edge contour label; A space-contour attention network is constructed based on a U-shaped network framework, an edge contour extraction module is added to an encoder module of the U-shaped network, and a space-contour attention module is used to replace a skip connection module of the original U-shaped network; the edge contour extraction module generates blood vessel edge contour features by extracting features at different layers in the main network, and the edge contour features and the features at different layers in the main network are input into the space-contour attention module to generate blood vessel adaptive weights; The space-contour attention network is trained based on a data set comprising the segmentation label and the edge contour label to obtain a converged network model, and the trained network model is input with a test coronary angiography image to obtain a segmentation result; The edge contour extraction module is used to assimilate the features at the shallow and deep layers in scale, fuse the features at the assimilated scale through convolution, and generate edge contour features unique to the current segmentation instance through contour label supervision; The edge contour features are used to fuse with the features at different levels of the encoder in the space-contour attention module; The encoder of the U-shaped network comprises four layers, the edge contour extraction module selects the first layer feature layer and the third layer feature layer in the encoder, performs upsampling and activation operations on the third layer feature layer to make the size of the third layer feature layer twice the original size and the channel number half, and repeats the operation until the size of the third layer feature layer is the same as that of the first layer feature layer; the two feature layers are spliced and convolved to be fused into a new feature layer with edge contour features, and the new feature layer is subjected to twice convolution and ReLU activation operation and then convolution and Sigmoid activation to form a mapping diagram of the edge contour features.

2. The medical image segmentation method based on the spatial-contour attention network according to claim 1, characterized in that, The space-contour attention module is composed of space attention and edge contour attention; the space attention obtains a space attention weight map through maximum pooling and average pooling in the channel dimension of the feature layer in the encoder and then convolution fusion; the edge attention weight map is the edge contour feature generated by the edge contour extraction module, and the same pooling operation is performed on the feature layer in the encoder, and the size remains consistent with that of the feature layer; the space-contour attention module is connected with the encoder and the decoder, the input is the different feature layers in the encoder and the edge contour features generated by the edge contour extraction module, and the output is a feature layer with space-contour feature information; the space attention weight map and the edge contour attention weight map are weighted and summed and then normalized to obtain a space-contour attention weight map. 3.The medical image segmentation method based on the spatial-contour attention network according to claim 1, characterized in that, The training steps of the space-contour attention network mainly include two paths, a main path for training the blood vessel segmentation path and an auxiliary path for training the edge segmentation path, and the training of the main path and the auxiliary path is in the same training cycle, the training of the auxiliary path is completed first to obtain the edge contour features to assist the training of the main path. The auxiliary path training process: the input image is subjected to multiple convolution, ReLU activation and pooling operations in the encoder to obtain a deep feature layer, the feature layer is subjected to upsampling operation to restore the spatial resolution of the image, and the image is subjected to convolution through an activation function together with a shallow feature layer to obtain a predicted edge contour label after training, which is compared with an input edge contour label, and a binary cross-entropy loss is used as a loss function; The main path training process: the input image is subjected to extraction of local features at a bottom layer and global features at a high layer by the encoder, and the edge contour feature generated in the auxiliary path is subjected to a pooling operation together with the feature layer to keep the same size, in the decoder stage, the feature layer is fused by upsampling step by step to restore the spatial resolution of the image, and the spatial-contour attention module fuses the feature layer in the encoder with the edge contour feature together with the feature layer in the decoder through convolution; finally, an activation function is used to obtain a predicted segmentation label after training, which is compared with an input label, and a binary cross-entropy loss is used as a loss function. 4.A medical image segmentation system based on a spatial-contour attention network, characterized by, The method comprises: a preprocessing module configured to extract an edge contour from a segmentation label of a coronary angiography image to generate an edge contour label; a network model construction module configured to construct a spatial-contour attention network based on a U-shaped network framework, add an edge contour extraction module to an encoder module of the U-shaped network, and replace a skip connection module of the original U-shaped network with a spatial-contour attention module; the edge contour extraction module is configured to generate a blood vessel edge contour feature by extracting features at different layers in the main network, and the edge contour feature and the features at different layers in the main network are input into the spatial-contour attention module to generate a blood vessel adaptive weight; a network training and testing module configured to train the spatial-contour attention network based on a data set comprising a segmentation label and an edge contour label, obtain a converged network model, and input a test coronary angiography image into the trained network model to obtain a segmentation result; the edge contour extraction module is configured to scale the features at the shallow and deep layers, fuse the scaled features through convolution, and supervise the features through a contour label to generate an edge contour feature unique to a current segmentation instance; the edge contour feature is configured to be fused with features at different levels in the encoder in the spatial-contour attention module; the encoder of the U-shaped network comprises four layers, the edge contour extraction module selects a first layer feature layer and a third layer feature layer in the encoder, performs upsampling and activation operations on the third layer feature layer to make the size of the third layer feature layer twice the original size and the channel number half, and repeats the operation until the size of the third layer feature layer is the same as that of the first layer feature layer; the two feature layers are spliced and convolved to be fused into a new feature layer with edge contour features, and the new feature layer is subjected to twice convolution and ReLU activation operation and then convolution and Sigmoid activation to form a mapping diagram of the edge contour feature.

5. The medical image segmentation system based on spatial-contour attention network according to claim 4, wherein, The space-contour attention module is composed of space attention and edge contour attention; the space attention is obtained by fusing convolution after maximum pooling and average pooling of feature layers in the encoder in the channel dimension; the edge attention weight map is the edge contour feature generated by the edge contour extraction module, which is subjected to the same pooling operation as the feature layers in the encoder, and the size thereof is consistent with that of the feature layers; the space-contour attention module is connected with the encoder and the decoder, the input thereof is different feature layers in the encoder and the edge contour feature generated by the edge contour extraction module, and the output thereof is a feature layer with space-contour feature information; the space-contour attention weight map is obtained by normalizing the weighted sum of the space attention weight map and the edge attention weight map.

6. A computer system comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The computer program is executed by the processor to realize the steps of the medical image segmentation method based on the space-contour attention network according to any one of claims 1-3.

7. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to realize the steps of the medical image segmentation method based on the space-contour attention network according to any one of claims 1-3.

Citation Information

Patent Citations

  • Cultivated land extraction method based on collaborative edge detection and space attention mechanism

    CN116844042A