Coronary artery segmentation method and system based on boundary perception and dynamic multi-scale attention network
By combining boundary awareness with a dynamic multi-scale attention network, the problems of complex background interference and vessel scale differences in coronary artery segmentation are solved, achieving more efficient and accurate vessel segmentation results while reducing computational resource requirements.
Patent Information
- Application Number
- CN202511928848.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-03-20
AI Technical Summary
Existing coronary artery segmentation methods suffer from complex background interference, differences in vessel scale, and blurred boundaries when processing X-ray coronary angiography images, making it difficult to achieve efficient and accurate vessel segmentation.
A segmentation method based on boundary awareness and dynamic multi-scale attention network is adopted. By combining a dual attention enhancement module, a dynamic multi-scale feature fusion module, and a boundary optimization module with a U-shaped network framework, the Adam optimizer and cosine annealing learning rate decay strategy are used, and a composite loss function is used for supervised training to improve the segmentation performance of blood vessel boundaries.
It significantly improves the segmentation performance of coronary angiography images, enhances the accuracy and structural coherence of vessel boundaries, reduces computational load and resource consumption, and achieves more efficient segmentation results.
Smart Images

Figure CN121708037A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of image processing, and particularly relates to a coronary artery segmentation method and system based on boundary perception and a dynamic multi-scale attention network. BACKGROUND
[0002] Cardiovascular disease is the leading cause of death worldwide, among which coronary artery disease is the most common. The diagnosis of coronary artery disease relies on accurate assessment of coronary artery morphology and stenosis degree. X-ray coronary angiography, as the "gold standard" for diagnosis, can clearly show the structure of the coronary artery, so the accurate segmentation of blood vessels in the X-ray coronary angiography image is the prerequisite for conducting clinical applications such as coronary artery stenosis detection and blood flow reserve fraction calculation.
[0003] Traditional coronary artery segmentation relies on manual annotation by medical experts, which is time-consuming, labor-intensive, and highly subjective, and is prone to observer differences, making it difficult to meet the efficiency and objectivity requirements of clinical diagnosis. Early automatic segmentation methods are mostly based on pattern recognition, geometric modeling and tracking technology, such as Hessian matrix vessel enhancement, edge detection, region growing, etc. However, these methods have limited robustness in dealing with complex backgrounds such as catheters and bones in X-ray coronary angiography images, as well as low-contrast regions and fuzzy edges, and the segmentation results are difficult to guarantee.
[0004] In contrast, in recent years, deep learning technology has shown significant advantages in the field of medical image segmentation. The encoder-decoder structure represented by U-Net has become a benchmark model in this field. U-Net fuses deep semantic features and shallow detail features through symmetric structure and skip connection, but is limited by the local receptive field of the convolution kernel, making it difficult to capture the subtle differences between blood vessels and surrounding tissues, and prone to blood vessel boundary blurring or breaking. Subsequent improved models such as U-Net++, U-Net3+ enhance multi-scale feature fusion to improve accuracy, but increase the computational burden; TransUNet and other models introduce Transformers to capture global dependencies, but have the problems of large computational load and overfitting in small sample scenarios.
[0005] Among the improved models based on attention mechanisms, some only focus on single-dimensional features in channels or space, making it difficult to fully suppress background interference; multi-scale feature fusion methods mostly use fixed weights or simple concatenation, which cannot adapt to the significant scale difference between the main stem and the distal branches of the blood vessels; and boundary information utilization methods are generally sensitive to noise and lack computational efficiency. Therefore, how to organically combine attention mechanisms, multi-scale feature fusion, and boundary optimization techniques to synergistically improve the completeness and boundary accuracy of coronary artery segmentation is still a technical direction that needs to be continuously explored in current research. SUMMARY
[0006] Invention purposes: The purpose of the present application is to provide a coronary artery segmentation method and system based on boundary perception and dynamic multi-scale attention network. According to the characteristics of coronary blood vessels, a double attention enhancement module, a dynamic multi-scale feature fusion module and a boundary optimization module are designed to improve the segmentation performance of the network for small blood vessels and fuzzy boundaries.
[0007] Technical scheme: In order to achieve the above invention purposes, the present application adopts the following technical scheme:
[0008] 1. The present application provides a coronary artery segmentation method based on boundary perception and dynamic multi-scale attention network, comprising the following steps:
[0009] S1, obtaining the X-ray coronary angiography image to be segmented and its corresponding segmentation label, performing data enhancement on the image, and dividing the training set, the validation set and the test set at the same time;
[0010] S2, constructing a boundary perception and dynamic multi-scale attention network based on a U-shaped network framework, the network comprising an encoder, a decoder, a double attention enhancement module, a dynamic multi-scale feature fusion module and a boundary optimization module; the double attention enhancement module and the dynamic multi-scale feature fusion module are located at the network bottleneck layer, used to suppress background interference and capture multi-scale blood vessel features; the boundary optimization module is located at the decoder stage, which uses specific boundary information to guide the network to strengthen the expression of blood vessel boundary features, and improves the clarity and accuracy of boundary segmentation;
[0011] S3, training the boundary perception and dynamic multi-scale attention network based on the data set, optimizing the network parameters through the Adam optimizer and the cosine annealing learning rate decay strategy during the training process, and using a composite loss function for supervision to obtain a converged network model;
[0012] S4, inputting the coronary angiography image to be processed into the trained network model to obtain the final coronary blood vessel segmentation result.
[0013] As a preferred, the double attention enhancement module is composed of an efficient channel attention module and an enhanced spatial attention module; the efficient channel attention module captures cross-channel interaction information through one-dimensional convolution to generate channel weights; the enhanced spatial attention module generates a spatial attention map through parallel maximum pooling and average pooling combined with a large convolution kernel; the double attention enhancement module combines the enhanced features of the efficient channel attention module and the spatial attention map generated by the enhanced spatial attention module, and outputs double enhanced features.
[0014] As preferred, the dynamic multi-scale feature fusion module is used for processing the features enhanced by the dual attention module, specifically including: using three different inflation rate parallel hole convolution branches of 2, 5, 9 to extract multi-scale features; and designing a channel gating mechanism to generate adaptive weights of each branch through global average pooling and convolution; the weighted multi-scale features are spliced and linearly combined to output the fused features. The module dynamically fuses multi-scale features through the adaptive gating mechanism, and alleviates the scale inconsistency problem caused by the change of blood vessel diameter.
[0015] As preferred, the boundary optimization module is used for fusing the shallow features of the encoder and the deep features of the decoder. The input is the low-level features of the encoder and the high-level features after upsampling of the previous decoder; the high-level features are bilinearly interpolated and upsampled to make their spatial resolution consistent with the low-level features of the corresponding encoder, the low-level features input the boundary extraction branch to generate a boundary attention map, and the boundary response of the low-level features is enhanced through residual connection; the enhanced low-level features are spliced and fused with the high-level features to generate the output of the current decoding stage.
[0016] As preferred, the training process of the boundary-aware and dynamic multi-scale attention network is divided into two stages: the first 50 epochs are used for fine-tuning the weights of the VGG16 backbone network, and the last 150 epochs are used for joint training of all parameters; during the whole training process, the Adam optimizer is used, the batch size is set to 16, and the cosine annealing strategy is used to dynamically adjust the learning rate, wherein the initial learning rate is set to 1e-4 and the minimum learning rate is set to 1e-6 to ensure stable convergence of the model in the later training stage.
[0017] As preferred, the composite loss function is composed of cross-entropy (CE) loss, Dice loss and boundary-weighted loss (BWL) weighted, and the composite loss function is defined as:
[0018]
[0019] wherein, is the cross-entropy loss, which is used to realize pixel-level classification supervision, and is defined as:
[0020]
[0021] wherein, is the total number of pixels, is the number of categories, is the indicator function, is the probability that the model predicts the pixel belongs to the category .
[0022] The Dice loss optimizes segmentation performance by maximizing the overlap between predicted and ground truth regions, and is defined as follows:
[0023]
[0024] in, This indicates the vascular region predicted by the model. This represents manually labeled areas of real blood vessels. It is a smoothing coefficient to enhance numerical stability.
[0025] BWL (Boundary Weighted Loss) imposes a higher penalty on prediction errors of blood vessel boundary pixels, thereby enhancing boundary segmentation accuracy. Its definition is:
[0026]
[0027] in, It is the total number of pixels. For the model to the first Predict the probability that a pixel is a blood vessel. This is a real label. For pixels located in the boundary region The weight.
[0028] The weight map generation process of the BWL is as follows: morphological dilation is performed on the binarized true segmentation labels, and the difference between the dilated labels and the original labels is calculated to extract the blood vessel edge region; then, a weight map is constructed, and pixels located in the edge region are weighted accordingly. Assign high weight values to pixels in non-edge regions. Assign a low weight value.
[0029] 2. This invention provides a coronary artery segmentation system based on boundary awareness and dynamic multi-scale attention network, comprising:
[0030] The data preprocessing module is used to acquire the X-ray coronary angiography image data to be segmented and its corresponding labels, perform data augmentation on the images, and divide them into training, validation and test sets.
[0031] A network model construction module is used to build a boundary-aware and dynamic multi-scale attention network based on a U-shaped network framework. The network includes an encoder, a decoder, a dual attention enhancement module, a dynamic multi-scale feature fusion module, and a boundary optimization module. The dual attention enhancement module and the dynamic multi-scale feature fusion module are located in the network bottleneck layer and are used to suppress background interference and capture multi-scale vascular features. The boundary optimization module is located in the decoder stage and uses specific boundary information to guide the network to strengthen the expression of vascular boundary features, thereby improving the clarity and accuracy of boundary segmentation.
[0032] a network training module configured to train the boundary perception and dynamic multi-scale attention network based on the data set, optimize network parameters through an Adam optimizer and a cosine annealing learning rate decay strategy during the training process, and use a composite loss function for supervision to obtain a converged network model;
[0033] a testing module configured to input the coronary angiography image to be processed into the trained network model to obtain a final coronary vessel segmentation result.
[0034] 3. The application provides a computer system comprising a memory, a processor, and a computer program / instruction stored on the memory and executable on the processor, wherein the computer program / instruction is executed by the processor to implement the steps of the coronary artery segmentation method based on the boundary perception and dynamic multi-scale attention network.
[0035] 4. The application provides a computer program product comprising a computer program / instruction, wherein the computer program / instruction is executed by a processor to implement the steps of the coronary artery segmentation method based on the boundary perception and dynamic multi-scale attention network.
[0036] Beneficial effects: In view of the problems of complex background interference, blood vessel scale difference, and boundary blur in the coronary angiography image segmentation task, the application proposes a boundary perception and dynamic multi-scale attention network. First, a dual attention enhancement mechanism is proposed to simultaneously extract features from the channel and spatial dimensions to accurately focus on the key blood vessel structure and effectively suppress background noise. Second, a dynamic multi-scale feature fusion module is designed to dynamically allocate multi-scale feature weights relying on an adaptive gating mechanism to flexibly capture the scale difference between the main trunk and the peripheral branches of the coronary artery and significantly improve the segmentation integrity of the distal small blood vessels. Finally, a boundary perception optimization scheme is constructed to synergistically exert force from two aspects of structure design and supervised learning to enhance the perception ability of the model to the blood vessel boundary, effectively alleviate the problems of blood vessel boundary blur and segmentation fracture, and further improve the boundary accuracy and structural continuity of the segmentation result. Compared with the prior art, the application can realize multi-dimensional synergistic optimization, effectively overcome the limitations of a single technical means, and effectively improve the segmentation performance of the coronary angiography image. BRIEF DESCRIPTION OF DRAWINGS
[0037] Figure 1 is an implementation flowchart of the application;
[0038] Figure 2 is a whole framework diagram of the network of the application;
[0039] Figure 3 is a framework diagram of the efficient channel attention module;
[0040] Figure 4is a framework diagram of an enhanced spatial attention module;
[0041] Figure 5 is a framework diagram of a dynamic multi-scale feature fusion module;
[0042] Figure 6 is a framework diagram of a boundary optimization module;
[0043] Figure 7 is a result diagram of a comparison between the present application and the prior art on the CCAD dataset. DETAILED DESCRIPTION
[0044] The technical solutions and effects of the present application will be further described below in combination with the drawings and specific embodiments.
[0045] As shown in Figure 1 , the coronary artery segmentation method based on boundary perception and dynamic multi-scale attention network disclosed in the embodiments of the present application has the following specific steps:
[0046] S1, obtain the X-ray coronary angiography image to be segmented and its corresponding segmentation label, perform data enhancement on the image, and divide the training set, the validation set and the test set;
[0047] Specifically, first, the coronary angiography image data and labels in the private clinical dataset CCAD are obtained; second, online data enhancement strategies such as random geometric transformation and random color gamut transformation in HSV space are used on the coronary angiography image to enhance the data robustness; finally, the processed CCAD dataset is randomly divided into a training set, a validation set and a test set.
[0048] S2, construct a boundary perception and dynamic multi-scale attention network based on a U-shaped network framework, the network including an encoder, a decoder, a double attention enhancement module, a dynamic multi-scale feature fusion module and a boundary optimization module. The double attention enhancement module and the dynamic multi-scale feature fusion module are added to the network bottleneck layer to suppress background interference and capture multi-scale blood vessel features; the boundary optimization module is added to the decoder stage to guide the network to strengthen the expression of blood vessel boundary features by using specific boundary information, thereby improving the clarity and accuracy of boundary segmentation;
[0049] Specifically, in this embodiment, the overall structure of the boundary perception and dynamic multi-scale attention network is as shown in Figure 2The encoder adopts a pre-trained VGG16 as a backbone network, contains 5 convolutional blocks, extracts multi-level features from shallow to deep through convolution and max-pooling operations, and outputs deep features to the bottleneck layer; the bottleneck layer sequentially embeds a double attention enhancement module and a dynamic multi-scale feature fusion module, the double attention enhancement module optimizes the encoder output features in channel and space, and the dynamic multi-scale feature fusion module performs multi-scale fusion on the optimized features; the decoder contains 4 decoding layers, each layer is replaced with a boundary optimization module, receives the corresponding encoder low-level features and the high-level features of the up-sampling of the previous layer decoder, fuses them, restores the image spatial resolution through deconvolution operation, and finally outputs the segmentation result.
[0050] The double attention enhancement module combines an efficient channel attention and an enhanced spatial attention module. It can extract features from both channel and spatial dimensions, making the model focus on key vascular structures and effectively suppress background interference. As shown in Figure 3 , the efficient channel attention module performs global average pooling on the input feature map , obtaining a Cx1x1 global channel description vector, realizes local cross-channel interaction with a one-dimensional convolution of kernel size k, generates a channel weight vector through a Sigmoid activation function, and multiplies the original feature by channel to obtain a channel enhanced feature. This process is represented by the following formula:
[0051]
[0052] wherein, is a one-dimensional convolution, is an activation function, is a channel enhanced feature.
[0053] As shown in Figure 4 , the enhanced spatial attention module performs average pooling and max-pooling on the channel enhanced feature in parallel, obtaining two HxWx1 feature maps, concatenating the two feature maps in the channel dimension into a HxWx2 feature map, inputting a 7x7 convolution kernel for fusion, and generating a spatial attention map through a Sigmoid activation. This process is represented by the following formula:
[0054]
[0055] wherein is a function, and the obtained is a spatial attention map.
[0056] Finally, the channel enhanced feature, the spatial enhanced feature, and the input feature are multiplied element by element to obtain a hybrid attention feature, which is then compressed in the channel dimension through a 1x1 convolution and sent to the dynamic multi-scale feature fusion module. This process is represented by the following formula:
[0057]
[0058] As shown in Figure 5 , the dynamic multi-scale feature fusion module sends the mixed attention feature map into three parallel branches, respectively applying 3x3 dilated convolution with three different expansion rates of 2, 5, and 9, combining BN and ReLU activation to extract blood vessel features of different scales; the original input features and the output features of the three branches are spliced in the channel dimension to form joint features; then the joint features are subjected to global average pooling, 1x1 convolution, and Softmax activation to generate adaptive weights corresponding to the four branches; finally, the features of each branch are multiplied by the corresponding weights element by element and then spliced again, processed by 1x1 convolution and BN-ReLU structure, restored to the original channel dimension, and output multi-scale fusion features. This process is represented by the following formula:
[0059]
[0060] wherein, represents a convolution operation with expansion rate , represents normalization, is an activation function, is the adaptive weight corresponding to the four branches, is the fused multi-scale feature.
[0061] As shown in Figure 6 , the input of the boundary optimization module is the low-level feature of the encoder and the high-level feature up-sampled from the previous decoder. First, the high-level feature is bilinearly up-sampled to make its spatial resolution consistent with the corresponding low-level feature of the encoder; the low-level feature is input into the boundary extraction branch, processed by 3x3 convolution, ReLU activation, and Sigmoid activation, and an HxWx1 boundary attention map is generated; secondly, a residual additive enhancement strategy is adopted to superimpose the boundary attention map and the original low-level feature to strengthen the boundary region feature response. The enhanced low-level feature is represented by the following formula:
[0062]
[0063] Finally, the enhanced low-level feature is spliced with the up-sampled high-level feature, and two 3x3 convolution blocks (including BN and ReLU) are used for deep fusion to output the current decoding layer feature.
[0064] wherein, represents the enhanced low-level feature, represents the original low-level feature, represents the boundary attention map, represents the up-sampled high-level feature, and represents the fused output feature.
[0065] S3, training the boundary perception and dynamic multi-scale attention network based on the CCAD dataset, optimizing network parameters through an Adam optimizer and a cosine annealing learning rate decay strategy during the training process, and using a composite loss function for supervision to obtain a converged network model;
[0066] Specifically, the training process of the entire boundary perception and dynamic multi-scale attention network is divided into two stages: the first 50 epochs are used to fine-tune the VGG16 backbone network weights, and the last 150 epochs are used to unfreeze all parameters for joint training. During the entire training process, the Adam optimizer is used, the batch size is set to 16, and the cosine annealing strategy is used to dynamically adjust the learning rate, wherein the initial learning rate is set to 1e-4 and the minimum learning rate is set to 1e-6 to ensure stable convergence of the model in the later training period.
[0067] The composite loss function used during training optimizes the network using a joint loss function, specifically including cross-entropy (CE) loss, Dice loss, and boundary-weighted loss (BWL). The composite loss function is defined as:
[0068]
[0069] wherein, is the cross-entropy loss, used to realize pixel-level classification supervision, and is defined as:
[0070]
[0071] wherein, is the total number of pixels, is the number of classes, is the indicator function, is the probability that the model predicts the pixel belongs to class .
[0072] is the Dice loss, which optimizes the segmentation effect by maximizing the area overlap between the prediction and the true label, and is defined as:
[0073]
[0074] wherein, represents the model's predicted blood vessel area, represents the manually annotated true blood vessel area, is a smoothing coefficient to enhance numerical stability.
[0075] BWL is the boundary weighted loss, which imposes higher penalty on the prediction error of the boundary pixels, and strengthens the boundary segmentation accuracy. It is defined as:
[0076]
[0077] where, is the total number of pixels, is the probability of the model predicting the i-th pixel as a blood vessel, is the true label. is the weight of the pixel located in the boundary region.
[0078] where, the weight map generation process of BWL is: a morphological dilation operation with a k x k structure element is performed on the binary real segmentation label Y, and the difference set of the dilated label and the original label is calculated to extract the blood vessel edge region, as shown in the following formula:
[0079]
[0080] Then construct the weight map, give high weight value to the pixel located in the edge region, and give low weight value to the non-edge region pixel .
[0081] S4, coronary angiography image segmentation: input the test set coronary angiography image into the trained network model to obtain the final coronary blood vessel segmentation result. And adopt Dice score (Dice Coefficient), Intersection over Union (IoU), precision (P), sensitivity (S e ) and specificity (S p ) as evaluation indexes, all indexes are derived from four variables in the confusion matrix: true positive (TP), false positive (FP), true negative (TN) and false negative (FN). The definitions are as follows:
[0082]
[0083]
[0084]
[0085]
[0086]
[0087] Meanwhile, in order to further embody the engineering application value of the network, the model parameter quantity Params and the calculation quantity FLOPs are additionally introduced as auxiliary evaluation dimensions, so as to comprehensively measure the performance and deployment feasibility of the network.
[0088] In order to objectively show the performance of the method proposed in the application in coronary angiography image segmentation, the network is compared and evaluated with mainstream models such as DeepLabV3+, HRNet, U-Net, Attention-Unet, SE-Unet, U-Net++, EDAE-Net and MAMNet, and the network model data are as shown in Table 1:
[0089] Table 1 Comparison of performance indicators of different network models on the CCAD data set
[0090] Model IoU(%) Dice(%) Precision(%) <![CDATA[S e (%)]]>
[00100] S p (%)]]> Params(M) FLOPs(G) DeepLabV3+ 65.60 79.23 82.50 76.20 99.37 54.71 20.86 HRNet 73.38 84.65 83.95 85.36 99.37 29.54 11.37 EDAE-Net 75.43 85.99 86.91 85.10 99.50 9.58 63.89 U-Net 78.76 88.12 87.94 88.30 99.53 24.89 56.46 Attention-Unet 79.76 88.74 88.70 88.79 99.56 28.38 67.33 SE-Unet 79.84 88.79 88.98 88.60 99.57 32.83 67.43 Unet++ 79.94 88.85 88.96 88.74 99.57 30.13 139.20 MAMNet 80.26 89.05 88.86 89.24 99.57 38.01 59.82 The method 80.88 89.43 89.58 89.28 99.60 36.43 68.38
[0091] As shown in Table 1 and Figure 7 As shown in Table 1 and
[0092] The application further discloses a boundary perception and dynamic multi-scale attention network system for coronary artery segmentation, comprising:
[0093] A data preprocessing module is configured to acquire X-ray coronary angiography image data to be segmented and corresponding labels thereof, perform data enhancement on the image, and divide a training set, a validation set and a test set;
[0094] A network model construction module is configured to construct a boundary perception and dynamic multi-scale attention network based on a U-shaped network framework, wherein the network comprises an encoder, a decoder, a double attention enhancement module, a dynamic multi-scale feature fusion module and a boundary optimization module; the double attention enhancement module and the dynamic multi-scale feature fusion module are located at a network bottleneck layer, and are configured to suppress background interference and capture multi-scale blood vessel features; the boundary optimization module is located at a decoder stage, and is configured to guide the network to strengthen blood vessel boundary feature expression by using specific boundary information, so as to improve the clarity and accuracy of boundary segmentation;
[0095] a network training module, which trains the boundary-aware and dynamic multi-scale attention network based on the data set, optimizes network parameters through an Adam optimizer and a cosine annealing learning rate decay strategy during the training process, and uses a composite loss function for supervision to obtain a converged network model;
[0096] a testing module, which inputs the coronary angiography image to be processed into the trained network model to obtain a final coronary vessel segmentation result.
[0097] The embodiment of the present application also discloses a computer system, which comprises a memory, a processor, and a computer program / instruction stored on the memory and executable on the processor, and the computer program / instruction realizes the steps of the coronary artery segmentation method based on the boundary-aware and dynamic multi-scale attention network when executed by the processor.
[0098] The embodiment of the present application also discloses a computer program product, which comprises a computer program / instruction, and the computer program / instruction realizes the steps of the coronary artery segmentation method based on the boundary-aware and dynamic multi-scale attention network when executed by the processor.
[0099] The preferred implementation method of the present application is described in detail above, and it should be pointed out that, for ordinary skilled persons in the technical field, according to the design idea of the present application, on the basis of the prior art, through logical deduction, analysis and demonstration or limited experiments, various adjustments and improvements can also be made, and these adjustment and improvement schemes should also be regarded as the protection scope of the present application.
Claims
1. A coronary artery segmentation method based on boundary awareness and dynamic multi-scale attention network, characterized in that, Includes the following steps: S1. Obtain the X-ray coronary angiography image to be segmented and its corresponding segmentation label, perform data augmentation on the image, and divide it into training set, validation set and test set; S2. Construct a boundary-aware and dynamic multi-scale attention network based on a U-shaped network framework. The network includes an encoder, a decoder, a dual attention enhancement module, a dynamic multi-scale feature fusion module, and a boundary optimization module. The dual attention enhancement module and the dynamic multi-scale feature fusion module are located in the network bottleneck layer and are used to suppress background interference and capture multi-scale vascular features. The boundary optimization module is located in the decoder stage and uses specific boundary information to guide the network to strengthen the expression of vascular boundary features, thereby improving the clarity and accuracy of boundary segmentation. S3. The boundary awareness and dynamic multi-scale attention network is trained based on the dataset. During the training process, the network parameters are optimized by Adam optimizer and cosine annealing learning rate decay strategy, and a composite loss function is used for supervision to obtain a converged network model. S4. Input the coronary angiography image to be processed into the trained network model to obtain the final coronary artery segmentation result.
2. The coronary artery segmentation method based on boundary awareness and dynamic multi-scale attention network according to claim 1, characterized in that, The dual attention enhancement module consists of an efficient channel attention module and an enhanced spatial attention module; the efficient channel attention module captures cross-channel interaction information through one-dimensional convolution to generate channel weights. The enhanced spatial attention module generates a spatial attention map by using parallel max pooling and average pooling combined with a large convolutional kernel. The dual attention enhancement module combines the features enhanced by the efficient channel attention module with the spatial attention map generated by the enhanced spatial attention module to output dual enhanced features.
3. The coronary artery segmentation method based on boundary awareness and dynamic multi-scale attention network according to claim 1, characterized in that, The dynamic multi-scale feature fusion module is used to process the features enhanced by the dual attention enhancement module. Specifically, it includes: extracting multi-scale features using three parallel dilated convolution branches with different dilation rates of 2, 5, and 9; designing a channel gating mechanism to generate adaptive weights for each branch through global average pooling and convolution; and concatenating and linearly combining the weighted multi-scale features to output fused features.
4. The coronary artery segmentation method based on boundary awareness and dynamic multi-scale attention network according to claim 1, characterized in that, The boundary optimization module is used in the decoding stage. Its inputs are the low-level features of the encoder and the high-level features upsampled by the previous level decoder. The high-level features are upsampled by bilinear interpolation to make their spatial resolution consistent with the low-level features of the corresponding encoder. The low-level features are used to extract the boundary branches to generate a boundary attention map, and the boundary response of the low-level features is enhanced by residual connection. The enhanced low-level features are concatenated and fused with the high-level features to generate the output of the current decoding stage.
5. The coronary artery segmentation method based on boundary awareness and dynamic multi-scale attention network according to claim 1, characterized in that, The training process of the network in step S3 is divided into two stages: the weights of the VGG16 backbone network are frozen for fine-tuning in the first 50 epochs, and all parameters are unfrozen for joint training in the next 150 epochs. Throughout the training process, the Adam optimizer is used, the batch size is set to 16, and the cosine annealing strategy is used to dynamically adjust the learning rate. The initial learning rate is set to 1e-4 and the minimum learning rate is set to 1e-6 to ensure that the model converges stably in the later stage of training.
6. The coronary artery segmentation method based on boundary awareness and dynamic multi-scale attention network according to claim 1, characterized in that, The composite loss function is composed of a weighted average of cross-entropy (CE) loss, Dice loss, and boundary-weighted loss (BWL). The composite loss function is defined as follows: in, Cross-entropy loss, used for pixel-level classification supervision, is defined as follows: in, Total number of pixels It is the number of categories. It is an indicator function. It is the model predicts the pixel. Category The probability of. The Dice loss optimizes segmentation performance by maximizing the overlap between predicted and ground truth regions, and is defined as follows: in, This indicates the vascular region predicted by the model. This represents manually labeled areas of real blood vessels. It is a smoothing coefficient to enhance numerical stability. BWL (Boundary Weighted Loss) imposes a higher penalty on prediction errors of blood vessel boundary pixels, thereby enhancing boundary segmentation accuracy. Its definition is: in, It is the total number of pixels. For the model to the first Predict the probability that a pixel is a blood vessel. This is a real label. For pixels located in the boundary region The weight. The weight map generation process of the BWL is as follows: morphological dilation is performed on the binarized true segmentation labels, and the difference between the dilated labels and the original labels is calculated to extract the blood vessel edge region; then, a weight map is constructed, and pixels located in the edge region are weighted accordingly. Assign high weight values to pixels in non-edge regions. Assign a low weight value.
7. A coronary artery segmentation system based on boundary awareness and dynamic multi-scale attention network, characterized in that, include: The data preprocessing module is used to acquire the X-ray coronary angiography image data to be segmented and its corresponding labels, perform data augmentation on the images, and divide them into training, validation and test sets. The network model construction module is used to construct a boundary-aware and dynamic multi-scale attention network based on a U-shaped network framework. The network includes an encoder, a decoder, a dual attention enhancement module, a dynamic multi-scale feature fusion module, and a boundary optimization module. The dual attention enhancement module and the dynamic multi-scale feature fusion module are located in the network bottleneck layer and are used to suppress background interference and capture multi-scale vascular features. The boundary optimization module is located in the decoder stage and uses specific boundary information to guide the network to strengthen the expression of vascular boundary features, thereby improving the clarity and accuracy of boundary segmentation. The network training module trains the boundary awareness and dynamic multi-scale attention network based on the dataset. During the training process, the network parameters are optimized by Adam optimizer and cosine annealing learning rate decay strategy, and a composite loss function is used for supervision to obtain a converged network model. The testing module is used to input the coronary angiography images to be processed into the trained network model to obtain the final coronary artery segmentation results.
8. The boundary-aware and dynamic multi-scale attention network system for coronary artery segmentation according to claim 7, characterized in that, In the network construction module, the dual attention module is embedded in the network bottleneck layer, receives the deep features output by the encoder, and is then sent to the dynamic multi-scale feature fusion module after being optimized by both the high-efficiency channel attention module and the enhanced spatial attention module. The multi-scale fused features output by the dynamic multi-scale feature fusion module are fed into the decoder. The boundary optimization module is set in each layer of the decoding stage. It receives the low-level features of the corresponding encoder and the output features of the previous layer decoder, and outputs the current layer's decoding features after fusion.
9. A computer system comprising a memory, a processor, and computer programs / instructions stored in the memory and executable on the processor, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the coronary artery segmentation method based on boundary awareness and dynamic multi-scale attention network according to any one of claims 1-6.
10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the coronary artery segmentation method based on boundary awareness and dynamic multi-scale attention network according to any one of claims 1-6.
