Blood vessel segmentation model training method, blood vessel segmentation method and electronic equipment

By introducing the target distance map during the training of the vascular segmentation model, the problem of difficulty in segmenting small blood vessels in the prior art is solved, and the segmentation performance and accuracy of the vascular segmentation model are improved.

CN119963592AActive Publication Date: 2025-05-09UNION STRONG (BEIJING) TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The prior art is difficult to accurately segment small blood vessels in vascular segmentation tasks, especially when complex morphology and non-vascular pixels have a great influence.

Method used

By obtaining DSA training data pairs, including DSA training images and labeled images, and generating target distance maps based on the labeled images, and training them in combination with neural network models to obtain a vascular segmentation model.

Benefits of technology

By adding the distance map to the training process of the vascular segmentation model, it provides richer vascular boundary information, improves the model's learning ability to complex boundaries, and significantly improves the segmentation performance of tiny blood vessels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119963592A_ABST
    Figure CN119963592A_ABST
Patent Text Reader

Abstract

The invention discloses a blood vessel segmentation model training method, a blood vessel segmentation method and electronic equipment. The blood vessel segmentation model training method comprises the steps that DSA training data pairs are acquired; the DSA training data pair comprises DSA training images and DSA annotation images which are in one-to-one correspondence, and the DSA annotation images are obtained by performing blood vessel segmentation annotation on the DSA training images; obtaining a target distance map corresponding to the DSA annotation image based on the DSA annotation image; and inputting the DSA training image, the DSA annotation image and the target distance map into a neural network model for training to obtain a blood vessel segmentation model. According to the method, the distance map is added into the training process of the blood vessel segmentation model, richer blood vessel boundary information is provided, the learning ability of the model for complex boundaries is improved, the influence of other non-blood vessel pixels is reduced, and the segmentation performance of small blood vessels is improved.
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 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 cerebral blood vessel segmentation and brain tumor extraction.

[0003] For the task of blood vessel segmentation, the morphology, trend, thickness of blood vessels and the influence of non-vascular pixels will increase the difficulty of blood vessel segmentation, 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 of the invention

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

[0005] In a first aspect, the present disclosure provides a method for training a vascular segmentation model, 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 annotated image, the DSA annotated image being obtained by annotating the DSA training image for vascular segmentation; obtaining a target distance map corresponding to the DSA annotated image based on the DSA annotated image; inputting the DSA training image, the DSA annotated image and the target distance map into a neural network model for training to obtain a vascular segmentation model.

[0006] In some embodiments, obtaining a distance map corresponding to the DSA annotated image based on the DSA annotated image includes: for each foreground pixel on the DSA annotated image, calculating the shortest distance from the foreground pixel to the background area on the DSA annotated image; using the shortest distance from the foreground pixel to the background area on the DSA annotated image as the pixel value of the foreground pixel to obtain a candidate distance map corresponding to the DSA annotated image; and normalizing the candidate distance map to obtain the target distance map.

[0007] In some embodiments, the normalization processing of the candidate distance map to obtain the target distance map includes: after setting the pixel value of the background pixel point of the candidate distance map to a specified pixel value, taking the inverse of 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 a 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 on the second scaled distance map whose pixel value is less than the second set pixel value to a third set pixel value to obtain the target distance map.

[0008] In some embodiments, before inputting the DSA training image, the DSA annotated image and the target distance map into the neural network model for training, the method further includes: preprocessing the DSA training image, the DSA annotated image and the target distance map, respectively, to obtain a preprocessed DSA training image, a preprocessed DSA annotated image and a preprocessed target distance map; inputting the DSA training image, the DSA annotated image and the target distance map into the neural network model for training includes: inputting the preprocessed DSA training image, the preprocessed DSA annotated image and the preprocessed target distance map into the neural network model for training.

[0009] In some embodiments, the preprocessing includes at least one of resampling, normalization, image cropping, and image enhancement.

[0010] In some embodiments, the DSA annotated image and the target distance map are subjected to the same preprocessing.

[0011] In some embodiments, the DSA training image, the DSA annotated image, and the target distance map are input into a neural network model for training to obtain a vascular segmentation model, including: performing vascular segmentation on the DSA training image by the neural network model to obtain a vascular segmentation prediction result; calculating a first loss value based on the vascular segmentation prediction result and the DSA annotated image, and calculating a second loss value based on the vascular segmentation prediction result, the DSA annotated 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 vascular segmentation model.

[0012] In some embodiments, the calculating the second loss value based on the blood vessel segmentation prediction result, the DSA annotated image and the target distance map includes: Among them, loss2 represents the second loss value; n represents the number of DSA training images; TP i represents the sum of the products of the blood vessel segmentation prediction result of the first type of pixel on the i-th DSA training image, the annotation result of the corresponding pixel on the DSA annotation image, and the pixel value of the corresponding pixel on the target distance map; wherein the first type of pixel is a pixel whose blood vessel segmentation prediction result of the pixel on the DSA training image and the annotation result of the corresponding pixel on the DSA annotation image are both positive; FN i FP represents the sum of the products of the blood vessel segmentation prediction result of the second type of pixel on the i-th DSA training image, the annotation result of the corresponding pixel on the DSA annotation image, and the pixel value of the corresponding pixel on the target distance map; wherein the second type of pixel is the pixel whose blood vessel segmentation prediction result on the DSA training image is negative and the annotation result of the corresponding pixel on the DSA annotation image is positive; i It represents the sum of the products 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; wherein 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.

[0013] In a second aspect, the present disclosure provides a blood vessel segmentation method, comprising: acquiring a DSA image to be segmented; inputting the DSA image to be segmented into a blood vessel segmentation model to perform blood vessel segmentation and obtain a blood vessel segmentation result; wherein the blood vessel segmentation model is trained based on the blood vessel segmentation model training method described in the first aspect or any 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, wherein 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 the first aspect or any embodiments of the first aspect or executes the steps of the blood vessel segmentation method as described in the second aspect.

[0015] Through the blood vessel segmentation model training method, blood vessel segmentation model and electronic device provided above. The disclosed embodiment provides more abundant blood vessel boundary information by adding the distance map to the blood vessel segmentation model training process, improves the model's learning ability for complex boundaries, enables the trained blood vessel segmentation model to more accurately capture boundary information, reduces the influence of other non-blood vessel pixels, and improves the blood vessel segmentation model's segmentation performance for small blood vessels. Furthermore, when the blood vessel segmentation is performed on the DSA image to be segmented by the blood vessel segmentation model, especially for the segmentation of small blood vessels, a more accurate blood vessel segmentation result is obtained. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] By reading the detailed description below 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 accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

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

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

[0019] Figure 2B A specific example diagram showing a target distance diagram of one of the cross sections of some embodiments of the present disclosure;

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

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

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

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

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

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

[0026] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of 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 "include" and "comprising" used in the specification and claims of the present disclosure indicate the presence of 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 collections thereof.

[0028] It should also be understood that the terms used in this disclosure are only for the purpose of describing specific embodiments and are not intended to limit the disclosure. As used in this disclosure and claims, the singular forms of "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise. It should also be further understood that the term "and / or" used in this disclosure and claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations.

[0029] As used in this specification and claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0030] The specific implementation of the present disclosure is described in detail below with reference to the accompanying drawings.

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

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

[0033] Exemplarily, the DSA training data pair in step S110 includes a one-to-one corresponding DSA training image and a DSA annotated image. It can be understood that the above-mentioned DSA is a high-end medical imaging technology that combines traditional angiography with computer image processing technology. Its principle is to take two frames of X-ray images before and after the injection of contrast agent in the same part of the human body, subtract them after digital processing, eliminate the bone and soft tissue images, and only retain the blood vessel images. DSA images are of great value for vascular variation, vascular diseases, and showing the relationship between lesions and blood vessels. In the disclosed embodiment, the above-mentioned DSA training image can be a 3D DSA grayscale image or a 3D DSA color image. The disclosed embodiment does not make specific limitations on this. The disclosed embodiment can be described by taking the DSA training image as a grayscale image as an example.

[0034] In the disclosed embodiment, the DSA training image may be a collected brain DSA image, chest DSA image, abdominal DSA image, etc., and blood vessel segmentation of DSA images of multiple parts may be achieved.

[0035] In the disclosed embodiment, the DSA annotated image is obtained by annotating the DSA training image with blood vessel segmentation. Specifically, for example, it can be manual annotation, that is, the DSA training image is manually annotated with blood vessel segmentation. For another example, it can also be automatic annotation, that is, the DSA training image is input into a pre-trained annotation model, and the DSA training image is annotated with blood vessel segmentation by the annotation model. For another example, it can also be a combination of automatic annotation and manual annotation, that is, the DSA training image is input into a pre-trained annotation model, the DSA training image is annotated with blood vessel segmentation by the annotation model, and then the blood vessel segmentation annotation result of the model is manually corrected. The disclosed embodiment does not specifically limit the annotation method of the DSA training image.

[0036] In the disclosed embodiment, when the DSA training image is annotated for blood vessel segmentation, each pixel of the DSA training image is annotated to determine whether it is a blood vessel pixel to form blood vessel annotation information. That is, the blood vessel pixels (recorded as foreground pixels) and non-blood vessel pixels (recorded as background pixels) in the DSA training image are annotated to form a blood vessel foreground area and a non-blood vessel background area. Specifically, a binary classification annotation can be performed for each pixel on the DSA training image. For example, if the pixel belongs to a blood vessel, the pixel is annotated as a first tag, and if the pixel does not belong to a blood vessel, the pixel is annotated as a second tag. Here, the first tag and the second tag can be expressed in many forms, such as different numbers, different colors, different letters, etc. As a specific embodiment, the first tag is "1" and the second tag is "0". The disclosed embodiment does not specifically limit the first tag and the second tag.

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

[0038] Exemplarily, in the disclosed embodiments, the above distance may be a Euclidean distance. In a specific implementation, for each foreground pixel on the DSA annotated image, the shortest distance from the foreground pixel to the background area on the DSA annotated image is calculated. At this time, for each foreground pixel on the DSA annotated image, a distance value can be obtained, and then the distance value of each foreground pixel on the DSA annotated image is used as the pixel value of the foreground pixel to obtain a candidate distance map corresponding to the DSA annotated image. In some embodiments, in order to facilitate calculation, a normalization operation may also be performed on the candidate distance map to obtain a final target distance map.

[0039] In the disclosed embodiment, the candidate distance map is normalized to obtain the target distance map, which can be specifically as follows: after setting the pixel values ​​of the background pixels of the candidate distance map to the specified pixel values, the pixel values ​​of each pixel on the candidate distance map are reciprocally processed, and the pixel values ​​of the background pixels on the candidate distance map are corrected to the first set pixel values ​​to obtain a first scaled distance map; each foreground pixel on the first scaled distance map is scaled to obtain a second scaled distance map; the pixel values ​​of the foreground pixels on the second scaled distance map whose pixel values ​​are less than the second set pixel value are set to the third set pixel values ​​to obtain the target distance map.

[0040] Exemplarily, in the disclosed embodiment, the pixel value of each background pixel of the candidate distance map is first set to a specified pixel value (e.g., -1), and then the pixel value of each pixel on the candidate distance map is reciprocally processed, that is, the inverse scaling of the Euclidean distance is achieved. Here, the specified pixel value is any pixel value that is non-0 and different from the pixel value of the foreground pixel. At this time, for each foreground pixel on the candidate distance map, the reciprocal of the foreground pixel can be obtained, that is, the reciprocal is used as the pixel value of the foreground pixel. For the background pixel on the candidate distance map, the pixel value of the background pixel is corrected to a first set pixel value to obtain a first scaled distance map. Here, the first set pixel value can be any value different from the pixel value of each foreground pixel, for example, 0, and the disclosed embodiment does not specifically limit this.

[0041] In the disclosed embodiment, after obtaining the first scaled distance map, a designated scaling process can be performed on each foreground pixel on the first scaled distance map to obtain a second scaled distance map. Here, there can be many types of designated scaling processes, for example, first performing maximum and minimum normalization processing on each foreground pixel on the first scaled distance map, and then multiplying the pixel value of each foreground pixel after the maximum and minimum normalization processing by a set scaling ratio value (for example, 2) to scale the pixel value of each foreground pixel on the first scaled distance map to a certain range. The disclosed embodiment does not specifically limit the designated scaling process and the set scaling ratio value, which can be determined according to actual conditions.

[0042] In the disclosed embodiment, when performing the maximum and minimum normalization processing on each foreground pixel, each foreground pixel may be normalized based on the pixel values ​​of all foreground pixels. Specifically, the maximum and minimum normalization processing may be implemented by the following formula:

[0043]

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

[0045] In the disclosed embodiment, for each foreground pixel on the second scaled distance map, if the pixel value of the foreground pixel is less than the second set pixel value (e.g., 1), the pixel value of the foreground pixel is set to a third set pixel value (e.g., 1) to avoid too small a value on the distance map. Here, the second set pixel value and the third set pixel value can both be any pixel value, and the second set pixel value and the third set pixel value can be the same or different, and the disclosed embodiment does not specifically limit this. At the same time, the pixel values ​​of the pixels in the background area on the second scaled distance map are corrected to the above-mentioned first set pixel value to obtain a target distance map.

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

[0047] like Figure 2A The DSA annotated image is shown, where the pixels in the black area are non-vascular pixels and the pixels in the white area are vascular pixels. Figure 2A The DSA in the image annotates each foreground pixel, calculates the shortest Euclidean distance between the foreground pixel and the background area, obtains a candidate distance map (not shown in the figure), and performs a normalization operation on the candidate distance map to obtain Figure 2B The target distance diagram shown. Among them, Figure 2B In the target distance map shown in the figure, the pixels in the black area are background pixels of non-vascular areas, and the pixels in the gray area are foreground pixels of blood vessels. Figure 2B It can be seen that the boundaries of the blood vessels are clear. The disclosed embodiment can provide richer boundary information by adding the distance map to the model training process, improve the learning ability of the blood vessel segmentation model for the boundary, and thus obtain more accurate blood vessel segmentation results when using the trained blood vessel segmentation model for blood vessel segmentation.

[0048] Exemplarily, the neural network model in step S130 may be a nnUNet model or other models, which is not specifically limited in the disclosed embodiments.

[0049] In the disclosed embodiment, in step S130, the DSA training image, the DSA annotated image and the target distance map are input into the neural network model for training, and the vascular segmentation model is obtained. Specifically, the following steps may be performed: the neural network model performs vascular segmentation on the DSA training image to obtain a vascular segmentation prediction result; a first loss value is calculated based on the vascular segmentation prediction result and the DSA annotated image, and a second loss value is calculated based on the vascular segmentation prediction result, the DSA annotated image and the target distance map; a target loss value of the neural network model is calculated based on the first loss value and the second loss value, and model parameters of the neural network model are adjusted based on the target loss value until the set iteration conditions are met to obtain the vascular segmentation model.

[0050] Exemplarily, the DSA training image, the DSA annotated image, and the target distance map are input into the neural network model, and the neural network model performs vascular segmentation on the DSA training image to obtain a vascular segmentation prediction result, where the vascular segmentation prediction result is the probability value of each pixel point on the DSA training image being a vascular pixel point and the probability value of a non-vascular pixel point, and the prediction result of each pixel point can be a 1*2 matrix. As a specific embodiment, for each pixel point on the DSA training image, its prediction result can be, for example: the probability of the pixel point being a vascular pixel point is: 0.8, and the probability of being a non-vascular pixel point is: 0.2, then the pixel point is a vascular pixel point.

[0051] In the disclosed embodiment, after obtaining the vascular segmentation prediction result, a first loss value is calculated based on the vascular segmentation prediction result and the DSA annotated image, and a second loss value is calculated based on the vascular segmentation prediction result, the DSA annotated image, and the target distance map. Here, the first loss value may be a loss value calculated based on a first loss function (e.g., a conventional cross entropy loss function). The second loss value may be a loss value calculated based on a second loss function (e.g., a dice loss function). As for how to obtain the first loss value by calculating the cross entropy loss function based on the vascular segmentation prediction result and the DSA annotated image, it is a conventional technique, and reference may be made to the description of the relevant materials, which will not be described here. As for how to obtain the second loss value by calculating the dice loss based on the vascular segmentation prediction result, the DSA annotated image, and the target distance map, the following embodiment provides an example description, which will not be described here.

[0052] In the disclosed embodiment, 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 performing a weighted average calculation on 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. 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. The disclosed embodiment does not specifically limit this, and it can be determined according to actual conditions.

[0053] In the disclosed embodiment, after obtaining the target loss value, the model parameters of the neural network model can be reversely adjusted based on the target loss value. Here, the model parameters may include, for example, model weights and biases, etc., to achieve training of the neural network model.

[0054] In the disclosed embodiment, the set iteration condition may be the convergence of the target loss value, or may be the reaching of a set number of iterations (e.g., 200 times), etc., which is not specifically limited in the disclosed embodiment. When the model training reaches the set iteration condition, a trained blood vessel segmentation model can be obtained.

[0055] The disclosed embodiment adds the distance map to the traditional loss value calculation during the model training process, thereby realizing the constraint on boundary information, increasing the model's attention to the boundary, and improving the segmentation performance of the model.

[0056] As an optional embodiment of the present disclosure, after obtaining the vascular segmentation model, DSA verification data can also be obtained to evaluate the performance of the vascular segmentation model. If qualified, vascular segmentation is performed based on the trained vascular segmentation model. If unqualified, the vascular segmentation model can be optimized until it is qualified.

[0057] As an optional embodiment of the present disclosure, before inputting the DSA training image, the DSA annotated 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 annotated image and the target distance map are preprocessed respectively to obtain a preprocessed DSA training image, a preprocessed DSA annotated image and a preprocessed target distance map.

[0059] Exemplarily, in this embodiment, the preprocessing may 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, gama enhancement, or contrast enhancement.

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

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

[0062] As a specific embodiment of the present disclosure, the second loss value may be calculated based on the blood vessel segmentation prediction result, the DSA annotated image, and the target distance map by using the following formula:

[0063]

[0064] Among them, loss 2 represents the second loss value; n represents the number of DSA training images; TP i represents the sum of the products of the blood vessel segmentation prediction results of the first-category pixel points on the i-th DSA training image, the annotation results of the corresponding pixel points on the DSA annotation image, and the pixel values ​​of the corresponding pixel points on the target distance map; wherein the first-category pixel points are the pixel points whose blood vessel segmentation prediction results of the pixel points on the DSA training image and the annotation results of the corresponding pixel points on the DSA annotation image are both positive; FN i FP represents the sum of the products 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; wherein, 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; i It represents the sum of the products 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; wherein, 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.

[0065] Figure 3 Schematic diagram of model evaluation indicators of some embodiments of the present disclosure is shown. Figure 3As shown in FIG. 1 , for a classification model such as the blood vessel segmentation model in the disclosed embodiment, four evaluation indicators can be obtained according to the prediction results of the model and the annotation results of the model, namely, TP, TN, FP, and FN, wherein TP (true positive example) refers to the positive sample predicted by the model as the positive class, i.e., the first class of pixels mentioned above (the blood vessel segmentation prediction result of the pixel point on the DSA training image and the annotation result of the corresponding pixel point on the DSA annotated image are both the positive class of pixels); TN (true negative example) refers to the negative sample predicted by the model as the negative class, which can be recorded as the fourth class of pixels (the blood vessel segmentation prediction result of the pixel point on the DSA training image and the annotation result of the corresponding pixel point on the DSA annotated image are both the positive class of pixels). The segmentation prediction result and the annotation result of the corresponding pixel on the DSA annotated image are both negative pixels); FP (false positive) refers to the negative samples predicted by the model as positive, that is, the third category of pixels mentioned above (the vascular segmentation prediction result of the pixel on the DSA training image is positive, and the annotation result of the corresponding pixel on the DSA annotated image is negative); FN (false negative) refers to the positive samples predicted by the model as negative, that is, the second category of pixels mentioned above (the vascular segmentation prediction result of the pixel on the DSA training image is negative, and the annotation result of the corresponding pixel on the DSA annotated image is positive).

[0066] The disclosed embodiment provides richer vascular boundary information by adding the distance map to the training process of the vascular segmentation model, improves the model's learning ability for complex boundaries, and enables the trained vascular segmentation model to more accurately capture boundary information, reduce the influence of other non-vascular pixels, and improve the segmentation performance of the vascular segmentation model for small blood vessels.

[0067] Figure 4 An exemplary flow chart of a blood vessel segmentation method 400 according to some embodiments of the present disclosure is shown.

[0068] like Figure 4 As shown, the blood vessel segmentation method 400 provided in the present disclosure includes: step S410: obtaining a DSA image to be segmented; step S420: inputting the DSA image to be segmented into a blood vessel segmentation model to perform blood vessel segmentation and obtain a blood vessel segmentation result; wherein the 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 S410 may be a 3D DSA grayscale image or a 3D DSA color image, which is not specifically limited in the present disclosed embodiment, and it only needs to be consistent with the DSA training image.

[0070] In the disclosed embodiment, the DSA image to be segmented may be, for example, a brain DSA image, a chest DSA image, an abdominal DSA image, etc., which includes vascular details of the corresponding part.

[0071] For example, in the disclosed embodiment, the DSA image to be segmented is input into the vascular segmentation model for vascular segmentation, and a vascular segmentation result including vascular contours is obtained. Here, the vascular segmentation model is trained based on the embodiment of the vascular segmentation model training method described above, and therefore, the DSA image to be segmented is segmented based on the vascular segmentation model to obtain a more accurate vascular segmentation result.

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

[0073] like Figure 5 As shown, first prepare 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), and then generate a distance map (i.e., the above-mentioned target distance map) based on the 3D vascular mask. Next, perform data preprocessing on the 3D DSA grayscale image to obtain a grayscale image, and perform the same annotation preprocessing on the 3D vascular mask and the distance map to obtain annotations and distance maps. Then, input the grayscale image and the annotations together into the neural network model for training, and apply the preprocessed distance map as a weight to the model training process (the specific implementation process can be found in the description of the above embodiment), 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 reasoning.

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

[0075] like Figure 6 As shown, a blood vessel segmentation model training device 600 provided by the disclosed embodiment includes: a DSA training data pair acquisition module 610, used to acquire 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 present disclosure, the target distance map acquisition module 620 is specifically used to: calculate, for each foreground pixel on the DSA annotated image, the shortest distance from the foreground pixel to the background area on the DSA annotated image; use the shortest distance from the foreground pixel to the background area on the DSA annotated image as the pixel value of the foreground pixel to obtain a candidate distance map corresponding to the DSA annotated image; and normalize the candidate distance map to obtain a target distance map.

[0077] As an optional embodiment of the disclosed embodiment, the target distance map acquisition module 620 performs normalization processing on the candidate distance map to obtain the target distance map, including: after setting the pixel value of the background pixel point of the candidate distance map to the specified pixel value, taking the inverse of 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 the first set pixel value to obtain a first scaled distance map; performing a specified scaling process 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 on the second scaled distance map whose pixel value is less than the second set pixel value to a third set pixel value to obtain the target distance map.

[0078] As an optional embodiment of the disclosed embodiment, the blood vessel segmentation model training device also includes: a preprocessing module, which is used to preprocess the DSA training image, the DSA annotated image and the target distance map respectively to obtain a preprocessed DSA training image, a preprocessed DSA annotated image and a preprocessed target distance map; the model training module 630 is specifically used to: input the preprocessed DSA training image, the preprocessed DSA annotated image and the preprocessed target distance map into the neural network model for training.

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

[0080] As an optional embodiment of the disclosed embodiment, the same preprocessing is performed on the DSA annotated image and the target distance map.

[0081] As an optional embodiment of the disclosed embodiment, the above-mentioned model training module 630 is specifically used for: performing vascular segmentation on the DSA training image by a neural network model to obtain a vascular segmentation prediction result; calculating a first loss value based on the vascular segmentation prediction result and the DSA annotated image, and calculating a second loss value based on the vascular segmentation prediction result, the DSA annotated 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 the set iteration conditions are met to obtain a vascular segmentation model.

[0082] As an optional embodiment of the disclosed embodiment, 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 above-mentioned model training module 630 includes: Among them, loss 2 represents the second loss value; n represents the number of DSA training images; TP i represents the sum of the products of the blood vessel segmentation prediction results of the first-category pixel points on the i-th DSA training image, the annotation results of the corresponding pixel points on the DSA annotation image, and the pixel values ​​of the corresponding pixel points on the target distance map; wherein the first-category pixel points are the pixel points whose blood vessel segmentation prediction results of the pixel points on the DSA training image and the annotation results of the corresponding pixel points on the DSA annotation image are both positive; FN i FP represents the sum of the products 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; wherein, 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; i It represents the sum of the products 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; wherein, 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 An exemplary structural block diagram of a blood vessel segmentation device 700 according to some embodiments of the present disclosure is shown.

[0084] like Figure 7 As shown, a blood vessel segmentation device 700 provided in the disclosed embodiment includes: a DSA image to be segmented acquisition module 710, used to acquire the DSA image to be segmented; a blood vessel segmentation module 720, used to input the DSA image to be segmented into a blood vessel segmentation model to perform blood vessel segmentation and obtain a blood vessel segmentation result; wherein the blood vessel segmentation model is trained based on the embodiment of the above-mentioned blood vessel segmentation model training method.

[0085] Correspondingly, the disclosed embodiment 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; the processor 810 is configured to load and execute the program instructions stored in the memory 820 to implement the corresponding embodiment of the blood vessel segmentation model training method or the corresponding embodiment of the blood vessel segmentation method as shown above.

[0086] As an embodiment, the memory 820 may be any electronic, magnetic, optical or other physical storage device that may contain or store information, such as program instructions, data, etc. For example, the memory 820 may be: a volatile memory, a non-volatile memory or a similar storage medium. Specifically, the memory 820 may be a RAM (Random Access Memory), a 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.

[0087] So far, completed Figure 8 Description of the electronic device shown.

[0088] 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. Those skilled in the art may think of many changes, modifications, and alternatives without departing from the thought and spirit of the present disclosure. It should be understood that in the process of practicing the present disclosure, various alternatives to the embodiments of the present disclosure described herein may be adopted. The attached claims are intended to define the scope of protection of the present disclosure, and therefore 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 training data pair includes a one-to-one corresponding DSA training image and a DSA annotated image, wherein the DSA annotated image is obtained by performing blood vessel segmentation and annotation on the DSA training image; Obtaining a target distance map corresponding to the DSA annotated image based on the DSA annotated image; The DSA training image, the DSA annotated image and the target distance map are input into a neural network model for training to obtain a blood vessel segmentation model.

2. The method according to claim 1, characterized in that The obtaining, based on the DSA annotated image, a distance map corresponding to the DSA annotated image comprises: For each foreground pixel on the DSA annotated image, calculate the shortest distance from the foreground pixel to the background area on the DSA annotated image; The shortest distance from the foreground pixel to the background area on the DSA annotated image is used as the pixel value of the foreground pixel to obtain a candidate distance map corresponding to the DSA annotated image; The candidate distance map is normalized to obtain the target distance map.

3. The method according to claim 2, characterized in that The step of normalizing the candidate distance map to obtain the target distance map includes: After setting the pixel values ​​of the background pixels of the candidate distance map to the specified pixel values, performing reciprocal processing on the pixel values ​​of each pixel on the candidate distance map, and correcting the pixel values ​​of the background pixels on the candidate distance map to the first set pixel values, to obtain a first scaled distance map; Performing a specified scaling process on each foreground pixel on the first scaling distance map to obtain a second scaling distance map; The pixel values ​​of foreground pixels whose pixel values ​​on the second scaled distance map are smaller than the second set pixel value are set as third set pixel values ​​to obtain the target distance map.

4. The method according to claim 1, characterized in that: Before inputting the DSA training image, the DSA annotated image, and the target distance map into a neural network model for training, the method further includes: Preprocessing the DSA training image, the DSA annotated image, and the target distance map respectively to obtain a preprocessed DSA training image, a preprocessed DSA annotated image, and a preprocessed target distance map; The step of inputting the DSA training image, the DSA annotated image, and the target distance map into a neural network model for training includes: The preprocessed DSA training image, the preprocessed DSA annotated image and the preprocessed target distance map are input into the neural network model for training.

5. The method according to claim 4, characterized in that The preprocessing includes: at least one of resampling, normalization, image cropping, and image enhancement.

6. The method according to claim 4, characterized in that The same preprocessing is performed on the DSA annotated image and the target distance map.

7. The method according to claim 1, characterized in that The step of inputting the DSA training image, the DSA annotated image and the target distance map into a neural network model for training to obtain a blood vessel segmentation model includes: Performing blood vessel segmentation on the DSA training image by using 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 annotated image, and calculating a second loss value based on the blood vessel segmentation prediction result, the DSA annotated image and the target distance map; A target loss value of the neural network model is calculated based on the first loss value and the second loss value, and model parameters of the neural network model are adjusted based on the target loss value until a set iteration condition is met, thereby obtaining the blood vessel segmentation model.

8. The method according to claim 7, characterized in that The second loss value is calculated based on the blood vessel segmentation prediction result, the DSA annotated image and the target distance map, include: Wherein, loss2 represents the second loss value; n represents the number of DSA training images; TP i represents the sum of the products of the blood vessel segmentation prediction result of the first type of pixel on the i-th DSA training image, the annotation result of the corresponding pixel on the DSA annotation image, and the pixel value of the corresponding pixel on the target distance map; wherein the first type of pixel is a pixel whose blood vessel segmentation prediction result of the pixel on the DSA training image and the annotation result of the corresponding pixel on the DSA annotation image are both positive; FN i FP represents the sum of the products of the blood vessel segmentation prediction result of the second type of pixel on the i-th DSA training image, the annotation result of the corresponding pixel on the DSA annotation image, and the pixel value of the corresponding pixel on the target distance map; wherein the second type of pixel is the pixel whose blood vessel segmentation prediction result on the DSA training image is negative and the annotation result of the corresponding pixel on the DSA annotation image is positive; i It represents the sum of the products 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; wherein 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.

9. A blood vessel segmentation method, characterized in that: The method comprises: Obtaining a DSA image to be segmented; The DSA image to be segmented is input into a vascular segmentation model to perform vascular segmentation to obtain a vascular segmentation result; wherein the vascular segmentation model is trained based on the vascular segmentation model training method according to any one of claims 1 to 8.

10. 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 according to any one of claims 1 to 8 or executes the steps of the blood vessel segmentation method according to claim 9.

Citation Information

Patent Citations

  • Training method and device and application method and device of blood vessel segmentation model

    CN113066090A

  • Method and device for detecting anatomical key points in three-dimensional angiography image

    CN114943682A

  • Arteriovenous malformation grading method and device based on time enhanced radiomics

    CN115375649A

  • Aneurysm segmentation method, electronic equipment and storage medium

    CN116758096A

  • Blood vessel segmentation method, electronic equipment and storage medium

    CN116958552A