Coronary artery segmentation method, device, computer equipment and storage medium
By calculating the coronary center line using the distance field model and the optimal path algorithm, the problem of searching for path errors or failures in coronary segmentation is solved, and a more accurate coronary segmentation result is achieved.
Patent Information
- Application Number
- CN202011626053.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-30
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2040-12-30
AI Technical Summary
The prior art is prone to problems of finding path errors or failures in coronary segmentation, especially in coronary bifurcations and venous adhesions.
By obtaining the editing points input by the user, the distance field map is calculated using the pre-trained distance field model, and the coronary center line is calculated in combination with the optimal path algorithm, and finally segmented according to the coronary center line and the distance field map.
It effectively avoids the problem of errors or failures in searching paths, improves the accuracy and reliability of coronary segmentation, and obtains more accurate segmentation results.
Smart Images

Figure CN114764807B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image segmentation technology, and in particular to a coronary artery segmentation method, apparatus, computer equipment and storage medium. Background Art
[0002] With the improvement of imaging speed and scanning accuracy of CT (Computed Tomography) equipment, CT medical images have been widely used in cardiac examination and disease diagnosis. Coronary artery segmentation and coronary artery edge extraction based on CT medical images can provide doctors with coronary artery contours, making it easier for doctors to observe stenosis, calcification, plaques, etc., and thus provide a basis for doctors to prevent and diagnose cardiovascular diseases in the early stage.
[0003] In the related art, the automatic coronary segmentation algorithm is already able to identify most of the coronary arteries. However, for cases of misclassification, omission or over-classification in coronary artery segmentation, a manual coronary artery editing algorithm can be used to supplement it.
[0004] However, path finding errors or failures often occur in cases such as coronary bifurcations and venous adhesions. Summary of the invention
[0005] Based on this, it is necessary to provide a coronary segmentation method, device, computer equipment and storage medium that can avoid problems such as search path errors or failures in order to address the above technical problems.
[0006] A coronary artery segmentation method, the method comprising:
[0007] Obtaining the edit points input by the user for the image to be segmented, and determining the target segmentation area in the image to be segmented according to the edit points;
[0008] The pre-trained distance field model is used to calculate the target segmentation area to obtain the distance field map corresponding to the target segmentation area;
[0009] The optimal path is calculated based on the distance field map and the edit points to obtain the coronary artery centerline in the image to be segmented;
[0010] Segmentation is performed based on the coronary artery centerline and the distance field map to obtain the target segmentation result.
[0011] In one embodiment, the above-mentioned calculation of the target segmentation region using the pre-trained distance field model to obtain the distance field map corresponding to the target segmentation region includes:
[0012] Sampling the target segmentation area according to a preset size to obtain multiple volume data;
[0013] Inputting multiple volume data into the distance field model in sequence to obtain the distance field corresponding to each volume data output by the distance field model;
[0014] The calculated multiple distance fields are merged to obtain a distance field map corresponding to the target segmentation area.
[0015] In one embodiment, the above-mentioned optimal path calculation based on the distance field map and the edit points to obtain the coronary artery centerline in the image to be segmented includes:
[0016] Taking the first edit point input by the user as the starting point, a pre-set optimal path algorithm is used to search for a path according to the distance field map, and the optimal path between the multiple edit points found is determined as the coronary artery centerline in the image to be segmented.
[0017] In one embodiment, the coronary artery segmentation is performed according to the coronary artery centerline and the distance field map to obtain the target segmentation result, including:
[0018] Determine the seed point based on the coronary artery centerline and determine the growth constraint conditions based on the distance field map;
[0019] The region growth process is performed according to the seed points and growth constraints to obtain the target segmentation result.
[0020] In one embodiment, after obtaining the target segmentation result, the method further includes:
[0021] The target segmentation result is subjected to edge optimization processing to obtain an optimized segmentation result.
[0022] In one embodiment, after the calculated multiple distance fields are merged, the method further includes:
[0023] The merged distance field is normalized to obtain a distance field map in the image to be segmented.
[0024] In one embodiment, before calculating the target segmentation region using the pre-trained distance field model to obtain the distance field map corresponding to the target segmentation region, the method further includes:
[0025] Obtaining a training sample set; the training sample set includes a plurality of sample images and a sample distance field corresponding to each sample image;
[0026] The deep learning model is trained based on the training sample set to obtain a distance field model.
[0027] In one embodiment, the step of obtaining a training sample set includes:
[0028] Acquire multiple sample images, and perform coronary artery segmentation on each sample image to obtain an initial segmentation result corresponding to each sample image;
[0029] Correcting the initial segmentation results corresponding to each sample image to obtain a corrected segmentation result corresponding to each sample image;
[0030] The distance field is calculated according to the corrected segmentation result of each sample image to obtain the sample distance field corresponding to each sample image. A training sample set is composed of multiple sample images and the sample distance fields corresponding to each sample image.
[0031] In one embodiment, the training of the deep learning model based on the training sample set to obtain the distance field model includes:
[0032] Input the sample image into the deep learning model to obtain the training result output by the deep learning model;
[0033] The loss value between the training result and the sample distance field is calculated using a preset loss function;
[0034] If the loss value does not meet the preset convergence condition, the parameters in the deep learning model are adjusted until the loss value meets the preset convergence condition, thereby obtaining a distance field model;
[0035] Among them, the weight ratio of the coronary artery and the background in the preset loss function is a preset ratio.
[0036] A coronary artery segmentation device, comprising:
[0037] The region determination module is used to obtain the editing points input by the user for the image to be segmented, and determine the target segmentation region in the image to be segmented according to the editing points;
[0038] A distance field calculation module is used to calculate the target segmentation area using a pre-trained distance field model to obtain a distance field map corresponding to the target segmentation area;
[0039] A path calculation module is used to calculate the optimal path according to the distance field map and the edit points to obtain the center line of the coronary artery in the image to be segmented;
[0040] The segmentation module is used to perform segmentation according to the coronary artery centerline and the distance field map to obtain the target segmentation result.
[0041] In one embodiment, the distance field calculation module is specifically used to sample the target segmentation area according to a preset size to obtain a plurality of volume data; input the plurality of volume data into the distance field model in sequence to obtain a distance field corresponding to each volume data output by the distance field model; and merge the calculated plurality of distance fields to obtain a distance field map corresponding to the target segmentation area.
[0042] In one of the embodiments, the path calculation module is specifically used to use the first edit point input by the user as the starting point, use a preset optimal path algorithm to perform path search according to the distance field map, and determine the optimal path between the multiple edit points found as the coronary artery centerline in the image to be segmented.
[0043] In one of the embodiments, the segmentation module is specifically used to determine the seed point according to the coronary centerline, determine the growth constraint condition according to the distance field map; perform region growth processing according to the seed point and the growth constraint condition to obtain the target segmentation result.
[0044] In one embodiment, the device further comprises:
[0045] The optimization module is used to perform edge optimization processing on the target segmentation result to obtain an optimized segmentation result.
[0046] In one embodiment, the device further comprises:
[0047] The normalization module is used to normalize the distance field after the merge process to obtain a distance field map in the image to be segmented.
[0048] In one embodiment, the device further comprises:
[0049] The sample set acquisition module is used to acquire a training sample set; the training sample set includes a plurality of sample images and a sample distance field corresponding to each sample image;
[0050] The training module is used to train the deep learning model based on the training sample set to obtain the distance field model.
[0051] In one of the embodiments, the sample set acquisition module is specifically used to acquire multiple sample images, and perform coronary artery segmentation on each sample image to obtain an initial segmentation result corresponding to each sample image; perform correction processing on the initial segmentation result corresponding to each sample image to obtain a corrected segmentation result corresponding to each sample image; perform distance field calculation based on the corrected segmentation result of each sample image to obtain a sample distance field corresponding to each sample image, and a training sample set is composed of multiple sample images and sample distance fields corresponding to each sample image.
[0052] In one embodiment, the training module is specifically used to input the sample image into the deep learning model to obtain the training result output by the deep learning model; use the preset loss function to calculate the loss value between the training result and the sample distance field; if the loss value does not meet the preset convergence condition, adjust the parameters in the deep learning model until the loss value meets the preset convergence condition, thereby obtaining the distance field model;
[0053] Among them, the weight ratio of the coronary artery and the background in the preset loss function is a preset ratio.
[0054] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0055] Obtaining the edit points input by the user for the image to be segmented, and determining the target segmentation area in the image to be segmented according to the edit points;
[0056] The pre-trained distance field model is used to calculate the target segmentation area to obtain the distance field map corresponding to the target segmentation area;
[0057] The optimal path is calculated based on the distance field map and the edit points to obtain the coronary artery centerline in the image to be segmented;
[0058] Segmentation is performed based on the coronary artery centerline and the distance field map to obtain the target segmentation result.
[0059] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0060] Obtaining the edit points input by the user for the image to be segmented, and determining the target segmentation area in the image to be segmented according to the edit points;
[0061] The pre-trained distance field model is used to calculate the target segmentation area to obtain the distance field map corresponding to the target segmentation area;
[0062] The optimal path is calculated based on the distance field map and the edit points to obtain the coronary artery centerline in the image to be segmented;
[0063] Segmentation is performed based on the coronary artery centerline and the distance field map to obtain the target segmentation result.
[0064] The above-mentioned coronary segmentation method, device, computer equipment and storage medium obtain the editing points input by the user for the image to be segmented, and determine the target segmentation area in the image to be segmented according to the editing points; use the pre-trained distance field model to calculate the target segmentation area to obtain the distance field map corresponding to the target segmentation area; calculate the optimal path according to the distance field map and the editing points to obtain the coronary centerline in the image to be segmented; perform segmentation according to the coronary centerline and the distance field map to obtain the target segmentation result. In the disclosed embodiment, the distance field model is used to obtain the distance field map, which can better solve the center weight problem of the coronary intersection or the venous adhesion. Combined with the calculation of the optimal path, the path can be accurately found, avoiding the problem of path search errors or failures, and thus obtaining a more accurate segmentation result. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 is an application environment diagram of a coronary artery segmentation method in an embodiment;
[0066] Figure 2 is a schematic flow chart of a coronary artery segmentation method in one embodiment;
[0067] Figure 3 is a schematic diagram of a coronary artery centerline in one embodiment;
[0068] Figure 4 is a schematic diagram of a target segmentation result in one embodiment;
[0069] Figure 5 A schematic diagram of a process of obtaining a distance field map by using a distance field model in one embodiment;
[0070] Figure 6 It is a flowchart of the steps of performing coronary segmentation according to the coronary centerline and the distance field map to obtain a target segmentation result in one embodiment;
[0071] Figure 7 A schematic diagram of a flow chart of the steps of training a distance field model in one embodiment;
[0072] Figure 8 is a schematic diagram of performing distance field calculation in one embodiment;
[0073] Fig. 9 A schematic diagram of the structure of a vnet network in one embodiment;
[0074] Fig.10 is a schematic diagram of training convergence in one embodiment;
[0075] Fig.11 is a structural block diagram of a coronary artery segmentation device in one embodiment;
[0076] Fig.12 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0077] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with 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.
[0078] The coronary artery segmentation method provided in this application can be applied to Figure 1In the application environment shown. The application environment may include an image processing device 101 and at least one medical scanning device 102. The image processing device 101 may communicate with the medical scanning device 102 through a network. The above-mentioned image processing device 101 may be, but not limited to, various personal computers, laptop computers and tablet computers, and the above-mentioned medical scanning device 102 may be, but not limited to, CT (Computed Tomography, i.e., electronic computer tomography) equipment, PET (Positron Emission Computed Tomography, positron emission computed tomography)-CT equipment, MRI (Magnetic Resonance Imaging, magnetic resonance imaging) equipment and ultrasound equipment.
[0079] The application environment may also include a PACS (Picture Archiving and Communication Systems) server 103. The image processing device 101 and the medical scanning device 102 may communicate with the PACS server 103 through a network. The PACS server 103 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0080] In one embodiment, Figure 2 As shown, a coronary artery segmentation method is provided, which is applied to Figure 1 The image processing device in the embodiment is taken as an example to illustrate, and the following steps are included:
[0081] Step 201 : obtaining the edit points input by the user for the image to be segmented, and determining the target segmentation area in the image to be segmented according to the edit points.
[0082] The image to be segmented may include at least one of CT images, PET images, MRI images and ultrasound images. The image to be segmented includes coronary arteries; coronary arteries generally refer to coronary arteries, which are arteries that supply blood to the heart, originate in the aortic sinus at the root of the aorta, and are divided into left and right branches, running on the surface of the heart.
[0083] The image processing device may obtain the image to be segmented from a medical scanning device, or may obtain the image to be segmented from a PACS server, which is not limited in the embodiments of the present disclosure.
[0084] After acquiring the image to be segmented, the image processing device may first perform preliminary segmentation processing and display the preliminary segmentation result. Afterwards, the user may input an edit point to the image processing device based on the preliminary segmentation result; correspondingly, the image processing device receives the edit point input by the user. The number of edit points may be two or more, which is not limited in the embodiments of the present disclosure.
[0085] After the image processing device obtains the edit points, the region with the smallest area containing all the edit points in the image to be segmented can be determined as the target segmentation region. For example, the image processing device receives four edit points input by the user, and according to the position coordinates of the four edit points on the image to be segmented, the region with the smallest area containing the four edit points is determined as the target segmentation region. Other methods can also be used to determine the target segmentation region, which is not limited in the embodiments of the present disclosure.
[0086] Step 202: Calculate the target segmentation region using the pre-trained distance field model to obtain a distance field map corresponding to the target segmentation region.
[0087] The distance field map is a field image, and the pixel value on the distance field map represents the distance between the pixel point and the center line.
[0088] The image processing device pre-trains the distance field model. After determining the target segmentation area, the image data in the target segmentation area is input into the distance field model, and the distance field map corresponding to the target segmentation area output by the distance field model can be obtained. The distance field model can adopt a deep learning model or a neural network model, which is not limited in the embodiments of the present disclosure.
[0089] Step 203, performing optimal path calculation based on the distance field map and the edit points to obtain the coronary artery centerline in the image to be segmented.
[0090] After obtaining the distance field map and the edit points, the image processing device uses the first edit point input by the user as the starting point, uses the preset optimal path algorithm to search for a path based on the distance field map, and determines the optimal path between the multiple edit points found as the coronary artery centerline in the image to be segmented. Figure 3 Black wire shown.
[0091] In order to improve the computational efficiency, the above optimal path algorithm may adopt the A* algorithm. The A* (A-Star) algorithm is the most effective direct search method for solving the shortest path in a static road network. Other optimal path algorithms may also be used, which are not limited in the embodiments of the present disclosure.
[0092] Step 204, segmentation is performed according to the coronary artery centerline and the distance field map to obtain a target segmentation result.
[0093] The image processing device can determine the segmentation position according to the coronary artery centerline and the distance between each pixel point and the centerline indicated by the distance field map; then, the image segmentation processing is performed according to the segmentation position to obtain the target segmentation result, such as Figure 4 The white area shown.
[0094] In the above coronary segmentation method, the editing points input by the user for the image to be segmented are obtained, and the target segmentation area in the image to be segmented is determined according to the editing points; the target segmentation area is calculated using the pre-trained distance field model to obtain the distance field map corresponding to the target segmentation area; the optimal path is calculated according to the distance field map and the editing points to obtain the coronary centerline in the image to be segmented; segmentation is performed according to the coronary centerline and the distance field map to obtain the target segmentation result. In the embodiment of the present disclosure, the distance field map is obtained by using the distance field model to solve the center weight problem of the coronary intersection or the venous adhesion. Combined with the calculation of the optimal path, the path can be accurately found to avoid the problem of path search errors or failures, thereby obtaining a more accurate segmentation result. Furthermore, the above coronary segmentation method can also be applied to coronary segmentation technologies such as single point tracking and seed point-based coronary tree segmentation, and can also be applied to segmentation technologies of tubular structures such as blood vessels and trachea, so that the method provided by the embodiment of the present disclosure has strong universality.
[0095] In one embodiment, Figure 5 As shown, the above step of calculating the target segmentation region using the pre-trained distance field model to obtain the distance field map corresponding to the target segmentation region may include:
[0096] Step 301 : sampling the target segmentation area according to a preset size to obtain a plurality of volume data.
[0097] The sampling size may be set in advance in the image processing device. After obtaining the target segmentation region, the image processing device samples the target segmentation region according to the preset size, thereby obtaining a plurality of volume data.
[0098] For example, the preset size is 0.5 mm*0.5 mm*0.5 mm, and the image processing device samples the target segmentation area to obtain a plurality of volume data, each of which has a size of 0.5 mm*0.5 mm*0.5 mm. The embodiments of the present disclosure do not limit the preset size.
[0099] Step 302: Input a plurality of volume data into the distance field model in sequence to obtain a distance field corresponding to each volume data output by the distance field model.
[0100] The image processing device sequentially inputs the sampled multiple volume data into the distance field model. The distance field model performs distance field calculation for each volume data and outputs the distance field corresponding to each volume data.
[0101] Step 303: merge the calculated multiple distance fields to obtain a distance field map corresponding to the target segmentation area.
[0102] After the distance field model outputs the distance field corresponding to each volume data, multiple distance fields are merged according to the location of the volume data to obtain a distance field map corresponding to the target segmentation area.
[0103] In the above step of calculating the target segmentation region using the pre-trained distance field model to obtain the distance field map corresponding to the target segmentation region, the target segmentation region is sampled according to a preset size to obtain multiple volume data; the multiple volume data are sequentially input into the distance field model to obtain the distance field corresponding to each volume data output by the distance field model; the calculated multiple distance fields are merged to obtain the distance field map corresponding to the target segmentation region. In the disclosed embodiment, the distance field map obtained by using the distance field model can better solve the center weight problem at the coronary intersection or the venous adhesion, and avoid the problem of path search error or identification; further, after sampling the target segmentation region and then calculating the distance field using the distance field model, the amount of calculation of the distance field model each time can be reduced, thereby improving the calculation efficiency.
[0104] In one embodiment, after the calculated multiple distance fields are merged, the method may further include: normalizing the merged distance fields to obtain a distance field map in the image to be segmented.
[0105] In practical applications, the normalization process may be to normalize the pixel value at the center line to 1, and decrease the pixel value from the center line to the outside until the pixel value is normalized to 0. Normalization can be expressed by the following formula:
[0106] g(x)=exp(3*(1-m(x)))-1
[0107] Among them, g(x) is the cost function. The closer the pixel is to the center, the smaller the cost is, and the closer the pixel is to the outside, the larger the cost is. m(x) is the distance field.
[0108] It can be understood that normalizing the distance field map facilitates subsequent optimal path calculation based on the distance field map, thereby improving the calculation efficiency of the optimal path.
[0109] In one embodiment, Figure 6 As shown, the above-mentioned step of performing coronary segmentation according to the coronary centerline and the distance field map to obtain the target segmentation result may include:
[0110] Step 401, determining a seed point according to the coronary artery centerline, and determining a growth constraint condition according to the distance field map.
[0111] Among them, the value-added constraints include the growth step and the growth stop condition.
[0112] The image processing device can determine the pixel point at the center line of the coronary artery as the seed point, and can determine the preset length as the growth step length according to the normalized distance field map, and determine the preset pixel value as the growth stop condition.
[0113] For example, 4 mm is used as the growth step length, and the pixel value 0.2 is determined as the growth stop condition, that is, the growth stops when the pixel value reaches 0.2. The embodiment of the present disclosure does not limit the growth constraint condition.
[0114] Step 402, performing region growing processing according to the seed points and the growth constraint conditions to obtain the target segmentation result.
[0115] The image processing device takes the seed point as the starting point, performs region growth processing according to the growth step length, and stops growing when the growth stop condition is reached. The growth region obtained when the growth stops is determined as the segmented coronary artery image, which is the target segmentation result.
[0116] In one of the embodiments, after obtaining the target segmentation result, the method may further include: performing edge optimization processing on the target segmentation result to obtain an optimized segmentation result.
[0117] After stopping the region growing process, the image processing device performs edge optimization processing on the growing region to make the edge of the growing region smoother, thereby obtaining an optimized segmentation result.
[0118] In the above-mentioned step of performing coronary segmentation according to the coronary centerline and the distance field map to obtain the target segmentation result, the seed point is determined according to the coronary centerline, and the growth constraint condition is determined according to the distance field map; the region growth processing is performed according to the seed point and the growth constraint condition to obtain the target segmentation result. In the disclosed embodiment, the distance field map and the coronary centerline are used to perform coronary segmentation. Since the distance field map can better solve the center weight problem of the coronary intersection or the venous adhesion, combined with the coronary centerline calculated by the optimal path, it can avoid the problem of path search error or failure, so that a more accurate segmentation result can be obtained.
[0119] In one embodiment, Figure 7 As shown, before calculating the target segmentation region using the pre-trained distance field model to obtain the distance field map corresponding to the target segmentation region, a step of training the distance field model may also be included:
[0120] Step 501: Obtain a training sample set.
[0121] The training sample set includes a plurality of sample images and a sample distance field corresponding to each sample image. The sample image may include at least one of a CT image, a PET image, an MRI image, and an ultrasound image.
[0122] An image processing device acquires a plurality of sample images, and performs coronary artery segmentation on each sample image to obtain an initial segmentation result corresponding to each sample image; then, the initial segmentation result corresponding to each sample image is corrected to obtain a corrected segmentation result corresponding to each sample image; then, a distance field is calculated based on the corrected segmentation result of each sample image to obtain a sample distance field corresponding to each sample image; finally, a training sample set is composed of the plurality of sample images and the sample distance fields corresponding to each sample image.
[0123] The correction processing of the initial segmentation results corresponding to each sample image can be performed manually, and the embodiment of the present disclosure does not limit this. The distance field calculation is performed based on the corrected segmentation results of each sample image to obtain the sample distance field corresponding to each sample image, which can be referred to Figure 8 shown.
[0124] Step 502: Train a deep learning model based on the training sample set to obtain a distance field model.
[0125] The image processing device inputs the sample image into the deep learning model to obtain the training result output by the deep learning model; uses the preset loss function to calculate the loss value between the training result and the sample distance field; if the loss value does not meet the preset convergence condition, adjusts the parameters in the deep learning model until the loss value meets the preset convergence condition, thereby obtaining the distance field model.
[0126] The above deep learning model can use a vnet network. The structure of the vnet network is as follows Fig. 9 As shown, the embodiments of the present disclosure are not limited to this.
[0127] In one embodiment, the weight ratio of the coronary artery to the background in the preset loss function is a preset ratio. For example, the coronary artery is a positive sample and the background is a negative sample, and the weight ratio of the coronary artery to the background is 10:1. The above preset loss function can use Focal loss, and the convergence situation is as follows Fig.10 As shown in Figure 1, this loss function can reduce the weight of a large number of simple negative samples in training, thereby solving the problem of severe imbalance in the ratio of positive and negative samples in one-stage target detection.
[0128] In the above step of training the distance field model, a training sample set is obtained; a deep learning model is trained based on the training sample set to obtain a distance field model. In the disclosed embodiment, the trained distance field model can better solve the center weight problem of coronary intersections or venous adhesions.
[0129] It should be understood that although Figures 2 to 7The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figures 2 to 7 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0130] In one embodiment, Fig.11 As shown, a coronary artery segmentation device is provided, comprising:
[0131] The region determination module 601 is used to obtain the editing points input by the user for the image to be segmented, and determine the target segmentation region in the image to be segmented according to the editing points;
[0132] The distance field calculation module 602 is used to calculate the target segmentation area using the pre-trained distance field model to obtain a distance field map corresponding to the target segmentation area;
[0133] A path calculation module 603 is used to calculate the optimal path according to the distance field map and the edit points to obtain the coronary artery centerline in the image to be segmented;
[0134] The segmentation module 604 is used to perform segmentation according to the coronary artery centerline and the distance field map to obtain a target segmentation result.
[0135] In one embodiment, the distance field calculation module 602 is specifically used to sample the target segmentation area according to a preset size to obtain a plurality of volume data; input the plurality of volume data into the distance field model in sequence to obtain a distance field corresponding to each volume data output by the distance field model; and merge the calculated plurality of distance fields to obtain a distance field map corresponding to the target segmentation area.
[0136] In one embodiment, the path calculation module 603 is specifically used to use the first edit point input by the user as the starting point, use a preset optimal path algorithm to perform path search according to the distance field map, and determine the optimal path between the multiple edit points found as the coronary artery centerline in the image to be segmented.
[0137] In one of the embodiments, the segmentation module 604 is specifically used to determine the seed point according to the coronary centerline, determine the growth constraint condition according to the distance field map; perform region growth processing according to the seed point and the growth constraint condition to obtain the target segmentation result.
[0138] In one embodiment, the device further comprises:
[0139] The optimization module is used to perform edge optimization processing on the target segmentation result to obtain an optimized segmentation result.
[0140] In one embodiment, the device further comprises:
[0141] The normalization module is used to normalize the distance field after the merge process to obtain a distance field map in the image to be segmented.
[0142] In one embodiment, the device further comprises:
[0143] The sample set acquisition module is used to acquire a training sample set; the training sample set includes a plurality of sample images and a sample distance field corresponding to each sample image;
[0144] The training module is used to train the deep learning model based on the training sample set to obtain the distance field model.
[0145] In one of the embodiments, the sample set acquisition module is specifically used to acquire multiple sample images, and perform coronary artery segmentation on each sample image to obtain an initial segmentation result corresponding to each sample image; perform correction processing on the initial segmentation result corresponding to each sample image to obtain a corrected segmentation result corresponding to each sample image; perform distance field calculation based on the corrected segmentation result of each sample image to obtain a sample distance field corresponding to each sample image, and a training sample set is composed of multiple sample images and sample distance fields corresponding to each sample image.
[0146] In one embodiment, the training module is specifically used to input the sample image into the deep learning model to obtain the training result output by the deep learning model; use the preset loss function to calculate the loss value between the training result and the sample distance field; if the loss value does not meet the preset convergence condition, adjust the parameters in the deep learning model until the loss value meets the preset convergence condition, thereby obtaining the distance field model;
[0147] Among them, the weight ratio of the coronary artery and the background in the preset loss function is a preset ratio.
[0148] For the specific definition of the coronary segmentation device, please refer to the definition of the coronary segmentation method above, which will not be repeated here. Each module in the above coronary 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 the processor in the computer device in the form of hardware, or stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0149] In one embodiment, a computer device is provided. The computer device is an image processing device, and its internal structure diagram can be as follows: Fig.12 As shown. 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 a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a coronary segmentation method is implemented. 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 set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0150] Those skilled in the art will understand that Fig.12 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0151] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0152] Obtaining the edit points input by the user for the image to be segmented, and determining the target segmentation area in the image to be segmented according to the edit points;
[0153] The pre-trained distance field model is used to calculate the target segmentation area to obtain the distance field map corresponding to the target segmentation area;
[0154] The optimal path is calculated based on the distance field map and the edit points to obtain the coronary artery centerline in the image to be segmented;
[0155] Segmentation is performed based on the coronary artery centerline and the distance field map to obtain the target segmentation result.
[0156] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0157] Sampling the target segmentation area according to a preset size to obtain multiple volume data;
[0158] Inputting multiple volume data into the distance field model in sequence to obtain the distance field corresponding to each volume data output by the distance field model;
[0159] The calculated multiple distance fields are merged to obtain a distance field map corresponding to the target segmentation area.
[0160] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0161] Taking the first edit point input by the user as the starting point, a pre-set optimal path algorithm is used to search for a path according to the distance field map, and the optimal path between the multiple edit points found is determined as the coronary artery centerline in the image to be segmented.
[0162] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0163] Determine the seed point based on the coronary artery centerline and determine the growth constraint conditions based on the distance field map;
[0164] The region growth process is performed according to the seed points and growth constraints to obtain the target segmentation result.
[0165] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0166] The target segmentation result is subjected to edge optimization processing to obtain an optimized segmentation result.
[0167] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0168] The merged distance field is normalized to obtain a distance field map in the image to be segmented.
[0169] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0170] Obtaining a training sample set; the training sample set includes a plurality of sample images and a sample distance field corresponding to each sample image;
[0171] The deep learning model is trained based on the training sample set to obtain a distance field model.
[0172] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0173] Acquire multiple sample images, and perform coronary artery segmentation on each sample image to obtain an initial segmentation result corresponding to each sample image;
[0174] Correcting the initial segmentation results corresponding to each sample image to obtain a corrected segmentation result corresponding to each sample image;
[0175] The distance field is calculated according to the corrected segmentation result of each sample image to obtain the sample distance field corresponding to each sample image. A training sample set is composed of multiple sample images and the sample distance fields corresponding to each sample image.
[0176] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0177] Input the sample image into the deep learning model to obtain the training result output by the deep learning model;
[0178] The loss value between the training result and the sample distance field is calculated using a preset loss function;
[0179] If the loss value does not meet the preset convergence condition, the parameters in the deep learning model are adjusted until the loss value meets the preset convergence condition, thereby obtaining a distance field model;
[0180] Among them, the weight ratio of the coronary artery and the background in the preset loss function is a preset ratio.
[0181] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0182] Obtaining the edit points input by the user for the image to be segmented, and determining the target segmentation area in the image to be segmented according to the edit points;
[0183] The pre-trained distance field model is used to calculate the target segmentation area to obtain the distance field map corresponding to the target segmentation area;
[0184] The optimal path is calculated based on the distance field map and the edit points to obtain the coronary artery centerline in the image to be segmented;
[0185] Segmentation is performed based on the coronary artery centerline and the distance field map to obtain the target segmentation result.
[0186] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0187] Sampling the target segmentation area according to a preset size to obtain multiple volume data;
[0188] Inputting multiple volume data into the distance field model in sequence to obtain the distance field corresponding to each volume data output by the distance field model;
[0189] The calculated multiple distance fields are merged to obtain a distance field map corresponding to the target segmentation area.
[0190] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0191] Taking the first edit point input by the user as the starting point, a pre-set optimal path algorithm is used to search for a path according to the distance field map, and the optimal path between the multiple edit points found is determined as the coronary artery centerline in the image to be segmented.
[0192] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0193] Determine the seed point based on the coronary artery centerline and determine the growth constraint conditions based on the distance field map;
[0194] The region growth process is performed according to the seed points and growth constraints to obtain the target segmentation result.
[0195] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0196] The target segmentation result is subjected to edge optimization processing to obtain an optimized segmentation result.
[0197] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0198] The merged distance field is normalized to obtain a distance field map in the image to be segmented.
[0199] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0200] Obtaining a training sample set; the training sample set includes a plurality of sample images and a sample distance field corresponding to each sample image;
[0201] The deep learning model is trained based on the training sample set to obtain a distance field model.
[0202] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0203] Acquire multiple sample images, and perform coronary artery segmentation on each sample image to obtain an initial segmentation result corresponding to each sample image;
[0204] Correcting the initial segmentation results corresponding to each sample image to obtain a corrected segmentation result corresponding to each sample image;
[0205] The distance field is calculated according to the corrected segmentation result of each sample image to obtain the sample distance field corresponding to each sample image. A training sample set is composed of multiple sample images and the sample distance fields corresponding to each sample image.
[0206] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0207] Input the sample image into the deep learning model to obtain the training result output by the deep learning model;
[0208] The loss value between the training result and the sample distance field is calculated using a preset loss function;
[0209] If the loss value does not meet the preset convergence condition, the parameters in the deep learning model are adjusted until the loss value meets the preset convergence condition, thereby obtaining a distance field model;
[0210] Among them, the weight ratio of the coronary artery and the background in the preset loss function is a preset ratio.
[0211] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and 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-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0212] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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, they should be considered to be within the scope of this specification.
[0213] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A coronary artery segmentation method, characterized in that: The method comprises: Acquire the edit points input by the user for the image to be segmented, and determine the target segmentation area in the image to be segmented according to the edit points; Inputting the image data in the target segmentation area into a pre-trained distance field model to obtain a distance field map corresponding to the target segmentation area output by the distance field model; Calculate the optimal path according to the distance field map and the edit points to obtain the center line of the coronary artery in the image to be segmented; Determine a seed point according to the coronary artery centerline, and determine a growth constraint condition according to the distance field map; A region growth process is performed according to the seed point and the growth constraint condition to obtain a target segmentation result.
2. The method according to claim 1, characterized in that: The step of inputting the image data in the target segmentation area into a pre-trained distance field model to obtain a distance field map corresponding to the target segmentation area output by the distance field model comprises: Sampling the target segmentation area according to a preset size to obtain a plurality of volume data; Inputting the plurality of volume data into the distance field model in sequence to obtain a distance field corresponding to each of the volume data output by the distance field model; The calculated multiple distance fields are combined to obtain a distance field map corresponding to the target segmentation area.
3. The method according to claim 2, characterized in that The step of performing optimal path calculation according to the distance field map and the edit points to obtain the center line of the coronary artery in the image to be segmented includes: Taking the first edit point input by the user as the starting point, a pre-set optimal path algorithm is used to perform path search according to the distance field map, and the optimal path between the multiple edit points found is determined as the coronary artery centerline in the image to be segmented.
4. The method according to claim 1, characterized in that: After obtaining the target segmentation result, the method further includes: Perform edge optimization processing on the target segmentation result to obtain an optimized segmentation result.
5. The method according to claim 1, characterized in that: The pixel value on the distance field map represents the distance between the pixel point and the center line.
6. The method according to claim 1, characterized in that Before inputting the image data in the target segmentation area into a pre-trained distance field model to obtain a distance field map corresponding to the target segmentation area output by the distance field model, the method further includes: Acquire a training sample set; the training sample set includes a plurality of sample images and a sample distance field corresponding to each sample image; A deep learning model is trained based on the training sample set to obtain the distance field model.
7. The method according to claim 6, characterized in that The step of obtaining a training sample set includes: Acquire a plurality of the sample images, and perform coronary artery segmentation on each of the sample images to obtain an initial segmentation result corresponding to each of the sample images; Correcting the initial segmentation results corresponding to the sample images to obtain corrected segmentation results corresponding to the sample images; Distance field calculation is performed according to the corrected segmentation results of each sample image to obtain a sample distance field corresponding to each sample image. The training sample set is composed of a plurality of sample images and the sample distance fields corresponding to each sample image.
8. A coronary artery segmentation device, characterized in that: The device comprises: A region determination module, used for obtaining an edit point input by a user for the image to be segmented, and determining a target segmentation region in the image to be segmented according to the edit point; A distance field calculation module is used to calculate the target segmentation area using a pre-trained distance field model to obtain a distance field map corresponding to the target segmentation area. The image data in the target segmentation area is input into the pre-trained distance field model to obtain a distance field map corresponding to the target segmentation area output by the distance field model. A path calculation module, used for performing optimal path calculation according to the distance field map and the edit points to obtain the coronary artery centerline in the image to be segmented; The segmentation module is used to determine the seed point according to the coronary centerline and the growth constraint condition according to the distance field map; perform regional growth processing according to the seed point and the growth constraint condition to obtain the target segmentation result.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: 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
Coronary artery image segmentation method and apparatus, compute device, and storage medium
CN109544566A
Medical image processing method and device, storage medium and computer equipment
CN111312374A