Vessel segmentation model training method, vessel segmentation method, and electronic device

By introducing a target distance map and preprocessing into the training of the blood vessel segmentation model, the problem of poor segmentation results for small blood vessels was solved, and more accurate blood vessel segmentation was achieved.

CN119963592BActive Publication Date: 2025-10-24UNION STRONG (BEIJING) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510154302.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-10-24
Estimated Expiration
2045-02-12

AI Technical Summary

Technical Problem

Existing technologies have poor segmentation effects in blood vessel segmentation tasks, especially in segmenting small blood vessels, and it is difficult to accurately segment complex boundaries.

Method used

By acquiring DSA training data pairs, including DSA training images and labeled images, and using the target distance map to train the neural network model, combined with preprocessing and loss value calculation, the model's ability to learn blood vessel boundaries is improved.

Benefits of technology

The blood vessel segmentation model has improved its segmentation performance for small blood vessels, reduced the influence of non-vascular pixels, and obtained more accurate blood vessel segmentation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119963592B_ABST
    Figure CN119963592B_ABST
Patent Text Reader

Abstract

The disclosure discloses a blood vessel segmentation model training method, a blood vessel segmentation method and an electronic device. The blood vessel segmentation model training method comprises: obtaining a DSA training data pair; the DSA training data pair comprises a one-to-one corresponding DSA training image and a DSA labeled image, and the DSA labeled image is obtained by performing blood vessel segmentation labeling on the DSA training image; obtaining a target distance map corresponding to the DSA labeled image based on the DSA labeled image; inputting the DSA training image, the DSA labeled image and the target distance map into a neural network model for training to obtain a blood vessel segmentation model. The disclosure provides more abundant blood vessel boundary information by adding the distance map to the training process of the blood vessel segmentation model, improves the learning ability of the model for complex boundaries, reduces the influence of other non-blood vessel pixels, and improves the segmentation performance of small blood vessels.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure generally relates to the field of artificial intelligence. More specifically, the present disclosure relates to a blood vessel segmentation model training method, a blood vessel segmentation model and an electronic device. BACKGROUND

[0002] Digital subtraction angiography (DSA) is a high-end diagnosis and treatment technology that combines conventional angiography with computer technology. It is often used for blood vessel segmentation, tumor extraction, etc., especially for brain blood vessel segmentation and brain tumor extraction.

[0003] For the blood vessel segmentation task, the shape, trend, thickness of the blood vessels and the influence of non-blood vessel pixels all increase the difficulty of the blood vessel segmentation task, especially when segmenting small blood vessels, the segmentation effect is poor. In view of this, it is urgent to provide a blood vessel segmentation model training method, a blood vessel segmentation method and an electronic device to improve the segmentation performance of small blood vessels. SUMMARY

[0004] To at least solve one or more of the above-mentioned technical problems, the present disclosure proposes a blood vessel segmentation model training method, a blood vessel segmentation model and an electronic device in various aspects.

[0005] In a first aspect, the present disclosure provides a blood vessel segmentation model training method, the method comprising: obtaining a DSA training data pair; the DSA training data pair comprising a one-to-one corresponding DSA training image and a DSA labeled image, the DSA labeled image being obtained by blood vessel segmentation labeling on the DSA training image; obtaining a target distance map corresponding to the DSA labeled image based on the DSA labeled image; inputting the DSA training image, the DSA labeled image and the target distance map into a neural network model for training to obtain a blood vessel segmentation model.

[0006] In some embodiments, the obtaining a distance map corresponding to the DSA labeled image based on the DSA labeled image comprises: for each foreground pixel point on the DSA labeled image, calculating the shortest distance from the foreground pixel point to the background region on the DSA labeled image; taking the shortest distance from the foreground pixel point to the background region on the DSA labeled image as the pixel value of the foreground pixel point to obtain a candidate distance map corresponding to the DSA labeled image; and performing normalization processing on the candidate distance map to obtain the target distance map.

[0007] In some embodiments, the normalization of the candidate distance map to obtain the target distance map comprises: setting pixel values of background pixel points of the candidate distance map to a specified pixel value, taking inverse of pixel values of each pixel point on the candidate distance map, and correcting pixel values of the background pixel points on the candidate distance map to a first set pixel value to obtain a first scaled distance map; performing specified scaling processing on each foreground pixel point on the first scaled distance map to obtain a second scaled distance map; setting pixel values of foreground pixel points with pixel values less than a second set pixel value on the second scaled distance map to a third set pixel value to obtain the target distance map.

[0008] In some embodiments, before the inputting of the DSA training image, the DSA labeled image, and the target distance map into the neural network model for training, the method further comprises: respectively pre-processing the DSA training image, the DSA labeled image, and the target distance map to obtain pre-processed DSA training image, pre-processed DSA labeled image, and pre-processed target distance map; and the inputting of the DSA training image, the DSA labeled image, and the target distance map into the neural network model for training comprises: inputting the pre-processed DSA training image, the pre-processed DSA labeled image, and the pre-processed target distance map into the neural network model for training.

[0009] In some embodiments, the pre-processing comprises at least one of resampling, normalization, image cropping, and image enhancement.

[0010] In some embodiments, the DSA labeled image and the target distance map are pre-processed in the same way.

[0011] In some embodiments, the inputting of the DSA training image, the DSA labeled image, and the target distance map into the neural network model for training to obtain the blood vessel segmentation model comprises: performing blood vessel segmentation on the DSA training image by the neural network model to obtain a blood vessel segmentation prediction result; calculating a first loss value based on the blood vessel segmentation prediction result and the DSA labeled image, and calculating a second loss value based on the blood vessel segmentation prediction result, the DSA labeled image, and the target distance map; calculating a target loss value of the neural network model based on the first loss value and the second loss value, and adjusting model parameters of the neural network model based on the target loss value until a set iteration condition is met to obtain the blood vessel segmentation model.

[0012] In some embodiments, the calculation of the second loss value based on the blood vessel segmentation prediction result, the DSA labeled image, and the target distance map comprises: wherein, loss2 represents the second loss value; n represents the number of DSA training images; TP i represents the sum of the product of the blood vessel segmentation prediction result of the first type of pixel point on the i-th DSA training image, the label result of the corresponding pixel point on the DSA label image, and the pixel value of the corresponding pixel point on the target distance map; wherein, the first type of pixel point is a pixel point whose blood vessel segmentation prediction result on the DSA training image and the label result of the corresponding pixel point on the DSA label image are both positive classes; FN i represents the sum of the product of the blood vessel segmentation prediction result of the second type of pixel point on the i-th DSA training image, the label result of the corresponding pixel point on the DSA label image, and the pixel value of the corresponding pixel point on the target distance map; wherein, the second type of pixel point is a pixel point whose blood vessel segmentation prediction result on the DSA training image is a negative class and the label result of the corresponding pixel point on the DSA label image is a positive class; FP i represents the sum of the product of the blood vessel segmentation prediction result of the third type of pixel point on the i-th DSA training image, the label result of the corresponding pixel point on the DSA label image, and the pixel value of the corresponding pixel point on the target distance map; wherein, the third type of pixel point is a pixel point whose blood vessel segmentation prediction result on the DSA training image is a positive class and the label result of the corresponding pixel point on the DSA label image is a negative class.

[0013] In a second aspect, the present disclosure provides a blood vessel segmentation method, comprising: obtaining a DSA image to be segmented; inputting the DSA image to be segmented into a blood vessel segmentation model for blood vessel segmentation to obtain a blood vessel segmentation result; wherein the blood vessel segmentation model is trained based on the blood vessel segmentation model training method of the first aspect or any of the embodiments of the first aspect.

[0014] In a second aspect, the present disclosure provides an electronic device, comprising: 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 perform the steps of the blood vessel segmentation model training method of the first aspect or any of the embodiments of the first aspect or perform the steps of the blood vessel segmentation method of the second aspect.

[0015] The blood vessel segmentation model training method, the blood vessel segmentation model and the electronic device are provided as above. The disclosure embodiments provide richer blood vessel boundary information by adding a distance map to the training process of the blood vessel segmentation model, improve the learning ability of the model for complex boundaries, so that the trained blood vessel segmentation model can more accurately capture boundary information, reduce the influence of other non-blood vessel pixels, and improve the segmentation performance of the blood vessel segmentation model for small blood vessels. Further, when performing blood vessel segmentation on a DSA image to be segmented by the blood vessel segmentation model, especially for small blood vessels, a more accurate blood vessel segmentation result is obtained. BRIEF DESCRIPTION OF DRAWINGS

[0016] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will be more apparent from the following detailed description read in conjunction with the accompanying drawings, in which like reference numerals refer to like elements throughout. Several embodiments of the present disclosure are illustrated in the drawings and described in detail below, and the same or corresponding components are designated by the same or corresponding reference numerals, wherein:

[0017] Figure 1 An exemplary flowchart of a blood vessel segmentation model training method of some embodiments of the present disclosure is shown;

[0018] Figure 2A A specific example of a blood vessel segmentation annotation of one cross-section of some embodiments of the present disclosure is shown;

[0019] Figure 2B A specific example of a target distance map of one cross-section of some embodiments of the present disclosure is shown;

[0020] Figure 3 A schematic diagram of a binary classification model evaluation index of some embodiments of the present disclosure is shown;

[0021] Figure 4 An exemplary flowchart of a blood vessel segmentation method of some embodiments of the present disclosure is shown;

[0022] Figure 5 A schematic diagram of the overall model training and model inference of some embodiments of the present disclosure is shown;

[0023] Figure 6 An exemplary structural block diagram of a blood vessel segmentation model training device of some embodiments of the present disclosure is shown;

[0024] Figure 7 An exemplary structural block diagram of a blood vessel segmentation device of some embodiments of the present disclosure is shown;

[0025] Figure 8 A specific schematic diagram of an electronic device of some embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0026] The technical solutions in the embodiments of the present disclosure will be described clearly and completely in combination with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0027] It should be understood that the terms “comprising” and “including” used in the specification and claims of the present disclosure indicate the presence of the described features, integers, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0028] It should also be understood that the terms used in the specification of the present disclosure are only 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, the singular forms “a”, “an” and “the” are intended to include the plural forms, unless the context clearly indicates otherwise. It should be further understood that the term “and / or” used in the specification and claims of the present disclosure means any combination of one or more of the associated listed items and all possible combinations thereof, and includes these combinations.

[0029] As used in the specification and claims of the present disclosure, the term “if’ can be interpreted as “when” or “upon” or “in response to a determination” or “in response to detecting” depending on the context. Similarly, the phrase “if determined” or “if detected [the described condition or event]” can be interpreted to mean “upon determining” or “in response to determining” or “upon detecting [the described condition or event]” or “in response to detecting [the described condition or event]” depending on the context.

[0030] The specific embodiments of the present disclosure are described in detail below in combination with the drawings.

[0031] Figure 1 An exemplary flowchart of a blood vessel segmentation model training method 100 of some embodiments of the present disclosure is shown.

[0032] As Figure 1 shown, the blood vessel segmentation model training method 100 provided by the present disclosure includes: step S110: obtaining a pair of DSA training data; step S120: obtaining a target distance map corresponding to the DSA labeled image based on the DSA labeled image; step S130: inputting the DSA training image, the DSA labeled image and the target distance map into a neural network model for training to obtain a blood vessel segmentation model.

[0033] Exemplarily, the DSA training data pair in the step S110 includes a one-to-one corresponding DSA training image and a DSA labeled image. It can be understood that the above-mentioned DSA is a high-end medical imaging technology combining traditional angiography and computer image processing technology, and its principle is to shoot two frames of X-ray images before and after injecting contrast medium in the same part of the human body, and then subtract the digital processing to eliminate bone and soft tissue images, and only keep the image of blood vessels. The DSA image has important value for blood vessel variation, blood vessel disease and display of lesions and blood vessel relationship. In the embodiment of the disclosure, the above-mentioned DSA training image can be a 3D DSA grayscale image or a 3D DSA color image, and the embodiment of the disclosure does not make specific limitation thereto, and the embodiment of the disclosure can be described taking the DSA training image as a grayscale image as an example.

[0034] In the embodiment of the disclosure, the DSA training image can be a brain DSA image, a chest DSA image, an abdominal DSA image, etc. collected, and the blood vessel segmentation of the DSA images of multiple parts can be realized.

[0035] In the embodiment of the disclosure, the DSA labeled image is obtained by performing blood vessel segmentation labeling on the DSA training image. Specifically, for example, it can be manually labeled, that is, artificially labeled by blood vessel segmentation. For another example, it can also be automatically labeled, that is, inputting the DSA training image into a pre-trained labeling model to label the DSA training image by blood vessel segmentation. For another example, it can also be a combination of automatic labeling and manual labeling, that is, inputting the DSA training image into a pre-trained labeling model to label the DSA training image by blood vessel segmentation, and then manually correcting the blood vessel segmentation labeling result of the model to obtain. The embodiment of the disclosure does not make specific limitation to the labeling method of the DSA training image.

[0036] In the embodiment of the disclosure, when the DSA training image is labeled by blood vessel segmentation, whether each pixel point of the DSA training image is a blood vessel pixel point is labeled to form blood vessel labeling information. That is, the blood vessel pixel points (denoted as foreground pixel points) and the non-blood vessel pixel points (denoted as background pixel points) in the DSA training image are labeled to form the foreground region of the blood vessel and the background region of the non-blood vessel. Specifically, each pixel point on the DSA training image can be labeled by binary classification, for example, if the pixel point belongs to the blood vessel, the pixel point is labeled as a first mark, and if the pixel point does not belong to the blood vessel, the pixel point is labeled as a second mark. Here, the first mark and the second mark can have many forms of expression, such as different numbers, different colors, different letters, etc. As a specific embodiment, the first mark is “1” and the second mark is “0”, and the embodiment of the disclosure does not make specific limitation to the first mark and the second mark.

[0037] Exemplarily, the distance map is usually used to represent the distance from each pixel point in the image to the nearest target boundary, which can assist the model to learn the shape of the boundary more accurately. In the embodiment of the present disclosure, in step S120, the target distance map corresponding to the DSA labeled image can be obtained based on the DSA labeled image. In a specific example, for each foreground pixel point on the DSA labeled image, the shortest distance from the foreground pixel point to the background region on the DSA labeled image can be calculated; the shortest distance from the foreground pixel point to the background region on the DSA labeled image is taken as the pixel value of the foreground pixel point, and a candidate distance map corresponding to the DSA labeled image is obtained; the candidate distance map is normalized to obtain the target distance map.

[0038] Exemplarily, in the embodiment of the present disclosure, the distance can be Euclidean distance. In specific implementation, for each foreground pixel point on the DSA labeled image, the shortest distance from the foreground pixel point to the background region on the DSA labeled image is calculated, at this time, for each foreground pixel point on the DSA labeled image, a distance value can be obtained, and then the distance value of each foreground pixel point on the DSA labeled image is taken as the pixel value of the foreground pixel point to obtain a candidate distance map corresponding to the DSA labeled image. In some embodiments, in order to facilitate calculation, the candidate distance map can also be normalized to obtain the final target distance map.

[0039] In the embodiment of the present disclosure, the normalization processing of the candidate distance map to obtain the target distance map can be specifically: after setting the pixel value of the background pixel point of the candidate distance map to a specified pixel value, the pixel value of each pixel point on the candidate distance map is processed by taking reciprocal, and the pixel value of the background pixel point on the candidate distance map is corrected to a first specified pixel value to obtain a first scaled distance map; each foreground pixel point on the first scaled distance map is processed by specified scaling to obtain a second scaled distance map; the pixel value of the foreground pixel point on the second scaled distance map which is less than a second specified pixel value is set to a third specified pixel value to obtain the target distance map.

[0040] Exemplarily, in the embodiment of the present disclosure, the pixel value of each background pixel point of the candidate distance map is first set as a specified pixel value (for example, -1), and then the pixel value of each pixel point on the candidate distance map is inverted, that is, the inverse scaling of the Euclidean distance is realized. Here, the specified pixel value is a non-zero value and is any pixel value different from the pixel value of the foreground pixel point. At this time, for each foreground pixel point on the candidate distance map, the inverse of the foreground pixel point can be obtained, and the inverse is taken as the pixel value of the foreground pixel point. For the background pixel point on the candidate distance map, the pixel value of the background pixel point is corrected to the first set pixel value to obtain the first scaling distance map. Here, the first set pixel value can be any value different from the pixel value of each foreground pixel point, for example, 0, and the embodiment of the present disclosure does not make specific limitation thereto.

[0041] In the embodiment of the present disclosure, after obtaining the first scaling distance map, a specified scaling process can be performed on each foreground pixel point on the first scaling distance map to obtain a second scaling distance map. Here, the specified scaling process can be various, for example, the maximum and minimum normalization process is first performed on each foreground pixel point on the first scaling distance map, and then the pixel value of each foreground pixel point after the maximum and minimum normalization process is multiplied by a set scaling ratio value (for example, 2) to scale the pixel value of each foreground pixel point on the first scaling distance map to a certain range. The embodiment of the present disclosure does not make specific limitation to the specified scaling process and the set scaling ratio value, which can be determined according to the actual situation.

[0042] In the embodiment of the present disclosure, when performing the maximum and minimum normalization process on each foreground pixel point, the normalization process can be performed on each foreground pixel point based on the pixel values of all foreground pixel points. Specifically, the maximum and minimum normalization process can be realized by the following formula:

[0043]

[0044] Wherein, x represents the pixel value of the foreground pixel point; min(x) represents the minimum pixel value of the foreground pixel point on the first scaling distance map; max(x) represents the maximum pixel value of the foreground pixel point on the first scaling distance map; x * represents the pixel value of the foreground pixel point after the maximum and minimum normalization process.

[0045] In the embodiments of the present disclosure, for each foreground pixel point on the second scaled distance map, if the pixel value of the foreground pixel point is less than a second set pixel value (for example, 1), the pixel value of the foreground pixel point is set to a third set pixel value (for example, 1) to avoid too small values on the distance map. Here, the second set pixel value and the third set pixel value can be any pixel value, and the second set pixel value and the third set pixel value can be the same or different, and the embodiments of the present disclosure do not make specific limitations on this. Meanwhile, the pixel value of the pixel point in the background region on the second scaled distance map is corrected to the first set pixel value described above to obtain the target distance map.

[0046] Figure 2A A specific example diagram of blood vessel segmentation annotation of one cross section of some embodiments of the present disclosure is shown; Figure 2B A specific example diagram of a target distance map of one cross section of some embodiments of the present disclosure is shown.

[0047] As Figure 2A shown is a DSA annotated image, wherein the pixel points in the black region are non-blood vessel pixel points, and the pixel points in the white region are blood vessel pixel points. In an embodiment, for each foreground pixel point in the DSA annotated image in Figure 2A , the shortest Euclidean distance between the foreground pixel point and the background region is calculated to obtain a candidate distance map (not shown in the figure), and a normalization operation is performed on the candidate distance map to obtain Figure 2B the target distance map shown. Wherein, Figure 2B in the target distance map shown, the pixel points in the black region are non-blood vessel background pixel points, and the pixel points in the gray region are blood vessel foreground pixel points, and it can be seen from Figure 2B that the boundary of the blood vessel is clear. The embodiments of the present disclosure can provide more rich boundary information by adding the distance map into the model training process, improve the learning ability of the blood vessel segmentation model to the boundary, and then make the blood vessel segmentation using the trained blood vessel segmentation model to obtain more accurate blood vessel segmentation results.

[0048] Exemplarily, the neural network model in step S130 can adopt an nnUNet model, or can adopt other models, and the embodiments of the present disclosure do not make specific limitations on this.

[0049] In the embodiment of the present disclosure, in step S130, the DSA training image, the DSA labeled image and the target distance map are input into the neural network model for training to obtain the blood vessel segmentation model. Specifically, the blood vessel segmentation model can be obtained by: performing blood vessel segmentation on the DSA training image by the neural network model to obtain a blood vessel segmentation prediction result; calculating a first loss value based on the blood vessel segmentation prediction result and the DSA labeled image, and calculating a second loss value based on the blood vessel segmentation prediction result, the DSA labeled image and the target distance map; calculating a target loss value of the neural network model based on the first loss value and the second loss value, and adjusting the model parameters of the neural network model based on the target loss value until a set iteration condition is met to obtain the blood vessel segmentation model.

[0050] For example, the DSA training image, the DSA labeled image and the target distance map are input into the neural network model, the DSA training image is segmented by the neural network model to obtain a blood vessel segmentation prediction result. Here, the blood vessel segmentation prediction result is a probability value of each pixel point on the DSA training image being a blood vessel pixel point and a probability value of each pixel point being a non-blood vessel pixel point. The prediction result of each pixel point can be a 1*2 matrix. As a specific example, for each pixel point on the DSA training image, the prediction result can be, for example, that the probability of the pixel point being a blood vessel pixel point is 0.8, and the probability of the pixel point being a non-blood vessel pixel point is 0.2. Therefore, the pixel point is a blood vessel pixel point.

[0051] In the embodiment of the present disclosure, after obtaining the blood vessel segmentation prediction result, a first loss value is calculated based on the blood vessel segmentation prediction result and the DSA labeled image, and a second loss value is calculated based on the blood vessel segmentation prediction result, the DSA labeled image and the target distance map. Here, the first loss value can be a loss value calculated based on a first loss function (for example, a conventional cross-entropy loss function). The second loss value can be a loss value calculated based on a second loss function (for example, a dice loss function). How to calculate the first loss value based on the blood vessel segmentation prediction result and the DSA labeled image by the cross-entropy loss function is a conventional technology, which can be described in related materials, and will not be described here. How to calculate the second loss value based on the blood vessel segmentation prediction result, the DSA labeled image and the target distance map by the dice loss function is described in the following embodiment, which will not be described here.

[0052] In the embodiments of the present disclosure, after obtaining the first loss value and the second loss value, the target loss value of the neural network model can be calculated based on the first loss value and the second loss value. Specifically, the target loss value can be obtained by weighted average calculation of the first loss value and the second loss value. When performing the weighted average calculation, the coefficients of the first loss value and the second loss value can be set arbitrarily, for example, both are 0.5, and for another example, the first coefficient of the first loss value is 0.3 and the coefficient of the second loss value is 0.7, and the embodiments of the present disclosure do not make specific limitations thereon, which can be determined according to actual conditions.

[0053] In the embodiments of the present disclosure, after obtaining the target loss value, the model parameters of the neural network model can be adjusted reversely based on the target loss value, where the model parameters may, for example, include weights and biases of the model and the like, so as to realize the training of the neural network model.

[0054] In the embodiments of the present disclosure, the iteration condition can be that the target loss value converges, or can be that a set iteration number (for example, 200 times) is reached, and the like, and the embodiments of the present disclosure do not make specific limitations thereon. When the model training reaches the set iteration condition, the trained blood vessel segmentation model can be obtained.

[0055] The embodiments of the present disclosure add the distance map to the traditional loss value calculation in the model training process, realize the constraint on the boundary information, increase the attention of the model to the boundary, and improve the segmentation performance of the model.

[0056] As an optional embodiment of the present disclosure, after obtaining the blood vessel segmentation model, the performance of the blood vessel segmentation model can be evaluated through the DSA verification data. If qualified, the blood vessel segmentation is performed based on the trained blood vessel segmentation model, and if unqualified, the blood vessel segmentation model can be optimized until qualified.

[0057] As an optional embodiment of the present disclosure, before inputting the DSA training image, the DSA annotation image and the target distance map into the neural network model for training, the blood vessel segmentation model training method further includes:

[0058] The DSA training image, the DSA annotation image and the target distance map are respectively preprocessed to obtain preprocessed DSA training image, preprocessed DSA annotation image and preprocessed target distance map.

[0059] For example, in the present embodiment, the preprocessing can include at least one of resampling, normalization, image cropping 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.

[0060] It should be noted that the same preprocessing is performed on the DSA annotation image and the target distance map when preprocessing the DSA annotation image and the target distance map.

[0061] In this embodiment, after preprocessing the DSA training image, the DSA annotation image, and the target distance map, the preprocessed DSA training image, the preprocessed DSA annotation image, and the preprocessed target distance map are input into the neural network model for training.

[0062] As one specific embodiment of the present disclosure, calculating the second loss value based on the blood vessel segmentation prediction result, the DSA annotation image, and the target distance map can specifically be calculated by the following formula:

[0063]

[0064] wherein loss2 represents the second loss value; n represents the number of DSA training images; TP i represents the sum of the product of the blood vessel segmentation prediction result of the first type of pixel point on the i-th DSA training image, the annotation result of the corresponding pixel point on the DSA annotation image, and the pixel value of the corresponding pixel point on the target distance map; wherein the first type of pixel point is a pixel point whose blood vessel segmentation prediction result on the DSA training image and annotation result of the corresponding pixel point on the DSA annotation image are both positive classes; FN i represents the sum of the product of the blood vessel segmentation prediction result of the second type of pixel point on the i-th DSA training image, the annotation result of the corresponding pixel point on the DSA annotation image, and the pixel value of the corresponding pixel point on the target distance map; wherein the second type of pixel point is a pixel point whose blood vessel segmentation prediction result on the DSA training image is negative class and the annotation result of the corresponding pixel point on the DSA annotation image is positive class; FP i represents the sum of the product of the blood vessel segmentation prediction result of the third type of pixel point on the i-th DSA training image, the annotation result of the corresponding pixel point on the DSA annotation image, and the pixel value of the corresponding pixel point on the target distance map; wherein the third type of pixel point is a pixel point whose blood vessel segmentation prediction result on the DSA training image is positive class and the annotation result of the corresponding pixel point on the DSA annotation image is negative class.

[0065] Figure 3 A schematic diagram of a model evaluation index of some embodiments of the present disclosure is shown. As shown in FIG. 6, the model evaluation index of some embodiments of the present disclosure includes the following indexes: the accuracy of the blood vessel segmentation prediction result, the precision of the blood vessel segmentation prediction result, the recall of the blood vessel segmentation prediction result, the F1 score of the blood vessel segmentation prediction result, the accuracy of the DSA annotation image, the precision of the DSA annotation image, the recall of the DSA annotation image, the F1 score of the DSA annotation image, the accuracy of the target distance map, the precision of the target distance map, the recall of the target distance map, and the F1 score of the target distance map. Figure 3As shown, for a classification model such as the blood vessel segmentation model in the embodiments of the present disclosure, four evaluation indexes, i.e., TP, TN, FP, and FN, can be obtained according to the prediction result of the model and the labeled result of the model, wherein TP (true positive) refers to a positive sample predicted as a positive class by the model, i.e., the first type of pixel point described above (the blood vessel segmentation prediction result of the pixel point on the DSA training image and the labeled result of the corresponding pixel point on the DSA labeled image are both positive classes); TN (true negative) refers to a negative sample predicted as a negative class by the model, which can be recorded as the fourth type of pixel point (the blood vessel segmentation prediction result of the pixel point on the DSA training image and the labeled result of the corresponding pixel point on the DSA labeled image are both negative classes); FP (false positive) refers to a negative sample predicted as a positive class by the model, i.e., the third type of pixel point described above (the blood vessel segmentation prediction result of the pixel point on the DSA training image is a positive class, and the labeled result of the corresponding pixel point on the DSA labeled image is a negative class); and FN (false negative) refers to a positive sample predicted as a negative class by the model, i.e., the second type of pixel point described above (the blood vessel segmentation prediction result of the pixel point on the DSA training image is a negative class, and the labeled result of the corresponding pixel point on the DSA labeled image is a positive class).

[0066] The embodiments of the present disclosure provide richer blood vessel boundary information by adding the distance map to the training process of the blood vessel segmentation model, improve the learning ability of the model for complex boundaries, so that the trained blood vessel segmentation model can more accurately capture boundary information, reduce the influence of other non-blood vessel pixels, and improve the segmentation performance of the blood vessel segmentation model for small blood vessels.

[0067] Figure 4 An exemplary flowchart of the blood vessel segmentation method 400 of some embodiments of the present disclosure is shown.

[0068] As shown, Figure 4 The blood vessel segmentation method 400 provided by the present disclosure includes: step S410: obtaining a DSA image to be segmented; and step S420: inputting the DSA image to be segmented into a blood vessel segmentation model for blood vessel segmentation to obtain a blood vessel segmentation result; wherein the blood vessel segmentation model is trained based on the embodiments of the blood vessel segmentation model training method described above.

[0069] Exemplarily, the DSA image to be segmented in step S410 can be a 3D DSA grayscale image or a 3D DSA color image, which is not specifically limited in the embodiments of the present disclosure and is consistent with the DSA training image.

[0070] In the embodiments of the present disclosure, the DSA image to be segmented can be one of a brain DSA image, a chest DSA image, an abdominal DSA image, etc., which includes blood vessel details of the corresponding part.

[0071] For example, in the disclosed embodiments, the DSA image to be segmented is input into a vessel segmentation model for vessel segmentation, resulting in a vessel segmentation result containing vessel contours. The vessel segmentation model is trained using the aforementioned embodiment of the vessel segmentation model training method. Therefore, segmenting the DSA image to be segmented based on the vessel segmentation model yields a more accurate vessel segmentation result.

[0072] Figure 5 An overall schematic diagram of model training and model inference in some embodiments of the present disclosure is shown.

[0073] like Figure 5 As shown, first, a 3D DSA grayscale image (i.e., the above-mentioned DSA training image) and a 3D vascular mask (i.e., the above-mentioned DSA annotated image) are prepared, and then a distance map (i.e., the above-mentioned target distance map) is generated based on the 3D vascular mask. Next, data preprocessing is performed on the 3D DSA grayscale image to obtain a grayscale image, and the same annotation preprocessing is performed on the 3D vascular mask and the distance map to obtain annotations and distance maps. Then, the grayscale image and annotations are input into the neural network model for training, and the preprocessed distance map is applied as a weight to the model training process (the specific implementation process can be found in the description of the embodiment above) until the set iteration end condition is met, and a trained model (i.e., the above-mentioned vascular segmentation model) is obtained. Finally, the 3D DSA grayscale image (i.e., the above-mentioned DSA image to be segmented) is input into the model, and the vascular segmentation result of the 3D DSA grayscale image is obtained by model inference.

[0074] Figure 6 FIG. 6 shows an exemplary structural block diagram of a blood vessel segmentation model training device 600 according to some embodiments of the present disclosure.

[0075] like Figure 6 As shown, a blood vessel segmentation model training device 600 provided by the embodiment of the present disclosure includes: a DSA training data pair acquisition module 610, used to obtain DSA training data pairs; the DSA training data pairs include one-to-one corresponding DSA training images and DSA annotated images, and the DSA annotated images are obtained by annotating the DSA training images for blood vessel segmentation; a target distance map acquisition module 620, used to obtain a target distance map corresponding to the DSA annotated image based on the DSA annotated image; a model training module 630, used to input the DSA training images, the DSA annotated images and the target distance map into a neural network model for training to obtain a blood vessel segmentation model.

[0076] As an optional embodiment of the embodiment of the disclosure, the target distance map obtaining module 620 is specifically configured to: for each foreground pixel point on the DSA labeled image, calculate the shortest distance from the foreground pixel point to the background region on the DSA labeled image; take the shortest distance from the foreground pixel point to the background region on the DSA labeled image as the pixel value of the foreground pixel point, and obtain a candidate distance map corresponding to the DSA labeled image; and perform normalization processing on the candidate distance map to obtain the target distance map.

[0077] As an optional embodiment of the embodiment of the disclosure, the normalization processing on the candidate distance map in the target distance map obtaining module 620 to obtain the target distance map comprises: setting the pixel value of the background pixel point of the candidate distance map as a specified pixel value, performing reciprocal processing on the pixel value of each pixel point on the candidate distance map, and correcting the pixel value of the background pixel point on the candidate distance map to a first specified pixel value to obtain a first scaled distance map; performing specified scaling processing on each foreground pixel point on the first scaled distance map to obtain a second scaled distance map; setting the pixel value of the foreground pixel point with a pixel value less than a second specified pixel value on the second scaled distance map as a third specified pixel value to obtain the target distance map.

[0078] As an optional embodiment of the embodiment of the disclosure, the blood vessel segmentation model training apparatus further comprises: a preprocessing module configured to pre-process the DSA training image, the DSA labeled image, and the target distance map respectively to obtain a pre-processed DSA training image, a pre-processed DSA labeled image, and a pre-processed target distance map; and the model training module 630 is specifically configured to input the pre-processed DSA training image, the pre-processed DSA labeled image, and the pre-processed target distance map into the neural network model for training.

[0079] As an optional embodiment of the embodiment of the disclosure, the preprocessing comprises at least one of resampling, normalization, image cropping, and image enhancement.

[0080] As an optional embodiment of the embodiment of the disclosure, the DSA labeled image and the target distance map are pre-processed in the same way.

[0081] As an optional embodiment of the embodiment of the disclosure, the model training module 630 is specifically configured to: perform blood vessel segmentation on the DSA training image by the neural network model to obtain a blood vessel segmentation prediction result; calculate a first loss value based on the blood vessel segmentation prediction result and the DSA labeled image, and calculate a second loss value based on the blood vessel segmentation prediction result, the DSA labeled image, and the target distance map; calculate a target loss value of the neural network model based on the first loss value and the second loss value, and adjust the model parameters of the neural network model based on the target loss value until a specified iteration condition is met to obtain the blood vessel segmentation model.

[0082] As an optional embodiment of the present disclosure, the calculation of the second loss value based on the blood vessel segmentation prediction result, the DSA annotated image, and the target distance map in the model training module 630 includes: Where loss2 represents the second loss value; n represents the number of DSA training images; TP i represents the sum of the product of the blood vessel segmentation prediction result of the first-category pixel point on the i-th DSA training image, the annotation result of the corresponding pixel point on the DSA annotation image, and the pixel value of the corresponding pixel point on the target distance map; among which, the first-category pixel point is the pixel point whose blood vessel segmentation prediction result on the DSA training image and the annotation result of the corresponding pixel point on the DSA annotation image are both positive; FN i represents the sum of the product of the blood vessel segmentation prediction result of the second-category pixel point on the i-th DSA training image, the annotation result of the corresponding pixel point on the DSA annotation image, and the pixel value of the corresponding pixel point on the target distance map; among which, the second-category pixel point is the pixel point whose blood vessel segmentation prediction result on the DSA training image is negative and the annotation result of the corresponding pixel point on the DSA annotation image is positive; FP i It represents the sum of the product of the blood vessel segmentation prediction result of the third-category pixel point on the i-th DSA training image, the annotation result of the corresponding pixel point on the DSA annotation image, and the pixel value of the corresponding pixel point on the target distance map; among which, the third-category pixel point is the pixel point whose blood vessel segmentation prediction result on the DSA training image is positive and the annotation result of the corresponding pixel point on the DSA annotation image is negative.

[0083] Figure 7 FIG. 7 shows an exemplary structural block diagram of a blood vessel segmentation device 700 according to some embodiments of the present disclosure.

[0084] like Figure 7 As shown, a blood vessel segmentation device 700 provided in an embodiment of the present disclosure includes: a DSA image acquisition module 710 for acquiring a DSA image to be segmented; a blood vessel segmentation module 720 for inputting the DSA image to be segmented into a blood vessel segmentation model for performing blood vessel segmentation to obtain a blood vessel segmentation result; wherein the blood vessel segmentation model is trained based on an embodiment of the above-mentioned blood vessel segmentation model training method.

[0085] Correspondingly, the present disclosure also provides Figure 6 or Figure 7 The hardware structure diagram of the device shown is as follows Figure 8 As shown, the electronic device 800 may be a device for implementing the above method 100 or method 400. Figure 8As shown, the electronic device 800 includes a processor 810 and a memory 820. The memory 820 is configured to store program instructions, and the processor 810 is configured to load and execute the program instructions stored in the memory 820 to implement an embodiment of the corresponding blood vessel segmentation model training method or an embodiment of the corresponding blood vessel segmentation method as shown above.

[0086] As an example, the memory 820 can be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as program instructions, data, and the like. For example, the memory 820 can be a volatile memory, a non-volatile memory, or similar storage media. Specifically, the memory 820 can be a RAM (Random Access Memory), a flash memory, a storage drive (such as a hard drive), a solid state drive, any type of storage disk (such as an optical disk, a DVD, and the like), or similar storage media, or a combination thereof.

[0087] So far, the description of the electronic device is completed. Figure 8

[0088] While the present disclosure has been illustrated and described with reference to various embodiments thereof, it will be apparent to those skilled in the art that many changes, modifications, and substitutions can be made thereto without departing from the spirit and scope of the present disclosure. It is to be understood that various alternatives to the embodiments of the present disclosure described herein can be employed in practicing the present disclosure. The following claims are intended to cover all such alternatives and equivalents.​

Claims

1. A blood vessel segmentation model training method, characterized in that: The method comprises: obtaining a DSA training data pair; the DSA training data pair comprises a one-to-one corresponding DSA training image and a DSA labeled image, and the DSA labeled image is obtained by performing blood vessel segmentation labeling on the DSA training image; obtaining a target distance map corresponding to the DSA labeled image based on the DSA labeled image; inputting the DSA training image, the DSA labeled image and the target distance map into a neural network model for training to obtain a blood vessel segmentation model; the method comprises: for each foreground pixel point on the DSA labeled image, calculating the shortest distance from the foreground pixel point to the background region on the DSA labeled image; taking the shortest distance from the foreground pixel point to the background region on the DSA labeled image as the pixel value of the foreground pixel point to obtain a candidate distance map corresponding to the DSA labeled image; after setting the pixel value of the background pixel point of the candidate distance map as a specified pixel value, performing inverse processing on the pixel value of each pixel point on the candidate distance map, and correcting the pixel value of the background pixel point on the candidate distance map to a first set pixel value to obtain a first scaled distance map; performing specified scaling processing on each foreground pixel point on the first scaled distance map to obtain a second scaled distance map; setting the pixel value of the foreground pixel point with a pixel value less than a second set pixel value on the second scaled distance map to a third set pixel value to obtain the target distance map.

2. The method of claim 1, wherein, Before the DSA training image, the DSA labeled image and the target distance map are input into the neural network model for training, the method further comprises: respectively pre-processing the DSA training image, the DSA labeled image and the target distance map to obtain a pre-processed DSA training image, a pre-processed DSA labeled image and a pre-processed target distance map; the method comprises: inputting the pre-processed DSA training image, the pre-processed DSA labeled image and the pre-processed target distance map into the neural network model for training.

3. The method of claim 2, wherein, The pre-processing comprises at least one of resampling, normalization, image cropping and image enhancement.

4. The method of claim 2, wherein, The DSA labeled image and the target distance map are pre-processed in the same way.

5. The method of claim 1, wherein, the method comprises: performing blood vessel segmentation on the DSA training image by the neural network model to obtain a blood vessel segmentation prediction result; calculating a first loss value based on the blood vessel segmentation prediction result and the DSA labeled image, and calculating a second loss value based on the blood vessel segmentation prediction result, the DSA labeled image and the target distance map; calculating a target loss value of the neural network model based on the first loss value and the second loss value, and adjusting model parameters of the neural network model based on the target loss value until a set iteration condition is met, to obtain the blood vessel segmentation model.

6. The method of claim 5, wherein, calculating a second loss value based on the blood vessel segmentation prediction result, the DSA labeled image, and the target distance map, comprising: wherein, the second loss value; n represents the number of DSA training images; represents the sum of the product of the blood vessel segmentation prediction result of the first type of pixel point on the i-th DSA training image, the label result of the corresponding pixel point on the DSA label image and the pixel value of the corresponding pixel point on the target distance map; wherein the first type of pixel point is a pixel point whose blood vessel segmentation prediction result on the DSA training image and the label result of the corresponding pixel point on the DSA label image are both positive classes; represents the sum of the product of the blood vessel segmentation prediction result of the second type of pixel point on the i-th DSA training image, the label result of the corresponding pixel point on the DSA label image and the pixel value of the corresponding pixel point on the target distance map; wherein the second type of pixel point is a pixel point whose blood vessel segmentation prediction result on the DSA training image is a negative class and the label result of the corresponding pixel point on the DSA label image is a positive class; represents the sum of the product of the blood vessel segmentation prediction result of the third type of pixel point on the i-th DSA training image, the label result of the corresponding pixel point on the DSA label image and the pixel value of the corresponding pixel point on the target distance map; wherein the third type of pixel point is a pixel point whose blood vessel segmentation prediction result on the DSA training image is a positive class and the label result of the corresponding pixel point on the DSA label image is a negative class.

7. A method of segmenting blood vessels, characterized by, the method comprises: obtaining a DSA image to be segmented; inputting the DSA image to be segmented into a blood vessel segmentation model for blood vessel segmentation to obtain a blood vessel segmentation result; wherein the blood vessel segmentation model is trained based on the blood vessel segmentation model training method of any one of claims 1-6.

8. An electronic device, comprising: comprising: a processor configured to execute program instructions; and a memory configured to store the program instructions, which, when loaded and executed by the processor, cause the processor to execute the steps of the blood vessel segmentation model training method of any one of claims 1-6 or execute the steps of the blood vessel segmentation method of claim 7.

Citation Information

Patent Citations

  • DSA coronary vessel segmentation deep learning method concerning edge and topological features

    CN116993763A

  • Method for training segmentation model for segmenting cerebral vessels and related product

    CN117036253A