A point cloud segmentation method, device and equipment of an angiogram and a medium
By designing directional features of vascular point clouds and constructing prior information on the direction of tortuous blood vessels, and utilizing a depth-first traversal algorithm and a list of directional features, the accuracy of vascular image segmentation is improved, solving the segmentation problem under complex tortuous and overlapping vascular phenomena, and supporting more precise interventional treatment.
Patent Information
- Application Number
- CN202310807924.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-03
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2043-07-03
AI Technical Summary
Existing point cloud segmentation methods have low segmentation accuracy when dealing with complex vascular tortuosity and overlap, making it difficult to achieve precise interventional treatment plans.
We designed directional features for blood vessel point clouds, constructed prior information covering the topological structure of blood vessel images and the tortuous direction of blood vessels, determined candidate paths through a depth-first traversal algorithm, and constructed a list of directional features. These features were then combined with point cloud features and input into a pre-trained segmentation model for segmentation.
It improves the segmentation accuracy of point cloud segmentation networks for blood vessel images, helping doctors to develop more precise treatment plans in the diagnosis and treatment of cardiovascular and cerebrovascular diseases.
Smart Images

Figure CN116778486B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of medical image processing technology, and more specifically, to a method, apparatus, device, and medium for point cloud segmentation of angiography images. Background Technology
[0002] Invasive angiography can clearly show whether there is stenosis in the coronary arteries, as well as the location and degree of stenosis, and remains the gold standard for vascular diseases such as coronary heart disease and stroke. However, in the diagnosis and treatment of cardiovascular and cerebrovascular diseases, the complex tortuous and overlapping nature of blood vessels makes it difficult for doctors to clearly and intuitively perform interventions and formulate precise treatment plans during surgery. Therefore, a highly accurate vascular point cloud segmentation method becomes particularly important.
[0003] In commonly used point cloud segmentation methods, only the point cloud coordinate features of binary segmentation are used as input, ignoring the point cloud features specific to blood vessel design, which reduces the segmentation accuracy of deep networks. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a point cloud segmentation method, apparatus, device and medium for angiography images. Effective vascular point cloud orientation features are designed for the unique structure of vascular images. A vascular point cloud orientation feature is constructed that covers prior information such as the topological structure of vascular images and the direction of tortuous blood vessels. This makes it easier for the network to learn the continuity and integrity of blood vessels, thereby improving the segmentation accuracy of the point cloud segmentation network for vascular images.
[0005] In a first aspect, embodiments of this application provide a point cloud segmentation method for angiography images, the point cloud segmentation method comprising:
[0006] Acquire angiography images and input the angiography images into a pre-trained blood vessel segmentation model to obtain a binary segmentation image of the blood vessel corresponding to the angiography images;
[0007] The centerline of the blood vessel is extracted from the binary segmented image of the blood vessel, and the centerline of the blood vessel is determined in the binary segmented image of the blood vessel.
[0008] Based on the position of each point cloud on the blood vessel centerline in the binary segmentation image of the blood vessel, a depth-first traversal algorithm is used to determine multiple candidate paths for the blood vessel centerline.
[0009] Based on the direction vector of each candidate path and the preset reference direction vector, a candidate direction feature list is constructed.
[0010] For each point cloud on the blood vessel centerline, based on the node type corresponding to the point cloud and the list of candidate directional features, the directional features corresponding to the point cloud are determined, and the position coordinates of the point cloud and the directional features corresponding to the point cloud are spliced together to obtain the point cloud features of the point cloud.
[0011] The point cloud features are input into a pre-trained point cloud segmentation model to determine the point cloud segmentation result of the point cloud in the center line of the blood vessel.
[0012] Furthermore, based on the position of each point cloud on the vessel centerline in the binary segmentation image of the vessel, a depth-first traversal algorithm is used to determine multiple candidate paths for the vessel centerline, including:
[0013] The binary segmentation image of the blood vessel is inverted to obtain the centerline image of the blood vessel; wherein, the background pixels in the centerline image of the blood vessel are labeled with a value of 1, and each pixel on the centerline of the blood vessel is labeled with a value of 0.
[0014] For each starting point on the blood vessel centerline, the first neighboring point in the blood vessel centerline image that is located in the neighborhood of the starting point and has a label value of 0 is added to the stack, an empty sublist is added to the two-dimensional branch list, and the label value of the starting point is set to 1;
[0015] For the first neighboring point located at the end of the stack, determine whether there is a second neighboring point with a label value of 0 in the neighborhood of the first neighboring point in the blood vessel centerline image;
[0016] If so, the first neighboring point is removed from the stack, the second neighboring point is added to the stack, the label value of the first neighboring point is set to 1, and the first neighboring point is added to the blank sublist of the two-dimensional branch list.
[0017] If not, then remove the first neighboring point from the stack;
[0018] When the number of points added to the sublist of the two-dimensional branch list reaches the branch length threshold, a new blank sublist is added to the two-dimensional branch list.
[0019] Return to the step of determining whether there is a second neighboring point with a label value of 0 in the neighborhood of the first neighboring point located at the end of the stack in the blood vessel centerline image, until the stack is empty, and obtain a target two-dimensional branch list containing multiple sublists;
[0020] Delete the blank sublists in the target two-dimensional branch list, and add the starting point to the head of each sublist in the target two-dimensional branch list to obtain the candidate path.
[0021] Furthermore, the step of constructing a candidate direction feature list based on the direction vector of each candidate path and a preset reference direction vector includes:
[0022] For each candidate path, the direction vector of the candidate path is determined based on the position coordinates of the last point cloud in the candidate path and the position coordinates of the first point cloud in the candidate path.
[0023] Determine the angle value corresponding to the angle between the direction vector of the candidate path and the preset reference direction vector;
[0024] Each angle value is arranged in a preset order to obtain the list of candidate direction features.
[0025] Furthermore, determining the directional features corresponding to the point cloud based on the node type corresponding to the point cloud and the list of candidate directional features includes:
[0026] Based on the number of other point clouds adjacent to the point cloud, the node type corresponding to the point cloud is determined; wherein, the node type includes endpoints, intermediate points, and branching points;
[0027] Based on the node type corresponding to the point cloud, construct the initial directional features corresponding to the point cloud based on the preset data dimensions;
[0028] In the list of candidate direction features, at least one angle value corresponding to the point cloud is determined;
[0029] At least one angle value is added to the initial orientation feature to obtain the orientation feature corresponding to the point cloud.
[0030] Furthermore, when the node type of the point cloud is a branch point, after determining the directional features corresponding to the point cloud, the point cloud segmentation method further includes:
[0031] From the binary segmentation image of the blood vessel, identify the adjacent point cloud that is adjacent to the point cloud and whose node type is the middle point;
[0032] Determine whether there are multiple angle values of a preset number in the directional features corresponding to the adjacent point clouds;
[0033] If so, the multiple angle values are arranged and combined to obtain multiple angle combinations;
[0034] For each angle combination, subtract the two angle values in the combination and take the absolute value to obtain the angle difference corresponding to the angle combination;
[0035] Select the target angle difference that meets the preset selection rules from multiple angle differences, and add the angle value in the angle combination corresponding to the target angle difference to the initial direction feature corresponding to the adjacent point cloud to obtain the direction feature corresponding to the adjacent point cloud.
[0036] Furthermore, the point cloud segmentation model is trained through the following steps:
[0037] Obtain the sample label for each point cloud in the binary segmentation image of the blood vessel sample;
[0038] For each sample point cloud, the point cloud features of the sample point cloud are concatenated with the sample label of the sample point cloud to obtain the sample features of the sample point cloud.
[0039] For each sample point cloud, the sample features of the sample point cloud are input into the original point cloud segmentation model to obtain the predicted point cloud segmentation result of the sample point cloud.
[0040] The predicted point cloud segmentation result of the sample point cloud is compared with the sample label of the sample point cloud, and the loss function of the original point cloud segmentation model in the current state is calculated.
[0041] Based on the loss function of the original point cloud segmentation model, the model parameters of the original point cloud segmentation model are continuously adjusted until the original point cloud segmentation model reaches a convergent state, thus obtaining the point cloud segmentation model.
[0042] Secondly, embodiments of this application also provide a point cloud segmentation device for angiography images, the point cloud segmentation device comprising:
[0043] The image acquisition module is used to acquire angiography images and input the angiography images into a pre-trained blood vessel segmentation model to obtain a binary segmentation image of the blood vessels corresponding to the angiography images.
[0044] The blood vessel centerline determination module is used to extract the centerline of the blood vessel image in the binary segmentation image of the blood vessels and determine the blood vessel centerline in the binary segmentation image of the blood vessels.
[0045] The candidate path determination module is used to determine multiple candidate paths for the blood vessel centerline based on the position of each point cloud on the blood vessel centerline in the binary segmentation image of the blood vessel, using a depth-first traversal algorithm.
[0046] The direction feature list construction module is used to construct a list of candidate direction features based on the direction vector of each candidate path and a preset reference direction vector among the multiple candidate paths;
[0047] The point cloud feature determination module is used to determine the directional features corresponding to each point cloud on the blood vessel centerline based on the node type corresponding to the point cloud and the list of candidate directional features, and to concatenate the position coordinates of the point cloud and the directional features corresponding to the point cloud to obtain the point cloud features of the point cloud.
[0048] The point cloud segmentation module is used to input the point cloud features of the point cloud into a pre-trained point cloud segmentation model to determine the point cloud segmentation result of the point cloud in the center line of the blood vessel.
[0049] Furthermore, when the candidate path determination module determines multiple candidate paths for the blood vessel centerline using a depth-first traversal algorithm based on the position of each point cloud on the blood vessel centerline in the binary segmentation image of the blood vessel, the candidate path determination module is also used for:
[0050] The binary segmentation image of the blood vessel is inverted to obtain the centerline image of the blood vessel; wherein, the background pixels in the centerline image of the blood vessel are labeled with a value of 1, and each pixel on the centerline of the blood vessel is labeled with a value of 0.
[0051] For each starting point on the blood vessel centerline, the first neighboring point in the blood vessel centerline image that is located in the neighborhood of the starting point and has a label value of 0 is added to the stack, an empty sublist is added to the two-dimensional branch list, and the label value of the starting point is set to 1;
[0052] For the first neighboring point located at the end of the stack, determine whether there is a second neighboring point with a label value of 0 in the neighborhood of the first neighboring point in the blood vessel centerline image;
[0053] If so, the first neighboring point is removed from the stack, the second neighboring point is added to the stack, the label value of the first neighboring point is set to 1, and the first neighboring point is added to the blank sublist of the two-dimensional branch list.
[0054] If not, then remove the first neighboring point from the stack;
[0055] When the number of points added to the sublist of the two-dimensional branch list reaches the branch length threshold, a new blank sublist is added to the two-dimensional branch list.
[0056] Return to the step of determining whether there is a second neighboring point with a label value of 0 in the neighborhood of the first neighboring point located at the end of the stack in the blood vessel centerline image, until the stack is empty, and obtain a target two-dimensional branch list containing multiple sublists;
[0057] Delete the blank sublists in the target two-dimensional branch list, and add the starting point to the head of each sublist in the target two-dimensional branch list to obtain the candidate path.
[0058] Thirdly, embodiments of this application also provide an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of the point cloud segmentation method for angiography images described above are performed.
[0059] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the point cloud segmentation method for angiography images as described above.
[0060] The point cloud segmentation method, apparatus, device, and medium for angiography images provided in this application first acquire an angiography image and input it into a pre-trained blood vessel segmentation model to obtain a binary segmented image of the blood vessel corresponding to the angiography image. Then, the centerline of the blood vessel image in the binary segmented image is extracted to determine the blood vessel centerline. Based on the position of each point cloud on the blood vessel centerline in the binary segmented image, a depth-first traversal algorithm is used to determine multiple candidate paths for the blood vessel centerline. Based on the direction vector of each candidate path and a preset reference direction vector, a list of candidate direction features is constructed. For each point cloud on the blood vessel centerline, based on the node type corresponding to the point cloud and the list of candidate direction features, the direction feature corresponding to the point cloud is determined, and the position coordinates of the point cloud and the direction feature corresponding to the point cloud are concatenated to obtain the point cloud feature. Finally, the point cloud feature is input into the pre-trained point cloud segmentation model to determine the point cloud segmentation result of the point cloud in the blood vessel centerline.
[0061] This application designs effective vascular point cloud orientation features for the unique structure of vascular images, and constructs vascular point cloud orientation features that cover prior information such as the topological structure of vascular images and the direction of tortuous blood vessels. This makes it easier for the network to learn the continuity and integrity of blood vessels, thereby improving the segmentation accuracy of point cloud segmentation networks for vascular images.
[0062] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0063] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0064] Figure 1 A flowchart illustrating a point cloud segmentation method for angiography images provided in this application embodiment;
[0065] Figure 2 One of the schematic diagrams of a point cloud segmentation device for angiography images provided in an embodiment of this application;
[0066] Figure 3 A second schematic diagram of a point cloud segmentation device for angiography images provided in an embodiment of this application;
[0067] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0068] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. Based on the embodiments of this application, every other embodiment obtained by those skilled in the art without inventive effort falls within the scope of protection of this application.
[0069] First, the applicable scenarios for this application will be introduced. This application can be applied to the field of medical image processing technology.
[0070] Cardiovascular and cerebrovascular diseases have become the leading cause of death in my country, seriously threatening human life and health. Invasive angiography can clearly show whether there is stenosis in the coronary arteries, as well as the location and degree of stenosis, and remains the gold standard for vascular diseases such as coronary heart disease and stroke. However, in the diagnosis and treatment of cardiovascular and cerebrovascular diseases, the tortuous and overlapping nature of complex blood vessels makes it difficult for doctors to clearly and intuitively perform interventions and formulate precise treatment plans during surgery. Therefore, a highly accurate vascular point cloud segmentation method has become particularly important.
[0071] Research has found that commonly used point cloud segmentation methods only use the point cloud coordinate features of binary segmentation as input, ignoring the point cloud features specific to blood vessel design, which reduces the segmentation accuracy of deep networks.
[0072] Based on this, embodiments of this application provide a point cloud segmentation method for angiography images to improve the segmentation accuracy of point cloud segmentation networks for vascular images.
[0073] Please see Figure 1 , Figure 1 This is a flowchart illustrating a point cloud segmentation method for angiography images provided in an embodiment of this application. Figure 1 As shown in the embodiments of this application, the point cloud segmentation method includes:
[0074] S101, acquire an angiography image and input the angiography image into a pre-trained blood vessel segmentation model to obtain a binary segmentation image of the blood vessel corresponding to the angiography image.
[0075] It should be noted that angiography images refer to the initial, unprocessed vascular images captured first, medical images carrying vascular tree structure images. According to the embodiments provided in this application, the vascular segmentation model can be a 2D segmentation model, such as 2D U-net, V-net, etc., and this application does not specifically limit its use. Binary vascular segmentation images refer to binary images that record vascular images.
[0076] Regarding step S101 above, in specific implementation, firstly, an angiography image is acquired, and then the angiography image is input into a pre-trained blood vessel segmentation model to obtain a binary segmented image of the blood vessel corresponding to the angiography image. During the training of the blood vessel segmentation model, a large amount of angiography data is binary-labeled for blood vessels. Based on the labeling results, a blood vessel segmentation model for blood vessel segmentation is trained. Through supervised learning of the blood vessel segmentation model, the loss is iterated continuously, gradually reducing the loss (such as cross-entropy loss, semantic segmentation loss DICE) until the model converges to obtain a trained blood vessel segmentation model. When testing the blood vessel segmentation model, an angiography image can be input, and the corresponding binary segmented image of the blood vessel can be output.
[0077] S102, extract the centerline of the blood vessel image in the binary segmentation image of the blood vessel, and determine the centerline of the blood vessel in the binary segmentation image of the blood vessel.
[0078] It should be noted that the vessel centerline refers to the line connecting the center of the vessel within the vessel region, and can be represented as a series of center point pixels. In a binary segmentation image of a vessel, the pixels on the vessel centerline have a gray value of 1, while other pixels have a gray value of 0.
[0079] Regarding step S102 above, in specific implementation, after obtaining the binary segmented image of the blood vessels, the centerline of the blood vessel image in the binary segmented image is extracted to determine the centerline of the blood vessels in the binary segmented image. Here, in specific implementation, a series of morphological operations (erosion, dilation, etc.) are performed on the binary segmented image of the blood vessels, and a smoothing algorithm (Gaussian filtering, median filtering, etc.) is used to smooth the image to obtain the result of the extracted centerline of the blood vessels.
[0080] S103, based on the position of each point cloud on the blood vessel centerline in the binary segmentation image of the blood vessel, a depth-first traversal algorithm is used to determine multiple candidate paths for the blood vessel centerline.
[0081] It should be noted that the main idea of the Depth First Search algorithm is to start from an unvisited vertex in the graph, follow a path to the end, then backtrack from the node at the end of the path to the previous node, and then start from another path to the end, recursively repeating this process until all nodes have been traversed.
[0082] Regarding step S103 above, in specific implementation, based on the position of each point cloud on the blood vessel centerline extracted in step S102 in the blood vessel binary segmentation image, a depth-first traversal algorithm is used to determine multiple candidate paths for the blood vessel centerline.
[0083] Specifically, regarding step S103 above, the step of determining multiple candidate paths for the blood vessel centerline based on the position of each point cloud on the blood vessel centerline using a depth-first traversal algorithm includes:
[0084] Step 1031: Invert the binary segmentation image of the blood vessel to obtain the centerline image of the blood vessel.
[0085] Regarding step 1031 above, in specific implementation, the binary segmentation image of the blood vessel is first inverted to obtain the image of the blood vessel centerline. Since the grayscale value of the pixels on the blood vessel centerline is 1 and the grayscale value of other pixels is 0 in the binary segmentation image of the blood vessel, after inverting the binary segmentation image of the blood vessel, the label value of the background pixels in the obtained image of the blood vessel centerline is 1, and the label value of each pixel on the blood vessel centerline is 0.
[0086] Step 1032: For each starting point on the blood vessel centerline, add the first neighboring point in the blood vessel centerline image that is located in the neighborhood of the starting point and has a label value of 0 to the stack, add an empty sublist to the two-dimensional branch list, and set the label value of the starting point to 1.
[0087] Regarding step 1032 above, in specific implementation, first maintain a stack `stack=[]` and a two-dimensional branch list `branch=[[]`. Since each node has 8 neighborhoods, namely the top left corner, top, top right corner, left side, right side, bottom left corner, bottom, and bottom right corner, therefore for each starting point on the blood vessel centerline ( The algorithm iterates through the 8-neighborhood of the starting point, checking if there exists a pixel on the vessel centerline (i.e., a pixel with a label value of 0) within the neighborhood of the starting point. It adds the first neighboring pixel in the vessel centerline image that is within the neighborhood of the starting point and has a label value of 0 to the stack. It also adds the current point (not the starting point) to a sublist of the 2D branch list. Since the current point is the starting point of the vessel centerline, an empty sublist is added to the 2D branch list. Finally, before the next loop, the current point is masked, meaning its label value is set to 1. As an example, consider maintaining a stack `stack=[]` and a two-dimensional branch list `branch=[[]]`. Assume the starting point's coordinates are a[125,243]. Determine if there are two first neighboring points with a label value of 0 within the eight neighborhoods of point a in the vascular centerline image. If two such first neighboring points exist, b[126,243] and c[125,244], add them sequentially to the stack, resulting in `stack=[b, c]`. Then, add the current point (not the starting point) to the two-dimensional branch list. Since the current point is the starting point, add an empty sublist to the two-dimensional branch list, resulting in `branch=[[]]`. Finally, set the label value corresponding to the starting point a to 1.
[0088] Step 1033: For the first neighboring point located at the end of the stack, determine whether there is a second neighboring point with a label value of 0 in the neighborhood of the first neighboring point in the blood vessel centerline image.
[0089] Step 1034: If yes, then remove the first neighboring point from the stack, add the second neighboring point to the stack, set the label value of the first neighboring point to 1, and add the first neighboring point to the blank sublist of the two-dimensional branch list.
[0090] Step 1035: If not, remove the first neighboring point from the stack.
[0091] According to the Last-In-First-Out (LIFO) principle of a stack, the first neighboring point at the end of the stack will be popped first. Regarding steps 1033-1035 above, in specific implementation, for the first neighboring point at the end of the stack, it is determined whether there is a second neighboring point with a label value of 0 in the neighborhood of this first neighboring point in the vascular centerline image. If there is a second neighboring point with a label value of 0, then step 1034 above is executed, in which case the first neighboring point is removed from the stack, the second neighboring point is added to the stack, the label value of the first neighboring point is set to 1, and the first neighboring point is added to the empty sublist of the two-dimensional branch list. If there is no second neighboring point with a label value of 0, then step 1035 above is executed, in which case the first neighboring point is removed from the stack. As an example, continuing the embodiment in step 1032 above, after obtaining the stack stack=[b, c] and the two-dimensional branch list branch=[[]], according to the LIFO principle, point c is popped first, and it is determined whether there is a point with a label value of 0 in the 8 neighborhoods of point c in the vascular centerline image. If a point d[125,245] exists, then point c is removed from the stack, and point d is added to the stack, resulting in stack=[b,d]. The current point, i.e., point c, is added to the two-dimensional branch list, resulting in branch=[[c]], and the label value corresponding to point c is set to 1.
[0092] Step 1036: When the number of points added to the sublist of the two-dimensional branch list reaches the branch length threshold, a new blank sublist is added to the two-dimensional branch list.
[0093] Regarding step 1036 above, in specific implementation, when the number of sublists in the two-dimensional branch list reaches the list length threshold, a new blank sublist needs to be added to the two-dimensional branch list. Specifically, a sublist length threshold is preset to m, and the branch length threshold is m-1. If the number of points added to the sublist reaches the branch length threshold m-1, a new blank list is added. As an example, continuing the embodiment in the above steps, a sublist length threshold m=2 is preset, and the branch length threshold is 2-1=1. When the two-dimensional branch list branch=[[c]], and the number of sublist branch points in the two-dimensional branch list branch reaches the preset branch length threshold 1, a new blank sublist is added, resulting in branch=[[c], []].
[0094] Step 1037: Return to the step of determining whether there is a second neighboring point with a label value of 0 in the neighborhood of the first neighboring point located at the end of the stack in the blood vessel centerline image, until the stack is empty, and obtain a target two-dimensional branch list containing multiple sublists.
[0095] Regarding step 1037 above, in specific implementation, after steps 1034 and 1035 above, the points stored in the stack will change. The process returns to step 1033 above, where for the last neighboring point in the stack, it is determined whether there is a second neighboring point with a label value of 0 in the neighborhood of that first neighboring point in the vascular centerline image. This process is repeated until the stack is empty, resulting in a target two-dimensional branch list containing multiple sublists. As an example, continuing the embodiment in the above steps, stack=[b,d], branch=[[c], []]. For the last neighboring point in the stack, i.e., point d, if there is no second neighboring point with a label value of 0 in the 8 neighborhoods of point d in the vascular centerline image, then point d is removed from the stack, resulting in stack=[b], branch=[[c], []]. Then point b is popped from the stack, and it is determined whether there is a point with a label value of 0 in the 8 neighborhoods of point b in the vascular centerline image. If a point e[127,243] exists, add point e to the stack, remove point b from the stack, resulting in stack=[e], and add the current point b to the empty sublist of the two-dimensional branch list, resulting in branch=[[c],[b]], and set the label value of point b to 1. Continue popping point e from the stack. If there is no second neighboring point with a label value of 0 within the 8 neighbors of point e in the vascular centerline image, then remove point e from the stack, at which point the stack is empty. At this time, the number of points added to the sublist reaches the preset branch length threshold 1 (2-1=1), so add a new empty sublist, resulting in the target two-dimensional branch list containing multiple sublists, i.e., branch=[[c],[b],[]].
[0096] Step 1038: Delete the blank sublists in the target two-dimensional branch list, and add the starting point to the head of each sublist in the target two-dimensional branch list to obtain the candidate path.
[0097] Regarding step 1038 above, in specific implementation, after obtaining the target two-dimensional branch list, the blank sub-lists in the target two-dimensional branch list are deleted, and the starting point is added to the head of each sub-list in the target two-dimensional branch list to obtain the candidate path. As an example, continuing the embodiment in the above steps, the target two-dimensional branch list branch=[[c], [b], []] is obtained. The last blank sub-list is deleted, and the starting point a is added to the head of each sub-list, thus obtaining branch=[[a,c], [a,b]]. The candidate path is determined to be branch=[[a,c], [a,b]].
[0098] S104, Based on the direction vector of each candidate path and the preset reference direction vector, construct a candidate direction feature list.
[0099] It should be noted that the preset reference direction vector refers to a pre-defined direction vector. For example, the preset reference direction vector can be set as follows: This application does not impose specific limitations on this.
[0100] Regarding step S104 above, in specific implementation, a list of candidate direction features is constructed based on the direction vector of each candidate path among the multiple candidate paths determined in step S103 and the preset reference direction vector.
[0101] Specifically, regarding step S104 above, the step of constructing a candidate direction feature list based on the direction vector of each candidate path and a preset reference direction vector among the plurality of candidate paths includes:
[0102] Step 1041: For each candidate path, determine the direction vector of the candidate path based on the position coordinates of the last point cloud in the candidate path and the position coordinates of the first point cloud in the candidate path.
[0103] Regarding step 1041 above, in specific implementation, for each candidate path, the direction vector of the candidate path is determined based on the position coordinates of the last point cloud and the position coordinates of the first point cloud in the candidate path. Specifically, the direction vector of the candidate path is obtained by subtracting the position coordinates of the first point cloud from the position coordinates of the last point cloud in the candidate path. As an example, suppose the multiple candidate paths obtained in step S103 are branch=[[a,c,e],[a,b,f],[a,d,g]], for each candidate path, the direction vector is obtained by subtracting the position coordinates of the first point cloud from the position coordinates of the last point cloud. , , ].
[0104] Step 1042: Determine the angle value corresponding to the angle between the direction vector of the candidate path and the preset reference direction vector.
[0105] Step 1043: Arrange each angle value in a preset order to obtain the list of candidate direction features.
[0106] Regarding steps 1042-1043 above, in specific implementation, for each candidate path, the angle value corresponding to the angle between the direction vector of the candidate path and the preset reference direction vector is determined. After obtaining the angle value corresponding to the angle between the direction vector of each candidate path and the preset reference direction vector, each angle value is arranged in a preset order to obtain a list of candidate direction features. The preset order can be sorted in ascending order, and this application does not specifically limit this. Specifically, the angle value α corresponding to the angle between the direction vector of each candidate path and the preset reference direction vector is calculated using the following formula:
[0107]
[0108] Where e represents the position coordinates of the endpoint point cloud in the candidate path, and a represents the position coordinates of the starting point cloud in the candidate path. This represents the x-coordinate of the terminating point cloud e. Let α represent the x-coordinate of the starting point cloud 'a', with the included angle ranging from 0° to 360°.
[0109] S105, for each point cloud on the center line of the blood vessel, based on the node type corresponding to the point cloud and the list of candidate directional features, determine the directional features corresponding to the point cloud, and concatenate the position coordinates of the point cloud and the directional features corresponding to the point cloud to obtain the point cloud features of the point cloud.
[0110] Here, node types include endpoints, intermediate points, and forks.
[0111] Regarding step S105 above, in specific implementation, for each point cloud along the blood vessel centerline, based on the node type corresponding to that point cloud and the list of candidate directional features, the directional feature corresponding to that point cloud is determined. d i1 , d i2 , d i3 And set the position coordinates of the point cloud []. x i , y i The point cloud features are then concatenated with the corresponding directional features to obtain the point cloud features. x i , y i , d i1 , d i2 , d i3 ].
[0112] Specifically, regarding step S105 above, determining the directional features corresponding to the point cloud based on the node type corresponding to the point cloud and the list of candidate directional features includes:
[0113] Step 1051: Determine the node type corresponding to the point cloud based on the number of other point clouds adjacent to the point cloud.
[0114] Regarding step 1051 above, in specific implementation, the number of other point clouds adjacent to the current point cloud is determined in the binary segmentation image of the blood vessel, and the node type corresponding to the current point cloud is determined based on the number of other point clouds adjacent to the current point cloud. Specifically, if there is only one other point cloud adjacent to the current point cloud, the node type corresponding to the current point cloud is determined as an endpoint. If there are two other point clouds adjacent to the current point cloud, the node type corresponding to the current point cloud is determined as an intermediate point. If there are more than two other point clouds adjacent to the current point cloud, the node type corresponding to the current point cloud is determined as a bifurcation point. Here, because a bifurcation point may correspond to more than one branch blood vessel, and each branch blood vessel corresponds to one adjacent point cloud, if there are more than two other point clouds adjacent to the current point cloud, the node type corresponding to the current point cloud is determined as a bifurcation point.
[0115] Step 1052: Based on the node type corresponding to the point cloud, construct the initial directional features corresponding to the point cloud based on the preset data dimensions.
[0116] Here, the preset data dimension can be set to 1*3, and this application does not make specific restrictions on this.
[0117] Regarding step 1052 above, in specific implementation, based on the node type corresponding to the point cloud, an initial orientation feature corresponding to the point cloud is constructed based on a preset data dimension. Here, as an example, since the data dimension of the input network needs to be consistent, a 1*3 orientation feature is maintained here. If it is smaller than this size, it is padded with zeros. Specifically, the initial orientation feature of the endpoints should be [ The initial direction feature of the intermediate point should be [0, 0]. The initial directional characteristics of the bifurcation point should be: .
[0118] Step 1053: Determine at least one angle value corresponding to the point cloud from the list of candidate direction features.
[0119] Step 1054: Add at least one angle value to the initial orientation feature to obtain the orientation feature corresponding to the point cloud.
[0120] Regarding steps 1053-1054 above, in specific implementation, at least one angle value corresponding to the point cloud is determined from the list of candidate direction features, and at least one angle value is added to the initial direction features to obtain the direction features corresponding to the point cloud.
[0121] As an optional implementation, when the node type of the point cloud is a bifurcation point, after determining the directional features corresponding to the point cloud, the point cloud segmentation method further includes:
[0122] (1) Identify the adjacent point cloud that is adjacent to the point cloud and whose node type is the middle point from the binary segmentation image of the blood vessel.
[0123] (2) Determine whether there are multiple angle values in the directional features corresponding to the adjacent point clouds.
[0124] Here, there is a special case where directional features need to be pruned, namely, the intermediate point near the bifurcation point has three directional vectors. For steps (1)-(2) above, in specific implementation, firstly, the adjacent point clouds adjacent to the current point cloud are determined from the binary segmentation image of the blood vessel, and it is determined whether the node type of the adjacent point cloud is an intermediate point. If so, the directional features corresponding to the adjacent point cloud determined by the above method are obtained. Since the node type of the adjacent point cloud is an intermediate point, when the directional features corresponding to the adjacent point cloud are... At this time, the directional feature contains two angle values, which is a reasonable situation. When the directional feature corresponding to the adjacent point cloud is If there are three angle values in this directional feature, pruning is required. In this case, continue with step (3) below. Here, the preset number should be 3.
[0125] (3) If so, the multiple angle values are arranged and combined to obtain multiple angle combinations.
[0126] (4) For each angle combination, subtract the two angle values in the angle combination and take the absolute value to obtain the angle difference corresponding to the angle combination.
[0127] (5) Select the target angle difference that meets the preset selection rules from multiple angle differences, and add the angle value in the angle combination corresponding to the target angle difference to the initial direction feature corresponding to the adjacent point cloud to obtain the direction feature corresponding to the adjacent point cloud.
[0128] Regarding steps (3) to (5) above, in specific implementation, if the directional features corresponding to the adjacent point cloud contain a preset number of angle values, then the multiple angle values are arranged and combined to obtain multiple angle combinations. Here, the angle combination contains two angle values. Continuing with the above embodiment, when the directional features corresponding to the adjacent point cloud are... At that time, multiple angle values in this directional feature are arranged and combined to obtain three angle combinations, which are respectively , , Then, for each angle combination, the two angle values in the combination are subtracted and their absolute values are taken to obtain the angle difference corresponding to that angle combination. Continuing with the above embodiment, the multiple angle differences obtained are respectively... Here, the vectors at both ends of a relatively reasonable midpoint, being a blood vessel, should form an angle close to 180 degrees. The aforementioned preset selection rule is to choose the angle difference closest to 180 degrees as the target angle difference. Therefore, the target angle difference closest to 180 degrees is selected from multiple angle differences, and the two angle values in the angle combination corresponding to the target angle difference are added to the initial orientation features of the adjacent point cloud to obtain the orientation features of that adjacent point cloud. For example, suppose... If the angle is closest to 180 degrees, then combine the angles. The two angle values and Added to the initial orientation features corresponding to the adjacent point cloud, the orientation features corresponding to the adjacent point cloud are thus formed as [ , , 0].
[0129] S106, input the point cloud features of the point cloud into the pre-trained point cloud segmentation model to determine the point cloud segmentation result of the point cloud in the center line of the blood vessel.
[0130] Regarding step S106 above, in specific implementation, the point cloud features determined in step S105 are input into a pre-trained point cloud segmentation model to determine the point cloud segmentation result of the point cloud in the blood vessel centerline. Here, according to the embodiment provided in this application, the point cloud segmentation model adopts the common PointNet / Point Transformer (PT). Taking Point Transformer as an example, this model consists of several downsampling (Transition down) and upsampling (Transition up) modules, with a self-attention module (Transformer Block) added to each layer. This is a common model and will not be described in detail.
[0131] As an optional implementation, after determining the point cloud features of each point cloud, in order to make it easier for the point cloud segmentation model to learn the orientation features, the orientation features in the point cloud features of each point cloud can also be used. d i1 , d i2 , di3 The angles are categorized. Please refer to Table 1 below, which provides an example of angle categorization. The angle ranges for each level are shown in Table 1 below:
[0132] Table 1: Examples of Angle Grading
[0133]
[0134] After grading the angles, the directional features can be sorted from smallest to largest. If a directional feature contains a 0, it is not sorted and is always placed at the end of the sort. For example, suppose the obtained directional features are [234, 123, 45]. According to Table 1 above, 234° corresponds to level 6, 123° corresponds to level 3, and 45° corresponds to level 1. Therefore, the feature level obtained after grading is [6, 3, 1]. Sort them in ascending order to get [1, 3, 6]. Suppose the obtained directional features are [130, 23, 0]. According to Table 1 above, 130° corresponds to level 3, and 23° corresponds to level 1. Therefore, the feature level obtained after grading is [3, 1, 0]. Sort them in ascending order, with 0 not participating in the sort and always placed at the end, resulting in [1, 3, 0].
[0135] Here, this method of constructing directional features can also enable the point cloud segmentation model to learn the type of each point cloud by the number of trailing zeros in the directional features of each point cloud. For example, if the number of zeros in the directional features of a point cloud is 1, then the type of the point cloud is a midpoint; if the number of zeros in the directional features is 2, then the type of the point cloud is an endpoint; and if the number of zeros in the directional features is 0, then the type of the point cloud is a bifurcation point.
[0136] Specifically, the point cloud segmentation model is trained through the following steps:
[0137] A: Obtain the sample label for each sample point cloud in the binary segmentation image of the blood vessel sample.
[0138] Here, the binary segmentation image of the sample blood vessel includes the centerline of the sample blood vessel, and the centerline of the sample blood vessel includes multiple sample point clouds. Regarding step A above, in specific implementation, the sample label of each sample point cloud in the binary segmentation image of the sample blood vessel is obtained. l i .
[0139] B: For each sample point cloud, the point cloud features of the sample point cloud are concatenated with the sample label of the sample point cloud to obtain the sample features of the sample point cloud.
[0140] Regarding step B above, in specific implementation, for each sample point cloud, the point cloud features of that sample point cloud are […]. xi , y i , d i1 , d i2 , d i3 [Sample label of the sample point cloud] By stitching the images together, the sample features of the point cloud are obtained. x i , y i , d i1 , d i2 , d i3 , l i Here, the method for obtaining the point cloud features of the sample point cloud is the same as the method for obtaining the point cloud features of the point cloud provided above, and can achieve the same technical effect, so it will not be repeated here.
[0141] C: For each sample point cloud, input the sample features of the sample point cloud into the original point cloud segmentation model to obtain the predicted point cloud segmentation result of the sample point cloud.
[0142] Regarding step C above, in practice, for each sample point cloud, the sample features of that sample point cloud are input into the original point cloud segmentation model to obtain the predicted point cloud segmentation result for that sample point cloud. .
[0143] D: Compare the predicted point cloud segmentation result of the sample point cloud with the sample label of the sample point cloud, and calculate the loss function of the original point cloud segmentation model in the current state.
[0144] E: Based on the loss function of the original point cloud segmentation model, continuously adjust the model parameters of the original point cloud segmentation model until the original point cloud segmentation model reaches a convergent state, thus obtaining the point cloud segmentation model.
[0145] It should be noted that a loss function is a function that maps the values of a random event or its related random variables to non-negative real numbers to represent the "risk" or "loss" of that random event. In applications, the loss function is often used as a learning criterion in relation to optimization problems; that is, the model is solved and evaluated by minimizing the loss function.
[0146] Regarding steps D-E above, in practical implementation, for each sample point cloud, the predicted point cloud segmentation result is compared with the sample label of that sample point cloud. The accuracy of the original point cloud segmentation model's prediction is determined by comparing the predicted segmentation result with the sample label. If the predicted segmentation result and the sample label are different, the original point cloud segmentation model is considered inaccurate. At this point, the loss function of the original point cloud segmentation model under the current state needs to be calculated. The method for calculating the loss function is explained in detail in existing technologies and will not be elaborated further here. Then, the model parameters of the original point cloud segmentation model are continuously adjusted. The original point cloud segmentation model continuously minimizes the loss through iteration. At each iteration step, the loss value of the original point cloud segmentation model is calculated. When the loss value of the original point cloud segmentation model cannot reach the loss threshold, the model parameters of the whitelist original detection model are continuously updated. The new parameters will calculate a new loss value, thus causing the loss value to show a fluctuating downward trend during the iteration process. Finally, when the loss value reaches a smooth state, that is, when the loss value of the trained original point cloud segmentation model is not greater than the loss threshold, that is, when the loss value does not decrease significantly compared with the loss value calculated in the previous time, the original point cloud segmentation model is considered to have reached a convergence state. At this time, the original point cloud segmentation model is relatively accurate, and the training ends, and the point cloud segmentation model is obtained.
[0147] The point cloud segmentation method for angiography images provided in this application firstly acquires an angiography image and inputs it into a pre-trained blood vessel segmentation model to obtain a binary segmented image of the blood vessel corresponding to the angiography image. Then, the centerline of the blood vessel image in the binary segmented image is extracted to determine the blood vessel centerline. Based on the position of each point cloud on the blood vessel centerline in the binary segmented image, a depth-first traversal algorithm is used to determine multiple candidate paths for the blood vessel centerline. Based on the direction vector of each candidate path and a preset reference direction vector, a list of candidate direction features is constructed. For each point cloud on the blood vessel centerline, based on the node type corresponding to the point cloud and the list of candidate direction features, the direction feature corresponding to the point cloud is determined, and the position coordinates of the point cloud and the direction feature corresponding to the point cloud are concatenated to obtain the point cloud feature. Finally, the point cloud feature is input into the pre-trained point cloud segmentation model to determine the point cloud segmentation result of the point cloud in the blood vessel centerline.
[0148] This application designs effective vascular point cloud orientation features for the unique structure of vascular images, and constructs vascular point cloud orientation features that cover prior information such as the topological structure of vascular images and the direction of tortuous blood vessels. This makes it easier for the network to learn the continuity and integrity of blood vessels, thereby improving the segmentation accuracy of point cloud segmentation networks for vascular images.
[0149] Please see Figure 2 , Figure 3 , Figure 2 This is one of the structural schematic diagrams of a point cloud segmentation device for angiography images provided in an embodiment of this application. Figure 3 This is a second schematic diagram of a point cloud segmentation device for angiography images provided in an embodiment of this application. Figure 2 As shown, the point cloud segmentation device 200 includes:
[0150] Image acquisition module 201 is used to acquire angiography images and input the angiography images into a pre-trained blood vessel segmentation model to obtain a binary segmentation image of the blood vessels corresponding to the angiography images;
[0151] The vessel centerline determination module 202 is used to extract the centerline of the vessel image in the binary segmentation image of the vessel and determine the vessel centerline in the binary segmentation image of the vessel.
[0152] The candidate path determination module 203 is used to determine multiple candidate paths of the blood vessel centerline based on the position of each point cloud on the blood vessel centerline in the binary segmentation image of the blood vessel and using a depth-first traversal algorithm.
[0153] The direction feature list construction module 204 is used to construct a list of candidate direction features based on the direction vector of each candidate path in the plurality of candidate paths and a preset reference direction vector;
[0154] The point cloud feature determination module 205 is used to determine the directional features corresponding to each point cloud on the blood vessel centerline based on the node type corresponding to the point cloud and the list of candidate directional features, and to concatenate the position coordinates of the point cloud and the directional features corresponding to the point cloud to obtain the point cloud features of the point cloud.
[0155] The point cloud segmentation module 206 is used to input the point cloud features of the point cloud into a pre-trained point cloud segmentation model to determine the point cloud segmentation result of the point cloud in the center line of the blood vessel.
[0156] Furthermore, when the candidate path determination module 203 determines multiple candidate paths for the blood vessel centerline based on the position of each point cloud on the blood vessel centerline in the binary segmentation image of the blood vessel, using a depth-first traversal algorithm, the candidate path determination module 203 is also used for:
[0157] The binary segmentation image of the blood vessel is inverted to obtain the centerline image of the blood vessel; wherein, the background pixels in the centerline image of the blood vessel are labeled with a value of 1, and each pixel on the centerline of the blood vessel is labeled with a value of 0.
[0158] For each starting point on the blood vessel centerline, the first neighboring point in the blood vessel centerline image that is located in the neighborhood of the starting point and has a label value of 0 is added to the stack, an empty sublist is added to the two-dimensional branch list, and the label value of the starting point is set to 1;
[0159] For the first neighboring point located at the end of the stack, determine whether there is a second neighboring point with a label value of 0 in the neighborhood of the first neighboring point in the blood vessel centerline image;
[0160] If so, the first neighboring point is removed from the stack, the second neighboring point is added to the stack, the label value of the first neighboring point is set to 1, and the first neighboring point is added to the blank sublist of the two-dimensional branch list.
[0161] If not, then remove the first neighboring point from the stack;
[0162] When the number of points added to the sublist of the two-dimensional branch list reaches the branch length threshold, a new blank sublist is added to the two-dimensional branch list.
[0163] Return to the step of determining whether there is a second neighboring point with a label value of 0 in the neighborhood of the first neighboring point located at the end of the stack in the blood vessel centerline image, until the stack is empty, and obtain a target two-dimensional branch list containing multiple sublists;
[0164] Delete the blank sublists in the target two-dimensional branch list, and add the starting point to the head of each sublist in the target two-dimensional branch list to obtain the candidate path.
[0165] Furthermore, when constructing a candidate direction feature list based on the direction vector of each candidate path and a preset reference direction vector, the direction feature list construction module 204 is also used to:
[0166] For each candidate path, the direction vector of the candidate path is determined based on the position coordinates of the last point cloud in the candidate path and the position coordinates of the first point cloud in the candidate path.
[0167] Determine the angle value corresponding to the angle between the direction vector of the candidate path and the preset reference direction vector;
[0168] Each angle value is arranged in a preset order to obtain the list of candidate direction features.
[0169] Furthermore, when the point cloud feature determination module 205 determines the directional features corresponding to the point cloud based on the node type corresponding to the point cloud and the list of candidate directional features, the point cloud feature determination module 205 is also used to:
[0170] Based on the number of other point clouds adjacent to the point cloud, the node type corresponding to the point cloud is determined; wherein, the node type includes endpoints, intermediate points, and branching points;
[0171] Based on the node type corresponding to the point cloud, construct the initial directional features corresponding to the point cloud based on the preset data dimensions;
[0172] In the list of candidate direction features, at least one angle value corresponding to the point cloud is determined;
[0173] At least one angle value is added to the initial orientation feature to obtain the orientation feature corresponding to the point cloud.
[0174] Furthermore, when the node type of the point cloud is a branch point, after determining the directional features corresponding to the point cloud, the point cloud feature determination module 205 is also used for:
[0175] From the binary segmentation image of the blood vessel, identify the adjacent point cloud that is adjacent to the point cloud and whose node type is the middle point;
[0176] Determine whether there are multiple angle values of a preset number in the directional features corresponding to the adjacent point clouds;
[0177] If so, the multiple angle values are arranged and combined to obtain multiple angle combinations;
[0178] For each angle combination, subtract the two angle values in the combination and take the absolute value to obtain the angle difference corresponding to the angle combination;
[0179] Select the target angle difference that meets the preset selection rules from multiple angle differences, and add the angle value in the angle combination corresponding to the target angle difference to the initial direction feature corresponding to the adjacent point cloud to obtain the direction feature corresponding to the adjacent point cloud.
[0180] Furthermore, such as Figure 3 As shown, the point cloud segmentation device 200 further includes a model training module 207, which is used to train the point cloud segmentation model through the following steps:
[0181] Obtain the sample label for each point cloud in the binary segmentation image of the blood vessel sample;
[0182] For each sample point cloud, the point cloud features of the sample point cloud are concatenated with the sample label of the sample point cloud to obtain the sample features of the sample point cloud.
[0183] For each sample point cloud, the sample features of the sample point cloud are input into the original point cloud segmentation model to obtain the predicted point cloud segmentation result of the sample point cloud.
[0184] The predicted point cloud segmentation result of the sample point cloud is compared with the sample label of the sample point cloud, and the loss function of the original point cloud segmentation model in the current state is calculated.
[0185] Based on the loss function of the original point cloud segmentation model, the model parameters of the original point cloud segmentation model are continuously adjusted until the original point cloud segmentation model reaches a convergent state, thus obtaining the point cloud segmentation model.
[0186] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 4 As shown, the electronic device 400 includes a processor 410, a memory 420, and a bus 430.
[0187] The memory 420 stores machine-readable instructions executable by the processor 410. When the electronic device 400 is running, the processor 410 communicates with the memory 420 via the bus 430. When the machine-readable instructions are executed by the processor 410, they can perform the operations described above. Figure 1 The steps of the point cloud segmentation method for angiography images in the method embodiment shown are described in detail in the method embodiment, and will not be repeated here.
[0188] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can perform the above-described actions. Figure 1 The steps of the point cloud segmentation method for angiography images in the method embodiment shown are described in detail in the method embodiment, and will not be repeated here.
[0189] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0190] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0191] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0192] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0193] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0194] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0195] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The scope of protection of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A point cloud segmentation method for angiography images, characterized in that, The point cloud segmentation method includes: Acquire angiography images and input the angiography images into a pre-trained blood vessel segmentation model to obtain a binary segmentation image of the blood vessel corresponding to the angiography images; The centerline of the blood vessel is extracted from the binary segmented image of the blood vessel, and the centerline of the blood vessel is determined in the binary segmented image of the blood vessel. Based on the position of each point cloud on the blood vessel centerline in the binary segmentation image of the blood vessel, a depth-first traversal algorithm is used to determine multiple candidate paths for the blood vessel centerline. Based on the direction vector of each candidate path and the preset reference direction vector, a candidate direction feature list is constructed. For each point cloud on the blood vessel centerline, based on the node type corresponding to the point cloud and the list of candidate directional features, the directional features corresponding to the point cloud are determined, and the position coordinates of the point cloud and the directional features corresponding to the point cloud are spliced together to obtain the point cloud features of the point cloud. The point cloud features are input into a pre-trained point cloud segmentation model to determine the point cloud segmentation result of the point cloud in the center line of the blood vessel.
2. The point cloud segmentation method according to claim 1, characterized in that, Based on the position of each point cloud on the vessel centerline in the binary segmentation image of the vessel, a depth-first traversal algorithm is used to determine multiple candidate paths for the vessel centerline, including: The binary segmentation image of the blood vessel is inverted to obtain the centerline image of the blood vessel; wherein, the background pixels in the centerline image of the blood vessel are labeled with a value of 1, and each pixel on the centerline of the blood vessel is labeled with a value of 0. For each starting point on the blood vessel centerline, the first neighboring point in the blood vessel centerline image that is located in the neighborhood of the starting point and has a label value of 0 is added to the stack, an empty sublist is added to the two-dimensional branch list, and the label value of the starting point is set to 1; For the first neighboring point located at the end of the stack, determine whether there is a second neighboring point with a label value of 0 in the neighborhood of the first neighboring point in the blood vessel centerline image; If so, the first neighboring point is removed from the stack, the second neighboring point is added to the stack, the label value of the first neighboring point is set to 1, and the first neighboring point is added to the blank sublist of the two-dimensional branch list. If not, then remove the first neighboring point from the stack; When the number of points added to the sublist of the two-dimensional branch list reaches the branch length threshold, a new blank sublist is added to the two-dimensional branch list. Return to the step of determining whether there is a second neighboring point with a label value of 0 in the neighborhood of the first neighboring point located at the end of the stack in the blood vessel centerline image, until the stack is empty, and obtain a target two-dimensional branch list containing multiple sublists; Delete the blank sublists in the target two-dimensional branch list, and add the starting point to the head of each sublist in the target two-dimensional branch list to obtain the candidate path.
3. The point cloud segmentation method according to claim 1, characterized in that, The step of constructing a candidate direction feature list based on the direction vector of each candidate path and a preset reference direction vector includes: For each candidate path, the direction vector of the candidate path is determined based on the position coordinates of the last point cloud in the candidate path and the position coordinates of the first point cloud in the candidate path. Determine the angle value corresponding to the angle between the direction vector of the candidate path and the preset reference direction vector; Each angle value is arranged in a preset order to obtain the list of candidate direction features.
4. The point cloud segmentation method according to claim 3, characterized in that, The step of determining the directional features corresponding to the point cloud based on the node type corresponding to the point cloud and the list of candidate directional features includes: Based on the number of other point clouds adjacent to the point cloud, the node type corresponding to the point cloud is determined; wherein, the node type includes endpoints, intermediate points, and branching points; Based on the node type corresponding to the point cloud, construct the initial directional features corresponding to the point cloud based on the preset data dimensions; In the list of candidate direction features, at least one angle value corresponding to the point cloud is determined; At least one angle value is added to the initial orientation feature to obtain the orientation feature corresponding to the point cloud.
5. The point cloud segmentation method according to claim 4, characterized in that, When the node type of the point cloud is a branch point, after determining the directional features corresponding to the point cloud, the point cloud segmentation method further includes: From the binary segmentation image of the blood vessel, identify the adjacent point cloud that is adjacent to the point cloud and whose node type is the middle point; Determine whether there are multiple angle values of a preset number in the directional features corresponding to the adjacent point clouds; If so, the multiple angle values are arranged and combined to obtain multiple angle combinations; For each angle combination, subtract the two angle values in the combination and take the absolute value to obtain the angle difference corresponding to the angle combination; Select the target angle difference that meets the preset selection rules from multiple angle differences, and add the angle value in the angle combination corresponding to the target angle difference to the initial direction feature corresponding to the adjacent point cloud to obtain the direction feature corresponding to the adjacent point cloud.
6. The point cloud segmentation method according to claim 1, characterized in that, The point cloud segmentation model is trained using the following steps: Obtain the sample label for each point cloud in the binary segmentation image of the blood vessel sample; For each sample point cloud, the point cloud features of the sample point cloud are concatenated with the sample label of the sample point cloud to obtain the sample features of the sample point cloud. For each sample point cloud, the sample features of the sample point cloud are input into the original point cloud segmentation model to obtain the predicted point cloud segmentation result of the sample point cloud. The predicted point cloud segmentation result of the sample point cloud is compared with the sample label of the sample point cloud, and the loss function of the original point cloud segmentation model in the current state is calculated. Based on the loss function of the original point cloud segmentation model, the model parameters of the original point cloud segmentation model are continuously adjusted until the original point cloud segmentation model reaches a convergent state, thus obtaining the point cloud segmentation model.
7. A point cloud segmentation device for angiography images, characterized in that, The point cloud segmentation device includes: The image acquisition module is used to acquire angiography images and input the angiography images into a pre-trained blood vessel segmentation model to obtain a binary segmentation image of the blood vessels corresponding to the angiography images. The blood vessel centerline determination module is used to extract the centerline of the blood vessel image in the binary segmentation image of the blood vessels and determine the blood vessel centerline in the binary segmentation image of the blood vessels. The candidate path determination module is used to determine multiple candidate paths for the blood vessel centerline based on the position of each point cloud on the blood vessel centerline in the binary segmentation image of the blood vessel, using a depth-first traversal algorithm. The direction feature list construction module is used to construct a list of candidate direction features based on the direction vector of each candidate path and a preset reference direction vector among the multiple candidate paths; The point cloud feature determination module is used to determine the directional features corresponding to each point cloud on the blood vessel centerline based on the node type corresponding to the point cloud and the list of candidate directional features, and to concatenate the position coordinates of the point cloud and the directional features corresponding to the point cloud to obtain the point cloud features of the point cloud. The point cloud segmentation module is used to input the point cloud features of the point cloud into a pre-trained point cloud segmentation model to determine the point cloud segmentation result of the point cloud in the center line of the blood vessel.
8. The point cloud segmentation device according to claim 7, characterized in that, When the candidate path determination module determines multiple candidate paths for the blood vessel centerline using a depth-first traversal algorithm based on the position of each point cloud on the blood vessel centerline in the binary segmentation image of the blood vessel, the candidate path determination module is further configured to: The binary segmentation image of the blood vessel is inverted to obtain the centerline image of the blood vessel; wherein, the background pixels in the centerline image of the blood vessel are labeled with a value of 1, and each pixel on the centerline of the blood vessel is labeled with a value of 0. For each starting point on the blood vessel centerline, the first neighboring point in the blood vessel centerline image that is located in the neighborhood of the starting point and has a label value of 0 is added to the stack, an empty sublist is added to the two-dimensional branch list, and the label value of the starting point is set to 1; For the first neighboring point located at the end of the stack, determine whether there is a second neighboring point with a label value of 0 in the neighborhood of the first neighboring point in the blood vessel centerline image; If so, the first neighboring point is removed from the stack, the second neighboring point is added to the stack, the label value of the first neighboring point is set to 1, and the first neighboring point is added to the blank sublist of the two-dimensional branch list. If not, then remove the first neighboring point from the stack; When the number of points added to the sublist of the two-dimensional branch list reaches the branch length threshold, a new blank sublist is added to the two-dimensional branch list. Return to the step of determining whether there is a second neighboring point with a label value of 0 in the neighborhood of the first neighboring point located at the end of the stack in the blood vessel centerline image, until the stack is empty, and obtain a target two-dimensional branch list containing multiple sublists; Delete the blank sublists in the target two-dimensional branch list, and add the starting point to the head of each sublist in the target two-dimensional branch list to obtain the candidate path.
9. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. The machine-readable instructions are executed by the processor to perform the steps of the point cloud segmentation method for angiography images as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the point cloud segmentation method for angiography images as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Segmentation method of silhouette angiography based on neural network
CN114140453A
Eye ground photo retinal vessel diameter calculation method based on region segmentation
CN115760873A