Method and system for segmenting cerebral angiography image based on topological structure
By eroding and dilating cerebral blood vessel images to generate pseudo labels, and using the image topology repair network to repair topological structure errors, the problem of incomplete boundary representation in cerebral angiography image segmentation is solved, and the accuracy of segmentation results and model robustness are improved. Great sex.
Patent Information
- Application Number
- CN202410754981.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-10-08
AI Technical Summary
Incomplete boundary representation in cerebral angiography image segmentation leads to topological errors and affects diagnosis and treatment.
Pseudo labels are generated by erosion and expansion processing of cerebral blood vessel images, guiding the network to predict false negatives and false positives, and combined with the image topology repair network to repair topological structure errors to ensure the accuracy of segmentation results.
It improves the correct representation of cerebral blood vessel edges and topological structures, enhances the robustness of the model, and achieves efficient and accurate cerebral blood vessel segmentation.
Smart Images

Figure CN118747756A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image segmentation, and in particular to a method and system for segmenting cerebral angiography images based on topological structure. Background Art
[0002] Stroke is a major public health problem that seriously endangers human health. Its main cause is cerebral atherosclerosis. Intravascular interventional therapy has been proven to improve the efficacy of stroke, and cerebral angiography is currently recognized as the gold standard. Automatic and accurate segmentation of cerebral angiography images not only helps clinicians make rapid and accurate diagnoses, but also enables time series registration and quantitative description of cerebral vascular structure. In addition, for doctors in some remote areas, automatic segmentation of cerebral vessels in cerebral angiography images can distinguish cerebral vessels from cerebral angiography images more quickly and accurately, and reduce the radiation exposure of doctors.
[0003] Due to the particularity of the medical field, cerebrovascular segmentation is required to achieve stable and accurate output of segmentation results as much as possible. However, in actual application scenarios, optimization based on medical image segmentation still faces huge challenges: (1) The thickness of cerebrovascular vessels varies greatly and the structure is complex. The cerebrovascular vessels in the human body can extend from a few pixels to more than a dozen pixels, and their distribution is complex and intertwined. (2) In the segmentation process, attention is paid to the overall segmentation effect, and the correct representation of the topological structure in the original image is ignored. In cerebrovascular segmentation, incorrect segmentation of the diseased cerebrovascular area may lead to incorrect representation of the topological structure, thereby affecting the doctor's subsequent diagnosis and treatment.
[0004] In the prior art, the invention patent with patent publication number CN116993763A discloses a deep learning method for DSA coronary vessel segmentation focusing on edge and topological features, including a deep learning network structure based on an improved bidirectional Transformer module and a multi-scale semantic fusion module, and innovatively proposes a new composite loss function and a three-stage training method that focuses on vascular edges and topological features to solve the problem of a large number of over-segmentation and under-segmentation of coronary vessels. Summary of the invention
[0005] The technical problem to be solved by the present invention is to solve the problem of incomplete boundary representation in cerebral angiography image segmentation.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] A method for segmenting a cerebral angiography image based on a topological structure comprises the following steps:
[0008] S10, performing erosion and dilation processing on the original two-dimensional cerebral vascular annotation image respectively to obtain a pseudo label after the erosion and dilation processing of the original two-dimensional cerebral vascular annotation image;
[0009] S20, the image segmentation network reconstructs the features of the cerebrovascular image to obtain the reconstructed features; optimizes the reconstructed features in combination with the loss target, so that the reconstructed features are close to the pseudo-label form after the erosion and dilation of the original two-dimensional cerebrovascular annotation image; splices the optimized reconstructed features to obtain the predicted segmentation map;
[0010] S30, taking the predicted segmentation map and the original two-dimensional cerebral vascular annotated image as input, inputting them into the image topology repair network, repairing the region with topological structure segmentation errors in the predicted segmentation map, and obtaining the final segmentation map.
[0011] Advantages: By performing erosion and expansion operations on cerebral blood vessels, false negative and false positive pseudo labels are generated to guide the network to predict false negatives and false positives. Additional constraints are added to the edges of cerebral blood vessels by adding predicted false negatives and subtracting predicted false positives. Considering the topological structure ignored during the segmentation process, which results in poor presentation of cerebrovascular lesions, an image topology repair network is added to repair the segmentation results by visualizing the areas with incorrect topological representation, and finally obtain a segmentation map that retains the topological structure. Through the above two parts, cerebral blood vessels can be segmented efficiently and accurately, ensuring the correct representation of cerebral blood vessel edges and topological structures, and improving the robustness of the model.
[0012] In one embodiment of the present invention, the pseudo labels of the original two-dimensional cerebral vascular annotation image after erosion and dilation are obtained, and the following formula is applied:
[0013]
[0014] In the formula, GT e is the pseudo label corresponding to the false negative in the original 2D cerebral vascular annotation image, GT d is the pseudo label corresponding to the false positive in the original 2D cerebral vascular annotation image, GT s is the original 2D cerebral vascular annotation image, K t is the structural element with a core size of t during the erosion and dilation process, It means element-by-element decrement. ⊙ represents erosion and dilation operations respectively, and abs represents taking the absolute value.
[0015] In one embodiment of the present invention, the image segmentation network includes a common encoder, a decoder Dec s 、DecoderDec d 、DecoderDec e And fusion module; among them, the public encoder extracts the features of the input image, and the decoder Dec s、DecoderDec d 、DecoderDec e Reconstruct the encoded features respectively, and obtain the reconstructed features F respectively. s , reconstruct feature F d and reconstructed feature F e ; The fusion module performs feature splicing on the reconstructed features optimized by the loss target to obtain the predicted segmentation map.
[0016] In one embodiment of the present invention, the fusion module performs feature splicing, including:
[0017] S21, set a convolution block and a softmax layer to obtain the reconstructed feature F e , reconstruct feature F d Corresponding enhanced features And, enhanced features Combined reconstruction feature F s , get the edge enhancement feature F st ;
[0018] S22, set up two transformer layers; add the position encoding p to the edge enhancement feature F st In the example, after two transformer layers and linear transformation, the position features with position information are obtained.
[0019] S23, will enhance the characteristics And the reconstruction feature F s , apply the splicing and convolution methods to obtain the splicing feature F sc , and the splicing feature F sc Enhanced stitching features
[0020] S24, using residual connection, will enhance the splicing features Location Features And the reconstruction feature F s Add and process through activation function to obtain refined features
[0021] S25, then refine the features Send to decoder Dec s , generate and obtain refined features The corresponding reconstruction feature F s and with the decoder Dec d 、DecoderDec e Decode the generated new reconstructed feature F again e , reconstruct feature F d Send it to the fusion module for feature splicing.
[0022] S26, taking the sum of the binary cross entropy loss and the Dice loss as the loss target, repeating step S25 until the reconstructed feature F s , reconstruct feature F d and reconstructed feature F e The loss between the corresponding original two-dimensional cerebrovascular annotated image, the pseudo-label corresponding to the false positive in the original two-dimensional cerebrovascular annotated image, and the pseudo-label corresponding to the false negative in the original two-dimensional cerebrovascular annotated image is minimized. The decoder Dec s 、DecoderDec d 、DecoderDec e Output the corresponding prediction graph Pre s 、Pre d 、Pre e ;
[0023] S27, the prediction graph Pre s 、Pre d 、Pre e Send it to the fusion module for splicing to obtain a complete predicted segmentation map.
[0024] In one embodiment of the present invention, a complete predicted segmentation map is obtained by the following formula:
[0025]
[0026] Where S is the predicted segmentation map, Conv is the residual block, Pre s 、Pre d 、Pre e Decoder Dec s 、DecoderDec d 、DecoderDece e Output the corresponding prediction graph, θ is the softmax function, They represent element-by-element decrement and element-by-element increment, respectively.
[0027] In one embodiment of the present invention, obtaining the final segmentation map includes the following steps:
[0028] S31, using a grayscale method, generating a segmentation map Euler feature and a label Euler feature corresponding to the predicted segmentation map and the original two-dimensional cerebral vascular annotation image;
[0029] S32, using the norm L1 distance calculation method to obtain the Euler error between the segmentation graph Euler feature and the label Euler feature;
[0030] S33, calculating the gradient of the Euler error relative to the predicted segmentation map as a visualized topological error area map;
[0031] S34, taking the topology error area map and the predicted segmentation as input of the image topology restoration network, and outputting a final segmentation map of the restored topology structure.
[0032] In one embodiment of the present invention, obtaining the segmentation graph Euler feature and the label Euler feature includes:
[0033] Set the segmentation mode K1, K2, K3;
[0034] The segmentation mode is located by using a multi-convolutional layer with a fixed kernel. In the multi-convolutional layer, the kernel of a single convolutional layer takes the same value as the segmentation mode K1, segmentation mode K2, and segmentation mode K3 respectively. The multi-convolutional layer is used to segment the predicted segmentation map and the original two-dimensional cerebral vascular annotation image to form a segmentation block.
[0035] Set up the pooling layer to split the prediction Figure 2 The values are then normalized and then the average pooling layer is used to obtain the segmentation modes K1, K2, and K3 corresponding to the number of segmentation times M1, M2, and M3;
[0036] A linear transformation layer is set, and the Euler feature model is obtained by using linear transformation according to the determined number of segmentation times M1, M2, and M3;
[0037] The predicted segmentation map and the segmentation blocks of the original two-dimensional cerebral vascular annotated image are used as inputs of the Euler feature model to obtain the local Euler number corresponding to each segmentation block;
[0038] The local Euler numbers corresponding to the predicted segmentation map are combined to obtain the Euler features of the segmentation map; the local Euler numbers corresponding to the original two-dimensional cerebral vascular annotation image are combined to obtain the label Euler features.
[0039] In one embodiment of the present invention, the topology error area map is obtained by the following formula:
[0040]
[0041] Where V is the topological error area map, e is the Euler error, and S is the predicted segmentation map.
[0042] In one embodiment of the present invention, the image topology restoration network is obtained by the following formula:
[0043]
[0044] In the formula, is the element in the final segmentation graph, V i,j is the element in the topological error area map, T is the filtering threshold, S i,j is the element of the predicted segmentation map, e is the natural logarithm, and σ is the standard deviation.
[0045] The present invention also provides a system for applying the above-mentioned method for segmenting cerebral angiography images based on topological structure, comprising:
[0046] A pseudo label module is used to perform erosion and dilation processing on the original two-dimensional cerebral vascular annotation image, and obtain pseudo labels after the erosion and dilation processing of the original two-dimensional cerebral vascular annotation image;
[0047] The predicted segmentation map module is used for the image segmentation network to reconstruct the features of the cerebrovascular image and obtain the reconstructed features; the reconstructed features are optimized in combination with the loss target to make the reconstructed features close to the pseudo-label form after the erosion and dilation of the original two-dimensional cerebrovascular annotation image; the optimized reconstructed features are spliced to obtain the predicted segmentation map;
[0048] The final segmentation map module is used to input the predicted segmentation map and the original two-dimensional cerebral vascular annotated image into the image topology repair network, repair the area with topological structure segmentation errors in the predicted segmentation map, and obtain the final segmentation map.
[0049] Compared with the prior art, the beneficial effects of the present invention are: by performing erosion and expansion operations on cerebral blood vessels, false negative and false positive pseudo labels are generated, the network is guided to predict false negatives and false positives, and additional constraints are added to the edges of cerebral blood vessels by adding predicted false negatives and subtracting predicted false positives. Considering the topological structure ignored during the segmentation process, which causes the cerebrovascular lesion area to not be well displayed, an image topology repair network is added to repair the segmentation results by visualizing the area with topological errors, and finally obtain a segmentation map that retains the topological structure. Through the above two parts, the model can efficiently and accurately segment cerebral blood vessels, ensure the correct representation of cerebral blood vessel edges and topological structures, and improve the robustness of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 The present invention is a flowchart of a method for segmenting cerebral angiography images based on topological structure according to an embodiment of the present invention.
[0051] Figure 2 It is a framework diagram of a method for segmenting cerebral angiography images based on topological structure according to an embodiment of the present invention.
[0052] Figure 3 This is a network framework diagram for image segmentation according to an embodiment of the present invention.
[0053] Figure 4 This is a network framework diagram of image topology repair according to an embodiment of the present invention.
[0054] Figure 5 The present invention is a system block diagram of a cerebral angiography image segmentation based on topological structure according to an embodiment of the present invention. DETAILED DESCRIPTION
[0055] In order to facilitate those skilled in the art to understand the technical solution of the present invention, the technical solution of the present invention is further described in conjunction with the accompanying drawings of the specification.
[0056] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0057] See also Figure 1 and Figure 2 As shown, the present invention discloses a method for segmenting cerebral angiography images based on topological structure, comprising the following steps:
[0058] S10, performing erosion and dilation processing on the original two-dimensional cerebral blood vessel annotation image respectively to obtain pseudo labels after the erosion and dilation processing of the original two-dimensional cerebral blood vessel annotation image.
[0059] In one embodiment of the present invention, when segmenting the cerebrovascular image, the cerebrovascular edge segmentation is incomplete, and the error source is mainly due to the large number of false positives (FP) and false negatives (FN) in the prediction of the cerebrovascular boundary. The present invention learns the existing FP and FN to build a new processing framework to obtain more accurate segmentation. Create pseudo labels (GT) of false positives (FP) and false negatives (FN). It provides some restrictions on the edge area of the original rough prediction image. Since FP is the area formed by the outward expansion of vascular pixels, and FN is the area formed by the inward contraction of vascular pixels. To this end, the original two-dimensional cerebrovascular annotated image is eroded and expanded to generate pseudo GTs corresponding to FP and FN. The formula is as follows:
[0060]
[0061] In the formula, GT e is the pseudo label corresponding to the false negative in the original 2D cerebral vascular annotation image, GT d is the pseudo label corresponding to the false positive in the original 2D cerebral vascular annotation image, GT s is the original 2D cerebral vascular annotation image, K t is the structural element with a core size of t during the erosion and dilation process, It means element-by-element decrement. ⊙ represents erosion and dilation operations respectively, and abs represents taking the absolute value.
[0062] GT after erosion treatment e Compared to GT s GT obtained by shrinking inward and expanding dExpand outward. Therefore, minus GT d It can reduce the proportion of FP in rough prediction segmentation and increase GT e The ratio of FN can be reduced. This operation can be used to obtain more accurate prediction and segmentation results.
[0063] S20, the image segmentation network reconstructs the features of the cerebrovascular image to obtain the reconstructed features; combines the loss target to optimize the reconstructed features, so that the reconstructed features are close to the form of the pseudo-labels after the erosion and dilation of the original two-dimensional cerebrovascular annotation image; splices the optimized reconstructed features to obtain the predicted segmentation map.
[0064] See also Figures 1 to 3 As shown, in one embodiment of the present invention, the image segmentation network includes a common encoder, a decoder Dec s 、DecoderDec d 、DecoderDec e and fusion module; wherein, the public encoder extracts the features of the cerebrovascular image, and the decoder Dec s 、DecoderDec d 、DecoderDec e Reconstruct the encoded features respectively, and obtain the reconstructed features F respectively. d , reconstruct feature F d and reconstructed feature F e ; The fusion module performs feature splicing on the reconstructed features optimized by the loss target to obtain the predicted segmentation map.
[0065] In this embodiment, in order to solve the problem that the decoder easily loses edge details during downsampling, in this embodiment, the common encoder and decoder Dec d 、DecoderDec e Using jump links between decoders, d 、DecoderDec e Generated reconstruction feature F d and reconstructed feature F e .DecoderDec s Perform normal downsampling and upsampling to generate the reconstructed feature F s .
[0066] Reconstruction feature F d and reconstructed feature F e and reconstructed feature F s Long-range dependencies are established in the input fusion module and global context information is obtained.
[0067] In this embodiment, in order to further enhance the effect of blood vessel edge processing, the features output by the three decoders are sent to the fusion module. Specifically, the fusion module performs feature splicing, including:
[0068] S21, set a convolution block and a softmax layer to obtain the reconstructed feature F e , reconstruct feature F d Corresponding enhanced features And, enhanced features Combined reconstruction feature F s , get the edge enhancement feature F st .
[0069] Among them, the enhanced features And the edge enhancement feature F st , obtained by the following formula:
[0070]
[0071] Where θ is the softmax function and Conv is the residual block.
[0072] S22, set up two transformer layers; add the position encoding p to the edge enhancement feature F st In the example, after two transformer layers and linear transformation, the position features with position information are obtained.
[0073] S23, will enhance the characteristics And the reconstruction feature F s , apply the splicing and convolution methods to obtain the splicing feature F sc , and the splicing feature F sc Enhanced stitching features
[0074] In this embodiment, the splicing feature F is obtained by the following formula: sc , and enhanced stitching features
[0075]
[0076] In the formula, Conv serial Denotes continuous convolutional blocks, and Con denotes connection.
[0077] S24, using residual connection, will enhance the splicing features Location Features And the reconstruction feature F s Add and process through activation function to obtain refined features
[0078] In this embodiment, residual links are used in the fusion module to promote gradient flow. Location Features And the reconstruction feature Fs Add and process through activation function to get the final refined features Send it to the next step decoder Dec s for further processing.
[0079] S25, then refine the features Send to decoder Dec s , generate and obtain refined features The corresponding reconstruction feature F s and with the decoder Dec d 、DecoderDec e Decode the generated new reconstructed feature F again e , reconstruct feature F d Send it to the fusion module for feature splicing.
[0080] S26, taking the sum of the binary cross entropy loss and the Dice loss as the loss target, repeating step S25 until the reconstructed feature F s , reconstruct feature F d and reconstructed feature F e The loss between the corresponding original two-dimensional cerebrovascular annotated image, the pseudo-label corresponding to the false positive in the original two-dimensional cerebrovascular annotated image, and the pseudo-label corresponding to the false negative in the original two-dimensional cerebrovascular annotated image is minimized. The decoder Dec s 、DecoderDec d 、DecoderDec e Output the corresponding prediction graph Pre seg 、Pre dilate 、Pre erode , the fusion module predicts the graph Pre seg 、Pre dilate 、Pre erode Stitching to obtain the complete predicted segmentation map.
[0081] In one embodiment of the present invention, the binary cross entropy loss and the Dice loss are prior arts, and no improvement is made thereon, but they are just a specific application of the present invention.
[0082] The complete predicted segmentation map is obtained by the following formula:
[0083]
[0084] Where S is the predicted segmentation map, Conv is the residual block, Pre seg 、Pre dilate 、Pre erode Decoder Dec s 、DecoderDec d 、DecoderDec eOutput the corresponding prediction graph, θ is the softmax function, They represent element-by-element decrement and element-by-element increment, respectively.
[0085] S30, taking the predicted segmentation map and the original two-dimensional cerebral vascular annotated image as input, inputting them into the image topology repair network, repairing the region with topological structure segmentation errors in the predicted segmentation map, and obtaining the final segmentation map.
[0086] See also Figure 1 , 2 and Figure 4 As shown, in one embodiment of the present invention, in the medical image segmentation process, the pixel overlap between the prediction and the label is often emphasized, while the correct representation of the topological structure in the original image is ignored. In cerebrovascular segmentation, the incorrect segmentation of the diseased cerebrovascular area may lead to the incorrect representation of the topological structure, thereby affecting the doctor's subsequent diagnosis and treatment. Therefore, based on topological theory, the present application adds an image topology repair network to repair the area with topological errors in the predicted segmentation results.
[0087] Euler features are topological invariants that describe the structure and properties of a given topological space. The predicted segmentation map is compared with the original two-dimensional cerebrovascular annotated image GT s As input, the corresponding Euler features are generated through convolution, pooling and linear transformation operations. Specifically, obtaining the final segmentation map includes the following steps:
[0088] S31, using the grayscale method, generating the predicted segmentation map and the segmentation map Euler features and label Euler features corresponding to the original two-dimensional cerebral vascular annotation image.
[0089] In this embodiment, the grayscale algorithm does not directly calculate the number of vertices, edges and faces, but calculates the Euler features by counting the number of occurrences of 10 different 2×2 patterns (called bit-quads). These patterns are divided into K1, K2, and K3, and the corresponding M1, M2, and M3 represent the number of occurrences of the bit-quads.
[0090] In this embodiment, the segmentation graph Euler features and pseudo-label segmentation graph Euler features are obtained:
[0091] S311, set the segmentation mode K1, K2, K3.
[0092] S312 uses a multi-convolutional layer with a fixed kernel to locate the segmentation mode, and sets the kernel of a single convolutional layer in the multi-convolutional layer to the same value as the segmentation mode K1, segmentation mode K2, and segmentation mode K3, respectively. The multi-convolutional layer is used to segment the predicted segmentation map and the pseudo-label of the original two-dimensional cerebral vascular annotation image to form a segmentation block.
[0093] In this embodiment, a convolutional layer with a fixed kernel is first used to locate the bit-quads in the segmentation, and the kernel is combined with the bit-quads K1∈{-1,1} 2×2×4 , K2∈{-1,1} 2×2×4 , K3∈{-1,1} 2×2×2 Take the same value.
[0094] S313, set the pooling layer to split the prediction Figure 2 The values are then normalized, and then the average pooling layer is used to obtain the segmentation modes K1, K2, and K3 corresponding to the number of segmentation times M1, M2, and M3.
[0095] In this embodiment, in addition, in order to ensure that only when the prediction has the same pattern as the bit-quads, it will be activated as 4 after convolution, the predicted segmentation map S is first binarized, then normalized, and finally an average pooling layer is used to obtain the number of occurrences M1, M2, and M3 of the bit-quads.
[0096] The number of divisions is determined by the following formula:
[0097] M l.ijΔ =Δ 2 ·AvgPool(1(P i,j,Δ *K l =4));
[0098] Where M l.i.jΔ Indicates the number of times the segmentation block is segmented in each segmentation mode, l∈{1, 2, 3}, * indicates the convolution operation, K l It represents the situation when the segmentation mode belongs to this category, P i,j,Δ It is represented as a segmentation block at the coordinate (i, j) in the image to be segmented, Δ represents the size of the segmentation block, and 1(·) is an indicator function that is equal to 1 only when the input is true. AvgPool is represented as an average pooling layer.
[0099] S314, setting a linear transformation layer, and using linear transformation to obtain the Euler feature model according to the determined number of segmentation times M1, M2, and M3.
[0100] Finally, based on the known number of segmentation, the Euler feature is calculated through linear transformation. Specifically, the Euler feature model X is the following formula:
[0101] X=f(M1, M2, M3)=(M1-M2+2×M3) / 4;
[0102] S315 , using the predicted segmentation map and the segmentation blocks of the original two-dimensional cerebral vascular annotated image as inputs of the Euler feature model, and obtaining the local Euler number corresponding to each segmentation block.
[0103] In this embodiment, the network maps the segmentation space to the Euler number space. To preserve the spatial information, for each segmentation block, the network generates a local Euler number X i,j (elements in X), and finally by combining all local Euler numbers X i,j to obtain the Euler characteristic X.
[0104] S316, combining the local Euler numbers corresponding to the predicted segmentation map to obtain the segmentation map Euler features; combining the local Euler numbers corresponding to the original two-dimensional cerebral vascular annotated image to obtain the label Euler features.
[0105] S32, using the norm L1 distance calculation method to obtain the Euler error between the segmentation graph Euler feature and the label Euler feature.
[0106] In this embodiment, the Euler error is obtained by the following formula:
[0107]
[0108] Where e represents the Euler error, X, represent the Euler features of the predicted segmentation map and the original 2D cerebral vascular annotation image, respectively, and ||·||1 represents the norm L1 distance calculation method.
[0109] S33, calculate the gradient of the Euler error relative to the predicted segmentation map as a visualized topological error area map.
[0110] In this embodiment, the topology error area map is obtained by the following formula:
[0111]
[0112] Where V is the topological error area map, e is the Euler error, and S is the predicted segmentation map.
[0113] S34, taking the topology error area map and the predicted segmentation as input of the image topology restoration network, and outputting a final segmentation map of the restored topology structure.
[0114] In this embodiment, the predicted segmentation map S (whose elements are S i,j ) and the topological error region graph V (whose elements are V i,j ) as input to generate the final segmentation map of the repaired topology (Its elements are ). The details are as follows: First, the coordinates {(i,j)} with serious topological errors are screened out (when |V i,j |≥T, T is the filtering threshold), and then through the standard Gaussian distribution The random probability sampled from replaces the segmentation value on the wrong coordinate, and finally uses the sigmoid function to map it to (0,1). The process can be summarized as:
[0115]
[0116] In the formula, is the element in the final segmentation graph, V i,j is the element in the topological error area map, T is the filtering threshold, S i,j is the element of the predicted segmentation map, e is the natural logarithm, and σ is the standard deviation.
[0117] See also Figure 5 As shown, the present invention also provides a system for applying the method for segmenting cerebral angiography images based on topological structure, comprising:
[0118] A pseudo label module is used to perform erosion and dilation processing on the original two-dimensional cerebral vascular annotation image, and obtain pseudo labels after the erosion and dilation processing of the original two-dimensional cerebral vascular annotation image;
[0119] The predicted segmentation map module is used for the image segmentation network to reconstruct the features of the cerebrovascular image and obtain the reconstructed features; the reconstructed features are optimized in combination with the loss target to make the reconstructed features close to the pseudo-label form after the erosion and dilation of the original two-dimensional cerebrovascular annotation image; the optimized reconstructed features are spliced to obtain the predicted segmentation map;
[0120] The final segmentation map module is used to input the predicted segmentation map and the original two-dimensional cerebral vascular annotated image into the image topology repair network, repair the area with topological structure segmentation errors in the predicted segmentation map, and obtain the final segmentation map.
[0121] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, the embodiments should be regarded as exemplary and non-limiting from any point of view, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention, and any reference numerals in the claims should not be regarded as limiting the claims involved.
[0122] The above-described embodiments merely represent implementation methods of the invention. The protection scope of the present invention is not limited to the above-described embodiments. For those skilled in the art, several modifications and improvements may be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.
Claims
1. A method for segmenting cerebral angiography images based on topological structure, characterized in that: The following steps are involved: S10, performing erosion and dilation processing on the original two-dimensional cerebral vascular annotation image respectively to obtain a pseudo label after the erosion and dilation processing of the original two-dimensional cerebral vascular annotation image; S20, the image segmentation network reconstructs the features of the cerebrovascular image to obtain the reconstructed features; optimizes the reconstructed features in combination with the loss target, so that the reconstructed features are close to the pseudo-label form after the erosion and dilation of the original two-dimensional cerebrovascular annotation image; splices the optimized reconstructed features to obtain the predicted segmentation map; S30, taking the predicted segmentation map and the original two-dimensional cerebral vascular annotated image as input, inputting them into the image topology repair network, repairing the region with topological structure segmentation errors in the predicted segmentation map, and obtaining the final segmentation map.
2. The method for segmenting cerebral angiography images based on topological structure according to claim 1, characterized in that: Obtain the pseudo-labels of the original two-dimensional cerebral vascular annotation image after erosion and dilation, and apply the following formula: In the formula, GT e is the pseudo label corresponding to the false negative in the original 2D cerebral vascular annotation image, GT d is the pseudo label corresponding to the false positive in the original 2D cerebral vascular annotation image, GT s is the original 2D cerebral vascular annotation image, K t is the structural element with a core size of t during the erosion and dilation process, It means element-by-element decrement. ⊙ represents erosion and dilation operations respectively, and abs represents taking the absolute value.
3. The method for segmenting cerebral angiography images based on topological structure according to claim 1, characterized in that: The image segmentation network includes a common encoder and a decoder Dec s 、DecoderDec d 、DecoderDec e and fusion module; wherein the public encoder extracts the features of cerebrovascular images, and the decoder Dec s 、DecoderDec d 、DecoderDec e Reconstruct the encoded features respectively, and obtain the reconstructed features F respectively. s , reconstruct feature F d and reconstructed feature F e ; The fusion module performs feature splicing on the reconstructed features optimized by the loss target to obtain the predicted segmentation map.
4. The method for segmenting cerebral angiography images based on topological structure according to claim 3, characterized in that: Get the complete predicted segmentation map, including: S21, set a convolution block and a softmax layer to obtain the reconstructed feature F e , reconstruct feature F d Corresponding enhanced features And, enhanced features Combined reconstruction feature F s , get the edge enhancement feature F st ; S22, set up two transformer layers; add the position encoding p to the edge enhancement feature F st In the example, after two transformer layers and linear transformation, the position features with position information are obtained. S23, will enhance the characteristics And the reconstruction feature F s , apply the splicing and convolution methods to obtain the splicing feature F sc , and the splicing feature F sc Enhanced stitching features S24, using residual connection, will enhance the splicing features Location Features And the reconstruction feature F s Add and process through activation function to obtain refined features S25, then refine the features Send to decoder Dec s , generate and obtain refined features The corresponding reconstruction feature F s and with the decoder Dec d 、DecoderDec e Decode the generated new reconstructed feature F again e , reconstruct feature F d ; S26, taking the sum of the binary cross entropy loss and the Dice loss as the loss target, repeating step S25 until the reconstructed feature F s , reconstruct feature F d and reconstructed feature F e The loss between the corresponding original two-dimensional cerebrovascular annotated image, the pseudo-label corresponding to the false positive in the original two-dimensional cerebrovascular annotated image, and the pseudo-label corresponding to the false negative in the original two-dimensional cerebrovascular annotated image is minimized. The decoder Dec s 、DecoderDec d 、DecoderDec e Output the corresponding prediction graph Pre s 、Pre d 、Pre e ; S27, the prediction graph Pre s 、Pre d 、Pre e Send it to the fusion module for splicing to obtain a complete predicted segmentation map.
5. The method for segmenting cerebral angiography images based on topological structure according to claim 4, characterized in that: The complete predicted segmentation map is obtained by the following formula: Where S is the predicted segmentation map, Conv is the residual block, Pre s 、Pre d 、Pre e Decoder DEc s 、Decoder DEc d 、DecoderDec e Output the corresponding prediction graph, θ is the softmax function, They represent element-by-element decrement and element-by-element increment, respectively.
6. The method for segmenting cerebral angiography images based on topological structure according to claim 1, characterized in that: Obtaining the final segmentation map includes the following steps: S31, using a grayscale method, generating a segmentation map Euler feature and a label Euler feature corresponding to the predicted segmentation map and the original two-dimensional cerebral vascular annotation image; S32, using the norm L1 distance calculation method to obtain the Euler error between the segmentation graph Euler feature and the label Euler feature; S33, calculating the gradient of the Euler error relative to the predicted segmentation map as a visualized topological error area map; S34, taking the topology error area map and the predicted segmentation as input of the image topology restoration network, and outputting a final segmentation map of the restored topology structure.
7. The method for segmenting cerebral angiography images based on topological structure according to claim 6, characterized in that: Get the segmentation graph Euler features and label Euler features, including: Set the segmentation mode K1, K2, K3; The segmentation mode is located by using a multi-convolutional layer with a fixed kernel. The kernel of a single convolutional layer in the multi-convolutional layer is set to the same value as the segmentation mode K1, segmentation mode K2, and segmentation mode K3 respectively. The multi-convolutional layer is used to segment the predicted segmentation map and the original two-dimensional cerebral vascular annotation image to form a segmentation block. Set the pooling layer, binarize the predicted segmentation map, normalize it, and then use the average pooling layer to obtain the segmentation modes K1, K2, K3 corresponding to the number of segmentation M1, M2, M3; A linear transformation layer is set, and the Euler feature model is obtained by using linear transformation according to the determined number of segmentation times M1, M2, and M3; The predicted segmentation map and the segmentation blocks of the original two-dimensional cerebral vascular annotated image are used as inputs of the Euler feature model to obtain the local Euler number corresponding to each segmentation block; The local Euler numbers corresponding to the predicted segmentation map are combined to obtain the Euler features of the segmentation map; the local Euler numbers corresponding to the original two-dimensional cerebral vascular annotated image are combined to obtain the Euler features of the pseudo-label segmentation map.
8. The method for segmenting cerebral angiography images based on topological structure according to claim 6, characterized in that: The topology error area map is obtained by the following formula: Where V is the topological error area map, e is the Euler error, and S is the predicted segmentation map.
9. The method for segmenting cerebral angiography images based on topological structure according to claim 6, characterized in that: The image topology restoration network is obtained by the following formula: In the formula, is the element in the final segmentation graph, V i,j is the element in the topological error area map, T is the filtering threshold, S i,j is the element of the predicted segmentation map, e is the natural logarithm, and σ is the standard deviation.
10. A system using the method for cerebral angiography image segmentation based on topological structure according to any one of claims 1 to 9, comprising: A pseudo label module is used to perform erosion and dilation processing on the original two-dimensional cerebral vascular annotation image, and obtain pseudo labels after the erosion and dilation processing of the original two-dimensional cerebral vascular annotation image; The predicted segmentation map module is used for the image segmentation network to reconstruct the features of the cerebrovascular image and obtain the reconstructed features; the reconstructed features are optimized in combination with the loss target to make the reconstructed features close to the pseudo-label form after the erosion and dilation of the original two-dimensional cerebrovascular annotation image; the optimized reconstructed features are spliced to obtain the predicted segmentation map; The final segmentation map module is used to input the predicted segmentation map and the original two-dimensional cerebral vascular annotated image into the image topology repair network, repair the area with topological structure segmentation errors in the predicted segmentation map, and obtain the final segmentation map.
Citation Information
Cited By
Hepatography blood vessel segmentation method based on tree topological structure attention and connectivity self-repairing and related device
CN120912632A
A liver angiography blood vessel segmentation method based on tree topology and connectivity self-repairing and related device
CN120912632B
