Blood vessel segmentation method and system
By extracting multi-scale feature maps and performing feature pyramid processing, combining residual networks and self-attention mechanisms, the problem of insufficient accuracy in complex vascular structures is solved, and more efficient vascular image segmentation is achieved.
Patent Information
- Application Number
- CN202510093484.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-27
AI Technical Summary
The existing vascular segmentation method is difficult to take into account both global and local information, especially when dealing with complex vascular topology, the segmentation accuracy is insufficient and the computational complexity is high, which limits its efficiency in practical applications.
A vascular image segmentation method is adopted to extract multi-scale feature maps to form a multi-scale feature pyramid, capture long-distance dependencies and complex spatial structures in the image, and perform feature refinement processing, combining residual networks, self-attention mechanisms and recursive update equations to enhance robustness to noise and deformation.
It improves the accuracy and accuracy of vascular image segmentation, can better capture the details and global characteristics of complex vascular structures, enhances the ability to adapt to noise and deformation, and improves the segmentation effect.
Smart Images

Figure CN120047684A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image segmentation, and particularly to a blood vessel segmentation method and system. Background Art
[0002] Blood vessel segmentation is a key task in medical image processing. Especially in CT and MRI scans of the brain, heart, and lungs, accurately segmenting the blood vessel structure is crucial for disease diagnosis, surgical planning, and treatment evaluation. Blood vessels have a slender and complex structure, and blood vessels of different scales exhibit significant morphological differences in images. Therefore, the segmentation algorithm not only needs to be able to capture the global blood vessel morphology but also accurately extract local details. Currently, deep learning-based image segmentation methods, especially networks adopting an encoder-decoder architecture such as U-Net, are widely used in blood vessel segmentation tasks. However, problems such as the complex topological structure, multi-scale features of blood vessels in medical images, and image noise pose higher requirements for the existing technologies. Traditional methods often encounter problems of insufficient accuracy when dealing with small blood vessels and branches.
[0003] Traditional blood vessel segmentation methods rely on manually designed features, which usually include local texture, shape, and brightness information. Common traditional methods include techniques such as centerline extraction, region growing, and active contour models. In the centerline extraction method, researchers identify the branches and endpoints of blood vessels by tracing the centerlines of blood vessels and using heuristic rules. However, for blood vessels with complex structures, such methods often perform poorly. Current blood vessel segmentation methods are difficult to balance global and local information, have insufficient segmentation accuracy for complex blood vessel topological structures, and have high computational complexity, which limits their efficiency in practical applications. Summary of the Invention
[0004] The present invention provides a blood vessel segmentation method and system, which can effectively improve the accuracy and precision of blood vessel image segmentation.
[0005] To solve the above technical problems, the present invention provides a blood vessel segmentation method, including:
[0006] Obtaining a blood vessel image to be segmented;
[0007] Inputting the blood vessel image to be segmented into a blood vessel image segmentation model, so that the blood vessel image segmentation model performs the following steps:
[0008] Extracting multi-scale features of the blood vessel image to be segmented to form a multi-scale feature map;
[0009] Performing multi-level feature processing on the multi-scale feature map to form a multi-scale feature pyramid;
[0010] Performing serialization processing on the multi-scale feature pyramid to form a sequence feature map;
[0011] Perform feature refinement processing on the sequence feature map to form a feature map to be segmented;
[0012] Perform vascular image segmentation on the feature map to be segmented to form a number of vascular segmentation maps.
[0013] The present invention uses a vascular image segmentation model to perform vascular segmentation on a vascular image to be segmented. By extracting multi-scale features of the vascular image to be segmented, different resolution information is obtained, and a multi-scale feature map containing different resolution information is formed; perform multi-level feature processing on the multi-scale feature map to further extract detailed information, form a multi-scale feature pyramid, and capture multi-level feature representations; rearrange the multi-scale feature pyramid into a sequence form to form a sequence feature map, thereby effectively capturing long-range dependencies and complex spatial structures in the image; perform feature refinement processing on the sequence feature map to form a feature map to be segmented to enhance the expression ability of complex features; finally, perform vascular image segmentation on the feature map to be segmented to form a number of vascular segmentation maps. By fully extracting the features of the vascular image to be segmented, more accurate image information is provided for image segmentation, thereby effectively improving the accuracy and precision of vascular image segmentation.
[0014] Further, the extraction of multi-scale features of the vascular image to be segmented to form a multi-scale feature map is specifically as follows:
[0015] Use a residual network to layer by layer extract local detail features of the vascular image to be segmented;
[0016] Use an encoder to extract global features of the vascular image to be segmented through a self-attention mechanism;
[0017] Concatenate the local detail features and the global features to form a multi-scale feature map.
[0018] The present invention uses a residual network to layer by layer extract local detail features of the vascular image to be segmented; uses an encoder to extract global features of the vascular image to be segmented through a self-attention mechanism; concatenates the local detail features and the global features to form a multi-scale feature map; by simultaneously capturing local details and global context information and concatenating local and global information, its ability to handle noise, artifacts, and deformations can be effectively enhanced.
[0019] Further, the multi-level feature processing of the multi-scale feature map to form a multi-scale feature pyramid is specifically as follows:
[0020] Perform adaptive pooling on the multi-scale feature map to scale the multi-scale feature map to different resolutions to form a number of pooled feature maps;
[0021] Extract the detailed information of several of the pooling feature maps by using a convolutional layer to form several optimized pooling feature maps;
[0022] Concatenate several of the optimized pooling feature maps to form a multi-scale feature pyramid.
[0023] The present invention performs adaptive pooling on the multi-scale feature maps, scales the multi-scale feature maps to different resolutions to form multiple pooling feature maps; extracts the detailed information of each pooling feature map by using a convolutional layer to form multiple optimized pooling feature maps; then concatenates all the optimized pooling feature maps to form a multi-scale feature pyramid; not only can it accurately capture tiny structures, but also can fully understand the global structural relationship, effectively improving the overall segmentation effect.
[0024] Further, serialize the multi-scale feature pyramid to form a sequence feature map, specifically:
[0025] Perform dimensional transformation on the multi-scale feature pyramid to form a one-dimensional time series feature;
[0026] Capture the feature dependency relationship of the one-dimensional time series feature by using a recursive update equation and generate a hidden state sequence;
[0027] Deserialize the hidden state sequence, convert the dimension of the hidden state sequence from one-dimensional to two-dimensional to form a sequence feature map.
[0028] The present invention performs dimensional transformation on the multi-scale feature pyramid to form a one-dimensional time series feature; captures the feature dependency relationship of the one-dimensional time series feature by using a recursive update equation and generates a hidden state sequence; deserializes the hidden state sequence, converts the dimension of the hidden state sequence from one-dimensional to two-dimensional to form a sequence feature map; by rearranging the multi-scale feature pyramid into a sequence form and then performing time series feature processing, it can effectively capture the long-distance dependency relationship and complex spatial structure in the image, thereby enhancing the ability to capture the dependency relationship between pixels at a long distance.
[0029] Further, capture the feature dependency relationship of the one-dimensional time series feature by using a recursive update equation and generate a hidden state sequence, specifically:
[0030] Obtain a recursive equation; the recursive equation is:
[0031] H t =Φ(W ssm H t-1 +U ssm F seq,t +b h )
[0032] In the formula, H tis the hidden state sequence at time t; H t-1 is the hidden state sequence at time t-1; W ssm is the state transition matrix; U ssm is the input mapping matrix; F seq,t is the serialized input feature at time t; b h is the bias term; Φ(·) is the non-linear activation function;
[0033] A residual path is introduced into the recursive equation to form a recursive update equation; the recursive update equation is:
[0034] H t = H t-1 + α·Φ(W ssm H t-1 + U ssm F seq,t + b h )
[0035] In the formula, H t is the hidden state sequence at time t; H t-1 is the hidden state sequence at time t-1; W ssm is the state transition matrix; U ssm is the input mapping matrix; F seq,t is the serialized input feature at time t; b h is the bias term; Φ(·) is the non-linear activation function; α is the scaling coefficient;
[0036] The recursive update equation is used to capture the feature dependency of the one-dimensional time series features and generate a hidden state sequence.
[0037] Furthermore, the feature refinement process for the sequence feature map is performed to form a feature map to be segmented, specifically:
[0038] Dilated convolution is used to extract the local spatial information of the sequence feature map to form a first feature map;
[0039] Based on a preset non-linear activation function, a first pointwise convolution is used to expand the channels of the first feature map to form a second feature map;
[0040] A second pointwise convolution is used to compress the channels of the second feature map to form a feature map to be segmented.
[0041] The present invention utilizes dilated convolution to extract local spatial information of a sequence feature map, forming a first feature map; based on a preset non-linear activation function, uses a first pointwise convolution to expand the channels of the first feature map, forming a second feature map; uses a second pointwise convolution to compress the channels of the second feature map, forming a feature map to be segmented; while maintaining the spatial structure, performs refined processing on the input features by expanding and compressing the channel dimensions, laying a solid feature foundation for the final segmentation task.
[0042] Further, performing vascular image segmentation on the feature map to be segmented, forming a plurality of vascular segmentation maps, specifically:
[0043] Performing upsampling on the feature map to be segmented, adjusting the spatial size of the feature map to be segmented to the spatial size of the vascular image to be segmented, forming an upsampled feature map;
[0044] Obtaining the multi-scale feature maps generated by the encoder;
[0045] Fusing the upsampled feature map and the multi-scale feature maps, forming a fused feature map;
[0046] Performing convolution refinement on the fused feature map, forming a refined feature map;
[0047] Determining the number of segmentation maps according to the preset number of segmentation categories;
[0048] Based on the number of segmentation maps, using a third pointwise convolution to compress the channels of the refined feature map, forming a plurality of vascular segmentation maps.
[0049] The present invention restores the spatial resolution of the feature map to be segmented by performing upsampling on the feature map to be segmented, making the feature map return to the same size as the vascular image to be segmented; fuses information of different resolutions through convolution processing to obtain a fused feature map, ensuring the accuracy of the output segmentation result in terms of spatial details; performs convolution refinement on the fused feature map to form a refined feature map; determines the number of segmentation maps based on the preset number of segmentation categories, and compresses the channels of the refined feature map according to the number of segmentation maps, forming multiple vascular segmentation maps, generating vascular segmentation maps with the same size as the vascular image to be segmented, improving the accuracy of the segmentation result.
[0050] Further, for the vascular image segmentation model, its model training loss function is:
[0051] L seg =L ce +L dice
[0052]
[0053] In the formula, Lseg is the model training loss function for the image segmentation model; L ce is the cross-entropy loss function; L dice is the Dice loss function; N is the number of pixels; C is the number of segmentation categories; y n,c is the ground truth value of the c-th class and the n-th pixel; is the predicted value of the c-th class and the n-th pixel.
[0054] The present invention combines the cross-entropy loss function and the Dice loss function to form the model training loss function of the image segmentation model, which can effectively optimize the segmentation accuracy.
[0055] Correspondingly, the present invention provides a vascular segmentation system, including: an image acquisition device and an image segmentation device;
[0056] The image acquisition device is used to acquire the vascular image to be segmented;
[0057] The image segmentation device is used to input the vascular image to be segmented into the vascular image segmentation model, so that the vascular image segmentation model performs the following steps:
[0058] Extract the multi-scale features of the vascular image to be segmented to form a multi-scale feature map;
[0059] Perform multi-level feature processing on the multi-scale feature map to form a multi-scale feature pyramid;
[0060] Perform serialization processing on the multi-scale feature pyramid to form a sequence feature map;
[0061] Perform feature refinement processing on the sequence feature map to form a feature map to be segmented;
[0062] Perform vascular image segmentation on the feature map to be segmented to form a plurality of vascular segmentation maps.
[0063] The image acquisition device of the present invention is used to acquire the blood vessel image to be segmented; the image segmentation device is used to extract the multi-scale features of the blood vessel image to be segmented, obtain different resolution information, and form a multi-scale feature map containing different resolution information; perform multi-level feature processing on the multi-scale feature map, further extract detailed information, form a multi-scale feature pyramid, and capture multi-level feature representations; rearrange the multi-scale feature pyramid into a sequence form to form a sequence feature map, thereby effectively capturing the long-range dependencies and complex spatial structures in the image; perform feature refinement processing on the sequence feature map to form the feature map to be segmented, so as to enhance the expression ability of complex features; finally, perform blood vessel image segmentation on the feature map to be segmented to form several blood vessel segmentation maps. By fully extracting the features of the blood vessel image to be segmented, more accurate image information is provided for image segmentation, thereby effectively improving the accuracy and precision of blood vessel image segmentation.
[0064] Further, the blood vessel image segmentation model includes: an encoder module, a multi-scale feature pyramid module, a Mamba state space model module, a convolutional feed-forward network module, and a decoder module;
[0065] The encoder module extracts the multi-scale features of the blood vessel image to be segmented to form a multi-scale feature map;
[0066] The multi-scale feature pyramid module performs multi-level feature processing on the multi-scale feature map to form a multi-scale feature pyramid;
[0067] The Mamba state space model module performs serialization processing on the multi-scale feature pyramid to form a sequence feature map;
[0068] The convolutional feed-forward network module performs feature refinement processing on the sequence feature map to form the feature map to be segmented;
[0069] The decoder module performs blood vessel image segmentation on the feature map to be segmented to form several blood vessel segmentation maps.
[0070] The blood vessel image segmentation model of the present invention includes an encoder module, a multi-scale feature pyramid module, a Mamba state space model module, a convolutional feed-forward network module, and a decoder module. Through the collaborative work of each module, high-precision image segmentation can be achieved. Description of the Drawings
[0071] Figure 1 It is a schematic flowchart of an embodiment of the blood vessel segmentation method provided by the present invention;
[0072] Figure 2 It is a schematic structural diagram of an embodiment of the multi-scale feature pyramid module provided by the present invention;
[0073] Figure 3 Schematic structural diagram of an embodiment of the blood vessel segmentation system provided by the present invention;
[0074] Figure 4 Schematic structural diagram of an embodiment of the blood vessel image segmentation model provided by the present invention. Detailed implementation manners
[0075] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0076] The flowchart shown in the accompanying drawings is only an example illustration, and does not necessarily include all the contents and operations / steps, nor does it necessarily need to be executed in the described order. For example, some operations / steps can also be decomposed, combined or partially merged. Therefore, the actual execution order may be changed according to the actual situation.
[0077] Next, some implementation manners of the present invention will be described in detail with reference to the accompanying drawings. Without conflict, the following embodiments and the features in the embodiments can be combined with each other.
[0078] Embodiment 1
[0079] As Figure 1 shown, it is a schematic flowchart of an embodiment of the blood vessel segmentation method provided by the present invention. The method includes steps 101 to 102, and the specific steps are as follows:
[0080] Step 101: Obtain the blood vessel image to be segmented.
[0081] Step 102: Input the blood vessel image to be segmented into the blood vessel image segmentation model so that the blood vessel image segmentation model performs the following steps:
[0082] Step 201: Extract multi-scale features of the blood vessel image to be segmented to form a multi-scale feature map;
[0083] Step 202: Perform multi-level feature processing on the multi-scale feature map to form a multi-scale feature pyramid;
[0084] Step 203: Perform serialization processing on the multi-scale feature pyramid to form a sequence feature map;
[0085] Step 204: Perform feature refinement processing on the sequence feature map to form a feature map to be segmented;
[0086] Step 205: Perform vascular image segmentation on the to-be-segmented feature map to form a number of vascular segmentation maps.
[0087] In an embodiment of the present invention, after obtaining the to-be-segmented vascular image, a vascular image segmentation model is used to perform vascular segmentation on the to-be-segmented vascular image. By extracting multi-scale features of the to-be-segmented vascular image, different resolution information is obtained, and a multi-scale feature map containing different resolution information is formed, providing rich context information for subsequent processing modules.
[0088] In an embodiment of the present invention, performing multi-level feature processing on the multi-scale feature map can further extract detailed information, form a multi-scale feature pyramid, and capture multi-level feature representations from fine-grained local features to global information.
[0089] In an embodiment of the present invention, rearranging the multi-scale feature pyramid into a sequence form to form a sequence feature map can effectively capture long-range dependencies and complex spatial structures in the image.
[0090] In an embodiment of the present invention, performing feature refinement processing on the sequence feature map to form a to-be-segmented feature map can enhance the expression ability for complex features;
[0091] In an embodiment of the present invention, performing vascular image segmentation on the to-be-segmented feature map to form a number of vascular segmentation maps. The to-be-segmented feature map can be obtained by fully extracting the features of the to-be-segmented vascular image. This to-be-segmented feature map provides more accurate image information for image segmentation and can effectively improve the accuracy and precision of vascular image segmentation.
[0092] In summary, an embodiment of the present invention provides a vascular segmentation method, which includes obtaining a to-be-segmented vascular image; inputting the to-be-segmented vascular image into a vascular image segmentation model to enable the vascular image segmentation model to perform the following steps: extracting multi-scale features of the to-be-segmented vascular image to form a multi-scale feature map; performing multi-level feature processing on the multi-scale feature map to form a multi-scale feature pyramid; performing serialization processing on the multi-scale feature pyramid to form a sequence feature map; performing feature refinement processing on the sequence feature map to form a to-be-segmented feature map; and performing vascular image segmentation on the to-be-segmented feature map to form a number of vascular segmentation maps. By fully extracting the features of the to-be-segmented vascular image, the present invention provides more accurate image information for image segmentation, thereby effectively improving the accuracy and precision of vascular image segmentation.
[0093] Embodiment 2
[0094] Embodiment 1
[0095] Such as Figure 1As shown, it is a schematic flowchart of an embodiment of the blood vessel segmentation method provided by the present invention. This method includes steps 101 to 102, and the specific steps are as follows:
[0096] Step 101: Obtain the blood vessel image to be segmented.
[0097] Step 102: Input the blood vessel image to be segmented into the blood vessel image segmentation model, so that the blood vessel image segmentation model performs the following steps:
[0098] Step 201: Extract multi-scale features of the blood vessel image to be segmented to form a multi-scale feature map;
[0099] Step 202: Perform multi-level feature processing on the multi-scale feature map to form a multi-scale feature pyramid;
[0100] Step 203: Perform serialization processing on the multi-scale feature pyramid to form a sequence feature map;
[0101] Step 204: Perform feature refinement processing on the sequence feature map to form a feature map to be segmented;
[0102] Step 205: Perform blood vessel image segmentation on the feature map to be segmented to form several blood vessel segmentation maps.
[0103] In the embodiment of the present invention, the blood vessel image segmentation model is used to perform blood vessel segmentation on the blood vessel image to be segmented. By extracting the multi-scale features of the blood vessel image to be segmented, different resolution information is obtained, and a multi-scale feature map containing different resolution information is formed; multi-level feature processing is performed on the multi-scale feature map to further extract detailed information, forming a multi-scale feature pyramid to capture multi-level feature representations; the multi-scale feature pyramid is rearranged into a sequence form to form a sequence feature map, thereby effectively capturing the long-range dependencies and complex spatial structures in the image; feature refinement processing is performed on the sequence feature map to form a feature map to be segmented to enhance the expression ability of complex features; finally, blood vessel image segmentation is performed on the feature map to be segmented to form several blood vessel segmentation maps. By fully extracting the features of the blood vessel image to be segmented, more accurate image information is provided for image segmentation, thereby effectively improving the accuracy of blood vessel image segmentation.
[0104] Furthermore, in the embodiment of the present invention, extracting the multi-scale features of the blood vessel image to be segmented to form a multi-scale feature map is specifically:
[0105] Use the residual network to layer by layer extract the local detail features of the blood vessel image to be segmented;
[0106] Use the encoder to extract the global features of the blood vessel image to be segmented through the self-attention mechanism;
[0107] The local detail features and the global features are spliced to form a multi-scale feature map.
[0108] In the embodiment of the present invention, the encoder module of the vascular image segmentation model can extract multi-scale features of the vascular image to be segmented to form a multi-scale feature map. The specific operations are as follows:
[0109] First, the pre-trained ResNet in the encoder module extracts local detail features layer by layer through a series of convolutional layers and pooling operations, and effectively retains the spatial information of the lower layers through residual connections. Its convolutional operation can be expressed as:
[0110] F i+1 = σ(W i * F i + b i )
[0111] In the formula, F i+1 is the feature map of the (i + 1)-th layer; F i is the feature map of the i-th layer; W i is the convolutional kernel; * represents the convolutional operation; b i is the bias term; σ is the activation function (ReLU).
[0112] In the embodiment of the present invention, through progressive downsampling, ResNet can extract increasingly abstract high-level features while retaining the local structural information in the input image, which provides a data basis for identifying fine anatomical structures such as blood vessels and organ boundaries.
[0113] Next, the pre-trained Swin Transformer in the encoder module extracts global features of the input image through the self-attention mechanism. Different from the above convolution, the self-attention mechanism can better capture global context information by comparing the correlations between pixels at long distances. Its core calculation formula is:
[0114]
[0115] In the formula, A, Q, K, and V are the attention weight matrix, query matrix, key matrix, and value matrix respectively; d is the feature dimension, and T represents the transpose of the matrix.
[0116] The Swin Transformer in the embodiment of the present invention adopts the method of local window division to calculate local and global feature representations layer by layer, and can capture long-range dependencies in the input image. This characteristic makes the Swin Transformer perform excellently when dealing with complex anatomical structures (such as the overall shape and layout of organs).
[0117] Finally, after obtaining the local detailed features and global features, the feature representations of the blood vessel image to be segmented from different perspectives are obtained. ResNet may generate a feature map with 64×64 pixels and 512 channels, while Swin Transformer generates a feature map with 16×16 pixels and 1024 channels. Therefore, to effectively fuse the local detailed features and global features, they can be concatenated in the channel dimension to form a multi-scale feature map:
[0118] F multi = Concat(F resnet + F swin )
[0119] In the formula, F multi is the multi-scale feature map; Concat is the concatenation function; F resnet is the local detailed feature; F swin is the global feature.
[0120] In the embodiment of the present invention, through the concatenation operation, the local detailed features and global context information of the blood vessel image to be segmented are organically combined, and a more comprehensive multi-scale feature map can be formed.
[0121] In the embodiment of the present invention, the encoder module adopts a multi-perspective feature extraction strategy. By simultaneously using the pre-trained ResNet and Swin Transformer encoders, multi-scale and multi-level features of the blood vessel image to be segmented are comprehensively extracted from different angles. The high-level semantic information is gradually extracted through the downsampling operation. These multi-scale feature maps contain different resolution information of the image and provide rich and diverse feature expressions for the subsequent processing module.
[0122] The encoder module of the present invention can effectively improve the feature diversity of the image to be segmented, realize multi-scale feature fusion, and improve the robustness of the model by adopting a multi-perspective feature extraction strategy. By combining the convolutional feature extraction of ResNet and the self-attention mechanism of Swin Transformer, the blood vessel image segmentation model can simultaneously capture local details and global context information, meeting the requirements of multi-scale lesion recognition in medical images. The multi-scale feature fusion strategy ensures the balance of the blood vessel image segmentation model in processing large-scale anatomical structures and small targets, enabling the segmentation task to achieve excellent performance at different scales. Further, the blood vessel image segmentation model effectively enhances its ability to handle noise, artifacts, and deformations by extracting features from multiple perspectives, improving its robustness under complex imaging conditions.
[0123] Furthermore, in the embodiment of the present invention, multi-level feature processing is performed on the multi-scale feature map to form a multi-scale feature pyramid, specifically:
[0124] Perform adaptive pooling on the multi-scale feature map, scale the multi-scale feature map to different resolutions, and form several pooled feature maps;
[0125] Use a convolutional layer to extract the detailed information of several of the pooled feature maps to form several optimized pooled feature maps;
[0126] Concatenate several of the optimized pooled feature maps to form a multi-scale feature pyramid.
[0127] In the embodiments of the present invention, rich local and global feature representations have been obtained in the multi-scale feature map. To further enhance the performance of these features at different scales, a multi-scale feature pyramid module can be used to perform multi-level feature processing on the multi-scale feature map to form a multi-scale feature pyramid, ensuring that the vascular image segmentation model can simultaneously focus on detailed features and global context information.
[0128] See Figure 2 , which is a schematic structural diagram of an embodiment of the multi-scale feature pyramid module provided by the present invention. After obtaining the encoder features, that is, the multi-scale feature map, the multi-scale feature pyramid module performs an adaptive pooling operation on the multi-scale feature map, scales the multi-scale feature map to different resolutions such as 1x1, 2x2, etc., and forms pooled feature maps at multiple scales. This process can be described by the following formula:
[0129]
[0130] In the formula, F pool (i,j) is the pooled feature map; F(i,j) is the multi-scale feature map; k represents the size of the pooling window, and p and q are the offsets of the pooling window in the row and column directions respectively, used to traverse the pixels within the pooling window.
[0131] Through this adaptive pooling in the embodiments of the present invention, pooled feature maps of different scales can be generated, and each feature map corresponds to a different resolution, so as to simultaneously capture detailed information and large-range context information.
[0132] In the embodiments of the present invention, the pooled feature maps of different scales will be further processed through a convolutional layer to form multiple optimized pooled feature maps. The convolutional operation can be expressed as:
[0133] F conv (i,j) = σ(W * F pool (i,j) + b)
[0134] In the formula, F conv (i,j) is the convolutional output feature map; F pool (i,j) is the pooled feature map; W is the convolutional kernel; * represents the convolutional operation; b is the bias term; σ is the ReLU activation function.
[0135] In the embodiment of the present invention, the convolutional layer can further extract details in the feature map and enhance the discrimination ability of the features.
[0136] In the embodiment of the present invention, after the convolutional process is completed, the pooled and optimized feature maps at all different resolutions are concatenated in the channel dimension to form a multi-scale feature pyramid containing multi-scale information. The concatenation operation can be expressed by the following formula:
[0137] F pyramid = Concat(F conv1 , F conv2 , …, F convn )
[0138] In the formula, F pyramid is the multi-scale feature pyramid; F conv1 , F conv2 , …, F convn are the pooled and optimized feature maps at different pooling scales respectively. Concat is the concatenation function.
[0139] In the embodiment of the present invention, by concatenating the pooled and optimized feature maps, local and global information can be combined to form a multi-scale feature representation containing rich context information. The design of the multi-scale feature pyramid can not only accurately capture tiny structures but also fully understand the global structural relationship, that is, capture multi-level feature representations from fine-grained local features to global information, thereby improving the overall segmentation effect.
[0140] Further, in the embodiment of the present invention, the multi-scale feature pyramid is serialized to form a sequence feature map, specifically:
[0141] The dimension of the multi-scale feature pyramid is transformed to form a one-dimensional time series feature;
[0142] The recursive update equation is used to capture the feature dependence relationship of the one-dimensional time series feature and generate a hidden state sequence;
[0143] The hidden state sequence is deserialized, and the dimension of the hidden state sequence is transformed from one-dimensional to two-dimensional to form a sequence feature map.
[0144] In the embodiment of the present invention, the multi-scale feature pyramid already contains rich multi-scale and multi-level features. However, the complex long-distance spatial dependence relationship in medical images cannot be fully processed only by these modules. To solve this problem, the Mamba state space model module in the vascular image segmentation model can be used to serialize the multi-scale feature pyramid to form a sequence feature map.
[0145] In the embodiments of the present invention, the multi-scale feature pyramid obtained through the multi-scale feature pyramid module is a two-dimensional feature map F ∈ R B×C×H×W . Where B is the batch size, C is the number of channels, and H and W are the height and width of the feature map respectively. To convert these two-dimensional spatial features into a processable temporal input, the multi-scale feature pyramid can be dimensionally transformed first to unfold the two-dimensional feature map into a one-dimensional sequence. By flattening the spatial dimensions (i.e., H×W) of the multi-scale feature pyramid, one-dimensional temporal features can be obtained, and the serialized one-dimensional temporal features are represented as F seq ∈R B×C×H×W . Where N = H×W is the sequence length, and this serialization process can be expressed as:
[0146]
[0147] In the formula, i represents the sample number in the batch; j represents the position in the flattened sequence; % represents the modulo operation; represents the floor operation.
[0148] In the embodiments of the present invention, by unfolding the two-dimensional features into temporal features, long-range dependencies between pixels can be captured through the state space model.
[0149] In the embodiments of the present invention, the one-dimensional temporal feature F seq generates a long sequence for each sample, and the length of the sequence is equal to the number of spatial pixels N of the feature map. The temporal one-dimensional temporal feature is used as the input for subsequent recursive modeling to perform temporal modeling on it. Once the feature map is serialized into a temporal input, the state space model gradually processes these temporal features through recursive equations to capture the dependencies at each position. The basic idea of this recursive modeling is that the hidden state H t at each moment depends not only on the current temporal feature F seq , but also on the hidden state H t-1 at the previous moment, so that long-range feature dependencies can be gradually captured.
[0150] In the embodiments of the present invention, after the recursive processing is completed, the obtained hidden state sequence contains enhanced information of the temporal features. In order to be able to continue processing in subsequent network modules, these temporal features need to be re-converted into two-dimensional spatial features. This deserialization operation is the opposite of the feature serialization process, that is, mapping the temporal features back to their corresponding two-dimensional spatial positions. The deserialization operation can be expressed as:
[0151]
[0152] In the formula, F out(i, j, k) is the sequence feature map; % represents the modulo operation; represents the floor operation, H(·) is the mapping function, i and j are the row and column indices of the two-dimensional spatial features respectively, k is the sequence feature index, H is the height of the feature map, k % H and respectively represent the offset positions in the row and column directions.
[0153] Through the above deserialization process, the hidden state sequence is reconstructed into a two-dimensional feature map, enabling the features processed by the temporal modeling to be further utilized by the decoder.
[0154] After the temporal modeling by the Mamba state space model module in this embodiment, it can have a stronger global dependency modeling ability, thereby more accurately capturing complex spatial relationships.
[0155] The Mamba state space model module of the embodiment of the present invention rearranges the multi-scale feature pyramid into a sequence form and then performs temporal feature processing, which can effectively capture the long-distance dependency relationships and complex spatial structures in the image, thereby enhancing the ability to capture the dependency relationships between distant pixels.
[0156] Further, in the embodiment of the present invention, a recursive update equation is used to capture the feature dependency relationships of the one-dimensional temporal features and generate a hidden state sequence, specifically:
[0157] Obtain the recursive equation; the recursive equation is:
[0158] H t = Φ(W ssm H t-1 + U ssm F seq,t + b h )
[0159] In the formula, H t is the hidden state sequence at time t; H t-1 is the hidden state sequence at time t - 1; W ssm is the state transition matrix; U ssm is the input mapping matrix; F seq,t is the input feature at time t after serialization; b h is the bias term; Φ(·) is the non-linear activation function;
[0160] Introduce a residual path into the recursive equation to form a recursive update equation; the recursive update equation is:
[0161] H t = H t-1 + α·Φ(W ssm H t-1 + U ssm Fseq,t +b h )
[0162] In the formula, H t is the hidden state sequence at time t; H t-1 is the hidden state sequence at time t-1; W ssm is the state transition matrix; U ssm is the input mapping matrix; F seq,t is the input feature at time t after serialization; b h is the bias term; Φ(·) is the non-linear activation function; α is the scaling coefficient;
[0163] The feature dependence of the one-dimensional time series features is captured by using a recursive update equation, and a hidden state sequence is generated.
[0164] In the embodiment of the present invention, the hidden state sequence can be generated by capturing the feature dependence of the one-dimensional time series features through a recursive update equation. Among them, the recursive update equation is improved on the basis of the recursive equation. The recursive equation is H t = Φ(W ssm H t-1 + U ssm F seq,t + b h ). The core of the recursive process is to enable the model to capture the global and local time series dependencies in the feature sequence by using the combination of the hidden state H t-1 at the previous moment and the input feature F seq,t at the current moment. The recursive process can gradually integrate the correlations between pixels at long distances, so that in the case of long-distance dependencies, the vascular image segmentation model can still maintain a high feature expression ability. To prevent the problem of gradient disappearance in long sequences, gradient stability and information flow can be maintained by introducing residual connections. Specifically, in the recursive update at each moment, a residual path is introduced, and the recursive update equation is changed to:
[0165] H t = H t-1 + α·Φ(W ssm H t-1 + U ssm F seq,t + b h )
[0166] Among them, α is a learnable scaling coefficient used to adjust the influence of the residual path. Through the residual connection, the hidden state H t in the recursive update process can effectively retain the important information of the previous moment and reduce the loss of information in the long sequence modeling process.
[0167] Further, in the embodiments of the present invention, the sequence feature map is subjected to feature refinement processing to form a feature map to be segmented, specifically:
[0168] Dilated convolution is used to extract the local spatial information of the sequence feature map to form a first feature map;
[0169] Based on a preset non-linear activation function, the first pointwise convolution is used to perform channel expansion on the first feature map to form a second feature map;
[0170] The second pointwise convolution is used to perform channel compression on the second feature map to form a feature map to be segmented.
[0171] In the embodiments of the present invention, after the Mamba state space model module captures global and long-range dependencies through recursive modeling, it is necessary to further refine these enhanced features to ensure that richer local and global information can be extracted. For this purpose, a convolutional feed-forward network module is adopted. By combining convolutional operations and feed-forward networks, the sequence feature map is refined in both the channel dimension and the spatial dimension to form a feature map to be segmented, which can improve the expression ability of the vascular image segmentation model for complex features.
[0172] In the embodiments of the present invention, the processing of the sequence feature map by the convolutional feed-forward network module mainly includes three steps. First, the sequence feature map is processed through a 3×3 convolution (i.e., dilated convolution) to extract and refine local spatial information. The output feature dimension of this convolution operation remains the same as the input, that is The formula for the convolution operation is:
[0173] F conv (i,j) = σ(W conv -F out (i,j) + b conv )
[0174] In the formula, F conv (i,j) is the convolution output feature map; σ is the ReLU activation function; W conv is a 3×3 convolution kernel; F out (i,j) is the sequence feature map; b conv is the bias term; - represents the convolution operation.
[0175] In the embodiments of the present invention, after the convolution operation on the sequence feature map is completed to form a first feature map, channel expansion and non-linear activation are performed on the first feature map. Specifically: channel expansion is performed through a 1×1 convolution (i.e., pointwise convolution), and the number of channels is expanded from d h to a higher dimension d exp。The purpose of this operation is to enhance the expressive ability of features in the channel dimension and provide a larger representation space for subsequent feature processing. The expanded feature dimension is which can be expressed by the following formula:
[0176] F exp (i, j) = Φ(W exp * F conv (i, j) + b exp )
[0177] In the formula, F exp (i, j) is the second feature map after channel expansion; Φ(·) is a non-linear activation function (GELU function); W exp is a 1×1 convolution kernel for channel dimension expansion; F conv (i, j) is the first feature map; b exp is the bias term.
[0178] In the embodiment of the present invention, after the channel expansion and non-linear activation operations are performed on the first feature map to form the second feature map, channel compression and output are performed on the second feature map. Specifically: the number of channels is compressed back to the original dimension d h through another 1×1 convolution (i.e., pointwise convolution), and the output feature dimension is restored to This channel compression operation can be expressed as:
[0179] F out_final (i, j) = W comp * F exp (i, j) + b comp
[0180] In the formula, F out_final (i, j) is the feature map to be segmented; F exp (i, j) is the second feature map; W comp is a 1×1 convolution kernel for channel dimension compression; b comp is the bias term.
[0181] In the embodiment of the present invention, through the convolution operation of channel compression, the original dimension of the feature can be maintained while the feature is refined and enhanced, providing a high-quality feature representation for subsequent segmentation tasks.
[0182] In the convolutional feedforward network module of the embodiment of the present invention, through the combination of convolutional operations and channel expansion, the local and global feature expression capabilities of the network are effectively improved. While maintaining the spatial structure, the input features are refined by expanding and compressing the channel dimensions, enhancing the perception ability of the vascular image segmentation model for complex structures. Especially in the processing of high-dimensional features, it can ensure the retention of global information and the enhancement of detailed features, improving the diversity and expression ability of features. Combined with the temporal dependence modeling of the Mamba state space model module, the image segmentation model can more comprehensively capture the correlation between global context information and local details, thereby not only enhancing the understanding of the global structure but also significantly improving the segmentation accuracy of complex boundaries and local details, laying a solid feature foundation for the final segmentation task.
[0183] Further, in the embodiment of the present invention, for the feature map to be segmented, vascular image segmentation is performed to form a plurality of vascular segmentation maps, specifically as follows:
[0184] Upsample the feature map to be segmented, adjust the spatial size of the feature map to be segmented to the spatial size of the vascular image to be segmented, and form an upsampled feature map;
[0185] Obtain the multi-scale feature maps generated by the encoder;
[0186] Fuse the upsampled feature map and the multi-scale feature maps to form a fused feature map;
[0187] Perform convolutional refinement on the fused feature map to form a refined feature map;
[0188] Determine the number of segmentation maps according to the preset number of segmentation categories;
[0189] Based on the number of segmentation maps, use the third pointwise convolution to perform channel compression on the refined feature map to form a plurality of vascular segmentation maps.
[0190] In the embodiment of the present invention, after obtaining rich global and local features through the above processing, it is necessary to gradually restore the spatial resolution of the feature map to generate a segmentation output that matches the original input image. For this purpose, a decoder module can be used to perform vascular image segmentation on the feature map to be segmented to form a plurality of vascular segmentation maps.
[0191] In the embodiment of the present invention, the decoder module can gradually restore low-resolution, high-dimensional features to high-resolution, low-dimensional feature maps through a series of upsampling and convolutional operations. It mainly includes the following steps:
[0192] First, the decoder module upsamples the feature map through bilinear interpolation or deconvolution operations, restoring the spatial dimensions of the feature map to be segmented to those of the blood vessel image to be segmented. The upsampling operation gradually restores the feature map from a lower resolution to the same resolution as the input image, achieving high-resolution restoration. The formula for upsampling is as follows:
[0193] F up (i,j) = Interpolate(F in , scale_factor = 2)
[0194] where F up (i,j) is the upsampled feature map; F in is the input feature map to be segmented, and the interpolation process scales up the spatial dimensions proportionally.
[0195] While performing the upsampling operation, the decoder module fuses the multi-scale feature maps in the encoder with the upsampled feature map obtained after upsampling through skip connections. This feature fusion operation ensures the combination of high-level semantic information and low-level spatial detail information, thus avoiding the loss of important details during the process of restoring the spatial resolution. The fusion process can be represented by the following formula:
[0196] F merge (i,j) = F up (i,j) + F encoder (i,j)
[0197] where F merge (i,j) is the fused feature map; F up (i,j) is the upsampled feature map; F encoder (i,j) is the multi-scale feature map output by the encoder at the same resolution.
[0198] After feature fusion, the decoder further processes the fused feature map through a 3×3 convolution (i.e., dilated convolution) to extract finer features. The purpose of this convolution operation is to enhance the feature representation ability while gradually restoring the spatial resolution. The formula for convolution is:
[0199] F conv (i,j) = σ(W conv * F merge (i,j) + b conv )
[0200] where F conv (i,j) is the refined feature map; F merge (i,j) is the fused feature map; W conv is the 3×3 convolution kernel; σ is the activation function, and b conv is the bias term.
[0201] By repeating the above processes of upsampling, feature fusion, and convolutional refinement, the feature map can be gradually restored from low resolution to high resolution, and finally a feature map with the same resolution as the original vascular image to be segmented is output. After multiple layers of upsampling and convolutional processing, the decoder can generate a feature map with the same size as the input image, where each channel represents a different segmentation category.
[0202] At the last layer of the decoder module, the number of channels of the refined feature map is reduced to the same as the number of segmentation categories through a 1×1 convolution (i.e., pointwise convolution). This operation ensures that each pixel position corresponds to a classification result for generating the final segmentation map. The convolution operation formula of the output layer is:
[0203] F output (i,j) = W out * F conv (i,j) + b out
[0204] In the formula, F output (i,j) is the final vascular segmentation map; W out is the third pointwise convolution, which is a 1×1 convolution kernel; F conv (i,j) is the refined feature map; b out is the bias term.
[0205] The decoder module of the embodiment of the present invention gradually restores the high-dimensional features extracted by the encoder in the network to the same resolution as the input image through layer-by-layer upsampling and convolutional processing. Combining the skip connection mechanism, the decoder can effectively fuse global and local information to ensure the accuracy and integrity of the segmentation result. The design of the decoder module not only strengthens the understanding of global semantics but also improves the performance of the image segmentation model in segmenting complex structures through layer-by-layer refinement processing, providing a high-quality output for the final vascular segmentation map.
[0206] Further, in the embodiment of the present invention, for the vascular image segmentation model, its model training loss function is:
[0207] L seg = L ce + L dice
[0208]
[0209] In the formula, L seg is the model training loss function of the image segmentation model; L ce is the cross-entropy loss function; L dice is the Dice loss function; N is the number of pixels; C is the number of segmentation categories; y n,cis the true value of the c-th class and the n-th pixel; is the predicted value of the c-th class and the n-th pixel.
[0210] In the embodiment of the present invention, by combining the cross-entropy loss function and the Dice loss function to form the model training loss function of the image segmentation model, the segmentation accuracy can be effectively optimized.
[0211] In summary, the embodiment of the present invention provides a blood vessel segmentation method, which obtains a blood vessel image to be segmented; inputs the blood vessel image to be segmented into a blood vessel image segmentation model, so that the blood vessel image segmentation model performs the following steps: extracting multi-scale features of the blood vessel image to be segmented to form a multi-scale feature map; performing multi-level feature processing on the multi-scale feature map to form a multi-scale feature pyramid; performing serialization processing on the multi-scale feature pyramid to form a sequence feature map; performing feature refinement processing on the sequence feature map to form a to-be-segmented feature map; performing blood vessel image segmentation on the to-be-segmented feature map to form a plurality of blood vessel segmentation maps. By fully extracting the features of the blood vessel image to be segmented, the present invention provides more accurate image information for image segmentation, thereby effectively improving the accuracy and precision of blood vessel image segmentation.
[0212] Embodiment 3
[0213] See Figure 3 , which is a schematic structural diagram of an embodiment of the blood vessel segmentation system provided by the present invention. The system includes an image acquisition device 201 and an image segmentation device 202;
[0214] The image acquisition device 201 is used to acquire a blood vessel image to be segmented;
[0215] The image segmentation device 202 is used to input the blood vessel image to be segmented into a blood vessel image segmentation model, so that the blood vessel image segmentation model performs the following steps:
[0216] extracting multi-scale features of the blood vessel image to be segmented to form a multi-scale feature map;
[0217] performing multi-level feature processing on the multi-scale feature map to form a multi-scale feature pyramid;
[0218] performing serialization processing on the multi-scale feature pyramid to form a sequence feature map;
[0219] performing feature refinement processing on the sequence feature map to form a to-be-segmented feature map;
[0220] performing blood vessel image segmentation on the to-be-segmented feature map to form a plurality of blood vessel segmentation maps.
[0221] Further, in the embodiments of the present invention, the vascular image segmentation model includes: an encoder module, a multi-scale feature pyramid module, a Mamba state space model module, a convolutional feed-forward network module, and a decoder module;
[0222] The encoder module extracts multi-scale features of the vascular image to be segmented to form a multi-scale feature map;
[0223] The multi-scale feature pyramid module performs multi-level feature processing on the multi-scale feature map to form a multi-scale feature pyramid;
[0224] The Mamba state space model module performs serialization processing on the multi-scale feature pyramid to form a sequence feature map;
[0225] The convolutional feed-forward network module performs feature refinement processing on the sequence feature map to form a feature map to be segmented;
[0226] The decoder module performs vascular image segmentation on the feature map to be segmented to form a plurality of vascular segmentation maps.
[0227] See Figure 4, which is a schematic structural diagram of an embodiment of the vascular image segmentation model provided by the present invention. The process of the vascular image segmentation model MSFV-Net for segmenting the vascular image to be segmented is as follows: First, the input vascular image to be segmented is processed by the encoder module. The encoder uses a pre-trained ResNet or Swin Transformer model to extract multi-scale features from different layers. The encoder gradually extracts high-level semantic information through downsampling operations. These multi-scale feature maps contain information of different resolutions of the image and provide rich context information for the subsequent processing modules. Then, the extracted multi-scale feature maps are passed to the multi-scale feature pyramid module. This module generates feature maps of different resolutions through adaptive pooling and further extracts detailed information through convolutional processing. The pooled feature maps are concatenated in the channel dimension to form a multi-scale feature pyramid, capturing multi-level feature representations from fine-grained local features to global information. The concatenated multi-scale feature maps are then fed into the Mamba state space model module. In this module, the feature maps are rearranged into a sequence form for temporal feature processing, thus effectively capturing long-range dependencies and complex spatial structures in the image. The processed feature maps are passed to the convolutional feed-forward network module. This module further adjusts the channel dimension through 1x1 convolutions and introduces non-linear features through the GELU activation function to enhance the expression ability of complex features. At the same time, the Dropout mechanism is used to prevent the model from overfitting. Finally, the processed feature maps are passed to the decoder module. The decoder restores the spatial resolution of the image through gradual upsampling, making the feature maps return to the same size as the input image. The decoder also fuses information of different resolutions through convolutional processing to ensure the accuracy of the output segmentation result in spatial details. The entire process finally outputs a multi-channel segmentation result with the same size as the input image.
[0228] Further, in the embodiment of the present invention, further, in the embodiment of the present invention, extracting multi-scale features of the vascular image to be segmented to form multi-scale feature maps specifically includes:
[0229] Using a residual network to extract local detail features of the vascular image to be segmented layer by layer;
[0230] Using the encoder to extract global features of the vascular image to be segmented through the self-attention mechanism;
[0231] Concatenating the local detail features and the global features to form multi-scale feature maps.
[0232] Further, in the embodiment of the present invention, performing multi-level feature processing on the multi-scale feature maps to form a multi-scale feature pyramid specifically includes:
[0233] Perform adaptive pooling on the multi-scale feature map, scale the multi-scale feature map to different resolutions, and form a number of pooled feature maps;
[0234] Use a convolutional layer to extract the detailed information of a number of the pooled feature maps to form a number of optimized pooled feature maps;
[0235] Concatenate a number of the optimized pooled feature maps to form a multi-scale feature pyramid.
[0236] Further, in the embodiment of the present invention, perform serialization processing on the multi-scale feature pyramid to form a sequence feature map, specifically:
[0237] Perform dimension conversion on the multi-scale feature pyramid to form a one-dimensional time series feature;
[0238] Use a recursive update equation to capture the feature dependence of the one-dimensional time series feature and generate a hidden state sequence;
[0239] Deserialize the hidden state sequence, convert the dimension of the hidden state sequence from one-dimensional to two-dimensional, and form a sequence feature map.
[0240] Further, in the embodiment of the present invention, use a recursive update equation to capture the feature dependence of the one-dimensional time series feature and generate a hidden state sequence, specifically:
[0241] Obtain a recursive equation; the recursive equation is:
[0242] H t =Φ(W ssm H t-1 +U ssm F seq,t +b h )
[0243] In the formula, H t is the hidden state sequence at time t; H t-1 is the hidden state sequence at time t-1; W ssm is the state transition matrix; U ssm is the input mapping matrix; F seq,t is the input feature at time t after serialization; b h is the bias term; Φ(·) is the non-linear activation function;
[0244] Introduce a residual path in the recursive equation to form a recursive update equation; the recursive update equation is:
[0245] H t =H t-1 +α·Φ(W ssm H t-1 +Ussm F seq,t + b h )
[0246] where H t is the hidden state sequence at time t; H t-1 is the hidden state sequence at time t - 1; W ssm is the state transition matrix; U ssm is the input mapping matrix; F seq,t is the input feature at time t after serialization; b h is the bias term; Φ(·) is the non - linear activation function; α is the scaling coefficient;
[0247] Capture the feature dependencies of the one - dimensional time - series features using the recursive update equation and generate a hidden state sequence.
[0248] Furthermore, in the embodiments of the present invention, perform feature refinement processing on the sequence feature map to form a feature map to be segmented, specifically:
[0249] Use dilated convolution to extract the local spatial information of the sequence feature map to form a first feature map;
[0250] Based on a preset non - linear activation function, use a first point - wise convolution to perform channel expansion on the first feature map to form a second feature map;
[0251] Use a second point - wise convolution to perform channel compression on the second feature map to form a feature map to be segmented.
[0252] Furthermore, in the embodiments of the present invention, perform vascular image segmentation on the feature map to be segmented to form a plurality of vascular segmentation maps, specifically:
[0253] Upsample the feature map to be segmented to adjust the spatial size of the feature map to be segmented to the spatial size of the vascular image to be segmented to form an upsampled feature map;
[0254] Obtain the multi - scale feature maps generated by the encoder;
[0255] Fuse the upsampled feature map and the multi - scale feature maps to form a fused feature map;
[0256] Perform convolution refinement on the fused feature map to form a refined feature map;
[0257] Determine the number of segmentation maps according to the preset number of segmentation categories;
[0258] Based on the number of segmentation maps, use a third point - wise convolution to perform channel compression on the refined feature map to form a plurality of vascular segmentation maps.
[0259] Further, in the embodiments of the present invention, for the vascular image segmentation model, its model training loss function is as follows:
[0260] L seg = L ce + L dice
[0261]
[0262] Wherein, L seg is the model training loss function of the image segmentation model; L ce is the cross-entropy loss function; L dice is the Dice loss function; N is the number of pixels; C is the number of segmentation categories; y n,c is the true value of the c-th category and the n-th pixel; is the predicted value of the c-th category and the n-th pixel.
[0263] In summary, the embodiments of the present invention provide a vascular segmentation system. Based on the organic combination of modules, it uses an image acquisition device to acquire the vascular image to be segmented; uses an image segmentation device to input the vascular image to be segmented into the vascular image segmentation model, so that the vascular image segmentation model performs the following steps: extracting multi-scale features of the vascular image to be segmented to form a multi-scale feature map; performing multi-level feature processing on the multi-scale feature map to form a multi-scale feature pyramid; performing serialization processing on the multi-scale feature pyramid to form a sequence feature map; performing feature refinement processing on the sequence feature map to form a to-be-segmented feature map; performing vascular image segmentation on the to-be-segmented feature map to form several vascular segmentation maps. The present invention provides more accurate image information for image segmentation by fully extracting the features of the vascular image to be segmented, and thus effectively improves the accuracy and precision of vascular image segmentation.
[0264] The above specific embodiments have further elaborated in detail the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above are only specific embodiments of the present invention and are not used to limit the protection scope of the present invention. In particular, it is pointed out that for those skilled in the art, any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A blood vessel segmentation method, characterized in that: include: Acquire a blood vessel image to be segmented; The blood vessel image to be segmented is input into the blood vessel image segmentation model, so that the blood vessel image segmentation model performs the following steps: Extracting multi-scale features of the blood vessel image to be segmented to form a multi-scale feature map; Performing multi-level feature processing on the multi-scale feature map to form a multi-scale feature pyramid; Performing serialization processing on the multi-scale feature pyramid to form a sequence feature graph; Performing feature refinement processing on the sequence feature graph to form a feature graph to be segmented; The feature map to be segmented is subjected to blood vessel image segmentation to form a plurality of blood vessel segmentation maps.
2. The blood vessel segmentation method according to claim 1, characterized in that: The step of extracting multi-scale features of the to-be-segmented blood vessel image to form a multi-scale feature map is specifically as follows: Extracting local detail features of the blood vessel image to be segmented layer by layer using a residual network; Using an encoder to extract global features of the blood vessel image to be segmented through a self-attention mechanism; The local detail features and the global features are concatenated to form a multi-scale feature map.
3. The blood vessel segmentation method according to claim 1, characterized in that: The multi-level feature processing is performed on the multi-scale feature map to form a multi-scale feature pyramid, specifically: Adaptively pooling the multi-scale feature map, scaling the multi-scale feature map to different resolutions to form a plurality of pooled feature maps; Using a convolutional layer to extract detailed information of a number of the pooled feature maps to form a number of pooled optimized feature maps; Several pooling optimized feature maps are spliced together to form a multi-scale feature pyramid.
4. The blood vessel segmentation method according to claim 1, characterized in that: The multi-scale feature pyramid is serialized to form a sequence feature graph, specifically: Performing dimension conversion on the multi-scale feature pyramid to form a one-dimensional time series feature; Using a recursive update equation to capture the feature dependency of the one-dimensional time series features and generate a hidden state sequence; The hidden state sequence is deserialized, and the dimension of the hidden state sequence is converted from one dimension to two dimensions to form a sequence feature graph.
5. The blood vessel segmentation method according to claim 4, characterized in that: The recursive update equation is used to capture the feature dependency of the one-dimensional time series feature and generate a hidden state sequence, specifically: Obtain a recursive equation; the recursive equation is: H t =Φ(W ssm H t-1 +U ssm F seq,t +b h ) In the formula, H t is the hidden state sequence at time t; H t-1 is the hidden state sequence at time t-1; W ssm is the state transfer matrix; U ssm is the input mapping matrix; F seq,t is the input feature at time t after serialization; b h is the bias term; Φ(·) is the nonlinear activation function; The residual path is introduced into the recursive equation to form a recursive update equation; the recursive update equation is: H t =H t-1 +α·Φ(W ssm H t-1 +U ssm F seq,t +b h ) In the formula, H t is the hidden state sequence at time t; H t-1 is the hidden state sequence at time t-1; W ssm is the state transfer matrix; U ssm is the input mapping matrix; F seq,t is the input feature at time t after serialization; b h is the bias term; Φ(·) is the nonlinear activation function; α is the scaling factor; A recursive update equation is used to capture the feature dependency of the one-dimensional time series features and generate a hidden state sequence.
6. The blood vessel segmentation method according to claim 1, characterized in that: The feature refinement processing of the sequence feature graph to form the feature graph to be segmented is specifically as follows: Extracting local spatial information of the sequence feature graph using dilated convolution to form a first feature graph; Based on a preset nonlinear activation function, using a first point-by-point convolution to perform channel expansion on the first feature map to form a second feature map; The second feature map is subjected to channel compression by using a second point-by-point convolution to form a feature map to be segmented.
7. The blood vessel segmentation method according to claim 2, characterized in that: The performing of blood vessel image segmentation on the feature map to be segmented to form a plurality of blood vessel segmentation maps is specifically as follows: Upsampling the feature map to be segmented, adjusting the spatial size of the feature map to be segmented to the spatial size of the blood vessel image to be segmented, and forming an upsampled feature map; Obtain a multi-scale feature map generated by the encoder; Performing feature fusion on the upsampled feature map and the multi-scale feature map to form a fused feature map; Performing convolution refinement on the fused feature map to form a refined feature map; Determine the number of segmentation maps according to the preset number of segmentation categories; Based on the number of segmentation maps, the refined feature map is channel compressed by using a third point-by-point convolution to form a plurality of blood vessel segmentation maps.
8. The blood vessel segmentation method according to claim 1, characterized in that: The blood vessel image segmentation model has a model training loss function as follows: L seg =L ce +L dice Where, L seg The model training loss function for the image segmentation model; L ce is the cross entropy loss function; L dice is the Dice loss function; N is the number of pixels; C is the number of segmentation categories; y n,c is the true value of the c-th class and the n-th pixel; is the predicted value of the c-th class and the n-th pixel.
9. A blood vessel segmentation system, characterized in that: include: Image acquisition device and image segmentation device; The image acquisition device is used to acquire the blood vessel image to be segmented; The image segmentation device is used to input the blood vessel image to be segmented into a blood vessel image segmentation model, so that the blood vessel image segmentation model performs the following steps: Extracting multi-scale features of the blood vessel image to be segmented to form a multi-scale feature map; Performing multi-level feature processing on the multi-scale feature map to form a multi-scale feature pyramid; Performing serialization processing on the multi-scale feature pyramid to form a sequence feature graph; Performing feature refinement processing on the sequence feature graph to form a feature graph to be segmented; The feature map to be segmented is subjected to blood vessel image segmentation to form a plurality of blood vessel segmentation maps.
10. The blood vessel segmentation system according to claim 9, characterized in that: The vascular image segmentation model comprises: an encoder module, a multi-scale feature pyramid module, a Mamba state space model module, a convolutional feedforward network module and a decoder module; The encoder module extracts multi-scale features of the blood vessel image to be segmented to form a multi-scale feature map; The multi-scale feature pyramid module performs multi-level feature processing on the multi-scale feature map to form a multi-scale feature pyramid; The Mamba state space model module performs serialization processing on the multi-scale feature pyramid to form a sequence feature graph; The convolutional feedforward network module performs feature refinement processing on the sequence feature graph to form a feature graph to be segmented; The decoder module performs blood vessel image segmentation on the feature map to be segmented to form a plurality of blood vessel segmentation maps.