A method for intracranial artery lumen and wall segmentation based on HRMRI images
By using an encoder network and a dual-branch decoder combined with a self-attention mechanism in HRMRI images, the complexity of intracranial artery lumen and wall segmentation is solved, and efficient and accurate segmentation results are achieved, which is suitable for the precise diagnosis of intracranial arterial lesions.
Patent Information
- Application Number
- CN202510694967.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-05-28
AI Technical Summary
Existing vascular wall segmentation methods are complex and difficult to reproducibly perform in HRMRI images, making the assessment of intracranial atherosclerotic plaque burden cumbersome. Traditional methods also ignore the correlation between the overall morphology of the blood vessels and the location of the plaques, resulting in segmentation results being broken in stenotic areas, making it difficult to achieve accurate lumen and wall segmentation.
A HRMRI-based intracranial artery lumen and wall segmentation method was adopted. High-dimensional features were extracted through an encoder network, and a dual-branch decoder based on spatial position encoding was established. Combined with the self-attention mechanism, parallel segmentation of the lumen and wall was achieved, and the spatial position encoding was shared to ensure the linkage and accuracy of the segmentation.
The accuracy and efficiency of intracranial artery lumen and wall segmentation are improved, noise interference is reduced, the robustness of the model is enhanced, the spatial continuity and consistency of the segmentation results are ensured, and the processing speed and accuracy are improved.
Smart Images

Figure CN120259343B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical informatics, and in particular to a method for segmenting the lumen and wall of an intracranial artery based on HRMRI images. Background Art
[0002] In clinical practice, quantitative metrics such as vessel wall thickness and plaque burden are important tools for measuring plaque. HRMRI, a modern imaging technique, can obtain cross-sectional images of arteries and detect early abnormalities in the vessel wall. Plaque quantification is achieved by identifying the intraluminal and extraluminal boundaries of the vessel wall on HRMRI images. However, due to the complex signal characteristics near the vessel wall, layer-by-layer analysis of HRMRI images is complex and difficult to reproducibly analyze, making the assessment of intracranial atherosclerotic plaque burden cumbersome. Clinicians often spend a considerable amount of time analyzing hundreds of HRMRI frames to accurately assess the condition. Visual identification and manual delineation of the intimal lumen, plaque, and medial and adventitial regions is not only time-consuming and labor-intensive, but also prone to human error and lacks accuracy. Existing vessel and lumen segmentation methods fall into two main categories: one is classical machine learning-based segmentation methods, which rely on rule-based algorithms such as filter enhancement, region growing, level set algorithms, and centerline guidance. These methods utilize image features of the vessel lumen and wall for segmentation, but their high reliance on manual labor makes them difficult to generalize to clinical practice. Another category, deep learning-based methods, has attracted attention for their increased scalability and accuracy. For example, they use feature extraction networks to learn the fine features of intracranial vascular structures. However, these methods often ignore the correlation between the overall vascular morphology and plaque location, resulting in segmentation results that are fragmented in narrower vascular regions and fail to fully represent the continuous structure of the lumen and wall. Traditional methods often perform the lumen and wall segmentation tasks separately and independently, training two independent models based on the original image. Due to the lack of information sharing, the anatomical topological constraints of the vessel wall are difficult to transmit to the lumen segmentation process, limiting the model's understanding of the structural integrity. Furthermore, the two models are prone to feature space misalignment during independent learning. Even with the same input image, the underlying feature representations may differ significantly due to different focus (e.g., focusing on edge gradient changes in the lumen while focusing on texture features in the wall). Therefore, there is an urgent need for intracranial artery lumen and wall segmentation methods that consider the continuous structure of the lumen and wall. Summary of the Invention
[0003] The present invention provides a method for segmenting the lumen and wall of intracranial arteries based on HRMRI images, so as to overcome the defects of the prior art.
[0004] The present invention provides a method for segmenting the lumen and wall of an intracranial artery based on HRMRI images, comprising:
[0005] S1: Acquire HRMRI images and annotate the lumen and wall of intracranial arteries to obtain a dataset;
[0006] S2: extracting features of the dataset through an encoder network to obtain high-dimensional features;
[0007] S3: Establish a dual-branch decoder based on spatial position coding;
[0008] S4: decoding the high-dimensional features through the dual-branch decoder to obtain an intracranial artery segmentation image including a lumen segmentation result and a vessel wall segmentation result.
[0009] According to the method for segmenting the lumen and wall of an intracranial artery based on HRMRI images provided by the present invention, step S1 further includes:
[0010] S11: Acquire HRMRI images;
[0011] S12: Preprocessing the HRMRI image to obtain a preprocessed image;
[0012] S13: registering the pre-processed image using the reference image to obtain a registered image;
[0013] S14: Annotate the intracranial artery lumen and the intracranial artery wall in the registered image respectively to obtain a data set including multiple annotated registered images.
[0014] According to the intracranial artery lumen wall segmentation method based on HRMRI images provided by the present invention, the preprocessing performed on the HRMRI image in step S12 includes removing artifact images, removing signal loss images, and removing abnormal noise images.
[0015] According to the intracranial artery lumen wall segmentation method based on HRMRI images provided by the present invention, step S2 further includes:
[0016] S21: input the data set;
[0017] S22: Convolve the image in the dataset through a convolution block to obtain a convolution feature map;
[0018] S23: Applying instance normalization to the convolution feature map to obtain a normalized feature map;
[0019] S24: Applying a ReLU activation function to the normalized feature map to obtain a nonlinear transformation feature map;
[0020] S25: Pooling the nonlinear transformation data to obtain a pooling feature map;
[0021] S26: Superimpose the pooled feature maps output by multiple convolution blocks to obtain high-dimensional features.
[0022] According to a method for segmenting the intracranial artery lumen and wall based on HRMRI images provided by the present invention, the expression of the normalized feature map in step S23 is:
[0023] ;
[0024] in, is the sample index value, is the channel index value, is the feature map height index value, is the feature map width index value, For the The convolutional feature map of the input The height of the channel is , width is Elements, For the The normalized feature map of the output The height of the channel is , width is Elements, For the The convolutional feature map of the input The mean of the channels, For the The convolutional feature map of the input The variance of the channels, To prevent zero constant.
[0025] According to the intracranial artery lumen wall segmentation method based on HRMRI images provided by the present invention, step S4 further includes:
[0026] S41: Input the high-dimensional features;
[0027] S42: Calculate the attention weight of the high-dimensional feature based on the self-attention mechanism to obtain a weighted feature map;
[0028] S43: Decoding the weighted feature map through the dual-branch decoder and introducing spatial position coding to obtain an intracranial artery segmentation image.
[0029] According to a method for segmenting intracranial artery lumen and wall based on HRMRI images provided by the present invention, in step S43, the step of decoding the weighted feature map by the dual-branch decoder further includes:
[0030] S4311: Upsampling the weighted feature map to obtain an upsampled feature map;
[0031] S4312: Performing deconvolution on the upsampled feature map to obtain a deconvolution feature map;
[0032] S4313: Add a bias term to the deconvolution feature map to obtain a transposed convolution feature map.
[0033] According to the intracranial artery lumen wall segmentation method based on HRMRI images provided by the present invention, in step S43, the step of introducing spatial position coding further includes:
[0034] S4321: Obtaining a spatial position code according to the coordinates of the high-dimensional features in the matrix by using a coding function based on a trigonometric function;
[0035] S4322: Add the spatial position code to each layer output feature map of the dual-branch decoder through a connection function.
[0036] According to a method for segmenting the lumen and wall of an intracranial artery based on HRMRI images provided by the present invention, the expression of the spatial position encoding in step S4321 is:
[0037] ;
[0038] in, To calculate the spatial position encoding, is the coordinate of the feature in the matrix, is the batch size, is the first learning parameter of the encoding function, is the second learning parameter of the encoding function, is the third learned parameter of the encoding function.
[0039] According to a method for intracranial artery lumen and wall segmentation based on HRMRI images provided by the present invention, the dual-branch decoder in step S3 is residually connected to the corresponding layer of the encoder network, and the structure of the dual-branch decoder specifically includes a parallel first branch decoder and a second branch decoder, the first branch decoder and the second branch decoder share spatial position coding, the first branch decoder is used for lumen segmentation, and the second branch decoder is used for wall segmentation.
[0040] The present invention provides a method for intracranial artery lumen and wall segmentation based on HRMRI images. This method introduces a deep learning model with shared feature spatial position encoding and a self-attention mechanism. Based on high-resolution magnetic resonance imaging (MRI) of a patient's intracranial arteries, the method is used to automatically obtain the segmented structure of the intracranial lumen and vessel wall. The method mainly includes the following steps: obtaining a high-resolution MRI dataset of intracranial arteries; constructing an encoder network based on a modified U-net architecture to extract high-dimensional features of the HRMRI images; establishing a dual-branch decoder for intracranial vessel lumen and wall segmentation; ensuring the linkage between lumen and wall segmentation based on shared spatial position encoding; introducing a self-attention mechanism to improve the ability to capture local information; and outputting the intracranial vessel and wall segmentation results.
[0041] The present invention extracts high-dimensional features of HRMRI images through an encoder network, and combines it with a dual-branch decoder based on spatial position coding to more accurately segment the lumen and wall of intracranial arteries, making full use of the spatial information and feature information of the image and improving the accuracy of segmentation; secondly, in the data preprocessing stage, the present invention can effectively reduce the noise and interference in the data by eliminating artifact images, signal loss images and abnormal noise images, enhance the robustness of the model, and help the model maintain stable and accurate segmentation performance in complex and changeable HRMRI images; in addition, the design of the dual-branch decoder enables the segmentation of the lumen and wall to be carried out in parallel, thereby improving processing efficiency. At the same time, due to the introduction of spatial position coding, the model can better understand the spatial structure of the image, further improving the segmentation speed and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1 A schematic flow chart of a method for segmenting the lumen and wall of an intracranial artery based on HRMRI images provided in an embodiment of the present invention;
[0044] Figure 2 A schematic diagram illustrating the principle of a method for segmenting the lumen and wall of an intracranial artery based on HRMRI images provided by an embodiment of the present invention;
[0045] Figure 3 A schematic diagram illustrating the effects of the threshold filtering method and region growing method on 3D blood vessel segmentation provided by an embodiment of the present invention;
[0046] Figure 4A schematic diagram comparing the 3D blood vessel segmentation effects of the Unet model provided in an embodiment of the present invention and the model of the present invention;
[0047] Figure 5 Schematic diagram comparing the cross-sectional tube wall and lumen segmentation effects of the traditional Unet model and the model of the present invention. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the drawings in the present invention. Obviously, the embodiments described are part of the embodiments of the present invention, not all of the embodiments, and they should not be understood as limitations on the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. In the description of the present invention, it should be understood that the terms used are only for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0049] In order to better understand the embodiments of the present invention, the research background of the present invention is first explained in detail below.
[0050] Intracranial atherosclerosis is the primary pathological change leading to ischemic stroke, characterized by vessel wall thickening and plaque formation. Therefore, obtaining clear and detailed images of the vessel wall and plaque structure is essential for accurate diagnosis and risk assessment of cerebrovascular disease. Currently, traditional vascular imaging techniques used in clinical practice include transcranial Doppler (TCD), computed tomography angiography (CTA), magnetic resonance angiography (MRA), and digital subtraction angiography (DSA). These tests have low resolution and can only visualize the residual lumen at the site of plaques, providing limited information about the plaque itself and unable to accurately assess the underlying vessel wall lesions. Furthermore, CTA and DSA have a certain degree of radioactivity, and DSA is invasive, potentially carrying the risk of complications. High-resolution magnetic resonance imaging (HRMRI) can noninvasively and clearly visualize the vessel wall and its pathological conditions, avoiding the potential invasive procedures and complications associated with angiography. Its ability to simultaneously provide multi-planar imaging and varying contrast weightings (such as T1, T2, and PDW) allows for comprehensive and multi-angle observation of plaque morphology, size, location, and thickness, enhancing the comprehensiveness of assessments. These advantages make HRMRI an ideal tool for evaluating intracranial arterial wall and plaque structure.
[0051] In clinical practice, quantitative indicators such as vessel wall thickness and plaque burden are important means of measuring plaques. HRMRI, as a modern imaging technology, can obtain cross-sectional images of arteries and detect early abnormal changes in vessel walls. Quantitative indicators of plaques are achieved by identifying the intraluminal and extraluminal boundaries of the vessel wall on HRMRI images. However, due to the complex signal characteristics near the vessel wall, layer-by-layer analysis of HRMRI images is complex and difficult to reproducible, making the assessment of intracranial atherosclerotic plaque burden cumbersome. Clinicians usually need to spend a lot of time analyzing hundreds of frames of HRMRI images to accurately judge the condition. Visual identification and manual outlining of the intimal lumen, plaques, and medial and adventitial regions is not only time-consuming and labor-intensive, but also prone to human error and difficult to ensure accuracy.
[0052] In the field of high-resolution MRI, artificial intelligence, particularly deep learning, has demonstrated tremendous application value in the segmentation of intracranial blood vessels. Due to the unique advantages of high-resolution MRI in analyzing blood vessel walls, vascular wall segmentation based on this technology has become a research hotspot. Deep learning technology enables precise segmentation of blood vessel walls, providing important insights for early diagnosis and treatment of diseases.
[0053] Compared to the wall and lumen features of large vessels such as the cervicothoracic arteries, segmenting intracranial vessel walls and vessels presents the following challenges: High anatomical complexity: Compared to cervicothoracic vessels, intracranial arteries have more bifurcations and more complex three-dimensional shapes. Although existing methods have attempted to introduce prior constraints such as region size and centroid location, this geometric information is overly simplistic and cannot accurately represent the complex morphological characteristics of intracranial arteries, resulting in limited model generalization. Image quality and morphological interference are significant: Intracranial HRMRI images often suffer from blurred boundaries, low signal-to-noise ratio, and flow void artifacts. Existing segmentation methods are prone to missed detections or misclassifications, especially in complex bifurcations or lesions. Some models still require manual correction, limiting the reliability of automated applications. Small vessel wall structures are difficult to label: Intracranial vessels have thin walls and low contrast, making it difficult for existing models to effectively capture their weak characteristic signals. Because the labeling process is highly dependent on clinical expertise and is time-consuming and labor-intensive, existing deep learning methods for cervicothoracic vessels face challenges with generalization and limited training data for this task.
[0054] In order to solve the above problems, the present invention proposes a method for segmenting the lumen and wall of intracranial arteries based on HRMRI images.
[0055] The following describes embodiments of the present invention based on the drawings.
[0056] like Figure 1 As shown, the present invention provides a method for segmenting the lumen and wall of an intracranial artery based on HRMRI images, comprising:
[0057] S1: Acquire HRMRI images and annotate the lumen and wall of the intracranial arteries to obtain a dataset.
[0058] Wherein, step S1 further includes:
[0059] S11: Acquire HRMRI images.
[0060] In step S11 , a magnetic resonance imaging device is first selected to ensure image quality, and scanning parameters are adjusted to obtain the best image effect. The patient is ensured to remain still during the scanning process to reduce the influence of motion artifacts.
[0061] S12: Preprocessing the HRMRI image to obtain a preprocessed image.
[0062] The preprocessing performed on the HRMRI image in step S12 includes removing artifact images, removing signal loss images, and removing abnormal noise images.
[0063] The preprocessing steps in step S12 are intended to improve image quality and reduce noise and interference factors, including removing artifact images: checking whether there are artifacts in the image due to equipment failure, patient movement or other factors, and removing these images; removing signal loss images: due to patient movement and equipment failure during the scanning process, signal loss may occur, so they should also be removed to avoid interference with subsequent analysis; removing abnormal noise images: removing abnormal noise in the image. The noise is caused by equipment noise, environmental interference, etc., and a filter is needed to reduce the noise.
[0064] S13: registering the pre-processed image using the reference image to obtain a registered image.
[0065] Step S13 aims to ensure the spatial consistency of all images. First, a high-quality image with clear anatomical structure is selected as the reference image, and then the other pre-processed images are translated, rotated, and scaled using affine transformation to align with the reference image so that all images are anatomically consistent.
[0066] S14: Annotate the intracranial artery lumen and the intracranial artery wall in the registered image respectively to obtain a data set including multiple annotated registered images.
[0067] In step S41, the lumen and wall areas of the intracranial arteries are first marked in the registered images manually or using a semi-automatic tool. Subsequently, all the marked registered images are combined into a dataset, and the obtained dataset will be used to train machine learning.
[0068] S2: Extract the features of the dataset through the encoder network to obtain high-dimensional features.
[0069] Wherein, step S2 further includes:
[0070] S21: Input the data set.
[0071] S22: Convolve the images in the dataset through a convolution block to obtain a convolution feature map.
[0072] S23: Apply instance normalization to the convolutional feature map to obtain a normalized feature map.
[0073] The expression of the normalized feature map in step S23 is:
[0074] ;
[0075] in, is the sample index value, is the channel index value, is the feature map height index value, is the feature map width index value, For the The convolutional feature map of the input The height of the channel is , width is Elements, For the The normalized feature map of the output The height of the channel is , width is Elements, For the The convolutional feature map of the input The mean of the channels, For the The convolutional feature map of the input The variance of the channels, To prevent zero constant.
[0076] S24: Applying a ReLU activation function to the normalized feature map to obtain a nonlinear transformation feature map.
[0077] S25: Pooling the nonlinear transformation data to obtain a pooling feature map.
[0078] Furthermore, the pooling layer in step S25 is used to reduce the dimension of the feature map while retaining the most important information. Pooling helps to reduce the amount of computation while improving the generalization ability of the model.
[0079] S26: Superimpose the pooled feature maps output by multiple convolution blocks to obtain high-dimensional features.
[0080] Specifically, the encoder in step S2 is primarily designed to extract high-dimensional features from the input intracranial artery HRMRI image, providing rich information for subsequent segmentation. The encoder is based on a modified U-Net architecture and includes the following: Convolutional blocks: Each convolutional block contains a convolution layer, instance normalization, and a LeakyReLU activation function. The convolutional layer uses 3D convolution (Convolutional3D), as 3D convolution can capture the hierarchical relationships of the image and is more suitable for processing 3D MRA images than 2D convolution. Convolution and pooling: During the convolution process, the image is gradually reduced in size through multiple convolutional and pooling layers to extract concentrated image features. Instance normalization helps maintain feature stability and accelerate convergence.
[0081] Furthermore, the encoder in step S2 consists of 4 consecutive convolution blocks. After 4 convolutions and pooling, a concentrated feature map is finally obtained, which contains the high-dimensional feature information of the image. The formation of a high-dimensional feature representation increases the capacity of the model, enabling it to learn more complex data structures.
[0082] S3: Establish a dual-branch decoder based on spatial position coding.
[0083] Among them, the dual-branch decoder in step S3 is residually connected to the corresponding layer of the encoder network. The structure of the dual-branch decoder specifically includes a parallel first branch decoder and a second branch decoder. The first branch decoder and the second branch decoder share spatial position coding. The first branch decoder is used for lumen segmentation, and the second branch decoder is used for tube wall segmentation.
[0084] Furthermore, the dual-branch decoder is designed to simultaneously process the segmentation tasks of the lumen and the wall. Since the lumen and the wall are closely related in anatomical structure but have their own unique characteristics, two parallel branches are established in step S3 to process them separately, which can more effectively capture and utilize this information.
[0085] The dual-branch decoder consists of two parallel decoder branches. The established dual-branch decoder shares the same spatial position encoding. Spatial position encoding is a method of embedding spatial position information into feature representation, which can ensure that the model maintains spatial consistency during the decoding process, thereby more accurately locating the lumen and wall.
[0086] In addition, a residual connection is established between the corresponding layers of the dual-branch decoder and the encoder network. The residual connection can alleviate the gradient vanishing problem in deep networks and accelerate the training process by adding the input directly to the output. The residual connection enables the features extracted by the encoder network to be directly passed to the corresponding layers of the decoder, thereby enhancing the reusability of features and the fluidity of information.
[0087] In the decoder stage of step S3 and the subsequent step S4, the present invention builds two parallel decoder branch structures for intracranial vascular lumen segmentation and intracranial vascular wall segmentation respectively, and encodes the spatial positions shared by the two branches. Since from a physiological point of view, the place where there is a vascular lumen must be surrounded by the vascular wall, the intracranial vascular lumen and the wall are interdependent, thereby enhancing the linkage effect when the intracranial vascular lumen and the intracranial vascular wall are segmented.
[0088] In order to solve the problem of blood vessel features disappearing in multiple convolutions, the decoder introduces residual connections to pass the features in the encoder directly to the decoder. Each layer of the decoder is connected to the encoding of a certain layer. The residual connection can be simply understood as a linear function, expressed as:
[0089] ;
[0090] in, represents the input of this layer, Indicates that the layer is sensitive to input The output after a series of transformations (such as convolution, activation function, etc.), Represents the output after residual connection. This formula reflects the core idea of residual connection, that is, input Add directly to the output of this layer On the top, the output after residual connection is formed .
[0091] S4: decoding the high-dimensional features through the dual-branch decoder to obtain an intracranial artery segmentation image including a lumen segmentation result and a vessel wall segmentation result.
[0092] Wherein, step S4 further includes:
[0093] S41: Input the high-dimensional features.
[0094] S42: Based on the self-attention mechanism, calculate the attention weight of the high-dimensional feature to obtain a weighted feature map.
[0095] Due to the design of the dual-branch decoder structure and the introduction of spatial position coding as a communication channel between the dual-branch decoders, the decoders cannot obtain the correct features when segmenting the corresponding tasks (that is, the unique features of the lumen will affect the results when the wall is segmented, and the unique features of the wall will affect the results when the lumen is segmented). Therefore, in step S42 of the present invention, a self-attention mechanism is introduced in the decoder. Through the self-attention mechanism, the two branch decoders can also fuse the spatial position relationship while paying more attention to the unique features of their own tasks. The obtained weighted feature map emphasizes the part of the input features that is more important for the segmentation task, so that the model can more accurately capture the features of the lumen and wall of the intracranial artery.
[0096] S43: Decoding the weighted feature map through the dual-branch decoder and introducing spatial position coding to obtain an intracranial artery segmentation image.
[0097] Wherein, in step S43, the step of decoding the weighted feature map by the dual-branch decoder further includes:
[0098] S4311: Upsample the weighted feature map to obtain an upsampled feature map.
[0099] During the decoding process, since the encoder network usually includes multiple downsampling (such as pooling) steps, which causes the resolution of the feature map to gradually decrease, in step S43, in order to restore the resolution of the original image, the decoder network first needs to perform an upsampling operation. The purpose is to increase the resolution of the weighted feature map to a level close to the original image or the target resolution. The feature map obtained after upsampling is called an upsampled feature map, which retains the important information in the original weighted feature map but has a higher resolution.
[0100] S4312: Perform deconvolution on the upsampled feature map to obtain a deconvolution feature map.
[0101] The purpose of deconvolution is opposite to that of convolution, that is, the purpose is to increase the resolution of the feature map. In the deconvolution operation of step S4312, a convolution kernel (or filter) is used to slide on the upsampled feature map, but the size of the output feature map will be larger than the input feature map. The feature map obtained after the deconvolution operation is called a deconvolution feature map, and its resolution is further increased while retaining the key information in the upsampled feature map.
[0102] S4313: Add a bias term to the deconvolution feature map to obtain a transposed convolution feature map.
[0103] In step S4313, after the deconvolution operation, a bias term needs to be added to the feature map. The bias term allows the model to add a learnable constant to each position of the output feature map, which helps the model better fit the training data and may improve the accuracy of segmentation.
[0104] The bias term is typically a vector with the same number of channels as the output feature map, with each element corresponding to a channel's bias value. This bias vector is added to each channel of the deconvolution feature map before passing it to the next layer. The resulting feature map after adding the bias term is called a transposed convolution feature map, which contains higher-resolution segmentation information and is used for the final segmentation output.
[0105] In step S43, the step of introducing spatial position coding further includes:
[0106] S4321: Obtain spatial position coding according to the coordinates of the high-dimensional features in the matrix using a coding function based on trigonometric functions.
[0107] The purpose of step S4321 is to obtain the spatial position code based on the coordinate calculation of the high-dimensional feature in the matrix to ensure spatial consistency during the decoding process. The specific implementation method is to use a coding function based on trigonometric functions to calculate the spatial position code. When processing periodic data, it can capture information of different frequencies and is more suitable for separate coding of the lumen and wall. The final calculated spatial position code is a vector with the same dimension as the feature, which contains information about the spatial position of the feature.
[0108] The expression of the spatial position coding in step S4321 is:
[0109] ;
[0110] in, To calculate the spatial position encoding, is the coordinate of the feature in the matrix, is the batch size, is the first learning parameter of the encoding function, is the second learning parameter of the encoding function, is the third learned parameter of the encoding function.
[0111] S4322: Add the spatial position code to each layer output feature map of the dual-branch decoder through a connection function.
[0112] The purpose of step S4322 is to add the calculated spatial position code to the output feature map of each layer of the dual-branch decoder to enhance the spatial information of the feature map, and use the spatial position code as a channel between the dual-branch decoders so that the two decoders can transmit information to each other.
[0113] Specifically, in step S4322, the spatial position code is added to the output feature map of each layer of the dual-branch decoder, that is, at each stage of the decoding process, the feature map is combined with the spatial position information to maintain spatial consistency. By introducing the spatial position code, the model can better understand the spatial relationship in the feature map and improve the accuracy of segmentation, especially when segmenting the lumen and wall of the intracranial artery processed by the present invention and medical images with complex spatial structures, the spatial position information can be better guaranteed to correspond.
[0114] Spatial Position Encoding in steps S4321 to S4322 is a technique that enhances the model's spatial understanding and is particularly suitable for segmenting structures such as intracranial blood vessels, helping the model to more accurately locate features in the image.
[0115] The process of introducing spatial position encoding is as follows: at each decoder layer, the multi-level, multi-dimensional features extracted by the encoder are fused to generate a highly refined feature representation, into which the spatial position encoding is embedded. The position encoding marks the coordinates of the features in the image, thereby helping the model to identify different image regions during the segmentation process.
[0116] The subsequent two branches share the same positional encoding to ensure spatial correlation between lumen and wall segmentation. Specifically, at each decoding layer, the positional encoding is embedded into the feature map, allowing the lumen and wall to cooperate in segmentation.
[0117] The core of the spatial position encoding mechanism introduced in the present invention is that at the end stage of the encoder processing flow, through an efficient feature aggregation process, all extracted multi-level and multi-dimensional features are condensed and integrated to form a highly refined and information-rich feature representation. Subsequently, this condensed feature set is further fed into a specific position encoding module to accurately encode the spatial position of areas with significant features. Subsequently, the present invention adds the spatial encoding to each layer of the decoder feature map using the concat function and introduces a self-attention mechanism in each layer.
[0118] Finally, after processing steps S1 to S4, the dual-branch decoder can output two segmentation result images, corresponding to the lumen and wall of the intracranial blood vessels respectively. Combining the segmentation results of the lumen and wall, a complete intracranial artery segmentation image is obtained, which facilitates the subsequent analysis and diagnosis of intracranial vascular lesions.
[0119] like Figure 2 Figure 2 shows a schematic diagram of the network principle of the HRMRI image-based intracranial artery lumen and wall segmentation method of the present invention. First, the original HRMRI image dataset is input. Specifically, the original HRMRI image dataset is intracranial artery imaging data acquired through high-resolution magnetic resonance imaging scans. This dataset contains HRMRI images of intracranial arteries from multiple patients. The images have high resolution and can clearly present the structure and details of the intracranial arteries. For each image, a professional medical image annotation tool is used to manually annotate the image. The annotation content includes: arterial lumen area and vascular wall area to ensure the completeness and accuracy of the image information, providing high-quality annotated data for subsequent model training. All annotations are completed by radiologists to ensure the consistency and reliability of the annotated data.
[0120] Subsequently, a dual-branch decoder structure is established through the residual connection of the encoder network and the decoder network. The two tasks share the same encoder so that the model can obtain the same feature expression. Then, by establishing a channel between the two branch decoders to transmit spatial feature encoding, the lumen model can know the segmentation position of the wall model, so that the two models can guide each other in segmentation, thereby improving the segmentation effect. Finally, the results of the segmentation of the internal structure of the intracranial blood vessels, namely the intracranial blood vessel lumen segmentation results and the intracranial blood vessel wall segmentation results, are output. The obtained segmentation results are of great significance for subsequent research on vascular lesions and assessment of vascular health status.
[0121] The following combination Figures 3 to 5 The results of the intracranial artery lumen wall segmentation method based on HRMRI images provided by the present invention are compared with those of traditional segmentation methods.
[0122] like Figure 3 As shown, the effect of 3D blood vessel segmentation is achieved by using the traditional threshold filtering method and region growing method. Figure 3 It can be seen that the traditional segmentation effect of the intracranial basal segment is extremely poor because the blood vessels pass through the middle of the bones. Figure 4 The 3D blood vessel segmentation effect diagram of the traditional Unet model and the improved model of the present invention. The green part is the segmentation result of the traditional Unet model, and the corresponding dice coefficient is 0.852. The red part is the segmentation result of the improved model of the present invention, and the corresponding dice coefficient is 0.878. Figure 5 The cross-sectional wall and lumen segmentation effects of the traditional Unet model and the improved model of the present invention are shown in FIG. Figure 5 The left image in the middle shows the segmentation result of the traditional Unet model. The yellow inner boundary is the lumen, and the green outer boundary is the wall. The dice coefficient of the lumen is 0.868, and the dice coefficient of the wall is 0.876. Figure 5 The figure on the right shows the segmentation results of the improved model of the present invention. The Dice coefficient for the lumen is 0.900, and the Dice coefficient for the wall is 0.902. The Dice coefficient is a geometric similarity metric function used to measure the similarity between the model prediction and the true target. Its value ranges from 0 to 1, and the closer it is to 1, the better the model construction effect. As can be seen from the above results, the improved model established by the present invention's method for intracranial artery lumen and wall segmentation based on HRMRI images is significantly superior to traditional methods in lumen and wall segmentation, with high accuracy.
[0123] The present invention provides a method for segmenting the lumen and wall of intracranial arteries based on HRMRI images. Through a dual-branch decoder structure, shared feature spatial position encoding, and a self-attention mechanism, the segmentation accuracy of the lumen and wall of intracranial arteries is significantly improved, avoiding the common fracture phenomenon in traditional methods and solving the problem of splitting the segmentation tasks of the lumen and wall. The dual-branch decoder structure and the use of residual connections ensure the spatial continuity and consistency of the segmentation, making the segmentation results more consistent with the anatomical structure of the blood vessels and contributing to the complete presentation of the global morphology. In summary, the present invention not only outperforms traditional methods in segmentation accuracy and stability, but also provides strong technical support for the accurate diagnosis of intracranial arterial lesions.
[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for segmenting the lumen and wall of intracranial arteries based on HRMRI images, characterized in that: include: S1: Acquire HRMRI images and annotate the lumen and wall of intracranial arteries to obtain a dataset; S2: extracting features of the dataset through an encoder network to obtain high-dimensional features; S3: Establish a dual-branch decoder based on spatial position coding; The dual-branch decoder in step S3 is connected to the residual of the corresponding layer of the encoder network. The structure of the dual-branch decoder specifically includes a parallel first branch decoder and a second branch decoder. The first branch decoder and the second branch decoder share a spatial position code. The first branch decoder is used for lumen segmentation, and the second branch decoder is used for vessel wall segmentation. S4: decoding the high-dimensional features by the dual-branch decoder to obtain an intracranial artery segmentation image including a lumen segmentation result and a vessel wall segmentation result; Step S4 further includes: S41: inputting the high-dimensional features; S42: calculating the attention weights of the high-dimensional features based on the self-attention mechanism to obtain a weighted feature map; S43: decoding the weighted feature map through the dual-branch decoder and introducing spatial position coding to obtain an intracranial artery segmentation image; In step S43, the step of decoding the weighted feature map by the dual-branch decoder further includes: S4311: upsampling the weighted feature map to obtain an upsampled feature map; S4312: deconvolving the upsampled feature map to obtain a deconvolved feature map; S4313: adding a bias term to the deconvolved feature map to obtain a transposed convolution feature map; In step S43, the step of introducing spatial position coding further includes: S4321: obtaining spatial position coding according to the coordinates of the high-dimensional features in the matrix by using a coding function based on trigonometric functions; S4322: adding the spatial position coding to each layer output feature map of the dual-branch decoder through a connection function; The expression of the spatial position coding in step S4321 is: ; in, To calculate the spatial position encoding, is the coordinate of the feature in the matrix, is the batch size, is the first learning parameter of the encoding function, is the second learning parameter of the encoding function, is the third learned parameter of the encoding function.
2. The method for segmenting the intracranial artery lumen and wall based on HRMRI images according to claim 1, characterized in that: Step S1 further comprises: S11: Acquire HRMRI images; S12: Preprocessing the HRMRI image to obtain a preprocessed image; S13: registering the pre-processed image using the reference image to obtain a registered image; S14: Annotate the intracranial artery lumen and the intracranial artery wall in the registered image respectively to obtain a data set including multiple annotated registered images.
3. The method for segmenting the intracranial artery lumen wall based on HRMRI images according to claim 2, characterized in that: The preprocessing performed on the HRMRI image in step S12 is to remove artifact images, remove signal loss images, and remove abnormal noise images.
4. The method for segmenting the intracranial artery lumen and wall based on HRMRI images according to claim 1, characterized in that: Step S2 further comprises: S21: input the data set; S22: Convolve the image in the dataset through a convolution block to obtain a convolution feature map; S23: Applying instance normalization to the convolution feature map to obtain a normalized feature map; S24: Applying a ReLU activation function to the normalized feature map to obtain a nonlinear transformation feature map; S25: Pooling the nonlinear transformation feature map to obtain a pooled feature map; S26: Superimpose the pooled feature maps output by multiple convolution blocks to obtain high-dimensional features.
5. The method for segmenting the intracranial artery lumen and wall based on HRMRI images according to claim 4, characterized in that: The expression of the normalized feature map in step S23 is: in, is the sample index value, is the channel index value, is the feature map height index value, is the feature map width index value, For the The convolutional feature map of the input The height of the channel is , width is Elements, For the The normalized feature map of the output The height of the channel is , width is Elements, For the The convolutional feature map of the input The mean of the channels, For the The convolutional feature map of the input The variance of the channels, To prevent zero constant.
Citation Information
Patent Citations
Double-branch OCT blood vessel hyperfine semantic segmentation method of encoder-decoder structure
CN116862891A
Brain tumor MRI image segmentation model and method based on improved Swin UNETR network
CN119600043A