Blood vessel segmentation model training method, blood vessel segmentation method and electronic equipment
By directly training the vascular segmentation model and optimizing the model using pseudo-notation and correction techniques, the problem of low training efficiency of vascular segmentation model in the existing technology is solved, and more efficient model training is achieved.
Patent Information
- Application Number
- CN202510141248.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-08
- Publication Date
- 2025-05-27
AI Technical Summary
The existing vascular segmentation algorithm requires training two neural network models, resulting in a large number of model training tasks, long time consumption, and low model training efficiency.
By obtaining DSA training data pairs, the vascular segmentation model is directly trained, and the model is optimized by combining pseudo-notation and correction techniques, the need to train multiple models is reduced.
It realizes the reduction of model training tasks, shortens model training time, improves model training efficiency, and reduces labeling work.
Smart Images

Figure CN120047773A_ABST
Abstract
Description
Technical Field
[0001] This disclosure generally relates to the field of artificial intelligence. More specifically, this disclosure relates to a method for training a blood vessel segmentation model, a blood vessel segmentation method, and an electronic device. Background Art
[0002] Digital Subtraction Angiography (DSA) is a high-end diagnostic and treatment technology that combines conventional angiography with computer technology. It is often used in blood vessel segmentation, tumor extraction, etc., especially in cerebral blood vessel segmentation, brain tumor extraction, etc.
[0003] For the blood vessel segmentation task, the conventional blood vessel segmentation algorithm is to train a blood vessel segmentation model using a labeled data set, so as to segment the blood vessel area from the DSA image through the blood vessel segmentation model, and then train a blood vessel segmentation model based on the segmented blood vessel area to segment the blood vessel area through the blood vessel segmentation model. This method requires training two neural network models, resulting in a large number of model training tasks, long consumption time, and low model training efficiency.
[0004] In view of this, there is an urgent need to provide a method for training a blood vessel segmentation model, a blood vessel segmentation method, and an electronic device to directly train a blood vessel segmentation model for blood vessel segmentation and improve the model training efficiency. Summary of the Invention
[0005] In order to solve at least one or more of the above-mentioned technical problems, this disclosure proposes a method for training a blood vessel segmentation model, a blood vessel segmentation method, and an electronic device in multiple aspects.
[0006] In a first aspect, this disclosure provides a method for training a blood vessel segmentation model, the method including: obtaining DSA training data pairs; the DSA pre-training data pairs include corresponding DSA training images and DSA training annotation images one by one, and the DSA training annotation images are obtained by performing blood vessel segmentation annotation on the DSA training images; using the DSA training data pairs to train a candidate blood vessel segmentation model, and using the candidate blood vessel segmentation model to process the obtained DSA images to be annotated, to obtain DSA pseudo-annotation images labeled with blood vessel segmentation labels; based on the obtained correction content for the DSA pseudo-annotation images, correcting the DSA pseudo-annotation images to obtain DSA corrected annotation images; obtaining DSA optimized data pairs based on the corresponding DSA images to be annotated and the DSA corrected annotation images, and using the DSA optimized data pairs to optimize the candidate blood vessel segmentation model to obtain a target blood vessel segmentation model.
[0007] In some embodiments, the method further includes: obtaining a first DSA verification data pair; the first DSA verification data pair includes a corresponding DSA verification image and a DSA verification annotation image, and the DSA verification annotation image is obtained by segmenting and annotating blood vessels in the DSA verification image; during the process of training the candidate blood vessel segmentation model, verifying the candidate blood vessel segmentation model based on the first DSA verification data pair.
[0008] In some embodiments, after obtaining the DSA corrected annotation image, the method further includes: using the corresponding DSA image to be annotated and the DSA corrected annotation image as a DSA data pair, and dividing the DSA data pair into a first DSA data pair group and a second DSA data pair group; wherein, the first DSA data pairs included in the first DSA data pair group are different from the second DSA data pairs included in the second DSA data pair group; the obtaining of the DSA optimized data pair based on the corresponding DSA image to be annotated and the DSA corrected annotation image, and using the DSA optimized data pair to optimize the candidate blood vessel segmentation model includes: using the first DSA data pairs in the first DSA data pair group as the DSA optimized data pair, and using the DSA optimized data pair to optimize the candidate blood vessel segmentation model; using the second DSA data pairs in the second DSA data pair group as the second DSA verification data pair, and during the process of optimizing the candidate blood vessel segmentation model, verifying the candidate blood vessel segmentation model using the second DSA verification data pair.
[0009] In some embodiments, the dividing of the DSA data pair into a first DSA data pair group and a second DSA data pair group includes: evenly dividing the DSA data pair into k data sets; for each of the k data sets, using this data set as the second DSA data pair group, and using the remaining k - 1 data sets as the first DSA data pair group, to obtain k data pair groups, each data pair group including a first DSA data pair group and a second DSA data pair group; for each data pair group, performing the steps from using the first DSA data pairs in the first DSA data pair group as the DSA optimized data pair, and using the DSA optimized data pair to optimize the candidate blood vessel segmentation model, to during the process of optimizing the candidate blood vessel segmentation model, verifying the candidate blood vessel segmentation model using the second DSA verification data pair, to obtain a target candidate blood vessel segmentation model; evaluating each of the target candidate blood vessel segmentation models, and using the target candidate blood vessel segmentation model with the best model performance as the target blood vessel segmentation model.
[0010] In some embodiments, before training the candidate blood vessel segmentation model using the DSA training data, the method further includes: preprocessing the DSA training images and the DSA training annotation images in the DSA training data pair respectively to obtain preprocessed DSA training images and preprocessed DSA training annotation images; the preprocessing includes at least one of resampling, normalization, image cropping, image padding, and image enhancement; the training of the candidate blood vessel segmentation model using the DSA training data pair includes: training the candidate blood vessel segmentation model using the preprocessed DSA training images and the preprocessed DSA training annotation images.
[0011] In some embodiments, the candidate blood vessel segmentation model is an nnUNet model.
[0012] In a second aspect, the present disclosure provides a blood vessel segmentation method, the method includes: obtaining a DSA image to be segmented; inputting the DSA image to be segmented into a target blood vessel segmentation model for blood vessel segmentation to obtain a blood vessel segmentation result; wherein, the target blood vessel segmentation model is trained based on the blood vessel segmentation model training method described in the first aspect or any of the embodiments of the first aspect.
[0013] In some embodiments, after obtaining the blood vessel segmentation result of the DSA image to be segmented, the method further includes: post-processing the blood vessel segmentation result to obtain a target blood vessel segmentation result; the post-processing includes at least one of denoising and smoothing.
[0014] In a third aspect, the present disclosure provides an electronic device, including: a processor configured to execute program instructions; and a memory configured to store the program instructions, when the program instructions are loaded and executed by the processor, causing the processor to execute the steps of the blood vessel segmentation model training method described in the first aspect or any of the embodiments of the first aspect or execute the steps of the blood vessel segmentation method described in the second aspect or any of the embodiments of the second aspect.
[0015] In a fourth aspect, the present disclosure provides a computer-readable storage medium, in which program instructions are stored, when the program instructions are loaded and executed by a processor, causing the processor to execute the steps of the blood vessel segmentation model training method described in the first aspect or any of the embodiments of the first aspect or execute the steps of the blood vessel segmentation method described in the second aspect or any of the embodiments of the second aspect.
[0016] Through the above-provided methods for training a blood vessel segmentation model, a blood vessel segmentation method, and an electronic device. In the embodiments of the present disclosure, first, a blood vessel segmentation model (i.e., the above-mentioned candidate blood vessel segmentation model) is directly trained using some pre-annotated training data (i.e., DSA training data pairs). By combining blood vessel segmentation and blood vessel segmentation into one, it is not necessary to train multiple models (i.e., a blood vessel segmentation model and a blood vessel segmentation model), which reduces the model training task and the model training time, and improves the model training efficiency. Then, based on the candidate blood vessel segmentation model, blood vessel segmentation annotations are made for the remaining unannotated training data (i.e., DSA images to be annotated). Subsequently, based on the corrected blood vessel segmentation annotation results (i.e., DSA corrected annotation images) and the DSA images to be annotated, the trained candidate blood vessel segmentation model is optimized to obtain the final blood vessel segmentation model (i.e., the target segmentation model), which reduces the annotation work and further improves the model training efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features, and advantages of the exemplary embodiments of the present disclosure will become readily understood. In the drawings, several embodiments of the present disclosure are shown in an exemplary rather than restrictive manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0018] Figure 1 Shows an exemplary flowchart of a method for training a blood vessel segmentation model according to some embodiments of the present disclosure;
[0019] Figure 2 Shows an exemplary flowchart of a blood vessel segmentation method according to some embodiments of the present disclosure;
[0020] Figure 3 Shows an overall schematic diagram of model training and model inference according to some embodiments of the present disclosure;
[0021] Figure 4 Shows an exemplary structural block diagram of a blood vessel segmentation model training device according to some embodiments of the present disclosure;
[0022] Figure 5 Shows an exemplary structural block diagram of a blood vessel segmentation device according to some embodiments of the present disclosure;
[0023] Figure 6 Shows a specific schematic diagram of an electronic device according to some embodiments of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0024] The following will clearly and completely describe the technical solutions in the embodiments of the present disclosure in conjunction with the accompanying drawings in the embodiments of the present disclosure. Obviously, the described embodiments are some, but not all, of the embodiments of the present disclosure. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present disclosure without creative efforts shall fall within the scope of protection of the present disclosure.
[0025] It should be understood that the terms "including" and "comprising" used in the specification and claims of the present disclosure indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.
[0026] It should also be understood that the terms used in the specification of the present disclosure are merely for the purpose of describing specific embodiments and are not intended to limit the present disclosure. As used in the specification and claims of the present disclosure, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are intended to include the plural forms. It should also be further understood that the term "and / or" used in the specification and claims of the present disclosure refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0027] As used in this specification and the claims, the term "if" can be interpreted as "when" or "once" or "in response to determining" or "in response to detecting" depending on the context. Similarly, the phrase "if determined" or "if detecting [the described condition or event]" can be interpreted as meaning "once determined" or "in response to determining" or "once detecting [the described condition or event]" or "in response to detecting [the described condition or event]" depending on the context.
[0028] The following will describe in detail the specific embodiments of the present disclosure in conjunction with the accompanying drawings.
[0029] Figure 1 An exemplary flowchart of a blood vessel segmentation model training method 100 according to some embodiments of the present disclosure is shown.
[0030] As Figure 1As shown, the vascular segmentation model training method 100 provided by this disclosure includes: Step S110: Obtain DSA training data pairs; Step S120: Use the DSA training data pairs to train a candidate vascular segmentation model, and use the candidate vascular segmentation model to process the obtained DSA images to be labeled, to obtain DSA pseudo-labeled images labeled with vascular segmentation labels; Step S130: Based on the obtained correction content for the DSA pseudo-labeled images, correct the DSA pseudo-labeled images to obtain DSA corrected labeled images; Step S140: Based on the one-to-one correspondence between the DSA images to be labeled and the DSA corrected labeled images, obtain DSA optimized data pairs, and use the DSA optimized data pairs to optimize the candidate vascular segmentation model to obtain a target vascular segmentation model.
[0031] Exemplarily, the DSA training data pairs in Step S110 include one-to-one corresponding DSA training images and DSA training labeled images. It can be understood that the above DSA is a high-end medical imaging technology that combines traditional angiography and computer image processing technology. Its principle is to take two frames of X-ray images before and after injecting a contrast agent at the same part of the human body, subtract them after digital processing, eliminate the images of bones and soft tissues, and only retain the images of blood vessels. DSA images are of great value for vascular variations, vascular diseases, and showing the relationship between lesions and blood vessels. In the embodiments of this disclosure, the above DSA training images can be 3D DSA grayscale images or 3D DSA color images. The embodiments of this disclosure do not make specific limitations on this, and the embodiments of this disclosure can be described by taking the DSA training images as grayscale images as an example.
[0032] In the embodiments of this disclosure, the DSA training images can be the collected brain DSA images, heart DSA images, abdominal DSA images, neck DSA images, etc., which can achieve vascular segmentation of DSA images of multiple parts.
[0033] In the embodiments of this disclosure, the DSA training labeled images are obtained by performing vascular segmentation labeling on the DSA training images. It can be understood that there are many data labeling methods. For example, manual labeling, that is, manually performing vascular segmentation labeling on the DSA training images. Another example is automatic labeling, that is, inputting the DSA training images into a pre-trained labeling model, and the labeling model performs vascular segmentation labeling on the DSA training images. Another example is the combination of automatic labeling and manual labeling, that is, inputting the DSA training images into a pre-trained labeling model, the labeling model performs vascular segmentation labeling on the DSA training images, and then manually corrects the vascular segmentation labeling results of the model. The DSA training labeled images in the embodiments of this disclosure are obtained by manually performing vascular segmentation labeling on the DSA training images.
[0034] In the embodiments of the present disclosure, when performing vascular segmentation annotation on DSA training images, it is determined which vascular segment pixel or non-vascular pixel each pixel of the DSA training image belongs to, so as to form vascular annotation information. For vascular segments, as a specific example, when the DSA training image is a brain DSA image, the blood vessels can be divided into the M1 segment (horizontal segment), M2 segment (insular segment), M3 segment (opercular segment), and M4 segment (cortical branch). For another example, when the DSA training image is a neck DSA image, the blood vessels can be divided into the C1 segment (cervical segment), C2 segment (petrous segment), C3 segment (cavernous segment), C4 segment (supraclinoid segment), C5 segment (ophthalmic segment), and C6 segment (communicating segment).
[0035] Specifically, multi-class annotation can be performed on each pixel of the DSA training image. For example, when the DSA training image is a brain DSA image, for each pixel of the DSA training image, if the pixel belongs to the M1 segment, the pixel is labeled with the first label; if the pixel belongs to the M2 segment, the pixel is labeled with the second label; if the pixel belongs to the M3 segment, the pixel is labeled with the third label; if the pixel belongs to the M4 segment, the pixel is labeled with the fourth label; if the pixel does not belong to a blood vessel (i.e., a non-vascular pixel), the pixel is labeled with the fifth label. Here, the first label, the second label, the third label, the fourth label, and the fifth label can have many forms of representation, such as different numbers, different colors, different letters, etc. As a specific embodiment, the first label is "0", the second label is "1", the third label is "2", the fourth label is "3", and the fifth label is "4". The embodiments of the present disclosure do not specifically limit the specific forms of representation of the first label, the second label, the third label, the fourth label, and the fifth label.
[0036] In the embodiments of the present disclosure, the number of DSA training data pairs is small, such as 200 pairs, 300 pairs, etc. That is, a small amount of training data is manually annotated first, and then a candidate vascular segmentation model is trained on a small dataset of manually annotated data, and then the remaining training data is annotated based on the candidate vascular segmentation model, which reduces the annotation work and further improves the model training efficiency.
[0037] Exemplarily, in this embodiment, the step of training the candidate vascular segmentation model using the DSA training data pair in step S120 can specifically be inputting the DSA training data pair into a neural network model, and the neural network model performs vascular segmentation on the DSA training image in the DSA data pair to obtain a vascular segmentation prediction result, calculating a loss value based on the vascular segmentation prediction result and the DSA training annotation image, and then based on the loss value, reversely adjusting the model parameters of the neural network model until the set iteration condition is met to obtain the candidate vascular segmentation model.
[0038] Here, the neural network model is the nnUNet model. Accordingly, the candidate blood vessel segmentation model is also the nnUNet model. In this embodiment, the model parameters may include, for example, the weights and biases of the model, etc., and the embodiments of the present disclosure do not make specific limitations thereto.
[0039] In the embodiments of the present disclosure, the above-mentioned set iteration condition may be the convergence of the loss value, or may be reaching the set number of iterations (for example, 200 times), etc., and the embodiments of the present disclosure do not make specific limitations thereto. After reaching the set iteration condition, the candidate blood vessel segmentation model can be obtained.
[0040] In this embodiment, the above-mentioned loss value may be calculated based on a loss function. Here, the loss function may be a single loss function (for example, a conventional cross-entropy loss function), or may be a fusion of multiple loss functions (for example, the fusion of a cross-entropy loss function and a mean squared error loss function, etc.), and the embodiments of the present disclosure do not make specific limitations thereto. As for calculating the loss value through the loss function, it is a conventional technique, and relevant materials can be referred to, and details are not described here for the time being.
[0041] In the embodiments of the present disclosure, after training the candidate blood vessel segmentation model using DSA training data, the candidate blood vessel segmentation model is used to process the obtained DSA image to be labeled, and a DSA pseudo-labeled image labeled with blood vessel segmentation labels is obtained. Specifically, the DSA image to be labeled may be a 3D DSA grayscale image or a 3D DSA color image, and the embodiments of the present disclosure do not make specific limitations thereto, as long as it is consistent with the DSA training image. Further, the above-mentioned DSA image to be labeled may be, for example, one of a brain DSA image, a neck DSA image, a heart DSA image, an abdominal DSA image, etc., as long as it is consistent with the DSA training image, and it may include blood vessel details of the corresponding part.
[0042] Exemplarily, for the DSA pseudo-labeled image output by the candidate segmentation model, the correction content for the DSA pseudo-labeled image is obtained, and the DSA pseudo-labeled image is corrected to obtain a DSA corrected labeled image. Here, the correction content for the DSA pseudo-labeled image is the content manually corrected for the DSA pseudo-labeled image. Based on the obtained manually corrected content, the DSA pseudo-labeled image is corrected to obtain a DSA corrected labeled image, so as to obtain a new data pair, that is, a DSA image to be labeled and a DSA corrected labeled image that correspond one by one.
[0043] In the embodiments of the present disclosure, after obtaining the above new data pairs, DSA optimization data pairs can be obtained based on the new data pairs. Specifically, all the new data pairs can be used as DSA optimization data pairs, or some of the new data pairs can be used as DSA optimization data pairs. For using some of the new data pairs as DSA optimization data pairs, a set percentage (e.g., 80%) of the new data pairs can be randomly used as DSA optimization data pairs. The embodiments of the present disclosure do not specifically limit the method for obtaining DSA optimization data pairs based on the new data pairs.
[0044] Then, the candidate blood vessel segmentation model is optimized using the DSA optimization data pairs to obtain the target blood vessel segmentation model.
[0045] In this embodiment, the process of optimizing the candidate blood vessel segmentation model using the DSA optimization data pairs is the same as the process of training the candidate blood vessel segmentation model using the DSA training data pairs described above, which will not be elaborated here. After the optimization is completed, the target blood vessel segmentation model can be obtained.
[0046] In the embodiments of the present disclosure, the blood vessel segmentation model (i.e., the above candidate blood vessel segmentation model) is directly trained first using some pre-annotated training data (i.e., DSA training data pairs), combining blood vessel segmentation and blood vessel segmentation into one, without the need to train multiple models (i.e., a blood vessel segmentation model and a blood vessel segmentation model), reducing the model training task and the model training time, and improving the model training efficiency.
[0047] As an optional embodiment of the present disclosure, the above blood vessel segmentation model training method further includes: obtaining first DSA verification data pairs; during the process of training the candidate blood vessel segmentation model, verifying the candidate blood vessel segmentation model based on the first DSA verification data pairs.
[0048] Exemplarily, in the embodiments of the present disclosure, the above first DSA verification data pairs include corresponding DSA verification images and DSA verification annotation images, where the DSA verification annotation images are obtained by performing blood vessel segmentation annotation on the DSA verification images. Here, the DSA verification images can be 3D DSA grayscale images or 3D DSA color images. The embodiments of the present disclosure do not specifically limit this, as long as they are the same as the DSA training images.
[0049] In the embodiments of the present disclosure, the above DSA verification images can be, for example, any one of brain DSA images, neck DSA images, heart DSA images, and abdominal DSA images, as long as they are the same as the DSA training images. The DSA verification images include the blood vessel details of the corresponding parts.
[0050] In the embodiments of the present disclosure, the method of performing vascular segmentation annotation on DSA verification images to obtain DSA verification annotation images is the same as the method of performing vascular segmentation annotation on DSA training images to obtain DSA training annotation images, and it is also obtained through manual annotation.
[0051] As a specific implementation manner of the embodiments of the present disclosure, the number of the first DSA verification data pairs can be, for example, 50 pairs, or other numbers, and the embodiments of the present disclosure do not make specific limitations thereon.
[0052] In the embodiments of the present disclosure, during the process of training the candidate vascular segmentation model, the candidate vascular segmentation model can be verified based on the first DSA verification data pair. Specifically, during the process of training the candidate vascular segmentation model, the candidate vascular segmentation model can be verified once based on the first DSA verification data pair every round of training; or the candidate vascular segmentation model can be verified once based on the first DSA verification data pair every 5 rounds of training. Of course, it is also possible to verify the candidate vascular segmentation model based on the first DSA verification data pair after the training is completed. The embodiments of the present disclosure do not make specific limitations thereon.
[0053] In the embodiments of the present disclosure, by verifying the candidate vascular segmentation model based on the first DSA verification data pair during the training process of the candidate vascular segmentation model to evaluate the generalization ability of the candidate vascular segmentation model, it can better help train the candidate vascular segmentation model and improve the model generalization ability.
[0054] Based on the above description, during the process of training the candidate vascular segmentation model, the candidate vascular segmentation model is verified using the first DSA verification data pair. Then, during the process of optimizing the candidate vascular segmentation model, the candidate vascular segmentation model also needs to be verified. For specific details, refer to the description of the following embodiments.
[0055] As an alternative implementation manner of the embodiments of the present disclosure, after obtaining the DSA corrected annotation image, the above-mentioned vascular segmentation model training method further includes: using the corresponding DSA image to be annotated and the DSA corrected annotation image as a DSA data pair, and dividing the DSA data pair into a first DSA data pair group and a second DSA data pair group; obtaining a DSA optimization data pair based on the corresponding DSA image to be annotated and the DSA corrected annotation image, and using the DSA optimization data pair to optimize the candidate vascular segmentation model, including: using the first DSA data pair in the first DSA data pair group as the DSA optimization data pair to optimize the candidate vascular segmentation model; using the second DSA data pair in the second DSA data pair group as the second DSA verification data pair, and during the process of optimizing the candidate vascular segmentation model, using the second DSA verification data pair to verify the candidate vascular segmentation model.
[0056] Exemplarily, in the embodiments of the present disclosure, the DSA data pairs are divided into a first DSA data pair group and a second DSA data pair group, and the first DSA data pair in the first DSA data pair group is used as the DSA optimization data pair to optimize the candidate blood vessel segmentation model; the second DSA data pair in the second DSA data pair group is used as the second DSA verification data pair to verify the candidate blood vessel segmentation model during the optimization process of the candidate blood vessel segmentation model. The specific optimization process and verification process can refer to the description of the above training embodiments and will not be elaborated here.
[0057] Here, the first DSA data pair included in the first DSA data pair group is different from the second DSA data pair included in the second DSA data pair group. Specifically, when dividing the DSA data pairs into the first DSA data pair group and the second DSA data pair group, the DSA data pairs can be divided according to a set ratio (for example, 8:2, 7:3, etc.). As a specific embodiment, 80% of the DSA data pairs are divided into the first DSA data pair group; the remaining 20% of the DSA data pairs are divided into the second DSA data pair group.
[0058] As an alternative implementation manner of the embodiments of the present disclosure, in order to reduce the situation of model overfitting and improve the generalization ability of the model, a cross-validation strategy can be used to train multiple target candidate blood vessel segmentation models, and the one with the best performance is selected from the multiple target candidate blood vessel segmentation models as the target blood vessel segmentation model, as follows:
[0059] Dividing the DSA data pairs into a first DSA data pair group and a second DSA data pair group includes: evenly dividing the DSA data pairs into k data sets; for each of the k data sets, using this data set as the second DSA data pair group and the remaining k - 1 data sets as the first DSA data pair group to obtain k data pair groups, each data pair group including a first DSA data pair group and a second DSA data pair group; for each data pair group, performing the steps from using the first DSA data pair in the first DSA data pair group as the DSA optimization data pair to optimize the candidate blood vessel segmentation model to using the second DSA verification data pair to verify the candidate blood vessel segmentation model during the optimization process of the candidate blood vessel segmentation model to obtain the target candidate blood vessel segmentation model; evaluating each of the target candidate blood vessel segmentation models and using the target candidate blood vessel segmentation model with the best model performance as the target blood vessel segmentation model.
[0060] Exemplarily, in the embodiments of the present disclosure, the above k can be, for example, 5, 10, etc. The embodiments of the present disclosure do not specifically limit the above k and can be determined according to the actual situation.
[0061] In an embodiment of the present disclosure, for all DSA data pairs, the DSA data pairs are evenly divided into k data sets; at this time, the DSA data pairs included in each data set are different. For each of the above k data sets, this data set is used as the second DSA data pair group, and the remaining k - 1 data sets are used as the first DSA data pair group, so that k data pair groups can be obtained. Here, each data pair group includes a first DSA data pair group and a second DSA data pair group.
[0062] As a specific embodiment, the DSA data pairs are evenly divided into 5 data sets {A1, A2, A3, A4, A5}. When dividing the above 5 data sets into 5 data pair groups (each data pair group includes a first DSA data pair group and a second DSA data pair group), the division is performed according to a ratio of 8:2. Then, the 5 divided data pair groups can be, for example: The first data pair group: the first DSA data pair group {A1, A2, A3, A4}; the second DSA data pair group {A5}; the second data pair group: the first DSA data pair group {A1, A2, A3, A5}; the second DSA data pair group {A4}; the third data pair group: the first DSA data pair group {A1, A2, A4, A5}; the second DSA data pair group {A3}. The fourth data pair group: the first DSA data pair group {A1, A3, A4, A5}; the second DSA data pair group {A2}. The fifth data pair group: the first DSA data pair group {A2, A3, A4, A5}; the second DSA data pair group {A1}. It should be noted that the above description is only for example and is not used to limit the present disclosure.
[0063] Based on the above description, for each data pair group, the above optimization process is performed to obtain multiple target candidate blood vessel segmentation models, and then the performance of each target candidate blood vessel segmentation model is evaluated. Here, the performance of each target candidate blood vessel segmentation model can be evaluated through model evaluation metrics (such as Dice, model accuracy, recall rate, etc.) to obtain the target candidate blood vessel segmentation model with the optimal model performance, which is the target blood vessel segmentation model.
[0064] As an optional embodiment of the present disclosure, before training the candidate blood vessel segmentation model using the DSA training data pairs, the above blood vessel segmentation model training method further includes: respectively preprocessing the DSA training images and DSA training annotation images in the DSA training data pairs to obtain the preprocessed DSA training images and preprocessed DSA training annotation images.
[0065] Exemplarily, in this embodiment, the preprocessing includes at least one of resampling, normalization, image cropping, image padding, and image enhancement; the image enhancement here includes, but is not limited to, one or more of rotation, scaling, flipping, blurring, gamma enhancement, or contrast enhancement.
[0066] In an embodiment of the present disclosure, after preprocessing the DSA training image and the DSA training annotation image in the DSA training data pair, the preprocessed DSA training image and the preprocessed DSA training annotation image are used to train a candidate blood vessel segmentation model.
[0067] Figure 2 An exemplary flowchart of a blood vessel segmentation method 200 according to some embodiments of the present disclosure is shown.
[0068] As Figure 2 shown, the blood vessel segmentation method 200 provided by the embodiments of the present disclosure includes: Step S210: Obtain a DSA image to be segmented; Step S220: Input the DSA image to be segmented into a target blood vessel segmentation model for blood vessel segmentation to obtain a blood vessel segmentation result; wherein, the target blood vessel segmentation model is trained based on the embodiment of the above-mentioned blood vessel segmentation model training method.
[0069] Exemplarily, the DSA image to be segmented in the above step S210 may be a 3D DSA grayscale image or a 3D DSA color image. The embodiments of the present disclosure do not make specific limitations on this, and it only needs to be consistent with the DSA training image.
[0070] In an embodiment of the present disclosure, the DSA image to be segmented may be, for example, any one of a brain DSA image, a neck DSA image, a heart DSA image, and an abdominal DSA image, and it only needs to be consistent with the DSA training image. The DSA image to be segmented includes blood vessel details of the corresponding part.
[0071] Exemplarily, in an embodiment of the present disclosure, the DSA model to be segmented is input into a target blood vessel segmentation model for blood vessel segmentation processing to obtain a blood vessel segmentation result. Here, the target blood vessel segmentation model is trained based on the embodiment of the above-mentioned blood vessel segmentation model training method. Therefore, based on the target blood vessel segmentation model, blood vessel segmentation of the DSA image to be segmented can directly obtain a blood vessel segmentation result.
[0072] As an optional embodiment of the present disclosure, after obtaining the blood vessel segmentation result of the DSA image to be segmented, the above-mentioned blood vessel segmentation method further includes: post-processing the blood vessel segmentation result to obtain a target blood vessel segmentation result.
[0073] Exemplarily, in the embodiments of the present disclosure, the post-processing may include at least one of denoising and smoothing. By performing post-processing on the blood vessel segmentation result, the noise in the blood vessel segmentation result is removed, the blood vessel segmentation result is optimized, and the target blood vessel segmentation result is obtained in the embodiments of the present disclosure.
[0074] Figure 3 The overall schematic diagram of model training and model inference in some embodiments of the present disclosure is shown.
[0075] As Figure 3 shown, first, a dataset pair is prepared. The dataset pair includes a corresponding 3D DSA grayscale image (i.e., the above-mentioned DSA training image) and a 3D DSA mask (i.e., the above-mentioned DSA training annotation image). Then, at least one preprocessing such as resampling, normalization, image cropping, image padding, and image enhancement is performed on the 3D DSA grayscale image and the 3D DSA mask to obtain the preprocessed 3D DSA grayscale image and the 3D DSA mask. The preprocessed 3D DSA grayscale image and the 3D DSA mask are input into the nnUNet model for training to obtain a segmentation model (i.e., the above-mentioned candidate blood vessel segmentation model). Then, the 3D DSA grayscale image (i.e., the above-mentioned DSA image to be annotated) is input into the segmentation model, and the 3D DSA segmentation result of the 3D DSA grayscale image (i.e., the above-mentioned DSA pseudo-annotation image) is obtained by inference of the segmentation model. The 3D DSA segmentation result is corrected manually to obtain a 3D DSA mask (i.e., the above-mentioned DSA corrected annotation image). Finally, the 3D DSA grayscale image and the 3D DSA mask are used as augmented data for the training dataset to optimize the candidate blood vessel segmentation model until the set iteration end condition is met, and a trained model (i.e., the above-mentioned target blood vessel segmentation model) is obtained.
[0076] Figure 4 The exemplary structural block diagram of the blood vessel segmentation model training device 400 in some embodiments of the present disclosure is shown.
[0077] As Figure 4As shown, a vascular segmentation model training device 400 provided by an embodiment of the present disclosure includes: a DSA training data pair acquisition module 410 for acquiring DSA training data pairs; the DSA pre-training data pairs include corresponding DSA training images and DSA training annotation images one by one, and the DSA training annotation images are obtained by performing vascular segmentation annotation on the DSA training images; a model training module 420 for training a candidate vascular segmentation model using the DSA training data pairs, and processing the obtained DSA images to be annotated using the candidate vascular segmentation model to obtain DSA pseudo-annotation images labeled with vascular segmentation labels; a correction module 430 for correcting the DSA pseudo-annotation images based on the obtained correction content for the DSA pseudo-annotation images to obtain DSA corrected annotation images; an optimization module 440 for obtaining DSA optimization data pairs based on the corresponding DSA images to be annotated and DSA corrected annotation images one by one, and optimizing the candidate vascular segmentation model using the DSA optimization data pairs to obtain a target vascular segmentation model.
[0078] As an optional embodiment of the present disclosure, the above-mentioned vascular segmentation model training device 400 further includes:
[0079] a DSA verification data pair acquisition module for acquiring first DSA verification data pairs; the first DSA verification data pairs include corresponding DSA verification images and DSA verification annotation images one by one, and the DSA verification annotation images are obtained by performing vascular segmentation annotation on the DSA verification images; a verification module for verifying the candidate vascular segmentation model based on the first DSA verification data pairs during the process of training the candidate vascular segmentation model.
[0080] As an optional embodiment of the present disclosure, the above-mentioned vascular segmentation model training device 400 further includes: a division module for taking the corresponding DSA images to be annotated and DSA corrected annotation images as DSA data pairs, and dividing the DSA data pairs into a first DSA data pair group and a second DSA data pair group; wherein, the first DSA data pairs included in the first DSA data pair group are different from the second DSA data pairs included in the second DSA data pair group; the above-mentioned optimization module 440 is specifically configured to: take the first DSA data pairs in the first DSA data pair group as DSA optimization data pairs, and optimize the candidate vascular segmentation model using the DSA optimization data pairs; take the second DSA data pairs in the second DSA data pair group as second DSA verification data pairs, and verify the candidate vascular segmentation model using the second DSA verification data pairs during the process of optimizing the candidate vascular segmentation model.
[0081] As an optional embodiment of the present disclosure, the above-mentioned partitioning module is specifically configured to: evenly partition the DSA data pairs into k data sets; for each of the k data sets, use this data set as the second DSA data pair group, and the remaining k-1 data sets as the first DSA data pair group, to obtain k data pair groups, each data pair group including a first DSA data pair group and a second DSA data pair group; for each data pair group, perform the steps of using the first DSA data pair in the first DSA data pair group as the DSA optimization data pair, using the DSA optimization data pair to optimize the candidate blood vessel segmentation model, to during the process of optimizing the candidate blood vessel segmentation model, using the second DSA verification data pair to verify the candidate blood vessel segmentation model, to obtain the target candidate blood vessel segmentation model; evaluate each of the target candidate blood vessel segmentation models, and use the target candidate blood vessel segmentation model with the best model performance as the target blood vessel segmentation model.
[0082] As an optional embodiment of the present disclosure, the above-mentioned blood vessel segmentation model training device 400 further includes: a preprocessing module, configured to preprocess the DSA training image and the DSA training annotation image in the DSA training data pair respectively, to obtain the preprocessed DSA training image and the preprocessed DSA training annotation image; the preprocessing includes at least one of resampling, normalization, image cropping, image padding, and image enhancement; the model training module 420 is specifically configured to: use the preprocessed DSA training image and the preprocessed DSA training annotation image to train the candidate blood vessel segmentation model.
[0083] As an optional embodiment of the present disclosure, the candidate blood vessel segmentation model is an nnUNet model.
[0084] Figure 5 The exemplary structural block diagram of the blood vessel segmentation device 500 showing some embodiments of the present disclosure is shown.
[0085] As Figure 5 shown, a blood vessel segmentation device 500 provided by an embodiment of the present disclosure includes: a DSA image to be segmented acquisition module 510, configured to acquire a DSA image to be segmented; a blood vessel segmentation module 520, configured to input the DSA image to be segmented into the target blood vessel segmentation model for blood vessel segmentation, to obtain a blood vessel segmentation result; wherein, it is trained by the embodiment of the above-mentioned blood vessel segmentation model training method.
[0086] As an optional embodiment of the present disclosure, the above-mentioned blood vessel segmentation device 500 further includes: a post-processing module, configured to post-process the blood vessel segmentation result to obtain a target blood vessel segmentation result; the post-processing includes at least one of denoising and smoothing.
[0087] Correspondingly, the embodiment of the present disclosure also provides Figure 4 or Figure 5Hardware structure diagram of the device shown, specifically as Figure 6 shown. The electronic device 600 can be a device for implementing the above method 100 or method 200. As Figure 6 shown, the electronic device 600 includes: a processor 610 and a memory 620. Among them, the memory 620 is configured to store program instructions; the processor 610 is configured to load and execute the program instructions stored in the memory 620 to implement the embodiments of the corresponding blood vessel segmentation model training method or the embodiments of the corresponding blood vessel segmentation method as shown above.
[0088] As an embodiment, the memory 620 can be any electronic, magnetic, optical or other physical storage device that can contain or store information such as program instructions, data, etc. For example, the memory 620 can be: a volatile memory, a non-volatile memory or a similar storage medium. Specifically, the memory 620 can be RAM (Random Access Memory), flash memory, a storage drive (such as a hard disk drive), a solid-state drive, any type of storage disk (such as an optical disk, a DVD, etc.), or a similar storage medium, or a combination thereof.
[0089] So far, the description of the Figure 6 shown electronic device is completed.
[0090] Although multiple embodiments of the present disclosure have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many changes, alterations and alternative ways can be thought of by those skilled in the art without departing from the spirit and scope of the present disclosure. It should be understood that various alternative solutions to the embodiments of the present disclosure described herein can be adopted in the practice of the present disclosure. The appended claims are intended to define the scope of protection of the present disclosure and thus cover equivalents or alternatives within the scope of these claims.
Claims
1. A blood vessel segmentation model training method, characterized in that: The method comprises: Acquire a DSA training data pair; the DSA pre-training data pair includes a one-to-one corresponding DSA training image and a DSA training annotated image, wherein the DSA training annotated image is obtained by annotating the DSA training image by blood vessel segmentation; Using the DSA training data to train a candidate blood vessel segmentation model, and using the candidate blood vessel segmentation model to process the acquired DSA image to be annotated to obtain a DSA pseudo-annotated image annotated with a blood vessel segmentation label; Based on the acquired correction content for the DSA pseudo-annotated image, correct the DSA pseudo-annotated image to obtain a DSA corrected annotated image; A DSA optimized data pair is obtained based on the one-to-one correspondence between the DSA image to be annotated and the DSA corrected annotated image, and the candidate blood vessel segmentation model is optimized using the DSA optimized data pair to obtain a target blood vessel segmentation model.
2. The method according to claim 1, characterized in that The method further comprises: Acquire a first DSA verification data pair; the first DSA verification data pair includes a one-to-one corresponding DSA verification image and a DSA verification annotated image, wherein the DSA verification annotated image is obtained by annotating the DSA verification image by blood vessel segmentation; During the process of training the candidate blood vessel segmentation model, the candidate blood vessel segmentation model is verified based on the first DSA verification data.
3. The method according to claim 2, characterized in that After obtaining the DSA corrected and annotated image, the method further includes: Taking the one-to-one corresponding DSA to-be-annotated image and the DSA corrected annotated image as DSA data pairs, and dividing the DSA data pairs into a first DSA data pair group and a second DSA data pair group; wherein the first DSA data pairs included in the first DSA data pair group and the second DSA data pairs included in the second DSA data pair group are different; The step of obtaining a DSA optimized data pair based on the one-to-one correspondence between the DSA image to be annotated and the DSA corrected annotated image, and optimizing the candidate blood vessel segmentation model using the DSA optimized data pair includes: taking the first DSA data pair in the first DSA data pair group as a DSA optimization data pair, and optimizing the candidate blood vessel segmentation model using the DSA optimization data pair; The second DSA data pair in the second DSA data pair group is used as a second DSA verification data pair, and in the process of optimizing the candidate blood vessel segmentation model, the candidate blood vessel segmentation model is verified using the second DSA verification data.
4. The method according to claim 3, characterized in that The dividing the DSA data pairs into a first DSA data pair group and a second DSA data pair group comprises: Evenly divide the DSA data pairs into k data sets; For each of the k data sets, use the data set as the second DSA data pair group, and use the remaining k-1 data sets as the first DSA data pair group, to obtain k data pair groups, each of which includes the first DSA data pair group and the second DSA data pair group; For each data pair group, performing the steps from taking the first DSA data pair in the first DSA data pair group as the DSA optimization data pair, optimizing the candidate blood vessel segmentation model by using the DSA optimization data pair, to verifying the candidate blood vessel segmentation model by using the second DSA verification data during the process of optimizing the candidate blood vessel segmentation model, to obtain a target candidate blood vessel segmentation model; Each target candidate blood vessel segmentation model is evaluated, and the target candidate blood vessel segmentation model with the best model performance is used as the target blood vessel segmentation model.
5. The method according to claim 1, characterized in that: Before using the DSA training data to train the candidate blood vessel segmentation model, the method further includes: Preprocessing the DSA training image and the DSA training annotated image in the DSA training data pair respectively to obtain a preprocessed DSA training image and a preprocessed DSA training annotated image; the preprocessing includes: at least one of resampling, normalization, image cropping, image filling, and image enhancement; The method of using the DSA training data to train a candidate blood vessel segmentation model comprises: The candidate vessel segmentation model is trained using the preprocessed DSA training images and the preprocessed DSA training annotated images.
6. The method according to claim 1, characterized in that The candidate blood vessel segmentation model is a nnUNet model.
7. A blood vessel segmentation method, characterized in that: The method comprises: Acquire a DSA image to be segmented; The DSA image to be segmented is input into a target blood vessel segmentation model to perform blood vessel segmentation to obtain a blood vessel segmentation result; wherein the target blood vessel segmentation model is trained based on the blood vessel segmentation model training method according to any one of claims 1 to 6.
8. The method according to claim 7, characterized in that After obtaining the blood vessel segmentation result of the DSA image to be segmented, the method further includes: The blood vessel segmentation result is post-processed to obtain a target blood vessel segmentation result; the post-processing includes: at least one of denoising and smoothing.
9. An electronic device, characterized in that: include: a processor configured to execute program instructions; as well as A memory configured to store the program instructions, and when the program instructions are loaded and executed by the processor, the processor executes the steps of the blood vessel segmentation model training method as described in any one of claims 1 to 6 or executes the steps of the blood vessel segmentation method as described in any one of claims 7 to 8.
10. A computer-readable storage medium having program instructions stored therein, characterized in that: When the program instructions are loaded and executed by the processor, the processor executes the steps of the blood vessel segmentation model training method as described in any one of claims 1 to 6 or the steps of the blood vessel segmentation method as described in any one of claims 7 to 8.
Citation Information
Patent Citations
Arterial blood vessel image model train method, segmentation method, device and electronic device
CN109087306A
Method and device for segmented positioning of pulmonary blood vessel, equipment and storage medium
CN113223013A
DSA cerebrovascular segmentation system and method based on spatial multi-scale attention network
CN115439651A
Image segmentation method, electronic equipment and storage medium
CN116958551A