A blood vessel image segmentation method, device, equipment and medium
By extracting constrained features using a variational self-decoder in the target image segmentation model, the problem of insufficient accuracy and generalization performance of existing neural network models in blood vessel image segmentation is solved, achieving blood vessel image segmentation with higher accuracy and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING WUJIE FUTURE POWER TECHNOLOGY CO LTD
- Filing Date
- 2023-02-28
- Publication Date
- 2026-08-04
AI Technical Summary
Existing neural network models lack accuracy and generalization performance in blood vessel image segmentation, resulting in inaccurate segmentation results.
A target image segmentation model is adopted, including an encoder, a first decoder, and a second decoder. The second decoder is a variational autodecoder. By preprocessing and segmenting the blood vessel image to be segmented, image blocks of a preset size are obtained, and the blocks are stitched together based on their relative positional relationship. The variational autodecoder is used to constrain the feature extraction process, thereby improving the model's generalization ability.
This improves the accuracy of blood vessel image segmentation and the generalization ability of the model, ensuring the precision and efficiency of blood vessel segmentation.
Smart Images

Figure CN118570114B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical image processing technology, and in particular to a method, apparatus, device and medium for segmenting blood vessel images. Background Technology
[0002] The structure of cerebral blood vessels is crucial medical information in the diagnosis and treatment of cerebrovascular diseases. The accuracy of extracting these structures also affects the precision and efficiency of clinical diagnosis and treatment.
[0003] Since multi-scale vessel enhancement filtering technology, a vessel segmentation method, requires a large amount of complex image preprocessing and postprocessing, many vessel segmentation methods based on neural network models such as U-Net and V-Net have been proposed to improve the efficiency of vessel image segmentation.
[0004] However, the accuracy of blood vessel image segmentation results from simple models such as U-Net and V-Net, as well as the generalization performance of these models, still need to be improved. Summary of the Invention
[0005] This invention provides a method, apparatus, device, and medium for segmenting blood vessel images, which can improve the generalization ability of neural network models used for blood vessel image segmentation and improve the accuracy of blood vessel image segmentation.
[0006] In a first aspect, embodiments of the present invention provide a method for segmenting blood vessel images, the method comprising:
[0007] Preprocessing and image segmentation are performed on the blood vessel image to be segmented to obtain multiple blood vessel image blocks of a preset size;
[0008] Each blood vessel image block to be segmented is input into the target image segmentation model to obtain the corresponding blood vessel segmentation image block;
[0009] The target blood vessel segmentation image is obtained by stitching together the images based on the relative positional relationship of each segmented blood vessel image block.
[0010] The target image segmentation model includes an encoder, a first decoder, and a second decoder. The second decoder is a variational self-decoder trained using a blood vessel enhancement segmentation reference image corresponding to the model training sample image as the sample label.
[0011] Secondly, embodiments of the present invention also provide a blood vessel image segmentation apparatus, the apparatus comprising:
[0012] The image preprocessing module is used to preprocess the blood vessel image to be segmented and perform image segmentation operations to obtain multiple blood vessel image blocks of a preset size.
[0013] The image segmentation module is used to input each blood vessel image block to be segmented into the target image segmentation model to obtain the corresponding blood vessel segmentation image block;
[0014] The image post-processing module is used to stitch images together based on the relative positional relationship of each segmented blood vessel image block to obtain the target blood vessel segmentation image;
[0015] The target image segmentation model includes an encoder, a first decoder, and a second decoder. The second decoder is a variational self-decoder trained using a blood vessel enhancement segmentation reference image corresponding to the model training sample image as the sample label.
[0016] Thirdly, embodiments of the present invention also provide a computer device, the computer device comprising:
[0017] One or more processors;
[0018] Memory, used to store one or more programs;
[0019] When the one or more programs are executed by the one or more processors, the one or more processors implement the blood vessel image segmentation method provided in any embodiment of the present invention.
[0020] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the blood vessel image segmentation method provided in any embodiment of the present invention.
[0021] The embodiments of the above invention have the following advantages or beneficial effects:
[0022] The technical solution of this invention involves preprocessing and segmenting the blood vessel image to be segmented to obtain multiple blood vessel image blocks of a preset size. Each blood vessel image block is then input into a target image segmentation model to obtain a corresponding blood vessel segmentation image block. Based on the relative positional relationship of each blood vessel segmentation image block, the images are stitched together to obtain a target blood vessel segmentation image. The target image segmentation model includes an encoder, a first decoder, and a second decoder. The second decoder is a variational self-decoder trained using a blood vessel enhancement segmentation reference image corresponding to the model's training sample image as the sample label. This technical solution solves the problem of low accuracy in blood vessel image segmentation using existing neural network models, improves the generalization ability of neural network models used for blood vessel image segmentation, and enhances the accuracy of blood vessel image segmentation. Attached Figure Description
[0023] Figure 1 This is a flowchart of a blood vessel image segmentation method provided in an embodiment of the present invention;
[0024] Figure 2 This is a flowchart of another blood vessel image segmentation method provided in an embodiment of the present invention;
[0025] Figure 3 This is a schematic diagram of the structure of an initial image segmentation model provided in an embodiment of the present invention;
[0026] Figure 4 This is a schematic diagram of an attention gate provided in an embodiment of the present invention;
[0027] Figure 5 This is an example of a target blood vessel segmentation image provided in an embodiment of the present invention;
[0028] Figure 6 This is a structural block diagram of a blood vessel image segmentation device provided in an embodiment of the present invention;
[0029] Figure 7 This is a structural block diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0030] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention and not the entire structure.
[0031] Figure 1 This is a flowchart of a blood vessel image segmentation method provided in an embodiment of the present invention. This embodiment is applicable to situations where blood vessel image segmentation is based on neural networks. The method can be executed by a blood vessel image segmentation device, which can be implemented in software and / or hardware and integrated into a computer device with application development capabilities.
[0032] like Figure 1 As shown, the blood vessel image segmentation method in this embodiment includes the following steps:
[0033] S110. Perform preprocessing and image segmentation operations on the blood vessel image to be segmented to obtain multiple blood vessel image blocks of a preset size.
[0034] The image of the vessel to be segmented can be a clinical medical image including the vessel to be segmented. The image type can be a computed tomography (CT) image, a magnetic resonance imaging (MRI) image, or an image displaying vascular structure in Digital Imaging and Communications in Medicine (DICOM) format, such as a digital subtraction angiography (DSA) image, a magnetic resonance angiography (MRA) image, or a CT angiography (CTA) image.
[0035] The preprocessing operations performed on the blood vessel image to be segmented include pixel value adjustment based on pixel value distribution to improve the contrast of the image; it also includes pixel value standardization and pixel spacing adjustment. Specifically, the pixel spacing adjustment can use trilinear interpolation to standardize the pixel spacing in the blood vessel image to be segmented.
[0036] Then, the preprocessed blood vessel image to be segmented is further segmented to obtain multiple blood vessel image patches of a preset size, thus ensuring that the paradigm of the blood vessel image to be segmented is consistent with the paradigm of the input image used for training the image segmentation model. This is because the target image segmentation model processes images on a patch-by-pattern basis. This takes into account that in real-world image segmentation applications, clinical medical images containing blood vessels to be segmented may be acquired at different sizes. After image segmentation, the target image segmentation model can process blood vessel images with a unified paradigm.
[0037] During image segmentation, a sliding window of a preset size can slide across the target format blood vessel image to be segmented at a preset unit sliding distance, sequentially cropping multiple blood vessel image patches of the preset size. The size of the sliding window is the size of each image patch, and the preset unit sliding distance determines the target region for blood vessel segmentation. Preferably, the preset unit sliding distance is less than the side length of the sliding window's edge parallel to the sliding direction, meaning that image cropping is performed sequentially with overlap. The size of the preset unit sliding distance determines the size of the overlapping region. For example, setting the overlap region to 50% means that half of the image patch cropped by the sliding window will appear repeatedly in the next cropped image patch, thus avoiding the omission of image information during image segmentation.
[0038] S120. Input each blood vessel image block to be segmented into the target image segmentation model to obtain the corresponding blood vessel segmentation image block.
[0039] The target image segmentation model is a pre-trained neural network model capable of segmenting images of the type of blood vessel to be segmented. It can be understood that for blood vessel images of different formats / types to be segmented, corresponding training sample images of the model can be used for model training to obtain a target image segmentation model capable of segmenting blood vessel images of the corresponding formats / types.
[0040] Specifically, in this embodiment, the target image segmentation model includes an encoder and two decoders, namely a first decoder and a second decoder. The second decoder is a variational self-decoder trained using blood vessel enhancement segmentation reference images corresponding to the model training sample images as sample labels. This second decoder constrains the feature extraction process of the original U-Net network encoder, reduces overfitting, and enables the trained network to have better generalization performance, more accurately extracting the vascular structures in the blood vessel images to be segmented, thus possessing clinical application value.
[0041] In a preferred embodiment, multiple blood vessel image blocks to be segmented can be processed simultaneously to improve the efficiency of blood vessel image segmentation.
[0042] Furthermore, a residual network structure is employed in the encoder. Each residual network structure performs ReLU activation on two feature blocks of the same size, convolves them, and then connects them to attention gates (AGs). The first and second decoders progressively recover the details and corresponding spatial dimensions of the blood vessel image blocks to be segmented through network layers such as upsampling / deconvolution. In addition, pooling layers are introduced, which increases the receptive field, reduces background interference, and aids in image classification.
[0043] The second decoder, namely the variational autodecoder, is trained based on the variational autoencoder (VAE) with the blood vessel enhancement segmentation reference image corresponding to the model training sample image as the sample label. The variational autodecoder is used to generate multi-scale blood vessel enhancement results, which can better cluster or organize the features output by the encoder and better restore the detailed features of the blood vessel image block to be segmented.
[0044] S130. Based on the relative positional relationship of each blood vessel segmentation image block, the images are stitched together to obtain the target blood vessel segmentation image.
[0045] Specifically, based on the relative positional relationship of each segmented blood vessel image block in the image of the blood vessel to be segmented, the blood vessel segmentation image obtained by stitching together the segmented blood vessel image blocks is used as the target blood vessel segmentation image.
[0046] Furthermore, the method also includes: extracting the vessel centerline and / or performing topological analysis on the target vessel segmentation image to obtain an optimized target vessel segmentation image.
[0047] Specifically, the vessel centerline can be used to calculate the vessel diameter, further enabling operations such as lesion target localization, surgical path planning, 3D reconstruction and visualization of blood vessels. Extracting the vessel centerline and / or performing topological analysis on the target vessel segmentation image can further remove non-vascular regions and fill in missing vessels, thus optimizing the target vessel segmentation image and obtaining an optimized target vessel segmentation image.
[0048] The technical solution of this embodiment preprocesses and segments the blood vessel image to be segmented to obtain multiple blood vessel image blocks of a preset size. Each blood vessel image block is then input into a target image segmentation model to obtain a corresponding segmented blood vessel image block. Based on the relative positional relationship of each segmented blood vessel image block, the images are stitched together to obtain the target segmented blood vessel image. This embodiment uses a neural network model with an adjusted structure, which solves the problem of low accuracy in blood vessel image segmentation using existing neural network models, improves the generalization ability of the neural network model used for blood vessel image segmentation, and enhances the accuracy of blood vessel image segmentation.
[0049] Figure 2 This is a flowchart of another blood vessel image segmentation method provided by an embodiment of the present invention. This embodiment belongs to the same inventive concept as the blood vessel image segmentation method in the above embodiments, and further describes the application scenario of blood vessel segmentation on brain magnetic resonance time-of-flight (TOF) sequence images containing cerebral vascular structures, and describes the training process of the corresponding image segmentation model. This method can be executed by a blood vessel image segmentation device, which can be implemented by software and / or hardware and integrated into a computer device with application development capabilities.
[0050] like Figure 2 As shown, the blood vessel image segmentation method in this embodiment includes the following steps:
[0051] S210. Obtain model training sample images, and preprocess and segment the model training sample images and the corresponding image segmentation standard reference images and blood vessel enhancement segmentation reference images to obtain multiple sample image blocks of a preset size.
[0052] In a specific model training embodiment, an existing public dataset can be used, which contains several head MRI TOF sequence images provided by volunteers of different ages and genders. These images can be used as model training sample images. The images obtained by three medical experts manually segmenting each data point based on the model training sample images in the public dataset can be used as the corresponding image segmentation standard reference images. The blood vessel enhancement segmentation reference images are images after the model training sample images have been enhanced by multi-scale blood vessel enhancement filtering.
[0053] Furthermore, the model training sample images, the corresponding image segmentation standard reference images, and the blood vessel enhancement segmentation reference images are simultaneously preprocessed and segmented to obtain image blocks of the model training sample images, the corresponding image segmentation standard reference images, and the blood vessel enhancement segmentation reference images of a preset size, which are used as a set of sample image blocks.
[0054] The specific image preprocessing and image segmentation process is as follows:
[0055] First, the threshold cumulative distribution of pixel values in the head MRI TOF sequence image is calculated. The pixel value corresponding to a cumulative distribution function value of 0.05 is taken as the lower threshold (denoted as a), and the cumulative distribution function value of 0.95 is taken as the upper threshold (denoted as b). All pixel values in the head MRI TOF sequence image that are less than a are updated to a, and those that are greater than b are updated to b. This step can improve the image contrast.
[0056] Then, the mean (denoted as μ) and variance (denoted as σ) of all images in the head magnetic resonance TOF sequence images after pixel value adjustment are calculated, and the model training sample images, the corresponding image segmentation standard reference images, and the blood vessel enhancement segmentation reference images are standardized: Where x represents the pixel value before standardization, x * This represents the standardized pixel value of each pixel.
[0057] Then, the pixel spacing of the image was adjusted to 0.75mm×0.75mm×0.75mm using trilinear interpolation.
[0058] Finally, using a sliding window method, 96×96×96 image patches are cropped out sequentially with overlap.
[0059] S220. The encoder in the initial image segmentation model extracts features from the model training sample image blocks in each sample pair image block to obtain sample image features.
[0060] The initial image segmentation model is a pre-constructed model for feature extraction, and its model structure includes an encoder, a first decoder, and a second decoder.
[0061] In a specific example, the structure of the initial image segmentation model is as follows: Figure 3 The model structure shown involves the encoder reducing the image size of the training sample image patch to half its original size while doubling the feature size. The input training sample image patch has a size of 1×96×96×96, and the output feature image has a size of 256×12×12×12. The variational autodecoder starts from the encoder endpoint output. First, it reduces the input to a low-dimensional space of 256 bits (where 128 bits represent the mean and the remaining 128 bits represent the variance). Then, it extracts a sample from a Gaussian distribution with the given mean and standard deviation, reconstructing it into the dimensions of each blood vessel image patch to be segmented, without using the inter-layer skip connections of the encoder, following the same architecture as the decoder.
[0062] The encoder uses ResNet blocks, each consisting of two convolutions with normalization and ReLU, which are then connected to attention gates (AGs). This embodiment uses group normalization (GN), which performs better than batch normalization (BN) when the batch size of images being processed is small.
[0063] In one specific embodiment, a stride convolution operation with a stride of 2 is used. The encoder's input image size is 1×96×96×96, the encoder performs 3D convolution with 32 filters, and the encoder's output feature map size is 256×12×12×12. The advantage of this approach is that it does not further increase the feature scale, thus preserving more spatial content.
[0064] Furthermore, each coding layer in the encoder is connected to a preset attention gate, and the feature coding vector of each coding layer and the feature decoding vector of the corresponding decoding layer in the first decoder are input together into the next decoding layer adjacent to the corresponding decoding layer through the preset attention gate.
[0065] In one specific embodiment, each decoding layer in the first decoder first uses a 1×1×1 convolution to reduce the number of features to half of the original, and then doubles the spatial dimension through trilinear upsampling, before feeding it together with the features output from the encoder into an attention gate. The end of the first decoder has the same spatial size as the blood vessel image patch to be segmented, and the number of features is equal to the initial input feature size.
[0066] In one specific embodiment, the structure of the attention gate is as follows: Figure 4 As shown, during the model training phase, since both the Conv (convolutional) layer and the Batch Normalization (BN) layer are linear operations, merging the Conv and BN layers essentially changes the weight bias of the convolutional layer but eliminates the computation of one BN layer, thus accelerating model training. First, the feature map output by the encoder is added to the upsampled feature map of the decoding layer corresponding to the first decoder. Then, it is activated by the ReLU function, followed by a 1×1×1 convolution, normalization, and sigmoid activation. Finally, it is multiplied with the upsampled feature map of the decoding layer corresponding to the first decoder to obtain the feature map output by the attention gate. The advantage of this approach is that it further processes the features extracted by the encoder, reduces redundant information, suppresses activation of irrelevant regions, and accelerates the training speed and accuracy of the model.
[0067] S230. The first decoder in the initial image segmentation model uses the image segmentation standard reference image block in each sample pair image block as the sample label to decode the sample image features and obtain the first image decoding loss function.
[0068] Specifically, the sample image features are decoded by the first decoder in the initial image segmentation model. The first decoder outputs the decoded image. A loss function is established to evaluate the relationship between the decoded image output by the first decoder and the sample label, which serves as the first image decoding loss function. For example, it can be the Dice Loss function used to evaluate the relationship between the decoded image and the sample label.
[0069] S240. Using the second decoder in the initial image segmentation model, the blood vessel enhancement segmentation reference image block in each sample pair image block is used as the sample label to decode the sample image features, thereby obtaining the second image decoding loss function.
[0070] Specifically, the sample image features are decoded by the second decoder in the initial image segmentation model. The second decoder outputs the decoded image, and a loss function is established to evaluate the relationship between the decoded image and the sample label. This loss function serves as the second image decoding loss function; for example, it could be an L2 loss function evaluating the relationship between the decoded image and the corresponding sample label. It is understood that steps S230 and S240 are performed synchronously. By simultaneously decoding the sample image features using both the first and second decoders, both the first and second image decoding loss functions can be obtained simultaneously, accelerating model training. Based on the first and second image decoding loss functions, the encoder is adjusted after each decoding operation by the second decoder, thereby reducing the error between the decoded image and the sample label and improving the accuracy of blood vessel image segmentation.
[0071] In one specific embodiment, the second image decoding loss function also includes a standard penalty term for the VAE decoder, which is the estimated normal distribution N(μ, σ). 2 The KL divergence (KLD) between the prior distribution N(0,1) and the prior distribution N(0,1) is also called relative entropy, information divergence, or information gain.
[0072] S250. Determine the target loss function based on the first image decoding loss function and the second image decoding loss function, and adjust the parameters of the encoder, the first decoder and the second decoder in the initial image segmentation model based on the function value of the target loss function to obtain the target image segmentation model.
[0073] The target loss function is the weighted sum of the first image decoding loss function, the second image decoding loss function, and the divergence analysis function of the second decoder.
[0074] In a specific embodiment, the expression for the target loss function (L) is:
[0075] L = L Dice +0.1*L L2 +0.1*L KL ;
[0076] Among them, L Dice It is the first image decoding loss function corresponding to the Dice loss function, L L2 It is the second image decoding loss function corresponding to the second image decoding loss function, L KL It is the standard penalty term of the VAE decoder in the second image decoding loss function.
[0077] The parameters of the encoder, first decoder, and second decoder in the initial image segmentation model are adjusted based on the function value of the target loss function. When the threshold of the set target loss function is met, the target image segmentation model is obtained.
[0078] The specific descriptions of steps S220, S230, S240, and S250 can be understood as the specific self-learning process of the initial image segmentation model to be trained. When the image segmented training sample image blocks are input into the model, the corresponding learning process will be automatically executed. After inference by the initial image segmentation model, a predicted image of each image segmented training sample image block can be obtained. By recombining the predicted images of all image segmented training sample image blocks and then performing thresholding, the complete blood vessel segmentation result can be obtained.
[0079] S260. Acquire the blood vessel image to be segmented and perform preprocessing and image segmentation operations on the blood vessel image to be segmented to obtain multiple blood vessel image blocks of a preset size.
[0080] In one specific embodiment, the blood vessel image to be segmented is a time-of-flight (TOF) sequence image of the brain via magnetic resonance imaging. TOF sequences are based on the enhanced inflow effect of flowing blood in gradient echo sequences, and feature non-invasive blood imaging without the need for contrast agents, making it the most widely used MRA technique in clinical practice.
[0081] For the preprocessing and image segmentation operations of the blood vessel images to be segmented, please refer to the process of processing the sample images in S210.
[0082] S270. Input each blood vessel image block to be segmented into the target image segmentation model to obtain the corresponding blood vessel segmentation image block.
[0083] S280. Based on the relative positional relationship of each blood vessel segmentation image block, the images are stitched together to obtain the target blood vessel segmentation image.
[0084] For the target blood vessel segmentation image, small non-vascular regions can be removed through blood vessel centerline extraction and topological analysis, while missing blood vessels are filled in to obtain the final blood vessel model. In a specific embodiment, the predicted images of all patches are reassembled and then thresholded to obtain the target blood vessel segmentation image including the complete blood vessel segmentation result (e.g., ...). Figure 5 (As shown).
[0085] The technical solution of this embodiment involves acquiring model training sample images, preprocessing and segmenting the model training sample images and corresponding image segmentation standard reference images and blood vessel enhancement segmentation reference images to obtain multiple sample image blocks of a preset size; extracting features from the model training sample image blocks in each sample image block using the encoder in the initial image segmentation model to obtain sample image features; decoding the sample image features using the first decoder in the initial image segmentation model with the image segmentation standard reference image blocks in each sample image block as sample labels to obtain a first image decoding loss function; and finally, decoding the blood vessel enhancement segmentation reference image blocks in each sample image block using the second decoder in the initial image segmentation model. The sample image features are decoded to obtain a second image decoding loss function, which serves as the sample label. A target loss function is determined based on the first and second image decoding loss functions, and the parameters of the encoder, first decoder, and second decoder in the initial image segmentation model are adjusted based on the value of the target loss function to obtain the target image segmentation model. The blood vessel image to be segmented is acquired and preprocessed, and image segmentation is performed to obtain multiple blood vessel image blocks of a preset size. Each blood vessel image block is input into the target image segmentation model to obtain the corresponding blood vessel segmentation image block. The images are then stitched together based on the relative positional relationship of each blood vessel segmentation image block to obtain the target blood vessel segmentation image.
[0086] The technical solution of this embodiment adjusts the structure of the neural network model based on the target loss function during the model training process, which speeds up the model training, solves the problem of low accuracy in blood vessel image segmentation using existing neural network models, improves the generalization ability of neural network models used for blood vessel image segmentation, and improves the accuracy of blood vessel image segmentation.
[0087] Figure 6 This is a structural block diagram of a blood vessel image segmentation device provided in an embodiment of the present invention. This embodiment is applicable to the case of blood vessel image segmentation based on neural networks. The device can be implemented by software and / or hardware and integrated into a computer device with application development capabilities.
[0088] like Figure 6 As shown, the blood vessel image segmentation device includes: an image preprocessing module 310, an image segmentation module 320, and an image postprocessing module 330.
[0089] The image preprocessing module 310 is used to preprocess and segment the blood vessel image to be segmented, obtaining multiple blood vessel image blocks of a preset size; the image segmentation module 320 is used to input each blood vessel image block to be segmented into the target image segmentation model to obtain the corresponding blood vessel segmentation image block; the image postprocessing module 330 is used to stitch the images based on the relative positional relationship of each blood vessel segmentation image block to obtain the target blood vessel segmentation image; the target image segmentation model includes an encoder, a first decoder and a second decoder, wherein the second decoder is a variational self-decoder trained with blood vessel enhancement segmentation reference images corresponding to the model training sample images as sample labels.
[0090] The technical solution of this embodiment preprocesses and segments the blood vessel image to be segmented to obtain multiple blood vessel image blocks of a preset size. Each blood vessel image block is then input into a target image segmentation model to obtain a corresponding segmented blood vessel image block. Based on the relative positional relationship of each segmented blood vessel image block, the images are stitched together to obtain the target segmented blood vessel image. This technical solution solves the problem of low accuracy in blood vessel image segmentation using existing neural network models, improves the generalization ability of neural network models used for blood vessel image segmentation, and enhances the accuracy of blood vessel image segmentation.
[0091] Optionally, each coding layer in the encoder is connected to a preset attention gate, and the feature coding vector of each coding layer and the feature decoding vector of the corresponding decoding layer in the first decoder are input together into the next decoding layer adjacent to the corresponding decoding layer through the preset attention gate.
[0092] Optionally, the blood vessel image segmentation device also includes a model training module, which is specifically used for:
[0093] The model training sample images are obtained, and the model training sample images and the corresponding image segmentation standard reference images and blood vessel enhancement segmentation reference images are preprocessed and segmented to obtain multiple sample image blocks of a preset size.
[0094] The encoder in the initial image segmentation model extracts features from the model training sample image patches in each sample pair image patch to obtain sample image features;
[0095] The first decoder in the initial image segmentation model uses the standard reference image block in each sample pair image block as the sample label to decode the sample image features, thus obtaining the first image decoding loss function;
[0096] The second decoder in the initial image segmentation model uses the blood vessel enhancement segmentation reference image block in each sample pair image block as the sample label to decode the sample image features and obtain the second image decoding loss function.
[0097] The target loss function is determined based on the first image decoding loss function and the second image decoding loss function. The parameters of the encoder, the first decoder and the second decoder in the initial image segmentation model are adjusted based on the function value of the target loss function to obtain the target image segmentation model.
[0098] Optionally, the model training module is also used to: take the weighted sum of the first image decoding loss function, the second image decoding loss function, and the divergence analysis function of the second decoder as the target loss function.
[0099] Optionally, the image preprocessing module 310 is also used for:
[0100] Image standardization is performed on the pixel values of each pixel in the blood vessel image to be segmented to obtain a standardized blood vessel image to be segmented.
[0101] Adjust the pixel spacing of each pixel in the standardized blood vessel image to be segmented to obtain the target format blood vessel image to be segmented;
[0102] By sliding a preset-sized sliding window across the target format blood vessel image to be segmented at a preset unit sliding distance, multiple blood vessel image blocks of the preset size are cut out sequentially.
[0103] Optionally, the blood vessel image segmentation device also includes an image optimization module, which is specifically used to: extract the blood vessel centerline and / or perform topological analysis on the target blood vessel segmentation image to obtain an optimized target blood vessel segmentation image.
[0104] Optionally, both the blood vessel images to be segmented and the model training sample images are time-of-flight MRI images of the brain.
[0105] The blood vessel image segmentation device provided in the embodiments of the present invention can execute the blood vessel image segmentation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method.
[0106] Figure 7 This is a structural block diagram of a computer device provided in an embodiment of the present invention. Figure 7 A block diagram of an exemplary computer device 12 suitable for implementing embodiments of the present invention is shown. Figure 7 The computer device 12 shown is merely an example and should not be construed as limiting the functionality or scope of the embodiments of the present invention. The computer device 12 can be any terminal device with computing capabilities, such as intelligent controllers and servers, mobile phones, and other terminal devices.
[0107] like Figure 7 As shown, the computer device 12 is represented in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and a bus 18 connecting different system components (including system memory 28 and processing unit 16).
[0108] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0109] Computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0110] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 7 Not shown; usually referred to as a "hard drive"). Although Figure 7 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.
[0111] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.
[0112] Computer device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, and display 24, etc.), and with one or more devices that enable a user to interact with the computer device 12, and / or with any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, computer device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), public network, and / or the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be understood that, although... Figure 7 As not shown, it can be used in conjunction with computer device 12 with other hardware and / or software modules, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0113] Processing unit 16 executes various functional applications and data processing by running programs stored in system memory 28, such as implementing the blood vessel image segmentation method provided in any embodiment of the present invention, the method comprising:
[0114] Preprocessing and image segmentation are performed on the blood vessel image to be segmented to obtain multiple blood vessel image blocks of a preset size;
[0115] Each blood vessel image block to be segmented is input into the target image segmentation model to obtain the corresponding blood vessel segmentation image block;
[0116] The target blood vessel segmentation image is obtained by stitching together the images based on the relative positional relationship of each segmented blood vessel image block.
[0117] The target image segmentation model includes an encoder, a first decoder, and a second decoder. The second decoder is a variational self-decoder trained using a blood vessel enhancement segmentation reference image corresponding to the model training sample image as the sample label.
[0118] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the blood vessel image segmentation method provided in any embodiment of this invention.
[0119] Preprocessing and image segmentation are performed on the blood vessel image to be segmented to obtain multiple blood vessel image blocks of a preset size;
[0120] Each blood vessel image block to be segmented is input into the target image segmentation model to obtain the corresponding blood vessel segmentation image block;
[0121] The target blood vessel segmentation image is obtained by stitching together the images based on the relative positional relationship of each segmented blood vessel image block.
[0122] The target image segmentation model includes an encoder, a first decoder, and a second decoder. The second decoder is a variational self-decoder trained using a blood vessel enhancement segmentation reference image corresponding to the model training sample image as the sample label.
[0123] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0124] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0125] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0126] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0127] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computing device. Alternatively, they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0128] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A method for segmenting blood vessel images, characterized in that, include: Preprocessing and image segmentation are performed on the blood vessel image to be segmented to obtain multiple blood vessel image blocks of a preset size; Each of the blood vessel image blocks to be segmented is input into the target image segmentation model to obtain the corresponding blood vessel segmentation image blocks; Based on the relative positional relationship of each segmented blood vessel image block, the images are stitched together to obtain the target blood vessel segmentation image; The target image segmentation model includes an encoder, a first decoder, and a second decoder. The second decoder is a variational self-decoder trained using a blood vessel enhancement segmentation reference image corresponding to the model training sample image as the sample label. In this encoder, each coding layer is connected to a preset attention gate, and the feature coding vector of each coding layer and the feature decoding vector of the corresponding decoding layer in the first decoder are input together into the next decoding layer adjacent to the corresponding decoding layer through the preset attention gate. The training process of the target image segmentation model includes: The model training sample images are obtained, and the model training sample images and the corresponding image segmentation standard reference images and blood vessel enhancement segmentation reference images are preprocessed and segmented to obtain multiple sample image blocks of the preset size; The encoder in the initial image segmentation model extracts features from the model training sample image blocks in each sample pair image block to obtain sample image features; The first decoder in the initial image segmentation model uses the image segmentation standard reference image block in each sample pair image block as the sample label to decode the features of the sample image and obtain the first image decoding loss function. The second decoder in the initial image segmentation model uses the blood vessel enhancement segmentation reference image block in each sample pair image block as the sample label to decode the features of the sample image and obtain the second image decoding loss function. A target loss function is determined based on the first image decoding loss function and the second image decoding loss function, and the parameters of the encoder, the first decoder and the second decoder in the initial image segmentation model are adjusted based on the function value of the target loss function to obtain the target image segmentation model.
2. The method according to claim 1, characterized in that, The step of determining the target loss function based on the first image decoding loss function and the second image decoding loss function includes: The target loss function is the weighted sum of the first image decoding loss function, the second image decoding loss function, and the divergence analysis function of the second decoder.
3. The method according to claim 1, characterized in that, The process of preprocessing and segmenting the blood vessel image to be segmented yields multiple blood vessel image blocks of a preset size, including: Image standardization processing is performed on the pixel values of each pixel in the blood vessel image to be segmented to obtain a standardized blood vessel image to be segmented. Adjust the pixel spacing of each pixel in the standardized blood vessel image to be segmented to obtain the target format blood vessel image to be segmented. The preset-sized sliding window is slid across the target format blood vessel image to be segmented by a preset unit sliding distance, thereby sequentially cropping out multiple blood vessel image blocks of the preset size.
4. The method according to claim 1, characterized in that, The method further includes: The target blood vessel segmentation image is processed by extracting the blood vessel centerline and / or performing topological analysis to obtain an optimized target blood vessel segmentation image.
5. The method according to claim 1, characterized in that, Both the blood vessel images to be segmented and the model training sample images are time-of-flight MRI images of the brain.
6. A blood vessel image segmentation device, characterized in that, include: The image preprocessing module is used to preprocess the blood vessel image to be segmented and perform image segmentation operations to obtain multiple blood vessel image blocks of a preset size. The image segmentation module is used to input each of the blood vessel image blocks to be segmented into the target image segmentation model to obtain the corresponding blood vessel segmentation image blocks; The image post-processing module is used to stitch images together based on the relative positional relationship of each segmented blood vessel image block to obtain a target segmented blood vessel image; The target image segmentation model includes an encoder, a first decoder, and a second decoder. The second decoder is a variational self-decoder trained using a blood vessel enhancement segmentation reference image corresponding to the model training sample image as the sample label. In this encoder, each coding layer is connected to a preset attention gate, and the feature coding vector of each coding layer and the feature decoding vector of the corresponding decoding layer in the first decoder are input together into the next decoding layer adjacent to the corresponding decoding layer through the preset attention gate. The blood vessel image segmentation device further includes a model training module, which is specifically used for: The model training sample images are obtained, and the model training sample images and the corresponding image segmentation standard reference images and blood vessel enhancement segmentation reference images are preprocessed and segmented to obtain multiple sample image blocks of a preset size. The encoder in the initial image segmentation model extracts features from the model training sample image patches in each sample pair image patch to obtain sample image features; The first decoder in the initial image segmentation model uses the standard reference image block in each sample pair image block as the sample label to decode the sample image features, thus obtaining the first image decoding loss function; The second decoder in the initial image segmentation model uses the blood vessel enhancement segmentation reference image block in each sample pair image block as the sample label to decode the sample image features and obtain the second image decoding loss function. The target loss function is determined based on the first image decoding loss function and the second image decoding loss function. The parameters of the encoder, the first decoder and the second decoder in the initial image segmentation model are adjusted based on the function value of the target loss function to obtain the target image segmentation model.
7. A computer device, characterized in that, The computer device includes: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the blood vessel image segmentation method as described in any one of claims 1-5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the blood vessel image segmentation method as described in any one of claims 1-5.