Vascular segmentation method, device, computer device and storage medium
By using coronary tracing model and dynamic threshold adjustment methods in vascular image processing, the problem of undersegment or oversegment in existing vascular segmentation methods is solved, and the accuracy of vascular segmentation is significantly improved.
Patent Information
- Application Number
- CN202111263343.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-28
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2041-10-28
AI Technical Summary
The existing vascular segmentation methods are affected by factors such as image quality and parameter selection, and there are problems of undersegment or oversegment, resulting in low accuracy of segmentation.
By selecting seed points to be grown based on the vascular image, the mask set and tracking mask are determined based on the coronary tracing model and preset threshold. If the tracking mask does not meet the preset conditions, the threshold value is lowered and the seed points are updated. The process is repeated until the conditions are met to determine the vascular segmentation image.
Undersegmentation or oversegment caused by the use of unified thresholds is avoided, and the accuracy of vascular segmentation is improved.
Smart Images

Figure CN114022492B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of medical image processing technology, and particularly to a blood vessel segmentation method, apparatus, computer device, and storage medium. Background Art
[0002] The segmentation and extraction of blood vessels is an important prerequisite for the quantitative description of diseases and the three-dimensional reconstruction of blood vessels, and is also an important means to assist doctors in clinical diagnosis and treatment. The region growing method is relatively common in blood vessel segmentation.
[0003] In the region growing method, first, a seed point is set, and the neighborhood of the seed point is continuously traversed. Points similar to the seed point are grouped into the same set, and then the neighborhood similar points of the points in the set are searched to continuously expand the region until the segmentation is completed. Currently, the commonly used seed point-based image segmentation methods are generally traditional image processing methods, such as algorithms like region growing, edge detection, and level set, or some improvements are made on the traditional image processing methods. The existing blood vessel segmentation methods are affected by factors such as image quality and parameter selection, and there are problems of under-segmentation or over-segmentation, resulting in low segmentation accuracy. Summary of the Invention
[0004] Based on this, it is necessary to provide a blood vessel segmentation method, apparatus, computer device, and storage medium that can avoid under-segmentation or over-segmentation caused by using a unified threshold to improve the accuracy of blood vessel segmentation for the above technical problems.
[0005] A blood vessel segmentation method, the method comprising:
[0006] Select a to-be-grown seed point of the blood vessel to be grown according to the blood vessel image;
[0007] Based on the blood vessel image, the to-be-grown seed point, a preset threshold, and a coronary artery tracking model, determine a mask set, and determine a tracking mask according to the mask set;
[0008] If the tracking mask does not meet the first preset condition, then reduce the preset threshold, update the to-be-grown seed point based on the tracking mask, and repeat the above process of determining the tracking mask until the determined tracking mask meets the first preset condition;
[0009] Based on each determined mask set and the blood vessel image, determine a blood vessel segmentation image.
[0010] In one of the embodiments, the first preset condition includes: the first preset condition includes: the connected domain of the tracking mask intersects with the blood vessel region of the blood vessel image, or the connected domain of the tracking mask and the blood vessel region of the blood vessel image satisfy neighborhood connectivity.
[0011] In one embodiment, determining a mask set based on the vascular image, the to-be-grown seed points, a preset threshold, and a coronary artery tracking model, and determining a tracking mask according to the mask set includes:
[0012] Based on the vascular image, the to-be-grown seed points, and the coronary artery tracking model, determining a candidate mask corresponding to the preset threshold;
[0013] If the candidate mask does not meet the second preset condition, updating the to-be-grown seed points according to the candidate mask, and repeating the process of determining the candidate mask corresponding to the preset threshold until the obtained candidate mask meets the second preset condition;
[0014] According to each determined candidate mask, determining a mask set, and using the candidate mask that meets the second preset condition in the mask set as the tracking mask.
[0015] In one embodiment, the determining a candidate mask corresponding to the preset threshold based on the vascular image, the to-be-grown seed points, and the coronary artery tracking model includes:
[0016] Determining a three-dimensional image patch centered on the to-be-grown seed points in the vascular image;
[0017] Inputting the three-dimensional image patch into the coronary artery tracking model to obtain a probability matrix;
[0018] Obtaining a candidate mask according to the probability matrix and the preset threshold.
[0019] In one embodiment, the second preset condition includes: the growth length of the candidate mask is less than a preset length, or the tracking times of the candidate mask are greater than a preset number of times.
[0020] In one embodiment, the updating the to-be-grown seed points based on the tracking mask includes:
[0021] Obtaining a tracking connected domain including the to-be-grown seed points in the tracking mask;
[0022] Determining a third center line of the tracking connected domain, and obtaining at least two end points of the third center line;
[0023] Replacing the to-be-grown seed points with any one of the at least two end points.
[0024] In one embodiment, the determining a vascular segmentation image based on each determined mask set and the vascular image includes:
[0025] Determine an initial segmentation mask based on the blood vessel image, and splice all the masks in the mask set corresponding to each preset threshold and the initial segmentation mask to obtain a reference mask;
[0026] Determine a target path in the reference mask, where the target path includes: a to-be-grown seed point selected in the to-be-grown blood vessel, and a first initial point within the blood vessel region of the blood vessel image;
[0027] Remove other paths in the reference mask except the target path to obtain a blood vessel segmentation image.
[0028] In one embodiment, the step of selecting a to-be-grown seed point of the to-be-grown blood vessel according to the blood vessel image includes:
[0029] Determine an initial segmentation mask based on the blood vessel image, where the initial segmentation mask includes a blood vessel region and a non-blood vessel region;
[0030] Select a to-be-grown seed point from a preset seed point set according to the initial segmentation mask, where the to-be-grown seed point is within the non-blood vessel region of the initial segmentation mask.
[0031] In one embodiment, before determining the blood vessel segmentation image based on each determined mask set and the blood vessel image, it further includes:
[0032] According to the blood vessel image, multiple mask sets of the to-be-grown seed points, and the seed point set, update the to-be-grown seed points, and determine a tracking mask for which the to-be-grown seed points meet the first preset condition, so as to obtain multiple mask sets of the to-be-grown seed points, until all the seed points in the seed point set are traversed to obtain multiple mask sets of each to-be-grown seed point;
[0033] Correspondingly, the step of determining the blood vessel segmentation image based on each determined mask set and the blood vessel image includes:
[0034] Splice the initial segmentation mask and multiple mask sets of each to-be-grown seed point to obtain a first mask;
[0035] For any to-be-grown seed point, determine any first starting point corresponding to the any to-be-grown seed point according to the first mask, and determine several second reference points corresponding to the any first starting point in the first mask, where the several second reference points are within the neighborhood of the any first starting point and within the blood vessel region of the first mask;
[0036] Using each second reference point corresponding to any one of the first starting points to replace the any one of the first starting points respectively, and repeating the above process of determining a plurality of second reference points corresponding to the any one of the first starting points until a second initial point is included in the plurality of second reference points corresponding to the any one of the first starting points determined, where the second initial point is within the blood vessel region of the blood vessel image;
[0037] Determine the path between any one of the to-be-grown seed points and the second initial point of the any one of the to-be-grown seed points, and determine the longest path;
[0038] Remove other paths in the first mask except the longest path to obtain a blood vessel segmentation image.
[0039] A blood vessel segmentation device, the device includes:
[0040] A to-be-grown seed point selection module, configured to select a to-be-grown seed point of a to-be-grown blood vessel according to a blood vessel image;
[0041] A first tracking module, configured to determine a mask set based on the blood vessel image, the to-be-grown seed point, a preset threshold, and a coronary artery tracking model, and determine a tracking mask according to the mask set;
[0042] A second tracking module, configured to, if the tracking mask does not meet a first preset condition, reduce the preset threshold, update the to-be-grown seed point based on the tracking mask, and repeat the above process of determining the tracking mask until the determined tracking mask meets the first preset condition;
[0043] A blood vessel segmentation image determination module, configured to determine a blood vessel segmentation image based on each determined mask set and the blood vessel image.
[0044] A computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0045] Select a to-be-grown seed point of a to-be-grown blood vessel according to a blood vessel image;
[0046] Determine a mask set based on the blood vessel image, the to-be-grown seed point, a preset threshold, and a coronary artery tracking model, and determine a tracking mask according to the mask set;
[0047] If the tracking mask does not meet a first preset condition, reduce the preset threshold, update the to-be-grown seed point based on the tracking mask, and repeat the above process of determining the tracking mask until the determined tracking mask meets the first preset condition;
[0048] Determine a blood vessel segmentation image based on each determined mask set and the blood vessel image.
[0049] A computer-readable storage medium stores a computer program thereon, and when the computer program is executed by a processor, the following steps are implemented:
[0050] Select the to-be-grown seed points of the blood vessel to be grown according to the blood vessel image;
[0051] Based on the blood vessel image, the to-be-grown seed points, a preset threshold, and a coronary artery tracking model, determine a mask set, and determine a tracking mask according to the mask set;
[0052] If the tracking mask does not meet the first preset condition, reduce the preset threshold, update the to-be-grown seed points based on the tracking mask, and repeat the process of determining the tracking mask until the determined tracking mask meets the first preset condition;
[0053] Based on each determined mask set and the blood vessel image, determine a blood vessel segmentation image.
[0054] The above blood vessel segmentation method, device, computer device, and storage medium perform blood vessel segmentation at a preset threshold according to the blood vessel image, the to-be-grown seed points, and the coronary artery tracking model to obtain a mask set at the preset threshold. If the tracking mask in the mask set does not meet the first preset condition, reduce the preset threshold, and update the to-be-grown seed points according to the tracking mask. Repeat the above process of performing blood vessel segmentation at a preset threshold according to the blood vessel image, the to-be-grown seed points, and the coronary artery tracking model to obtain a mask set at the preset threshold, and iterate this process until the tracking mask in the obtained mask set meets the first preset condition. During the blood vessel segmentation process, gradually reduce the preset threshold and perform blood vessel segmentation at different thresholds, avoiding the situation of under-segmentation or over-segmentation caused by using a unified threshold, and improving the accuracy of blood vessel segmentation. Description of the Drawings
[0055] Figure 1 It is a schematic flowchart of the blood vessel segmentation method in an embodiment of the present invention;
[0056] Figure 2 It is a schematic diagram of the initial segmentation mask and the to-be-grown seed points in an embodiment of the present invention;
[0057] Figure 3 It is a schematic flowchart of the specific process of S102 in an embodiment of the present invention;
[0058] Figure 4 It is a schematic structural diagram of the coronary artery tracking model in an embodiment of the present invention;
[0059] Figure 5 It is a schematic diagram of the candidate mask in an embodiment of the present invention;
[0060] Figure 6Schematic diagram of the specific process of S103 in an embodiment of the present invention;
[0061] Figure 7 Schematic diagram of the specific process of S104 in an embodiment of the present invention;
[0062] Figure 8 Schematic diagram of the vascular segmentation image in an embodiment of the present invention;
[0063] Figure 9 Schematic diagram of the process of the vascular segmentation method in a specific embodiment of the present invention;
[0064] Figure 10 Schematic diagram of the specific process of S101 when the to-be-grown seed points are selected from a preset set of seed points in an embodiment of the present invention;
[0065] Figure 11 Schematic diagram of the process of determining multiple mask sets corresponding to all to-be-grown seed points in a set of seed points in an embodiment of the present invention;
[0066] Figure 12 Schematic diagram of the specific process of S104 when the to-be-grown seed points are selected from a preset set of seed points in an embodiment of the present invention;
[0067] Figure 13 Schematic diagram of the process of determining the vascular segmentation image according to the first mask in an embodiment of the present invention;
[0068] Figure 14 Schematic block diagram of the vascular segmentation device in an embodiment of the present invention;
[0069] Figure 15 Internal structure diagram of a computer device in an embodiment. Specific embodiments
[0070] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0071] The vascular segmentation method provided by the present application can be applied to a terminal, and the terminal can be, but is not limited to, a vascular imaging device, a personal computer, etc.
[0072] In one embodiment, as Figure 1 shown, a vascular segmentation method is provided. In this embodiment, it is exemplified that the method is applied to a terminal. The method includes the following steps:
[0073] S101, select the to-be-grown seed points of the to-be-grown blood vessels according to the blood vessel image.
[0074] Among them, the blood vessel image is a three-dimensional image, and the blood vessel image includes: CT angiography image (CTA), magnetic resonance angiography image (MRA), digital subtraction angiography (DSA), and MR non-contrast blood vessel image, etc. The blood vessel to be grown can be any blood vessel that needs to be generated in the blood vessel image. The seed point to be grown can be a seed point designated by a doctor.
[0075] Specifically, an initial segmentation mask of the blood vessel image is obtained. The initial segmentation mask includes a blood vessel region and a non-blood vessel region. The blood vessel region refers to the region where the blood vessel is located, and the region other than the blood vessel region in the initial segmentation mask is the non-blood vessel region. Determine the blood vessel to be grown in the blood vessel region of the initial segmentation mask, and select the seed point to be grown for the blood vessel to be grown according to the non-blood vessel region of the initial segmentation mask. That is to say, the seed point to be grown is within the non-blood vessel region of the initial segmentation mask.
[0076] As Figure 2 shown, determine the initial segmentation mask of the blood vessel image. The initial segmentation mask includes a blood vessel region and a non-blood vessel region. The pixel value of the pixel points in the non-blood vessel region of the initial segmentation mask is 0, the non-blood vessel region is black, and the seed point to be grown ( Figure 2 the dot in) is within the non-blood vessel region.
[0077] S102. Based on the blood vessel image, the seed point to be grown, a preset threshold, and a coronary artery tracking model, determine a set of masks, and determine a tracking mask according to the set of masks.
[0078] Among them, the coronary artery tracking model is used for image segmentation. The preset threshold is preset. The set of masks is a set of multiple candidate masks obtained by performing blood vessel segmentation under the preset threshold, and the set of masks includes a tracking mask.
[0079] Specifically, candidate masks are obtained based on the blood vessel image, the seed point to be grown, the coronary artery tracking model, and the preset threshold. The process of obtaining candidate masks is a process of performing blood vessel segmentation once under the preset threshold. Under the preset threshold, there will be several processes of blood vessel segmentation until the candidate masks obtained by blood vessel segmentation meet the stop growth condition, then stop blood vessel segmentation, and use the candidate masks that meet the stop growth condition as the tracking mask. The set of masks includes: several candidate masks obtained by performing blood vessel segmentation several times under the preset threshold, where several candidate masks include the tracking mask that meets the stop growth condition.
[0080] For example, at a preset threshold a1, a blood vessel segmentation is performed once to obtain a candidate mask m1. If m1 does not meet the stop growth condition, then at the preset threshold a1, the next blood vessel segmentation is performed to obtain a candidate mask m2. If m2 does not meet the stop growth condition, then at the preset threshold a1, the next blood vessel segmentation is performed to obtain a candidate mask m3. If m3 meets the stop growth condition, the growth is stopped, and m3 is used as the tracking mask. The mask set at the preset threshold a1 includes: m1, m2, and m3.
[0081] Since the mask set is obtained by performing blood vessel segmentation at a preset threshold, the mask set corresponds to the preset threshold. By performing blood vessel segmentation at different preset thresholds, different mask sets are obtained. For example, by performing blood vessel segmentation at the preset threshold a1, a mask set A1 is obtained, and by performing blood vessel segmentation at the preset threshold a2, a mask set A2 is obtained.
[0082] S103, if the tracking mask does not meet the first preset condition, then reduce the preset threshold, update the to-be-grown seed points based on the tracking mask, and repeat the above process of determining the tracking mask until the determined tracking mask meets the first preset condition.
[0083] Among them, the first preset condition includes that the connected domain of the tracking mask intersects with the blood vessel region of the blood vessel image. The above process of determining the tracking mask refers to the process in S102.
[0084] Specifically, if the tracking mask does not meet the first preset condition, it means that when growing at the preset threshold in S102, the obtained tracking mask does not intersect with the to-be-grown blood vessels; updating the to-be-grown seed points based on the tracking mask means determining new to-be-grown seed points according to the tracking mask. Specifically, any endpoint of the center line of the tracking mask is used as the new to-be-grown seed point; reducing the preset threshold, taking the reduced preset threshold as the new preset threshold, repeating S102, growing blood vessels at the new preset threshold, obtaining the tracking mask at the new preset threshold, and then determining again whether the tracking mask at the new preset threshold meets the first preset condition; repeating this process until the tracking mask at the preset threshold meets the first preset condition. S103 is an iterative process. The diameter of the blood vessels obtained by performing blood vessel segmentation before reducing the preset threshold is smaller than the diameter of the blood vessels obtained by performing blood vessel segmentation after reducing the preset threshold; by gradually reducing the preset threshold, the tracking mask obtained by performing blood vessel segmentation at the reduced preset threshold meets the first preset condition.
[0085] S104, based on each determined mask set and the blood vessel image, determine the blood vessel segmentation image.
[0086] Among them, each mask set is each mask set among all the mask sets obtained in S102, and the preset thresholds of each mask set are different. The preset threshold of each mask set is respectively the preset threshold used in the iterative process of S103. Each mask set includes a number of candidate masks.
[0087] Specifically, an initial segmentation mask is determined according to the blood vessel image. The candidate masks in each mask set are spliced with the initial segmentation mask to obtain a reference mask, and a blood vessel segmentation image is obtained according to the reference mask.
[0088] In the above blood vessel segmentation method, according to the blood vessel image, the seed points to be grown, and the coronary artery tracking model, blood vessel segmentation is performed at a preset threshold to obtain a mask set at the preset threshold. If the tracking mask in the mask set does not meet the first preset condition, the preset threshold is lowered, and the seed points to be grown are updated according to the tracking mask. Repeat the above process of performing blood vessel segmentation at the preset threshold according to the blood vessel image, the seed points to be grown, and the coronary artery tracking model to obtain a mask set at the lowered preset threshold, and iterate this process until the tracking mask in the obtained mask set meets the first preset condition. During the blood vessel segmentation process, the preset threshold is gradually lowered, and blood vessel segmentation is performed at different thresholds, avoiding the situation of under-segmentation or over-segmentation caused by using a unified threshold, and improving the accuracy of blood vessel segmentation.
[0089] In one embodiment, as Figure 3 shown, S102 includes:
[0090] S201. Based on the blood vessel image, the seed points to be grown, and the coronary artery tracking model, determine the candidate mask corresponding to the preset threshold.
[0091] Specifically, an input image is determined based on the blood vessel image and the seed points to be grown, the input image is input into the coronary artery tracking model to obtain a probability matrix, and the candidate mask is determined according to the preset threshold and the probability matrix.
[0092] Specifically, S201 includes:
[0093] S211. Determine a three-dimensional image patch centered on the seed points to be grown in the blood vessel image.
[0094] Specifically, since the blood vessel image is a three-dimensional image, the image patch determined in the blood vessel image is a three-dimensional image patch. The size of the three-dimensional image patch is a preset size, and the preset size can be set customarily; for example, the preset size can be set to: 16*16*16, that is to say, each dimension of the three-dimensional image patch includes 16 pixel points, or the preset size can be set to: 32*32*32, that is to say, each dimension of the three-dimensional image patch includes 32 pixel points.
[0095] S212. Input the three-dimensional image patch into the coronary artery tracking model to obtain a probability matrix.
[0096] Among them, as Figure 4 shown, the coronary artery tracking model includes: a 3×3 convolutional layer c1, a first 2×2 convolutional layer c2, a second 2×2 convolutional layer c3, a first transformer c3, a first transformer c4, a second transformer c5, a first residual module c6, a second residual module c7, a third residual module c8, a fourth residual module c9, a first splicing layer c10, a second splicing layer c11, and a 1×1 convolutional layer c12.
[0097] The convolutional kernel size of the 3×3 convolutional layer c1 is 3×3×3, and the 3×3 convolutional layer c1 is fused with a batch normalization (BN) layer and a rectified linear unit (ReLU) layer; the convolutional kernel size of the 1×1 convolutional layer c11 is 1×1; the convolutional kernel sizes of the first 2×2 convolutional layer c2 and the second 2×2 convolutional layer c3 are both 2×2×2, and the strides are both 2. The first 2×2 convolutional layer c2 and the second 2×2 convolutional layer c3 are both fused with a BN layer and a ReLU layer; the convolutional kernel sizes of the first transformer c3 and the second transformer c4 are both 2×2×2, and the strides are both 2. The first transformer c3 and the second transformer c4 are both fused with a BN layer and a ReLU layer.
[0098] The three-dimensional image patch undergoes two downsamplings and two upsamplings in the coronary artery tracking model to extract local features of the three-dimensional image patch. Input the three-dimensional image patch into the coronary artery tracking model to obtain a feature image, and the size of the feature image is the same as the image size of the three-dimensional image patch. The feature image can be divided into an anode matrix and a cathode matrix. The anode matrix includes multiple anode probabilities, and the cathode matrix includes multiple cathode probabilities. The multiple anode probabilities and the multiple cathode probabilities correspond one by one. The sum of the corresponding anode probability and cathode probability is 1. The multiple anode probabilities correspond one by one to the multiple pixel points of the three-dimensional image patch. For the corresponding anode probability and pixel point, the anode probability is the probability that its corresponding pixel point is in the vascular region. Therefore, the anode matrix is used as the probability matrix.
[0099] The coronary artery tracking model is obtained by training an initial tracking model based on multiple training image patches and the annotation of each training image patch. The model structure of the coronary artery tracking model is the same as that of the initial tracking model. The size of the three-dimensional image patch is the same as the size of the training image patch. The resolution of the training image patch can be set from 0.3 mm to 0.8 mm. For example, the resolution of the training image patch can be set to 0.6 mm. The multiple training image patches are all obtained through normalization processing, and normalization can be performed by means of mean and standard deviation.
[0100] During the training process, the loss value is calculated based on the prediction results corresponding to the training image patches output by the initial tracking model and the annotations of the training image patches. The parameters of the initial tracking model are adjusted according to the loss value. The dice loss is used to calculate the loss function value, and the parameters of the initial tracking model are adjusted by the Adam parameter optimization method. After the training is completed, a coronary artery tracking model is obtained.
[0101] S213. Obtain a candidate mask according to the probability matrix and the preset threshold.
[0102] Specifically, the probability matrix includes a plurality of probability values, and the plurality of probability values correspond one-to-one to a plurality of pixel points of the three-dimensional image patch. Any probability value is the probability value that the pixel point corresponding to the any probability value is in the blood vessel area. The pixel points corresponding to the probability values greater than the preset threshold are determined as the pixel points in the blood vessel area, and the pixel points corresponding to the probability values less than or equal to the preset threshold are determined as the pixel points in the non-blood vessel area. In the probability matrix, the probability values greater than the preset threshold can be set to 1, and the probability values less than or equal to the preset threshold can be set to 0 to obtain a candidate mask. The candidate mask is as Figure 5 shown.
[0103] In the above embodiment, binary segmentation is performed on the three-dimensional image patch through the coronary artery tracking model to obtain a probability matrix. The probability matrix is used to reflect the probability that each pixel point in the three-dimensional image patch is in the blood vessel area. Through the coronary artery tracking model, a large number of features of the three-dimensional image patch can be extracted to obtain a probability matrix with high accuracy. Furthermore, according to the probability matrix and the preset threshold, a candidate mask with high accuracy can be obtained.
[0104] S202. If the candidate mask does not meet the second preset condition, update the to-be-grown seed points according to the candidate mask, and repeat the process of determining the candidate mask corresponding to the preset threshold until the obtained candidate mask meets the second preset condition.
[0105] Among them, the second preset condition includes: the growth length of the candidate mask is less than the preset length, or the tracking times of the candidate mask are greater than the preset times. The growth length is the difference between the first center line of the spliced mask and the second center line of the initial segmentation mask corresponding to the blood vessel image. The spliced mask is obtained by splicing the candidate mask and the initial segmentation mask. The tracking times are the number of times of repeating the process (S201) of obtaining the candidate mask.
[0106] Specifically, the process of determining the growth length of the candidate mask includes: determining the candidate connected components of the candidate mask, and extracting the first centerline in the candidate connected components; splicing the candidate mask and the initial segmentation mask to obtain a spliced mask, determining the spliced connected components in the spliced mask, extracting the second centerline in the spliced connected components, and calculating the difference between the second centerline and the first centerline to obtain the growth length.
[0107] The preset length can be set to any value from 1 to the preset side length, and the preset side length is the length of one dimension in the preset size of the three-dimensional image block. For example, if the preset size is 16*16*16, the preset side length is 16, and the preset length can be set to any value from 1 to 16. The number of tracking times can be set to any value from 3 to 20.
[0108] If the growth length of the candidate mask is less than the preset length, it means that the blood vessel area cannot be segmented under the preset threshold, and the blood vessel segmentation under the preset threshold can be stopped; if the number of tracking times of the candidate mask is greater than the preset number of times, it means that the number of times of blood vessel segmentation under the preset threshold has reached the preset number of times, and the blood vessel segmentation under the preset threshold can be stopped.
[0109] Specifically, the process of updating the to-be-grown seed points according to the candidate mask includes: determining the centerline of the candidate mask, updating the to-be-grown seed points with any endpoint of the centerline of the candidate mask, and obtaining a candidate mask based on the updated to-be-grown seed points, the preset threshold, the blood vessel image, and the coronary artery tracking model. If the candidate mask does not meet the second preset condition, then update the to-be-grown seed points according to the candidate mask again, and repeat this process until the candidate mask meets the second preset condition.
[0110] Illustrate with an example, obtaining a candidate mask that meets the second preset condition includes:
[0111] S11, the to-be-grown seed point determined in S101 is Qi;
[0112] S12, obtaining a candidate mask Mi according to Qi, the preset threshold T1, the blood vessel image, and the coronary artery tracking model;
[0113] S13, determining whether the candidate mask Mi meets the second preset condition. If not, enter S14; if so, enter S15;
[0114] S14, updating the to-be-grown seed points according to the candidate mask Mi. The updated to-be-grown seed point is Qi+1, record Qi+1 as Qi, and enter S12;
[0115] S15, obtaining a candidate mask that meets the second preset condition, and ending.
[0116] S203. Determine a mask set based on each determined candidate mask, and use the candidate masks in the mask set that meet the second preset condition as tracking masks.
[0117] Specifically, at a preset threshold, the process of obtaining candidate masks that meet the second preset condition is a cyclic process. As shown in the above example from S1 to S5, multiple candidate masks may be obtained during the cyclic process. The mask set includes multiple candidate masks obtained during the cyclic process, and the candidate masks in the multiple candidate masks that meet the second preset condition are used as tracking masks. Since each candidate mask is obtained based on the preset threshold, the candidate mask set is obtained at the preset threshold, the candidate mask set corresponds to the preset threshold, and the tracking mask corresponds to the preset threshold.
[0118] In the above embodiments, through multiple cyclic processes of blood vessel segmentation, a mask set corresponding to the preset threshold and a tracking mask that meets the second preset condition are determined; for two blood vessel segmentations, candidate masks are obtained according to the first blood vessel segmentation, and any endpoint of the center line of the candidate mask is used to replace the to-be-grown seed point used in the first blood vessel segmentation to obtain the to-be-grown seed point used in the second cycle, so as to perform the next blood vessel segmentation based on the candidate masks obtained from the previous blood vessel segmentation, so that the blood vessel regions of the candidate masks obtained from the previous blood vessel segmentation are connected to the blood vessel regions of the candidate masks obtained from the next blood vessel segmentation. Multiple candidate masks with connected blood vessel regions can be obtained through multiple cyclic processes of blood vessel segmentation.
[0119] Specifically, in S103, the first preset condition includes: the connected domain of the tracking mask intersects with the blood vessel region of the blood vessel image, or the connected domain of the tracking mask and the blood vessel region of the blood vessel image satisfy neighborhood connectivity.
[0120] The intersection of the connected domain of the tracking mask and the blood vessel region of the blood vessel image means that the blood vessel region in the tracking mask intersects with the blood vessel region in the blood vessel image. That is, starting from the to-be-grown seed point in S101 for blood vessel segmentation, the blood vessels grown through blood vessel segmentation have intersected with the blood vessels in the blood vessel image. The neighborhood connectivity means that there are pixel points in the blood vessel region that satisfy neighborhood connectivity with the pixel points in the tracking mask. The neighborhood connectivity can be 26-neighborhood connectivity or 8-neighborhood connectivity between the connected domain of the tracking mask and the blood vessel region.
[0121] Specifically, as Figure 6 shown, in S103, the reduction of the preset threshold can be to reduce the preset threshold according to a preset step size, and the preset step size can be set according to requirements. The updating of the to-be-grown seed point based on the tracking mask includes:
[0122] S301, obtain the tracking connected region in the tracking mask that includes the to-be-grown seed point.
[0123] S302, determine the third center line of the tracking connected region, and obtain at least two end points of the third center line.
[0124] S303, replace the to-be-grown seed point with any one of the at least two end points.
[0125] Specifically, the tracking connected region is the connected region in the tracking mask that includes the to-be-grown seed point. The tracking connected region can be extracted from the tracking mask by existing methods. After obtaining the tracking connected region, the third center line of the tracking connected region is extracted, and the third center line can be extracted from the tracking connected region by existing methods. The third center line includes at least one line. Therefore, the third center line includes at least two end points, and any one of the at least two end points is used to replace the to-be-grown seed point.
[0126] For example, the to-be-grown seed point is Q1. The tracking connected region S1 in the tracking mask M1 is extracted, the center line L1 in the tracking connected region S1 is extracted, and at least two end points of L1 are obtained: q1, q2, and q3. The to-be-grown seed point Q1 is replaced with q1 to obtain the to-be-grown seed point as q1, or the to-be-grown seed point Q1 is replaced with q2 to obtain the to-be-grown seed point as q2, or the to-be-grown seed point Q1 is replaced with q3 to obtain the to-be-grown seed point as q3.
[0127] In the above embodiment, first, blood vessel segmentation is performed under a preset threshold. After determining the tracking mask corresponding to the preset threshold, if the tracking mask corresponding to the preset threshold does not meet the first preset condition, the preset threshold is lowered, and the tracking mask corresponding to the lowered preset threshold is determined. By gradually lowering the preset threshold multiple times until the tracking mask corresponding to the lowered preset threshold meets the first preset condition; by gradually lowering the preset threshold multiple times, blood vessel segmentation is performed under different preset thresholds, avoiding the situation of under-segmentation or over-segmentation using a unified threshold, and improving the accuracy of blood vessel segmentation.
[0128] In one embodiment, as Figure 7 shown, S104 includes:
[0129] S401, determine an initial segmentation mask according to the blood vessel image, and splice all the masks in the mask set corresponding to each preset threshold and the initial segmentation mask to obtain a reference mask.
[0130] Specifically, the initial segmentation mask is the segmentation mask of the blood vessel image. The mask set corresponding to each preset threshold is a mask set obtained by performing blood vessel segmentation under different preset thresholds, and is a mask set of different preset thresholds obtained by repeating S102. All masks in the mask set corresponding to each preset threshold include: multiple candidate masks and tracking masks corresponding to each preset threshold.
[0131] The initial segmentation mask and all masks in the mask set corresponding to each preset threshold are concatenated to obtain a reference mask.
[0132] S402: Determine a target path in the reference mask.
[0133] The target path includes: a seed point to be grown selected in the blood vessel to be grown, and a first initial point in the blood vessel region of the blood vessel image.
[0134] Specifically, the seed point to be grown selected in the blood vessel to be grown is the seed point to be grown in S101. The seed point to be grown selected in the blood vessel to be grown is used as the second starting point, the neighborhood of the second starting point is determined in the reference mask, and several first reference points located in the blood vessel region of the reference mask are determined in the neighborhood, and each first reference point is used to replace the second starting point respectively. For any second starting point, the process of determining several first reference points is repeated until the several first reference points include the first initial point. The path between the seed point to be grown selected in the blood vessel to be grown and the first initial point is used as the target path.
[0135] Determining a neighborhood of the second starting point in the reference mask, and determining a plurality of first reference points located in the blood vessel region of the reference mask within the neighborhood, comprises: extracting a reference center line of the reference mask, and determining a plurality of first reference points located on the reference center line within the neighborhood of the second starting point. The neighborhood of the second starting point may be a 26-neighborhood or an 8-neighborhood.
[0136] S403, eliminating other paths except the target path in the reference mask to obtain a blood vessel segmentation image.
[0137] Specifically, multiple paths may be obtained during the execution of S402. After the target path is determined, other paths except the target path are eliminated from the multiple paths. All pixel points included in the other paths may be set to 0, and all pixel points included in the target path may be set to 1, so as to eliminate other paths except the target path from the multiple paths, and only retain the target path in the reference mask to obtain a blood vessel segmentation image. The blood vessel segmentation image is as follows: Figure 8 shown.
[0138] In the above embodiments, the reference mask includes multiple paths grown along all directions of the blood vessel. Taking the to-be-grown seed point as the starting point, an initial point is found in the neighborhood of the starting point through a loop process, and the path among the multiple paths that includes the to-be-grown seed point and the initial point is used as the target path, so as to determine the target path connected to the to-be-grown blood vessel among the multiple paths, making the blood vessel segmentation image clearer.
[0139] In a specific embodiment, referring to Figure 9 , the blood vessel segmentation method includes:
[0140] S21. Determine a three-dimensional image block centered on the to-be-grown seed point in the blood vessel image;
[0141] S22. Obtain a candidate mask according to the three-dimensional image block, the coronary artery tracking model, and a preset threshold;
[0142] S23. Determine whether the candidate mask meets a second preset condition. If not, enter S24; if so, enter S25;
[0143] S24. Extract the center line of the candidate mask, update the to-be-grown seed point with any endpoint of the center line of the candidate mask, and enter S21;
[0144] S25. Use the candidate mask that meets the second preset condition as the tracking mask;
[0145] S26. Determine whether the tracking mask meets a first preset condition. If not, enter S27; if so, enter S28;
[0146] S27. Lower the preset threshold, extract the center line of the tracking mask, update the to-be-grown seed point with any endpoint of the center line of the tracking mask, and enter S21;
[0147] S28. Determine the blood vessel segmentation image according to all the candidate masks, all the tracking masks, and the initial segmentation mask of the blood vessel image obtained in the above steps.
[0148] In the above embodiments, S21 to S24 is the first loop process, and S21 to S27 is the second loop process. Through the first loop process, blood vessel segmentation is performed at a preset threshold to obtain the tracking mask corresponding to the preset threshold. Through the second loop process, the preset threshold is gradually lowered until a tracking mask that meets the first preset condition is obtained. Then, according to all the candidate masks, all the tracking masks, and the initial segmentation mask, the blood vessel segmentation image is determined. Performing blood vessel segmentation at different preset thresholds avoids the situation of under-segmentation or over-segmentation caused by using a unified threshold, and improves the accuracy of blood vessel segmentation.
[0149] In one embodiment, the to-be-grown seed points are selected from a preset set of seed points. The preset set of seed points includes multiple seed points, and the multiple seed points can be the seed points designated by a doctor. As Figure 10 shown, in S101, selecting the to-be-grown seed points of the to-be-grown blood vessel according to the blood vessel image includes:
[0150] S111, determining an initial segmentation mask according to the blood vessel image, where the initial segmentation mask includes a blood vessel region and a non-blood vessel region;
[0151] S112, selecting the to-be-grown seed points from the preset set of seed points according to the initial segmentation mask, where the to-be-grown seed points are in the non-blood vessel region in the initial segmentation mask.
[0152] Specifically, there is no set order for selecting multiple seed points in the set of seed points as the to-be-grown seed points. Any seed point in the non-blood vessel region in the set of seed points is selected as the to-be-grown seed point.
[0153] Corresponding to S111 to S112, before S104, it further includes:
[0154] S1041, updating the to-be-grown seed points according to the blood vessel image, the multiple mask sets of the to-be-grown seed points, and the set of seed points, and determining a tracking mask for which the to-be-grown seed points meet the first preset condition, so as to obtain multiple mask sets of the to-be-grown seed points, until all the seed points in the set of seed points are traversed, and multiple mask sets of each to-be-grown seed point are obtained.
[0155] Among them, the multiple mask sets of the to-be-grown seed points are obtained by performing blood vessel segmentation on the to-be-grown seed points under multiple different preset thresholds, and can be obtained according to step 102 and step 103; the multiple mask sets of the to-be-grown seed points include multiple masks, and the multiple masks include a tracking mask that meets the first preset condition.
[0156] Specifically, the process of updating the to-be-grown seed points in S104 includes: obtaining the initial segmentation mask of the blood vessel image, splicing all the masks in the initial segmentation mask and the multiple mask sets corresponding to the to-be-grown seed points to obtain a second mask, and updating the to-be-grown seed points according to the second mask. Updating the to-be-grown seed points according to the second mask can be to determine the seed points in the set of seed points that are not in the blood vessel region of the second mask to update the to-be-grown seed points.
[0157] Since there is no setting for the order in which multiple seed points in the seed point set are selected as the seed points to be grown, among the seed points determined in the seed point set that are not within the blood vessel region of the second mask, any one of the seed points determined in the seed point set that is not within the blood vessel region of the second mask is selected.
[0158] After updating the seed points to be grown, perform S102 and S103 to obtain multiple mask sets (including the tracking mask of the updated seed points to be grown) of the updated seed points to be grown until all the seed points in the seed point set are traversed to obtain multiple mask sets for each seed point to be grown.
[0159] As Figure 11 shown, determining the multiple mask sets corresponding to all the seed points to be grown in the seed point set includes:
[0160] S31. Select a seed point from the seed point set;
[0161] S32. Determine whether the seed point is within the blood vessel region. For the first selected seed point, determine whether the seed point is within the blood vessel region of the initial segmentation mask. For a seed point that is not the first selected one, determine whether the seed point is within the blood vessel region of the second mask. If it is within the blood vessel region, go to S31; if it is not within the blood vessel region, go to S33;
[0162] S33. Take the seed point as the seed point to be grown;
[0163] S34. Determine the multiple mask sets corresponding to the seed point to be grown;
[0164] S35. Determine whether all the seed points in the seed point set have been traversed. If not, go to S31; if so, go to S36;
[0165] S36. End.
[0166] For example, the seed point set includes multiple seed points: Q1, Q2, Q3, Q4, and the seed point Q1 to be grown that is not in the blood vessel area of the initial segmentation mask is selected from the seed point set. Through S102 and S103, multiple mask sets U1 corresponding to Q1 are obtained, and U1 includes multiple masks (all candidate masks corresponding to Q1 and tracking masks that meet the first preset condition). The multiple masks included in U1 and the initial segmentation mask are spliced to obtain the second mask M01 corresponding to Q1; the seed point to be grown is updated according to the seed point set and the second mask M01 corresponding to Q1. Assuming that Q2 is in the blood vessel area of M01, Q2 is skipped. Assuming that Q3 is in the non-blood vessel area of the second mask M01, Q3 is used as the updated seed point to be grown, and through S102 and S103, 3. Obtain multiple mask sets U3 corresponding to Q3, U3 includes multiple masks, and splice the multiple masks included in U3 and the second mask M01 to obtain the second mask M03 corresponding to Q3 (spin the initial segmentation mask, the multiple masks included in U1 and the multiple masks included in U3 to obtain M03); update the seed points to be grown according to the seed point set and the second mask M03 corresponding to Q3. Assuming that the seed point Q4 is in the non-vascular area of M03, Q4 is used as the updated seed point to be grown, and the multiple mask sets U4 corresponding to Q4 are obtained through S102 and S103. So far, the multiple seed points included in the seed point set have been traversed, and the multiple mask sets of each seed point to be grown are: multiple mask sets U1 of Q1, multiple mask sets U3 of Q3, and multiple mask sets U4 of Q4.
[0167] For each seed point to be grown selected in the seed point set in S101, when S102 is executed for the first time, the mask set under the preset threshold value T1 is obtained. For example, when S101 and S102 are executed for the first time, the mask set of the seed point to be grown under the preset threshold value T1 is obtained, and the threshold value is lowered in S103, and S102 is executed again to obtain the mask set under the preset threshold value T2, until multiple mask sets of the seed point to be grown under multiple preset threshold values (T1, T2, ... Tn) are obtained; the seed point to be grown is updated according to the multiple mask sets of the seed point to be grown, the initial segmentation mask and the seed point set, and for the updated seed point to be grown, the updated seed point to be grown executes S101 and S102 for the first time, and the mask set of the updated seed point to be grown under the preset threshold value T1 (rather than the mask set under Tn) is obtained, and the threshold value is lowered in S103, and S102 is executed again to obtain the mask set of the updated seed point to be grown under the preset threshold value T2.
[0168] In the above embodiments, if a set of seed points for blood vessel segmentation is specified for a blood vessel to be grown, any seed point in the set of seed points that is not within the blood vessel region of the second mask is selected as the updated seed point to be grown. That is to say, the multiple seed points in the set of seed points are processed in an unordered manner. The set of seed points is traversed to obtain multiple mask sets for each seed point to be grown, so that the information for determining the blood vessel segmentation image is richer, and a more accurate blood vessel segmentation image can be obtained.
[0169] As Figure 12 shown, correspondingly to S1041, S104 includes:
[0170] S1042, splicing the initial segmentation mask and the multiple mask sets of each seed point to be grown to obtain a first mask.
[0171] Specifically, the multiple mask sets of each seed point to be grown correspond one by one to multiple preset thresholds; the multiple mask sets of each seed point to be grown include multiple masks, and the multiple masks include tracking masks that meet the first preset condition. The multiple mask sets of each seed point to be grown and the initial segmentation mask are spliced to obtain a first mask.
[0172] For example, each seed point to be grown includes: Q1, Q3, and Q4. The multiple mask sets of Q1 are U1, the multiple mask sets of Q3 are U3, and the multiple mask sets of Q4 are U4. All the masks included in U1, all the masks included in U3, all the masks included in U4, and the initial segmentation mask, as well as the initial segmentation mask, are spliced to obtain a first mask.
[0173] S1043, for any seed point to be grown, determine any first starting point corresponding to the any seed point to be grown according to the first mask, and in the first mask, determine several second reference points corresponding to the any first starting point.
[0174] Among them, the several second reference points are located in the neighborhood of the any first starting point and within the blood vessel region.
[0175] Specifically, the any seed point to be grown is the seed point to be grown selected through S101; extract the candidate center line of the first mask, and map the any seed point to be grown to the candidate center line to obtain any first starting point corresponding to the any seed point to be grown. Mapping the any seed point to be grown to the candidate center line means determining the point on the candidate center line that is closest to the any seed point to be grown, and taking the determined point as any first starting point of the any seed point to be grown.
[0176] Determine the neighborhood of any first starting point, and take the points that are within the neighborhood of any first starting point and located on the candidate center line as several second reference points of any first starting point. The neighborhood of any first starting point can be a 26-neighborhood or an 8-neighborhood. Since the candidate center line is the center line of the connected region of the first mask, all points on the candidate center line are within the blood vessel region of the first mask. The second reference points selected on the candidate center line are all within the blood vessel region of the first mask.
[0177] S1044. Use each second reference point corresponding to any first starting point to replace the any first starting point respectively, and repeat the above process of determining several second reference points corresponding to the any first starting point until the several second reference points corresponding to the any first starting point include a second initial point.
[0178] Specifically, use each second reference point of any first starting point to replace the any first starting point, then determine several second reference points that are on the candidate center line within the neighborhood of the replaced any first starting point, and repeat S1043 until the several second reference points include a second initial point, where the second initial point is within the blood vessel region of the initial segmentation mask.
[0179] S1045. Determine the path between any to-be-grown seed point and the second initial point of the any to-be-grown seed point, and determine the longest path.
[0180] Specifically, obtain the second initial point corresponding to any to-be-grown seed point according to S1044, determine the path corresponding to any to-be-grown seed point according to the second initial point corresponding to any to-be-grown seed point, and determine the longest path among the paths corresponding to each to-be-grown seed point.
[0181] For example, each to-be-grown seed point includes: Q1, Q3, and Q4. The path corresponding to Q1 is: L1, the path corresponding to Q3 is: L3, and the path corresponding to Q4 is: L4. Determine the longest path among L1, L2, and L4.
[0182] S1046. Remove other paths in the first mask except the longest path to obtain a blood vessel segmentation image.
[0183] Specifically, according to S1046, obtain the path of any to-be-grown seed point in the first mask, remove other paths in the path of any to-be-grown seed point except the longest path to obtain a blood vessel segmentation image. It can be to set all pixel points included in other paths to 0 and set all pixel points included in the longest path to 1 to achieve removing other paths in the path of any to-be-grown seed point except the longest path.
[0184] In the above embodiments, for each to-be-grown seed point selected from the seed point set, the corresponding path (including the to-be-grown seed point and the second initial point corresponding to the to-be-grown seed point) is determined, and a plurality of paths are obtained. The plurality of paths provide richer paths for determining the blood vessel segmentation image. The longest path is determined from the plurality of paths, and then the blood vessel segmentation image is obtained, so that the segmented blood vessel path is longer, the blood vessels are clearer and more accurate.
[0185] In a specific embodiment, referring to Figure 13 , after obtaining the first mask, the process of determining the blood vessel segmentation image according to the first mask includes:
[0186] S41. Extract the candidate center line of the first mask;
[0187] S42. Map any to-be-grown seed point to the candidate center line to obtain any first starting point;
[0188] S43. Determine several second reference points corresponding to any first starting point in the first mask;
[0189] S44. Determine whether the several second reference points include a second initial point in the initial segmentation mask. If not, go to S45; if so, go to S46;
[0190] S45. Replace any first starting point with each second reference point corresponding to the any first starting point, and go to S43;
[0191] S46. Determine the path between any to-be-grown seed point and the second initial point of the any to-be-grown seed point;
[0192] S47. Determine the longest path;
[0193] S48. Remove other paths in the first mask except the longest path to obtain the blood vessel segmentation image.
[0194] In this embodiment, by performing vessel segmentation on the basis of a vessel image, to-be-grown seed points, and a coronary artery tracking model at a preset threshold, a mask set at the preset threshold is obtained. If the tracking mask in the mask set does not meet the first preset condition, the preset threshold is decreased, and the to-be-grown seed points are updated according to the tracking mask. The above process of performing vessel segmentation on the basis of the vessel image, the to-be-grown seed points, and the coronary artery tracking model at the preset threshold to obtain a mask set at the decreased preset threshold is repeated and this process is iterated until the tracking mask in the obtained mask set meets the first preset condition. During the vessel segmentation process, the preset threshold is gradually decreased, and vessel segmentation is performed at different thresholds, avoiding the situation of under-segmentation or over-segmentation caused by using a unified threshold and improving the accuracy of vessel segmentation; the to-be-grown seed points are selected from a preset seed point set, and the order in which multiple seed points in the seed point set are selected as the to-be-grown seed points is not determined, that is, multiple seed points in the seed point set are processed disorderly.
[0195] In one embodiment, as Figure 14 shown, a vessel segmentation device is provided, including: a to-be-grown seed point selection module, a first tracking module, and a second tracking module, where:
[0196] The to-be-grown seed point selection module is configured to select to-be-grown seed points of a to-be-grown blood vessel according to a vessel image;
[0197] The first tracking module is configured to determine a mask set based on the vessel image, the to-be-grown seed points, a preset threshold, and a coronary artery tracking model, and determine a tracking mask according to the mask set;
[0198] The second tracking module is configured to, if the tracking mask does not meet the first preset condition, decrease the preset threshold, update the to-be-grown seed points based on the tracking mask, and repeat the above process of determining the tracking mask until the determined tracking mask meets the first preset condition;
[0199] The vessel segmentation image determination module is configured to determine a vessel segmentation image based on each determined mask set and the vessel image.
[0200] For specific limitations on the vessel segmentation device, reference may be made to the limitations on the vessel segmentation method in the foregoing text, which will not be elaborated herein. Each module in the above vessel segmentation device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in or independent of a processor in a computer device in the form of hardware, or stored in a memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0201] In one embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 15As shown in the figure. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be achieved through WIFI, carrier network, NFC (Near Field Communication) or other technologies. The computer program, when executed by the processor, implements a method for blood vessel segmentation. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0202] Those skilled in the art can understand that Figure 15 the structure shown in the figure is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0203] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the following steps are implemented:
[0204] Select the seed points to be grown for the blood vessels to be grown according to the blood vessel image;
[0205] Based on the blood vessel image, the seed points to be grown, a preset threshold, and a coronary artery tracking model, determine a mask set, and determine a tracking mask according to the mask set;
[0206] If the tracking mask does not meet the first preset condition, then reduce the preset threshold, update the seed points to be grown based on the tracking mask, and repeat the above process of determining the tracking mask until the determined tracking mask meets the first preset condition;
[0207] Based on each determined mask set and the blood vessel image, determine a blood vessel segmentation image.
[0208] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, the following steps are implemented:
[0209] Select the seed points to be grown for the blood vessels to be grown according to the blood vessel image;
[0210] Based on the blood vessel image, the to-be-grown seed points, a preset threshold, and a coronary artery tracking model, determine a mask set, and determine a tracking mask according to the mask set;
[0211] If the tracking mask does not meet the first preset condition, then reduce the preset threshold, update the to-be-grown seed points based on the tracking mask, and repeat the process of determining the tracking mask above until the determined tracking mask meets the first preset condition;
[0212] Based on each determined mask set and the blood vessel image, determine a blood vessel segmentation image.
[0213] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical memory, etc. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0214] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0215] The above-described embodiments only represent several implementation manners of the present application. Their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A method for blood vessel segmentation, characterized in that, The method includes: Selecting a to-be-grown seed point of a to-be-grown blood vessel according to a blood vessel image; Performing at least one blood vessel segmentation on the blood vessel image based on the to-be-grown seed point and a coronary artery tracking model under a preset threshold until a candidate mask obtained by the blood vessel segmentation meets a stop growth condition, then determining a mask set according to the candidate mask, and using the candidate mask that meets the stop growth condition as a tracking mask; the coronary artery tracking model is used for performing image segmentation on the blood vessel image; If the tracking mask does not meet a first preset condition, reducing the preset threshold, updating the to-be-grown seed point based on the tracking mask, and repeating the above process of determining the tracking mask until the determined tracking mask meets the first preset condition; Determining a blood vessel segmentation image based on each determined mask set and the blood vessel image.
2. The method according to claim 1, wherein The first preset condition includes: the connected component of the tracking mask intersects with the blood vessel region of the blood vessel image, or the connected component of the tracking mask and the blood vessel region of the blood vessel image satisfy neighborhood connectivity.
3. The method according to claim 1, characterized in that The performing at least one blood vessel segmentation on the blood vessel image based on the to-be-grown seed point and a coronary artery tracking model under a preset threshold until a candidate mask obtained by the blood vessel segmentation meets a stop growth condition, then determining a mask set according to the candidate mask, and using the candidate mask that meets the stop growth condition as a tracking mask includes: Determining a candidate mask corresponding to the preset threshold based on the blood vessel image, the to-be-grown seed point, and the coronary artery tracking model; If the candidate mask does not meet a second preset condition, updating the to-be-grown seed point according to the candidate mask, and repeating the process of determining the candidate mask corresponding to the preset threshold until the obtained candidate mask meets the second preset condition; Determining a mask set according to each determined candidate mask, and using the candidate mask in the mask set that meets the second preset condition as a tracking mask.
4. The method according to claim 3, characterized in that The determining a candidate mask corresponding to the preset threshold based on the blood vessel image, the to-be-grown seed point, and the coronary artery tracking model includes: Determining a three-dimensional image patch centered on the to-be-grown seed point in the blood vessel image; Inputting the three-dimensional image patch into the coronary artery tracking model to obtain a probability matrix; Obtaining a candidate mask according to the probability matrix and the preset threshold.
5. The method according to claim 3, characterized in that, The second preset condition includes: the growth length of the candidate mask is less than a preset length, or the tracking times of the candidate mask are greater than a preset number of times.
6. The method according to claim 1, wherein The updating the to-be-grown seed point based on the tracking mask includes: Obtaining a tracking connected component including the to-be-grown seed point in the tracking mask; Determining a third center line of the tracking connected component, and obtaining at least two end points of the third center line; Replacing the to-be-grown seed point with any one of the at least two end points.
7. The method according to any one of claims 1 to 6, characterized in that, The determining a blood vessel segmentation image based on each determined mask set and the blood vessel image includes: Determining an initial segmentation mask according to the blood vessel image, and splicing all masks in the mask set corresponding to each preset threshold and the initial segmentation mask to obtain a reference mask; Determine a target path in the reference mask, where the target path includes: a to-be-grown seed point selected in the to-be-grown blood vessel, and a first initial point within the blood vessel region of the blood vessel image; Remove other paths in the reference mask except the target path to obtain a blood vessel segmentation image.
8. A vascular segmentation device, characterized in that, The device includes: A to-be-grown seed point selection module, configured to select a to-be-grown seed point of a to-be-grown blood vessel according to a blood vessel image; A first tracking module, configured to perform at least one blood vessel segmentation on the blood vessel image based on the to-be-grown seed point and a coronary artery tracking model under a preset threshold until the candidate mask obtained by the blood vessel segmentation meets a stop growth condition, then determine a mask set according to the candidate mask, and use the candidate mask that meets the stop growth condition as a tracking mask; the coronary artery tracking model is used to perform image segmentation on the blood vessel image; A second tracking module, configured to, if the tracking mask does not meet a first preset condition, reduce the preset threshold, update the to-be-grown seed point based on the tracking mask, and repeat the above process of determining the tracking mask until the determined tracking mask meets the first preset condition; A blood vessel segmentation image determination module, configured to determine a blood vessel segmentation image based on each determined mask set and the blood vessel image.
9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Weak supervised semantic segmentation method based on watershed algorithm and image category tags
CN109858487A
Liver image segmentation method based on deep learning
CN113223004A