Automated liver segmentation method and system incorporating dual-flow topology attention and hemodynamics
Patent Information
- Application Number
- CN202611016207.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-09
- Publication Date
- 2026-10-09
AI Technical Summary
[0006]尽管 TPMA-Net 在一定程度上实现了PT理念的自动化,但在处理复杂的血管拓扑时仍面临两大核心瓶颈:一是边界混淆问题,即模型在肝段过渡区域产生分支上的误判;二是空间混淆问题,即模型将空间邻近但拓扑无关的血管节点误分为同一类别
Smart Images

Figure CN122887802A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of medical data processing technology, and relates to a fully automated liver segmentation method and system that combines dual-flow path topological attention and hemodynamics. Background Technology
[0002] Hepatocellular carcinoma (HCC) is highly invasive, and its main pathological route of spread is along the portal vein (PT), which is also one of the important reasons for intrahepatic metastasis and postoperative local recurrence. In the 1980s, Professor Masatoshi Makuuchi of the University of Tokyo proposed the concept of complete resection of tumor-bearing PT, namely anatomical liver resection (ALR). ALR uses the PT segment or subsegment as the basic anatomical unit, systematically resecting the tumor-bearing PT, and also completely resecting the tumor-bearing Glisson system that supplies and marks the PT, in order to obtain better oncological efficacy.
[0003] Due to current technological limitations, the common practice is to use the Couinaud segmentation method to expose the main hepatic veins, combined with methylene blue staining to guide the liver resection plane, in order to achieve a resection effect similar to physical puncture (PT). However, the Couinaud segmentation method is an artificial segmentation based on the main hepatic veins, not a true PT segmentation in the physiological or oncological sense, and it is difficult to accurately reflect the complex spatial distribution of the actual intrahepatic vessels and the physiological flow domain they define.
[0004] Strict segmentation of the liver based on PT (portal vein segmentation) is still primarily done manually or semi-automatically. Existing mature methods typically involve first segmenting the liver and portal vein from CT images, then refining and topologically mapping the vessels, and finally performing functional segmentation of the liver using region growing based on the vessel segmentation results. Although liver segmentation and vessel segmentation can be automatically extracted using deep learning, there is still no effective algorithm for further automatic planning of the refined vessel tree. In practice, manual selection of vessel branches for watershed division still relies on manual methods, resulting in a cumbersome and time-consuming process. Therefore, such semi-automatic methods are only used in more complex surgeries.
[0005] In recent years, deep learning methods have been widely applied to automatic liver segmentation, but most mainstream techniques are still based on the Couinaud segmentation method, which can be broadly categorized into three types: The first type is semantic segmentation models based on architectures such as U-Net, Transformer, and point cloud inference networks. These methods rely on voxel-level manual annotation based on the Couinaud standard, and due to the lack of explicit modeling of the topological relationships and anatomical structures between voxels, it is difficult to achieve boundary divisions that conform to anatomical logic. The second type is approximate segmentation methods based on geometric planes, which use anatomical planes to define boundaries. However, this rigid geometric division method is difficult to adapt to the complex nonlinear boundaries of the liver. The third type is segmentation methods based on the PT concept. In this direction, the existing technology has proposed TPMA-Net, which focuses on parsing the topological structure of portal vein branches to achieve automatic segmentation of vascular segments, and finally combining watershed growth algorithms to complete liver segmentation.
[0006] Although TPMA-Net has automated the PT concept to some extent, it still faces two major bottlenecks when dealing with complex vascular topologies: one is the boundary confusion problem, that is, the model misclassifies branches in the transition region of liver segments; the other is the spatial confusion problem, that is, the model misclassifies spatially adjacent but topologically unrelated vascular nodes into the same category.
[0007] Based on the definition of portal vein branch basin, it is believed that the existing network fails to fully decouple two mutually exclusive properties of vascular network: one is "longitudinal topological consistency", that is, from the root node to any terminal node, the conduction of blood flow has strict classification inheritance; the other is "lateral spatial heterogeneity", that is, there should be strong mutual repulsion between different hepatic segment branches that are closely intertwined in space.
[0008] Furthermore, due to limitations of graph neural networks or traditional sequence models, existing algorithms are unable to perceive physical damping features (such as the effect of tube diameter differences on resistance) along long blood flow paths, resulting in the loss of distal features in long sequences. Summary of the Invention
[0009] The purpose of this invention is to address the aforementioned problems in existing technologies by proposing a fully automated liver segmentation method and system that combines dual-flow-path topological attention with hemodynamics.
[0010] To achieve the above objectives, the basic solution of this invention is: a fully automated liver segmentation method combining dual-flow-path topological attention and hemodynamics, comprising the following steps:
[0011] A vascular topology node graph is obtained based on the vascular graph construction process. and node feature vectors (a d-dimensional real vector space), and input it into a dynamic graph convolutional encoder to extract local features;
[0012] The hybrid topology Transformer module is set up to reconstruct the multi-head attention in the Transformer layer into two parallel processing paths: a longitudinal path and a transverse path. Local features are input into the hybrid topology Transformer module to extract blood flow conduction features and spatial competition features and fuse them to obtain fused features.
[0013] A blood flow impedance sensing Mamba sequence module is introduced, and the fused features are used as its input to extract several blood flow paths from the root node to each terminal leaf node. For any blood vessel node, the features of all paths containing that node are averaged and pooled to obtain the final node feature vector.
[0014] The final node feature vector is input into a preset classifier to obtain the liver segment category label to which each vascular tree node belongs;
[0015] The process of mapping the vascular tree nodes with liver segment category labels back to the portal vein 3D pipeline model is as follows: based on the spatial coordinates and topological connections between the vascular tree nodes and the portal vein centerline points, the liver segment category labels are assigned to the corresponding centerline points and propagated to the corresponding portal vein lumen region to obtain a labeled portal vein vascular tree; using the labeled portal vein vascular tree as a seed, regional growth is performed within the liver parenchyma mask area to determine the liver segment category corresponding to each voxel in the liver parenchyma, and the complete liver segmentation result is generated and output.
[0016] The working principle and beneficial effects of this basic scheme are as follows: This technical scheme combines dual-path topological attention with hemodynamics, splitting the attention calculation into two parallel flow paths: the longitudinal flow path maintains the consistency of blood flow conduction characteristics through ancestor-descendant masking and directed distance encoding; the transverse flow path introduces the relative coordinates and spatial distance attenuation of the nearest common ancestor (LCA) to suppress branch interference from nearby but different sources. This design effectively solves the common boundary confusion and spatial confusion problems in vascular map classification at the global topological scale.
[0017] Furthermore, the method for extracting local features by inputting the vascular skeleton node map into a dynamic graph convolutional encoder is as follows:
[0018] For the dynamic graph convolution encoder, the first Dynamic graph convolutional layer with arbitrary nodes The features are updated as follows:
[0019] ,
[0020] ,
[0021] in, For the first The first in the layer The output feature vector of each node For the first The first in the layer The input feature vector of each node, For the first Multilayer perceptron (feedforward neural network):
[0022] ,
[0023] This is the weight matrix. For bias, is the activation function; x is the input feature vector;
[0024] Presentation layer normalization operation:
[0025] ,
[0026] and These are the mean and standard deviation of the feature, respectively. and These are learnable parameters;
[0027] Indicates feature concatenation operation; Represents a node In the current feature space A set of nearest neighbor nodes, where i and j represent the nearest neighbor node indices; The maximum pooling aggregation function is defined for the channel dimension.
[0028] By introducing relative geometric features By connecting with the residuals, the network initially solves the problem of fusing small-scale boundary features and generates initial geometric features. .
[0029] Local features are extracted by a dynamic graph convolutional encoder, and node embeddings that are robust to spatial transformations are learned by explicitly modeling local relative geometric relationships.
[0030] Furthermore, the longitudinal flow path is used to extract blood flow conduction features, specifically as follows:
[0031] Construct a binary mask matrix For any pair of nodes Information transfer is only permitted if they are direct blood relatives:
[0032] ,
[0033] in, For the i-th blood vessel node, Let j be the j-th blood vessel node; For nodes All ancestor nodes (upstream nodes) of the node. For nodes All descendant nodes (downstream nodes);
[0034] Define directed distance ,when for The value is positive when the ancestor is not mentioned, and negative otherwise; the bias term... This is achieved through a learnable embedding layer:
[0035] ,
[0036] ,
[0037] in, Let be the distance (hop count) between node i and node j, and sgn be the sign function, where sgn (positive number) is set to 1 and sgn (negative number) is set to -1. Let be the depth of node j (i.e., the number of hops on the path from the root node to node j). Learnable embedding layers will Mapped to bias terms;
[0038] Attention weights of longitudinal flow paths ,for:
[0039] ,
[0040] in, The query matrix represents the set of query feature vectors for each node in the vertical flow path. The transpose of the key matrix represents the set of key feature vectors for each node in the longitudinal flow path; The value matrix represents the set of feature vectors representing the values of each node along the longitudinal flow path. The dimension of the key vector is used to scale the attention score to prevent it from becoming too large.
[0041] This flow path aims to maintain liver segment classification labels in the "parent node" To ensure consistency in the direction of "child nodes", two core constraints are introduced to simulate the unidirectional conduction characteristics of blood flow.
[0042] Furthermore, the lateral flow path is used to extract spatial competition features, specifically:
[0043] set up for and The nearest common ancestor is relative to the coordinates. Defined as:
[0044] ,
[0045] in, For the i-th blood vessel node, Let j be the j-th blood vessel node;
[0046] Using a two-dimensional embedded table Map this relative coordinate to attention bias ,in, This represents the number of discrete branch positions relative to the nearest common ancestor. The number of channels representing attention bias. The learnable embedding parameter table is updated during training, specifically as follows:
[0047] Set nodes and nodes The most recent common ancestor is ,node Compared to The discrete number of the sub-branch is ,node Compared to The discrete number of the sub-branch is ,and Then relative topological coordinates Represented as:
[0048] ,
[0049] Based on relative topological coordinates in a two-dimensional embedding table By searching for the corresponding learnable bias vector in the middle, we obtain:
[0050] ,
[0051] in, Represents a node and nodes The lateral topological attention bias vector between them is added to the attention score of the lateral flow path;
[0052] Introducing a soft suppression term based on Euclidean distance, as the physical distance... As attention increases, attention intensity decreases logarithmically.
[0053] ,
[0054] in, :node With nodes The spatial inhibition bias term is used to adjust the attention score; :node Three-dimensional spatial coordinates; :node Three-dimensional spatial coordinates; A learnable temperature coefficient used to adaptively adjust the rate at which attention decays with distance;
[0055] Calculate the attention of the lateral flow path ,for:
[0056] ,
[0057] in, The query matrix represents the set of query feature vectors for each node in the lateral flow path. Let be the transpose of the key matrix, representing the set of key feature vectors for each node in the lateral flow path. The value matrix represents the set of value feature vectors for each node in the lateral flow path.
[0058] This flow path focuses on addressing the boundary discrimination problem at vascular bifurcation points, particularly distinguishing competing branches belonging to adjacent liver segments.
[0059] Furthermore, the features extracted from the longitudinal and transverse flow paths are fused through concatenation and linear transformation:
[0060] ,
[0061] in, Indicates fusion features, Represents a linear transformation. Indicates splicing, For the attention weight of the longitudinal flow path, Attention is drawn to the lateral flow path.
[0062] Local features are sequentially input into the hybrid topology Transformer module and the blood flow impedance sensing Mamba sequence module to handle the long-range dependencies of global topology and flow direction, obtain fused features, and facilitate subsequent use.
[0063] Furthermore, a blood flow impedance sensing Mamba sequence module is introduced, and the fused features are used as its input to extract several blood flow paths from the root node directly to each terminal leaf node. The specific steps are as follows:
[0064] According to Poiseuille's law, the resistance of fluid in a pipe It is inversely proportional to the fourth power of the radius r ( ), define the path from root to leaf node. The cumulative flow resistance position of each node The sum of the flow resistances of all preceding nodes on the path:
[0065] ,
[0066] in, : Node index on the path, representing the sequential number from the root node to the current node; : The first on the path The radius of the blood vessel corresponding to each node; To prevent the denominator from being zero, a small constant is usually chosen, which is a very small positive number, for numerical stability.
[0067] The input features are mapped to a high-dimensional location vector using a multilayer perceptron (MLP) and injected as residuals.
[0068] ,
[0069] in, : Node feature vectors after injecting accumulated flow resistance location information; : The original node input feature vector;
[0070] Design a pipe diameter-based gating mechanism for each time step. (i.e., the first) (Number of nodes), calculate an importance gating coefficient. :
[0071] ,
[0072] Where Sigmoid is the activation function that maps the input to... interval; Learnable weight parameters for linear transformation of pipe diameter gating; : The first on the path The radius of the blood vessel at each node; Learnable bias parameters for linear transformation of pipe diameter gating;
[0073] Dynamically scaling input features using importance gating coefficients:
[0074] ,
[0075] in, : Scaling factor, a hyperparameter used to adjust the gating magnification effect; The first one after gating and dynamic scaling Each node's feature vector;
[0076] Obtaining remodulation sequences with strong physiological topological expressiveness Then, it is fed into a continuous state equation that depends on dynamic input:
[0077] ,
[0078] in, : The path feature sequence after remodulation This represents the path length, which is the total number of nodes in the path. :time The first derivative of the hidden state (the rate of change in the continuous state equation); :time The hidden state vector; :time The input feature vector (i.e. ); :time The output feature vector; , , : The learnable parameter matrix in the continuous state-space model, corresponding to the state transition, input projection, and output projection, respectively; Indicates the first Path The feature vector obtained after gating and dynamic scaling of the last node (i.e., the leaf node) is the remodulation feature of the end point (leaf node) of the path;
[0079] To adapt to discrete node sequences, a step parameter (i.e., a discrete scale) is used. Discretization is performed using zero-order preservation to generate the parameter matrix. and In the Mamba framework, discrete scale and projection matrix and All are from the current input item Selective scanning is achieved through adaptive generation via linear projection.
[0080] ,
[0081] ,
[0082] in, The discretized state transition matrix determines the retention ratio of the previous hidden state, according to the formula... Dynamically generated, discrete scale ; The discretized input projection matrix determines the influence of the current input on the hidden state, according to the formula... generate; The output projection matrix depends on the current input and is generated by linear projection, for example... : No. The discrete hidden state vector of each step is used to record and transmit contextual information about the historical path; : No. The discrete output feature vector of each step is the single-step result of the state-space derivation;
[0083] Obtain the output feature sequence of this path For any vascular node The final node feature vector is obtained by performing mean pooling on all path features containing that node. :
[0084] ,
[0085] in, The first one obtained from disassembly A set of "root-to-leaf node paths"; : in the Path In the deduction output sequence, a specific node The corresponding feature vector; Indicates the first Path The output feature vector obtained after the state-space model derivation of the last node (leaf node);
[0086] Features after merging By directly connecting the MLP-based channel dimensionality reduction and linear classification layer (i.e., classifier), the projection convergence from the overall liver blood flow trunk to the probability of liver segment attribution labels in the portal vein basin is achieved.
[0087] In the long-range path modeling phase, this component introduces a blood flow impedance sensing state space model (HA-Mamba) to fully capture the contextual structure distribution when blood flow is conducted from a single source at the root to multiple terminal branches.
[0088] Furthermore, the final node feature vector is input into a pre-defined classifier to obtain the liver segment category label to which each vascular tree node belongs.
[0089] The classifier uses a linear transformation plus Softmax to transform the high-dimensional features of each node. Projected onto the class space, output class probability distribution :
[0090] ,
[0091] in, and These are learnable parameters.
[0092] It is easy to operate and facilitates the acquisition of category probability distributions.
[0093] Furthermore, it also includes a step of training using a joint loss function, as follows:
[0094] ,
[0095] in, Represents the total loss function. The standard cross-entropy loss is used to supervise the classification prediction at each node; and Hyperparameters for balancing the weights of each task; The topological consistency loss is defined as the ancestor node. with descendant nodes The Kullback-Leibler (KL) divergence between predicted probability distributions aims to explicitly constrain prediction coherence along vascular pathways.
[0096] ,
[0097] in, Let be the set of ancestor-descendant node pairs in the vascular tree. and Representing nodes respectively and The predicted probability distribution; The Kullback-Leibler (KL) divergence function;
[0098] The supervised contrastive loss in the form of InfoNCE is used to bring similar nodes closer together and push dissimilar nodes further apart in the local feature space, thereby enhancing boundary discrimination:
[0099] ,
[0100] in, The set of vessel nodes (i.e., anchor points) participating in the contrastive loss calculation; for any vessel node (anchor point) in the set... , , , These represent the nodes respectively. The feature vectors of the positive samples (samples of the same class) and the negative samples (samples of different classes) are also present. For nodes The set of negative samples; Indicates cosine similarity; It is a learnable temperature coefficient.
[0101] A joint loss function is used for training to collaboratively optimize the semantic classification accuracy and topological consistency of nodes.
[0102] This invention also provides a fully automated liver segmentation system based on the method described herein, combining dual-flow-path topological attention and hemodynamics, comprising:
[0103] The data acquisition unit is used to obtain a vascular topology node map based on the vascular map construction process. and node feature vectors ;
[0104] Linear layer, used to receive the vascular topology node map and node feature vectors The initial node features are then upscaled. At the network input, a linear transformation (fully connected layer) is applied to the original node features. Ascending to higher dimensions ,Right now =W +b, unifies the feature dimension; where... The original input node feature vector, with dimension 1. ; The upgraded node feature vector has a dimension of 1. ; The weight matrix of the linear transformation, with the following shape: Used for feature dimensionality upscaling; The bias vector of the linear transformation, with dimension . ;
[0105] A dynamic graph convolutional encoder is used to receive an upscaled vascular topology node graph and node feature vectors, and extract local features. The dynamic graph convolutional encoder contains two cascaded dynamic graph convolutional layers, each comprising:
[0106] K-nearest neighbor search layer: Based on the node features such as the input 3D coordinates, it finds the nearest neighbor nodes in the local feature space;
[0107] Feature splicing layer: splices the features of the central node with the relative feature differences of the adjacent nodes;
[0108] The multilayer perceptron (MLP) layer consists of a fully connected layer and a ReLU activation function: used to perform linear transformations and non-linear activations on the concatenated high-dimensional features.
[0109] Max Pooling: performs feature aggregation along the nearest neighbor channel dimension;
[0110] Residual connections and LayerNorm: The aggregated features are added to the original input features and then normalized to obtain a single-layer output;
[0111] The original node features are input into the first dynamic graph convolutional layer, the output of the first layer is used as the input of the second layer, and the final output of the second layer is fed into the hybrid topology Transformer module.
[0112] The hybrid topology Transformer module, whose input is connected to the output of the dynamic graph convolutional encoder, is used to extract and fuse blood flow conduction features and spatial competition features to obtain fused features. The hybrid topology Transformer module contains three cascaded dual-stream hybrid attention layers, each comprising two parallel flow paths and a fusion network, specifically:
[0113] Linear mapping layer: In the vertical and horizontal flow paths, the input features are mapped to query (Q), key (K), and value (V) matrices respectively;
[0114] Attention computation and bias injection layer: includes matrix multiplication operation, scaling operation, bias (or mask) matrix addition operation with two flow paths, and Softmax activation layer;
[0115] Feature splicing layer and linear fusion layer: The feature attention matrices output from the two pipelines are spliced in the channel dimension and fused through a fully connected layer;
[0116] Feedforward Neural Network (FFN) and Layer Normalization: After the fused features pass through residual connections and layer normalization, they are fed into a feedforward network consisting of two fully connected layers and activation functions. The residuals are summed again and layer normalization is performed before output.
[0117] The output of layer l is directly used as the input of layer l+1, and three layers are stacked consecutively. The output features of layer 3 are fed into the blood flow impedance sensing Mamba sequence module.
[0118] The blood flow impedance sensing Mamba sequence module, whose input is connected to the output of the hybrid topology Transformer module, is used to extract several blood flow paths from the root node to each terminal leaf node. For any vessel node, the features of all paths containing that node are averaged and pooled to obtain the final node feature vector. The blood flow impedance sensing Mamba sequence module contains one HA-Mamba inference layer, which includes:
[0119] Path decomposition operation: Reorganizes graph structure data into independent path sequences;
[0120] Flow resistance injection layer (containing 1 MLP layer): The accumulated flow resistance scalar is mapped to a high-dimensional position vector and fused with the input sequence through residual addition operation;
[0121] The pipe diameter gating layer, consisting of one fully connected layer and a Sigmoid activation layer, calculates the pipe diameter gating coefficients and dynamically scales the sequence features through multiplication operations.
[0122] State-space scanning layer: It consists of three parallel linear projection layers (generating discretization coefficients Δ, B, C), discretization operators, and a selective scanning inference mechanism, and outputs a long-range dependent feature sequence.
[0123] Mean pooling layer: The feature sequences corresponding to the same physical blood vessel node in different paths are averaged and aggregated to complete the folding and recovery of sequence to graph features;
[0124] After receiving the fused features from the hybrid topology Transformer module, the feature vectors are injected, gated, scanned, and pooled to output the final high-dimensional node feature vectors to the classifier.
[0125] A classifier, whose input is connected to the output of the blood flow impedance sensing Mamba sequence module, obtains the liver segment category label to which each vascular tree node belongs; the classifier includes:
[0126] Channel dimensionality reduction layer, with a linear fully connected layer / MLP at the bottom: used to compress and map information from the feature vectors of high-dimensional nodes;
[0127] Linear classification layer: maps the dimensionality-reduced node features to the target category number: 9 categories, including 8 portal vein hepatic segment categories and background;
[0128] Softmax layer: Normalizes the output to the probability distribution of each node belonging to each liver segment;
[0129] The liver segmentation generation module maps the liver segment category labels of the vascular tree nodes output by the classifier back to the portal vein 3D pipeline model, and uses the labeled portal vein vascular tree as a seed to perform regional growth within the liver parenchyma mask to generate a complete liver segmentation mask.
[0130] This system leverages the cooperation of various modules to overcome the performance bottlenecks in existing technologies. By explicitly extracting the vascular map structure and introducing dual-dimensional long-range dependency modeling and physiological and physical priors, it achieves higher accuracy in vascular tree node classification. Attached Figure Description
[0131] Figure 1 This is the network architecture diagram of the fully automated liver segmentation system that combines dual-flow path topological attention and hemodynamics according to the present invention.
[0132] Figure 2 This is a schematic diagram of the watershed growth results of the fully automated liver segmentation system that combines dual-flow-path topological attention and hemodynamics according to the present invention. Detailed Implementation
[0133] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0134] In the description of this invention, it should be understood that the terms "longitudinal", "lateral", "up", "down", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0135] In the description of this invention, unless otherwise specified and limited, it should be noted that the terms "installation", "connection" and "linking" should be interpreted broadly. For example, they can refer to mechanical or electrical connections, or internal connections between two components. They can be direct connections or indirect connections through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.
[0136] This invention discloses a fully automated liver segmentation method combining dual-flow-path topological attention and hemodynamics. By explicitly extracting the vascular map structure and introducing dual-dimensional long-range dependency modeling and physiological-physical priors, it achieves higher accuracy in vascular tree node classification. The fully automated liver segmentation method combining dual-flow-path topological attention and hemodynamics includes the following steps:
[0137] A vascular topology node graph is obtained based on the vascular graph construction process. and node feature vectors (a d-dimensional real vector space), and input it into a dynamic graph convolutional encoder to extract local features;
[0138] The preferred approach for constructing a vascular map is as follows:
[0139] Portal vein central line extraction:
[0140] First, the liver and portal vein in abdominal CT images were segmented in three dimensions using the U-Net++ network. Based on the preliminary portal vein segmentation results, the three-dimensional topological centerline of the vein was extracted using the VMTK (Vascular Modeling Toolkit). In this process, the basic topological structure and corresponding geometric framework information of the portal vein centerline network were acquired in one step, such as the three-dimensional spatial coordinates, the maximum inscribed sphere radius, and the Frenet frame, which form the physical basis for subsequent analysis.
[0141] Key node identification and feature engineering:
[0142] The central axis of blood vessels typically contains a massive number of linear redundant nodes. To construct an efficient and computationally friendly graph structure suitable for deep learning, the feature nodes in the network are compressed from their original density to key topological points. Specifically, endpoints (degree 1), bifurcation points (degree ≥ 3), and predefined starting root nodes are extracted, defined by the number of connections (degree). Simultaneously, non-maximum suppression is introduced to preserve local curvature extrema to capture the tortuous features of blood vessels. These point sets are then merged to form a lightweight and semantically pure key blood vessel graph structure G=(V,E), where V is the set of key blood vessel nodes and E is the set of topological connections between nodes.
[0143] For each key vascular node v_i∈V in the acyclic dendrogram G, a multi-dimensional joint feature vector x_i∈R^d is constructed. This feature set covers four dimensions: 1) Normalized spatial coordinates: relative coordinates with the portal vein entry point into the liver (root node) as the origin; 2) Geometric topological properties: including the local inscribed sphere radius (diameter), curvature, node degree (endpoint / bifaction identifier), and Frenet cut vector; 3) Relative spatial relationship of the liver: including the shortest distance from the node to the liver surface, the Euclidean distance relative to the liver centroid, and the spherical azimuth angle; 4) Topological path properties: geodesic distance (path arc length) calculated along the vascular topology from the entry root node. The above manual feature engineering constructs a complete medical graph theory boundary mapping, providing rich physical input for subsequent networks.
[0144] Preferably, the vascular map construction process specifically includes:
[0145] The input abdominal CT image is segmented into portal vein vessels to obtain a binary mask of the portal vein vessels. The portal vein vessel segmentation can be implemented using a deep learning-based medical image segmentation network, including UNet, UNet++, or improved networks. Three-dimensional surface reconstruction is performed based on the binary mask of the portal vein vessels to obtain a three-dimensional surface model of the portal vein vessels.
[0146] The centerline of the portal vein is extracted from the binary mask or the three-dimensional surface model of the portal vein to obtain the vessel centerline model, which includes multiple centerline points and the connection relationship between adjacent centerline points.
[0147] A vascular topology map is established based on the connection relationship between adjacent centerline points in the vascular centerline model. The centerline points or key centerline points selected from the centerline points are used as vascular nodes, and the connected paths formed along the centerline between adjacent vascular nodes are used as vascular edges.
[0148] Determine the root node in the vascular topology graph, and traverse the vascular topology graph from the root node to obtain the parent-child relationship, node degree, node depth, endpoint set, and branch point set of each vascular node.
[0149] Topology optimization of the vascular topology graph is performed, including removing short terminal branches, deleting loop connections, and merging adjacent bifurcation nodes, to obtain the optimized vascular topology node graph. ,in, Represents a set of blood vessel nodes. Represents the set of topological connection edges between blood vessel nodes;
[0150] For each vascular node The node feature vector is obtained by extracting its spatial coordinates, node degree, blood vessel radius, curvature, twist rate, local direction vector, distance to the liver surface, path distance relative to the root node, and radial distance. ;
[0151] blood vessel topology node graph and node feature vectors Input a dynamic graph convolutional encoder to extract local features.
[0152] The hybrid topology Transformer module is set up to reconstruct the multi-head attention in the Transformer layer into two parallel processing paths: a longitudinal path and a transverse path. Local features are input into the hybrid topology Transformer module to extract blood flow conduction features and spatial competition features and fuse them to obtain fused features.
[0153] A blood flow impedance sensing Mamba sequence module is introduced, and the fused features are used as its input to extract several blood flow paths from the root node to each terminal leaf node. For any blood vessel node, the features of all paths containing that node are averaged and pooled to obtain the final node feature vector.
[0154] The final node feature vector is input into a preset classifier to obtain the liver segment category label to which each vascular tree node belongs;
[0155] The process of mapping the vascular tree nodes with liver segment category labels back to the portal vein 3D pipeline model is as follows: based on the spatial coordinates and topological connections between the vascular tree nodes and the portal vein centerline points, the liver segment category labels are assigned to the corresponding centerline points and propagated to the corresponding portal vein lumen region to obtain a labeled portal vein vascular tree; using the labeled portal vein vascular tree as a seed, regional growth is performed within the liver parenchyma mask area to determine the liver segment category corresponding to each voxel in the liver parenchyma, and the complete liver segmentation result is generated and output.
[0156] In a preferred embodiment, the portal vein 3D vascular model is a set of portal vein centerline sampling points with radius and topological hierarchy reconstructed from CT images. During matching, the 3D Euclidean distance between the vascular tree nodes and the centerline points is calculated. For example, a matching threshold of 2mm is set, and only points with the same topological branch level are established to establish a correspondence. When matching multiple nodes with a single point, the label of the nearest node is selected (the portal vein topological hierarchy starts with the main portal vein as level 0, and the value increases by 1 for each vascular bifurcation level. Only vascular tree nodes with a level difference of 0 are allowed to establish a matching relationship with the centerline point; if there are terminal branch labels of the same level in the overlapping vascular region, the label with the smaller 3D Euclidean distance to the current lumen voxel is selected for assignment). All centerline points are assigned values by piecewise linear interpolation along the centerline, and then the labels are diffused to all vascular lumen voxels by 3D spherical expansion based on the vascular radius of each point. Terminal branch labels are preferentially retained in the bifurcation overlapping region, resulting in a portal vein vascular tree with a unique liver segment label. The deep learning model outputs the classification results of the vascular skeleton nodes. To obtain the final liver segments, these categorized nodes are first mapped back onto the three-dimensional portal vein, achieving accurate segmentation of the portal vein vascular tree. Subsequently, using the vascular segmentation results as seeds, a region growing algorithm is used to expand them to the entire liver parenchyma, ultimately obtaining 8 complete liver segments (segment I to segment VIII).
[0157] The growth process operates within the liver parenchyma mask extracted by U-Net++ in the previous stage, using the classified portal vein tree as the seed point. The growth algorithm employs a layer-by-layer iterative diffusion mechanism in three-dimensional space: in each iteration, the unclassified liver voxels are examined... Local spatial neighborhood. If a classified voxel or blood vessel exists within the neighborhood, the current voxel is labeled with the category of the nearest known voxel; if the neighborhood consists entirely of unclassified voxels, it waits for the next round of expansion. Through this iterative radial growth, the label categories of each portal vein branch gradually diffuse outward and fill the entire liver. This method simulates the distribution characteristics of real blood flow basins, effectively overcoming the limitations of traditional geometric plane forced segmentation, and ultimately generating 8 liver segment masks with natural boundaries that conform to human anatomy. Specifically, the liver parenchyma mask is obtained by binarizing the liver probability map output by U-Net++ with a 0.5 threshold, retaining only liver tissue and removing the abdominal background; three-dimensional iterative region growth is performed using labeled blood vessel voxels as seeds, traversing the 3×3×3 neighborhood of unlabeled voxels in each round, assigning liver segments according to the Euclidean nearest distance principle, and using the liver capsule and hepatic vein masks as blocking boundaries to restrict the diffusion of labels across regions. Growth stops when no new labeled voxels are added for 3 consecutive rounds. The maximum number of global iterations can be set. If there are still unlabeled isolated hepatocytes after reaching the iteration limit, they will be uniformly labeled as background areas of intrahepatic lesions and will not be included in the segmentation range of the 8 types of liver segments.
[0158] This invention splits attention computation into two parallel flow paths: the longitudinal flow path maintains the consistency of blood flow conduction features through ancestor-descendant masks and directed distance encoding; the lateral flow path introduces the relative coordinates and spatial distance attenuation of the nearest common ancestor (LCA) to suppress branch interference from nearby but different sources. This design effectively solves the common boundary and spatial confusion problems in vascular map classification at the global topological scale.
[0159] In a preferred embodiment of the present invention, the method for extracting local features by inputting the vascular skeleton node map into a dynamic graph convolutional encoder is as follows:
[0160] By explicitly modeling local relative geometric relationships, robust node embeddings to spatial transformations are learned. This includes nodes containing 3D coordinates. ,radius The vascular skeleton node map is used as input. For the dynamic graph convolutional encoder, the first... Dynamic graph convolutional layer with arbitrary nodes The features are updated as follows:
[0161] ,
[0162] ,
[0163] in, For the first The first in the layer The output feature vector of each node For the first The first in the layer The input feature vector of each node, For the first Multilayer perceptron (feedforward neural network):
[0164] ,
[0165] This is the weight matrix. For bias, is the activation function; x is the input feature vector;
[0166] Presentation layer normalization operation:
[0167] ,
[0168] and These are the mean and standard deviation of the feature, respectively. and These are learnable parameters;
[0169] Indicates feature concatenation operation; Represents a node In the current feature space A set of nearest neighbor nodes, where i and j represent the nearest neighbor node indices; The maximum pooling aggregation function is defined for the channel dimension.
[0170] By introducing relative geometric features By connecting with the residuals, the network initially solves the problem of fusing small-scale boundary features and generates initial geometric features. .
[0171] To resolve the conflict between topological propagation (vertical) and spatial competition (lateral) in feature extraction, a dual-flow hybrid topological attention mechanism is proposed based on the standard Transformer encoder. The multi-head attention in the Transformer layer is reconstructed into two parallel processing flows. Assuming the total number of heads is... Before allocation Size is used to capture vertical relationships, later Size is used to capture horizontal relationships, preferred : =2:1, for example, if the total number of heads is 6. Take 4. Take 2, but the specific ratio can be adjusted.
[0172] In a preferred embodiment of the present invention, the longitudinal flow path is used to extract blood flow conduction features, specifically as follows:
[0173] This flow path aims to maintain liver segment classification labels in the "parent node" Consistency in the direction of "child nodes". Two core constraints are introduced to simulate the unidirectional conduction characteristics of blood flow.
[0174] To prevent noise from side branches (sibling branches) from interfering with the transmission of main features, a binary mask matrix is constructed. For any pair of nodes Information transfer is only permitted if they are direct blood relatives:
[0175] ,
[0176] in, For the i-th blood vessel node, Let j be the j-th blood vessel node; For nodes All ancestor nodes (upstream nodes) of the node. For nodes All descendant nodes (downstream nodes);
[0177] Undirected distance alone cannot distinguish between "blood supply source" and "feedback". Therefore, we define directed distance. ,when for The value is positive when the ancestor is not mentioned, and negative otherwise; the bias term... This is achieved through a learnable embedding layer:
[0178] ,
[0179] ,
[0180] in, Let be the distance (hop count) between node i and node j, and sgn be the sign function, where sgn (positive number) is set to 1 and sgn (negative number) is set to -1. Let be the depth of node j, which is the number of hops on the path from the root node to node j. Learnable embedding layers will Mapped to bias terms;
[0181] Attention weights of longitudinal flow paths ,for:
[0182] ,
[0183] in, The query matrix represents the set of query feature vectors for each node in the vertical flow path. The transpose of the key matrix represents the set of key feature vectors for each node in the longitudinal flow path; The value matrix represents the set of feature vectors representing the values of each node along the longitudinal flow path. The dimension of the key vector is used to scale the attention score to prevent it from becoming too large.
[0184] In a preferred embodiment of the present invention, the lateral flow path is used to extract spatial competition features, specifically as follows:
[0185] This flow path focuses on addressing the boundary discrimination problem at vascular bifurcation points, particularly distinguishing competing branches belonging to adjacent liver segments.
[0186] Traditional fully connected attention lacks awareness of tree-like branching structures. It calculates the path distance between any two nodes relative to their nearest common ancestor, constructing a two-dimensional topological coordinate system. Let... for and The nearest common ancestor is relative to the coordinates. Defined as:
[0187] ,
[0188] in, For the i-th blood vessel node, Let j be the j-th blood vessel node;
[0189] Using a two-dimensional embedded table Map this relative coordinate to attention bias This mechanism enables the model to explicitly identify sibling relationships (coordinates). ) and cousin relationships (coordinates) ), thereby suppressing feature confusion in parallel competing branches, where, This represents the number of discrete branch positions relative to the nearest common ancestor. The number of channels representing attention bias. The learnable embedding parameter table is updated during training, specifically as follows:
[0190] Set nodes and nodes The most recent common ancestor is ,node Compared to The discrete number of the sub-branch is ,node Compared to The discrete number of the sub-branch is ,and Then relative topological coordinates Represented as:
[0191] ,
[0192] Based on relative topological coordinates in a two-dimensional embedding table By searching for the corresponding learnable bias vector in the middle, we obtain:
[0193] ,
[0194] in, Represents a node and nodes The lateral topological attention bias vector between them is added to the attention score of the lateral flow path;
[0195] To further constrain the model to focus on branches that are truly adjacent in physical space, a soft suppression term based on Euclidean distance is introduced. This suppression term varies with the physical distance. As attention increases, attention intensity decreases logarithmically.
[0196] ,
[0197] in, :node With nodes The spatial inhibition bias term is used to adjust the attention score; :node Three-dimensional spatial coordinates; :node Three-dimensional spatial coordinates; A learnable temperature coefficient used to adaptively adjust the rate at which attention decays with distance;
[0198] Calculate the attention of the lateral flow path ,for:
[0199] ,
[0200] in, The query matrix represents the set of query feature vectors for each node in the lateral flow path. Let be the transpose of the key matrix, representing the set of key feature vectors for each node in the lateral flow path. The value matrix represents the set of value feature vectors for each node in the lateral flow path.
[0201] More preferably, the features extracted from the longitudinal and transverse flow paths are fused through concatenation and linear transformation:
[0202] ,
[0203] in, Indicates fusion features, Represents a linear transformation. Indicates splicing, For the attention weight of the longitudinal flow path, Attention is drawn to the lateral flow path.
[0204] In the long-range path modeling stage, a blood flow impedance sensing state-space model (HA-Mamba) is introduced. This is to fully capture the contextual structure distribution as blood flow propagates from a single root source to multiple terminal branches:
[0205] First, the vascular tree of the graph structure is decomposed into a set of independent paths from the root node to each terminal leaf node. For any extracted route The node features it contains constitute a sequence. The corresponding vessel radius sequence is To compensate for the standard sequence model's neglect of physical properties, the input sequence is feature-remodulated based on hemodynamic principles and then fed into a selective state-space model for deduction and node allocation.
[0206] In a preferred embodiment of the present invention, a blood flow impedance sensing Mamba sequence module is introduced, and the fusion features are used as its input to extract several blood flow paths from the root node directly to each terminal leaf node. The specific steps are as follows:
[0207] According to Poiseuille's law, the resistance of fluid in a pipe It is inversely proportional to the fourth power of the radius r ( ), define the path from root to leaf node. The cumulative flow resistance position of each node The sum of the flow resistances of all preceding nodes on the path:
[0208] ,
[0209] in, : Node index on the path, representing the sequential number from the root node to the current node; : The first on the path The radius of the blood vessel corresponding to each node; To prevent the denominator from being zero, a small constant is usually chosen, which is a very small positive number, for numerical stability.
[0210] The input features are mapped to a high-dimensional location vector using a multilayer perceptron (MLP) and injected as residuals.
[0211] ,
[0212] in, : Node feature vectors after injecting accumulated flow resistance location information; : The original node input feature vector;
[0213] This operation allows the model to naturally "forget" distant information separated by high-resistance capillaries when processing long sequences.
[0214] To reflect the dominant role of the main blood vessels in liver segment classification, a diameter-based gating mechanism was designed for each time step. Calculate an importance gating coefficient :
[0215] ,
[0216] Where Sigmoid is the activation function that maps the input to... interval; Learnable weight parameters for linear transformation of pipe diameter gating; : The first on the path The radius of the blood vessel at each node; Learnable bias parameters for linear transformation of pipe diameter gating;
[0217] Dynamically scaling input features using importance gating coefficients:
[0218] ,
[0219] in, : Scaling factor, a hyperparameter used to adjust the gating magnification effect; The first one after gating and dynamic scaling Each node's feature vector; for large main blood vessels ( (larger) As the value approaches 1, its feature weights are significantly amplified; however, for small, tortuous peripheral blood vessels ( Features that approach 0 retain their basic weights and are not additionally enhanced. This mechanism ensures that the model can rely more on reliable information provided by the main blood vessels when determining the liver segment classification, effectively preventing classification errors caused by complex morphology or minor interference at the vascular terminals (i.e., preventing jumps).
[0220] Obtaining remodulation sequences with strong physiological topological expressiveness Then, it is fed into a continuous state equation that depends on dynamic input:
[0221] ,
[0222] in, : The path feature sequence after remodulation This represents the path length, which is the total number of nodes in the path. :time The first derivative of the hidden state (the rate of change in the continuous state equation); :time The hidden state vector; :time The input feature vector (i.e. ); :time The output feature vector; , , : The learnable parameter matrix in the continuous state-space model, corresponding to the state transition, input projection, and output projection, respectively; Indicates the first Path The feature vector obtained after gating and dynamic scaling of the last node (i.e., the leaf node) is the remodulation feature of the end point (leaf node) of the path;
[0223] To adapt to discrete node sequences, a step parameter (i.e., a discrete scale) is used. Discretization is performed using zero-order preservation to generate the parameter matrix. and In the Mamba framework, discrete scale and projection matrix and All are from the current input item Selective scanning is achieved through adaptive generation via linear projection.
[0224] ,
[0225] ,
[0226] in, The discretized state transition matrix determines the retention ratio of the previous hidden state, according to the formula... Dynamically generated, discrete scale ; The discretized input projection matrix determines the influence of the current input on the hidden state, according to the formula... generate; The output projection matrix depends on the current input and is generated by linear projection, for example... : No. The discrete hidden state vector of each step is used to record and transmit contextual information about the historical path; : No. The discrete output feature vector of each step is the single-step result of the state-space derivation;
[0227] Obtain the output feature sequence of this path Because vascular networks have a tree-like branching structure, trunk nodes are often contained within multiple root-to-leaf paths, resulting in multiple corresponding path output features for the same vascular node after computation. To obtain a unique representation of this node for classification, feature aggregation is required. Specifically, for any vascular node... The final node feature vector is obtained by performing mean pooling on all path features containing that node. :
[0228] ,
[0229] in, The first one obtained from disassembly A set of "root-to-leaf node paths"; : in the Path In the deduction output sequence, a specific node The corresponding feature vector; Discrete scale (or step parameter) is the dynamic time step used to discretize a continuous system; it is adaptively generated from the current input. Indicates the first Path The output feature vector obtained after the state-space model derivation of the last node (leaf node);
[0230] Features after merging By directly connecting the MLP-based channel dimensionality reduction and linear classification layer (i.e., classifier), the projection convergence from the overall liver blood flow trunk to the probability of liver segment attribution labels in the portal vein basin is achieved.
[0231] Poiseuille's Law introduces a sequence modeling end of the topological path and modulates the position of the feature space based on the cumulative flow resistance generated by long-range multi-scale branches, which significantly enhances the noise resistance of the main classification feature flow to the deep complex intersection area.
[0232] In a preferred embodiment of the present invention, the method for inputting the final node feature vector into a preset classifier to obtain the liver segment category label to which each vascular tree node belongs is as follows:
[0233] The classifier uses a linear transformation plus Softmax to transform the high-dimensional features of each node. Projected onto the class space, output class probability distribution :
[0234] ,
[0235] in, and These are learnable parameters.
[0236] In a preferred embodiment of the present invention, the method further includes a step of training using a joint loss function, as follows:
[0237] ,
[0238] in, Represents the total loss function. The standard cross-entropy loss is used to supervise the classification prediction at each node; and To balance the hyperparameters of the task weights, for example Take 0.5, Take 0.3; The topological consistency loss is defined as the ancestor node. with descendant nodes The Kullback-Leibler (KL) divergence between predicted probability distributions aims to explicitly constrain prediction coherence along vascular pathways.
[0239] ,
[0240] in, Let be the set of ancestor-descendant node pairs in the vascular tree. and Representing nodes respectively and The predicted probability distribution; The Kullback-Leibler (KL) divergence function;
[0241] The supervised contrastive loss in the form of InfoNCE is used to bring similar nodes closer together and push dissimilar nodes further apart in the local feature space, thereby enhancing boundary discrimination:
[0242] ,
[0243] in, The set of vessel nodes (i.e., anchor points) participating in the contrastive loss calculation; for any vessel node (anchor point) in the set... , , , These represent the nodes respectively. The feature vectors of the positive samples (samples of the same class) and the negative samples (samples of different classes) are also present. For nodes The set of negative samples; Indicates cosine similarity; It is a learnable temperature coefficient.
[0244] This invention also provides a fully automated liver segmentation system based on the method described herein, combining dual-flow-path topological attention and hemodynamics, such as... Figure 1 As shown, it includes:
[0245] Data acquisition unit ( Figure 1 (Not shown in the image), used to obtain a vascular topology node map based on the vascular map construction process. and node feature vectors ; Figure 1 In the diagram, (a) represents the overall model architecture, (b) represents the dynamic graph convolutional encoder, (c) represents the hybrid topology Transformer module, and (d) represents the blood flow impedance sensing Mamba module. Figure 1In (d), the circular nodes with different filling textures are used to illustrate the different states of the feature vectors in the root-leaf path before and after flow resistance injection and gating modulation.
[0246] Linear layer, used to receive the vascular topology node map and node feature vectors The initial node features are then upscaled. At the network input, a linear transformation (fully connected layer) is applied to the original node features. Ascending to higher dimensions ,Right now =W +b, unifies the feature dimension; where... The original input node feature vector, with dimension 1. ; The upgraded node feature vector has a dimension of 1. ; The weight matrix of the linear transformation, with the following shape: Used for feature dimensionality upscaling; The bias vector of the linear transformation, with dimension . ;
[0247] A dynamic graph convolutional encoder is used to receive a vascular skeleton node map and extract local features. The dynamic graph convolutional encoder contains two cascaded dynamic graph convolutional layers, each of which includes:
[0248] K-nearest neighbor search layer: Based on the node features such as the input 3D coordinates, it finds the nearest neighbor nodes in the local feature space. For example, k is set to 8, and Euclidean distance is used to measure the spatial distance between nodes.
[0249] Feature stitching layer: The stitched features include the three-dimensional coordinates, radius and curvature features of the nodes, etc. The relative feature difference between the central node features and the adjacent nodes (i.e. the difference between the central node features and the adjacent node features) is stitched together.
[0250] The multilayer perceptron (MLP) layer consists of a fully connected layer and a ReLU activation function: used to perform linear transformations and non-linear activations on the concatenated high-dimensional features.
[0251] Max Pooling: performs feature aggregation along the nearest neighbor channel dimension;
[0252] Residual connections and LayerNorm: The aggregated features are added to the original input features and then normalized to obtain a single-layer output;
[0253] The original node features are input into the first dynamic graph convolutional layer, the output of the first layer is used as the input of the second layer, and the final output of the second layer is fed into the hybrid topology Transformer module.
[0254] The hybrid topology Transformer module, whose input is connected to the output of the dynamic graph convolutional encoder, is used to extract and fuse blood flow conduction features and spatial competition features to obtain fused features. The hybrid topology Transformer module contains three cascaded dual-stream hybrid attention layers, each comprising two parallel flow paths and a fusion network, specifically:
[0255] Linear mapping layer: In the vertical and horizontal flow paths, the input features are mapped to query (Q), key (K), and value (V) matrices respectively;
[0256] Attention computation and bias injection layer: includes matrix multiplication operation, scaling operation, bias (or mask) matrix addition operation with two flow paths, and Softmax activation layer;
[0257] Feature splicing layer and linear fusion layer: The feature attention matrices output from the two pipelines are spliced in the channel dimension and fused through a fully connected layer;
[0258] Feedforward Neural Network (FFN) and Layer Normalization: After the fused features pass through residual connections and layer normalization, they are fed into a feedforward network consisting of two fully connected layers and activation functions. The residuals are summed again and layer normalization is performed before output.
[0259] The output of layer l is directly used as the input of layer l+1, and three layers are stacked consecutively. The output features of layer 3 are fed into the blood flow impedance sensing Mamba sequence module.
[0260] The blood flow impedance sensing Mamba sequence module, whose input is connected to the output of the hybrid topology Transformer module, is used to extract several blood flow paths from the root node to each terminal leaf node. For any vessel node, the features of all paths containing that node are averaged and pooled to obtain the final node feature vector. The blood flow impedance sensing Mamba sequence module contains one HA-Mamba inference layer, which includes:
[0261] Path decomposition operation: Reorganize the graph structure data into independent path sequences (this step is data reorganization rather than weighted network layers).
[0262] Flow resistance injection layer (containing 1 MLP layer): The accumulated flow resistance scalar is mapped to a high-dimensional position vector and fused with the input sequence through residual addition operation;
[0263] The diameter-gated layer consists of one fully connected layer and a sigmoid activation layer: it calculates the diameter-gated coefficients and dynamically scales the sequence features through multiplication operations; for example, in the sigmoid transformation of the gating coefficients, the weights are initialized to 0.1 and the biases are initialized to -0.5, so that the weights of the main blood vessels are more significantly amplified.
[0264] State space scanning layer: It consists of three parallel linear projection layers (generating discretization coefficients Δ, B, C), discretization operators, and a selective scanning inference mechanism. It outputs long-range dependent feature sequences. For example, if the input feature dimension is 256, the output dimension of the three linear projection layers is also 256. The discretization coefficients Δ are generated from the input features through a 128-dimensional linear layer, ensuring efficient modeling and inference of the model on long-sequence vascular pathways.
[0265] Mean pooling layer: The feature sequences corresponding to the same physical blood vessel node in different paths are averaged and aggregated to complete the folding and recovery of sequence to graph features;
[0266] After receiving the fused features from the hybrid topology Transformer module, the feature vectors are injected, gated, scanned, and pooled to output the final high-dimensional node feature vectors to the classifier.
[0267] A classifier, whose input is connected to the output of the blood flow impedance sensing Mamba sequence module, obtains the liver segment category label to which each vascular tree node belongs; the classifier includes:
[0268] Channel dimensionality reduction layer, with a linear fully connected layer / MLP at the bottom: used to compress and map information from the feature vectors of high-dimensional nodes;
[0269] Linear classification layer: maps the dimensionality-reduced node features to the target category number: 9 categories, including 8 portal vein hepatic segment categories and background;
[0270] Softmax layer: Normalizes the output to the probability distribution of each node belonging to each liver segment.
[0271] Liver segmentation generation module ( Figure 1 (Not shown in the image), the liver segment category labels of the vascular tree nodes output by the classifier are mapped back to the portal vein 3D pipeline model, and the labeled portal vein vascular tree is used as a seed to perform region growth within the liver parenchyma mask to generate a complete liver segment mask.
[0272] Regarding network training, the DGTT-HA (Dual-Stream Graph Topo-Transformer with Haemodynamic-Aware Mamba) model (a fully automatic segmentation model, i.e., the system structure model of this invention) was used, with AdamW as the optimizer (initial learning rate). Weight decay This is combined with a cosine annealing strategy to ensure smooth convergence of the model under the aforementioned joint loss.
[0273] For example, a dedicated dataset containing 73 portal vein abdominal CT images can be used. All data underwent initial segmentation based on UNet++, semi-automatic centerline extraction, and independent annotation and arbitration by radiologists to ensure the accuracy of vascular topology annotation. For data partitioning, 15 cases (20%) were randomly selected as the independent test set, and the remaining 58 cases were used for model training and validation using 5-fold cross-validation. The final performance was calculated as the 5-fold average. All node features were Z-score normalized before being input into the model.
[0274] To comprehensively evaluate model performance, the mean accuracy and macro-average F1 score are reported for all nine categories (eight liver segments + background). In addition, two proprietary metrics are introduced: Topological Consistency Score (TCS) and Boundary Discrimination Accuracy (BDA).
[0275] To evaluate the effectiveness of the proposed method, the system model of this invention was comprehensively compared with a series of node classification network models, including DGCNN, GAT, Tree-LSTM, and related research TPMA-Net. All results are the average values of 5-fold cross-validation. See Table 1 for details.
[0276] Table 1 Comparison Results
[0277]
[0278] As shown in Table 1, Tree-LSTM achieves a high level (0.9891) in topological consistency (TCS) due to its tree structure prior, but it has limitations in boundary discrimination (BDA) for overlapping liver segments. TPMA-Net's pooling architecture, designed for dense point clouds, is difficult to adapt to the sparse key node graph constructed in this study, resulting in limited feature extraction efficiency, low overall performance, and a high inference time of 163.80 ms. In contrast, this invention achieves a very good balance between global topological consistency and local feature discrimination on sparse graphs, and significantly outperforms in all major discrimination metrics.
[0279] The overall accuracy (Acc) and Macro-F1 score outperformed the suboptimal model (Tree-LSTM) by 4.16% and 3.97%, respectively, while the boundary discrimination accuracy (BDA) was significantly improved to 0.8612. Meanwhile, DGTT-HA's average inference time per sample is only 10.32 ms, balancing excellent prediction accuracy with lightweight clinical real-time requirements.
[0280] The direct output of the deep learning network is the liver segment category of discrete skeleton nodes. In order to transform the classification results of vascular nodes into complete three-dimensional liver segment divisions, and to correct the prediction anomalies of individual isolated nodes, a post-processing strategy based on path voting and region growing was designed.
[0281] Bottom-up label propagation based on path voting:
[0282] Considering that a few terminal nodes may still have classification errors due to weak features, label smoothing is performed from bottom to top using the topology of the vascular tree. When the predicted label of a parent node differs from that of its child branches (e.g., two consecutive child nodes have the same predicted label but different from the parent node, this is considered a discrepancy and label correction is triggered to ensure consistency of classification results within the branch), the algorithm will vote based on the mainstream category of downstream consecutive nodes to correct the label of the current node. This operation can effectively eliminate isolated misclassifications and ensure consistency of classification results within a single portal vein branch.
[0283] like Figure 2 As shown (the classification refers to the 8 segments of the liver anatomy based on the portal vein basin in the figure), basin region growth: After completing the classification correction of vascular branches, the classification results are mapped back to the original 3D CT image space, drawing on the existing growth mechanism proposed by Yang et al. Using the portal vein with classification labels as seed points, voxel-level boundary expansion is performed outward within the liver parenchyma (the expansion stopping condition can be set, for example, stopping when the voxel similarity is less than 0.7 or the expansion distance exceeds 2 mm), thereby forming a complete liver segment division.
[0284] The method generates continuous and naturally defined independent liver segments. Compared with the traditional geometric method of rigid planar segmentation based on the location of the main vein, this nonlinear boundary generated by the watershed strictly follows the actual course of the intrahepatic portal vein and is more consistent with the real anatomical and physiological structure, thus providing a more accurate planning reference for clinical anatomical liver resection.
[0285] The specific embodiments described herein are merely illustrative examples of the present invention. Those skilled in the art can make various modifications or additions to the described embodiments or use similar methods to substitute them, without departing from the technology of the present invention or exceeding the scope defined by the appended claims.
[0286] In the embodiments of this application, terms such as "fixed," "fixed connection," and "fixed connection" refer to common fixing methods in the prior art, such as welding, riveting, and screws. "Rotary connection" refers to common rotary connection methods in the prior art, such as hinges and bearing rotation. If electrical components are provided, the functions, control, and power supply methods of all electrical components are common technical means in the prior art. This application has not improved them and they are not within the protection scope of this application. Therefore, this application will not elaborate on them.
Claims
1. A fully automated liver segmentation method combining dual-flow-path topological attention and hemodynamics, characterized in that, Includes the following steps: A vascular topology node graph is obtained based on the vascular graph construction process. and node feature vectors And input the dynamic graph convolutional encoder to extract local features; The hybrid topology Transformer module is set up to reconstruct the multi-head attention in the Transformer layer into two parallel processing paths: a longitudinal path and a transverse path. Local features are input into the hybrid topology Transformer module to extract blood flow conduction features and spatial competition features and fuse them to obtain fused features. A blood flow impedance sensing Mamba sequence module is introduced, and the fused features are used as its input to extract several blood flow paths from the root node to each terminal leaf node. For any blood vessel node, the features of all paths containing that node are averaged and pooled to obtain the final node feature vector. The final node feature vector is input into a preset classifier to obtain the liver segment category label to which each vascular tree node belongs; The process of mapping the vascular tree nodes with liver segment category labels back to the portal vein 3D pipeline model is as follows: Based on the spatial coordinates and topological connections between the vascular tree nodes and the portal vein centerline points, the liver segment category labels are assigned to the corresponding centerline points and propagated to the corresponding portal vein lumen region to obtain a labeled portal vein vascular tree; Using the labeled portal vein vascular tree as a seed, regional growth is performed within the liver parenchyma mask area to determine the liver segment category corresponding to each voxel in the liver parenchyma, and the complete liver segmentation result is generated and output.
2. The fully automated liver segmentation method combining dual-flow-path topological attention and hemodynamics as described in claim 1, characterized in that, The method for extracting local features by inputting the vascular skeleton node map into a dynamic graph convolutional encoder is as follows: For the dynamic graph convolution encoder, the first Dynamic graph convolutional layer with arbitrary nodes The features are updated as follows: , , in, For the first The first in the layer The output feature vector of each node For the first The first in the layer The input feature vector of each node, For the first Multilayer perceptron: , This is the weight matrix. For bias, is the activation function; x is the input feature vector; Presentation layer normalization operation: , and These are the mean and standard deviation of the feature, respectively. and These are learnable parameters; Indicates feature concatenation operation; Represents a node In the current feature space A set of nearest neighbor nodes, where i and j represent the nearest neighbor node indices; The maximum pooling aggregation function is defined for the channel dimension. By introducing relative geometric features By connecting with the residuals, the network initially solves the problem of fusing small-scale boundary features and generates initial geometric features. .
3. The fully automated liver segmentation method combining dual-flow-path topological attention and hemodynamics as described in claim 1, characterized in that, The longitudinal flow path is used to extract blood flow conduction features, specifically: Construct a binary mask matrix For any pair of nodes Information transfer is only permitted if they are direct blood relatives: , in, For the i-th blood vessel node, Let j be the j-th blood vessel node; For nodes All ancestor nodes, For nodes All descendant nodes; Define directed distance ,when for The value is positive when the ancestor is not mentioned, and negative otherwise; the bias term... This is achieved through a learnable embedding layer: , , in, Let be the distance between node i and node j, and sgn be the sign function. Let be the depth of node j, which is the number of hops on the path from the root node to node j. Learnable embedding layers will Mapped to bias terms; Attention weights of longitudinal flow paths ,for: , in, The query matrix represents the set of query feature vectors for each node along the vertical flow path. The transpose of the key matrix represents the set of key feature vectors for each node in the longitudinal flow path; The Value matrix represents the set of eigenvectors representing the values of each node along the longitudinal flow path. : The dimension of the key vector, used to scale the attention score to prevent the value from becoming too large.
4. The fully automated liver segmentation method combining dual-flow-path topological attention and hemodynamics according to claim 3, characterized in that, The lateral flow path is used to extract spatial competition features, specifically: set up for and The nearest common ancestor is relative to the coordinates. Defined as: , in, For the i-th blood vessel node, Let j be the j-th blood vessel node; Using a two-dimensional embedded table Map this relative coordinate to attention bias ,in, This represents the number of discrete branch positions relative to the nearest common ancestor. The number of channels representing attention bias. The learnable embedding parameter table is updated during training, specifically as follows: Set nodes and nodes The most recent common ancestor is ,node Compared to The discrete number of the sub-branch is ,node Compared to The discrete number of the sub-branch is ,and Then relative topological coordinates Represented as: , Based on relative topological coordinates in a two-dimensional embedding table By searching for the corresponding learnable bias vector in the middle, we obtain: , in, Represents a node and nodes The lateral topological attention bias vector between them is added to the attention score of the lateral flow path; Introducing a soft suppression term based on Euclidean distance, as the physical distance... As attention increases, attention intensity decreases logarithmically. , in, :node With nodes The spatial inhibition bias term is used to adjust the attention score; :node Three-dimensional spatial coordinates; :node Three-dimensional spatial coordinates; A learnable temperature coefficient is used to adaptively adjust the rate at which attention decays with distance; this is used to calculate the attention in the lateral flow path. ,for: , in, The query matrix represents the set of query feature vectors for each node on the lateral flow path. Let be the transpose of the Key matrix, representing the set of key feature vectors for each node in the lateral flow path. Value matrix represents the set of eigenvectors of each node in the lateral flow path.
5. The fully automated liver segmentation method combining dual-flow-path topological attention and hemodynamics according to claim 4, characterized in that, Features extracted from the longitudinal and transverse flow paths are fused through concatenation and linear transformation: , in, Indicates fusion features, Represents a linear transformation. Indicates splicing, For the attention weight of the longitudinal flow path, Attention is drawn to the lateral flow path.
6. The fully automated liver segmentation method combining dual-flow-path topological attention and hemodynamics according to claim 1, characterized in that, A blood flow impedance sensing Mamba sequence module is introduced, and the fused features are used as its input to extract several blood flow paths from the root node to each terminal leaf node. The specific steps are as follows: Based on Poiseuille's law, the resistance of fluid in the pipe... It is inversely proportional to the fourth power of the radius r. Define the path from the root to the leaf node. The cumulative flow resistance position of each node The sum of the flow resistances of all preceding nodes on the path: , in, : Node index on the path, representing the sequential number from the root node to the current node; : The first on the path The radius of the blood vessel corresponding to each node; : To prevent small constants from having a denominator of zero; The input features are mapped to a high-dimensional location vector through a multilayer perceptron (MLP) and injected as residuals. , in, : Node feature vectors after injecting accumulated flow resistance location information; : The original node input feature vector; Design a pipe diameter-based gating mechanism for each time step. That is, the first For each node, calculate an importance gating coefficient. : , in, Sigmoid is an activation function that maps the input to... interval; Learnable weight parameters for linear transformation of pipe diameter gating; : The first on the path The radius of the blood vessel at each node; Learnable bias parameters for linear transformation of pipe diameter gating; Dynamically scaling input features using importance gating coefficients: , in, : Scaling factor, a hyperparameter used to adjust the gating magnification effect; The first one after gating and dynamic scaling Each node's feature vector; Obtaining remodulation sequences with strong physiological topological expressiveness Then, it is fed into a continuous state equation that depends on dynamic input: , in, : The path feature sequence after remodulation This represents the path length, which is the total number of nodes in the path. :time The first derivative of the hidden state; :time The hidden state vector; :time The input feature vector, i.e. ; :time The output feature vector; , , : The learnable parameter matrix in the continuous state-space model, corresponding to the state transition, input projection, and output projection, respectively; Indicates the first Path The feature vector obtained after gating and dynamic scaling of the last node is the remodulation feature of the end point of the path. To adapt to discrete node sequences, the stride parameter is used. That is, a discrete scale, using zero-order preservation for discretization to generate a parameter matrix. and In the Mamba framework, discrete scale and projection matrix and All are from the current input item Selective scanning is achieved through adaptive generation via linear projection. , , in, The discretized state transition matrix determines the retention ratio of the previous hidden state, according to the formula... Dynamically generated, discrete scale ; The discretized input projection matrix determines the influence of the current input on the hidden state, according to the formula... generate; The output projection matrix depends on the current input and is generated by linear projection. : No. The discrete hidden state vector of each step is used to record and transmit contextual information about the historical path; : No. The discrete output feature vector of each step is the single-step result of the state-space derivation; Obtain the output feature sequence of this path For any vascular node The final node feature vector is obtained by performing mean pooling on all path features containing that node. : , in, The first one obtained from disassembly A set of "root-to-leaf node paths"; : in the Path In the deduction output sequence, a specific node The corresponding feature vector; Indicates the first Path The output feature vector obtained from the state-space model derivation of the last node; Features after merging By directly connecting the MLP-based channel dimensionality reduction and linear classification layers, projection convergence is achieved from the overall liver blood flow trunk to the probability of liver segment attribution labels in the portal vein basin.
7. The fully automated liver segmentation method combining dual-flow-path topological attention and hemodynamics according to claim 1, characterized in that, The method for inputting the final node feature vector into a preset classifier to obtain the liver segment category label to which each vascular tree node belongs is as follows: The classifier uses a linear transformation plus Softmax to transform the high-dimensional features of each node. Projected onto the class space, output class probability distribution : , in, and These are learnable parameters.
8. The fully automated liver segmentation method combining dual-flow-path topological attention and hemodynamics according to claim 1, characterized in that, It also includes the step of training using a joint loss function, as follows: , in, Represents the total loss function. The standard cross-entropy loss is used to supervise the classification prediction at each node; and Hyperparameters for balancing the weights of each task; The topological consistency loss is defined as the ancestor node. with descendant nodes The Kullback-Leibler divergence between predicted probability distributions aims to explicitly constrain prediction coherence along vascular pathways: , in, Let be the set of ancestor-descendant node pairs in the vascular tree. and Representing nodes respectively and The predicted probability distribution; The Kullback-Leibler divergence function; The supervised contrastive loss in the form of InfoNCE is used to bring similar nodes closer together and push dissimilar nodes further apart in the local feature space, thereby enhancing boundary discrimination: , in, The set of vessel nodes participating in the contrastive loss calculation, i.e., the anchor set; for any vessel node in the set... , , , These represent the nodes respectively. The feature vectors of positive sample nodes of the same type, and the feature vectors of negative sample nodes of different types; For nodes The set of negative samples; Indicates cosine similarity; It is a learnable temperature coefficient.
9. A fully automated liver segmentation system combining dual-flow-path topological attention and hemodynamics, based on the fully automated liver segmentation method according to any one of claims 1-8, characterized in that, include: The data acquisition unit is used to obtain a vascular topology node map based on the vascular map construction process. and node feature vectors ; Linear layer, used to receive the vascular topology node map and node feature vectors And perform initial node feature upscaling. At the network input, a linear transformation is applied to the original node features... Ascending to higher dimensions ,Right now =W +b, unifies the feature dimension; where... The original input node feature vector, with dimension 1. ; The upgraded node feature vector has a dimension of 1. ; The weight matrix of the linear transformation, with the following shape: Used for feature dimensionality upscaling; The bias vector of the linear transformation, with dimension . ; A dynamic graph convolutional encoder is used to receive an upscaled vascular topology node graph and node feature vectors, and extract local features. The dynamic graph convolutional encoder contains two cascaded dynamic graph convolutional layers, each comprising: K-Nearest Neighbor Search Layer: For the input 3D coordinate node features, find the nearest neighbor nodes in the local feature space; Feature splicing layer: splices the features of the central node with the relative feature differences of the adjacent nodes; The multilayer perceptron (MLP) consists of a fully connected layer and a ReLU activation function, which is used to perform linear transformations and nonlinear activations on the concatenated high-dimensional features. Max pooling layer: performs feature aggregation along the nearest neighbor channel dimension; Residual connection and layer normalization layer: The aggregated features are added to the original input features and then normalized to obtain a single-layer output; The original node features are input into the first dynamic graph convolutional layer, the output of the first layer is used as the input of the second layer, and the final output of the second layer is fed into the hybrid topology Transformer module. The hybrid topology Transformer module, whose input is connected to the output of the dynamic graph convolutional encoder, is used to extract and fuse blood flow conduction features and spatial competition features to obtain fused features. The hybrid topology Transformer module contains three cascaded dual-stream hybrid attention layers, each comprising two parallel flow paths and a fusion network, specifically: Linear mapping layer: In the vertical and horizontal flow paths, the input features are mapped to a query Q, key K, and value V matrix, respectively; Attention computation and bias injection layer: includes matrix multiplication, scaling, bias matrix addition, and softmax activation layer with two flow paths; Feature splicing layer and linear fusion layer: The feature attention matrices output from the two pipelines are spliced in the channel dimension and fused through a fully connected layer; Feedforward Neural Network Layers and Layer Normalization: After the fused features pass through residual connections and layer normalization, they are fed into a feedforward network consisting of two fully connected layers and activation functions. The residuals are summed again and layer normalization is performed before output. The output of layer l is directly used as the input of layer l+1, and three layers are stacked consecutively. The output features of layer 3 are fed into the blood flow impedance sensing Mamba sequence module. The blood flow impedance sensing Mamba sequence module, whose input is connected to the output of the hybrid topology Transformer module, is used to extract several blood flow paths from the root node to each terminal leaf node. For any vessel node, the features of all paths containing that node are averaged and pooled to obtain the final node feature vector. The blood flow impedance sensing Mamba sequence module contains one HA-Mamba inference layer, which includes: Path decomposition operation: Reorganizes graph structure data into independent path sequences; The flow resistance injection layer contains one MLP layer: it maps the accumulated flow resistance scalar into a high-dimensional position vector and fuses it with the input sequence through residual addition operation; The pipe diameter gating layer, consisting of one fully connected layer and a Sigmoid activation layer, calculates the pipe diameter gating coefficients and dynamically scales the sequence features through multiplication operations. State-space scanning layer: It consists of three parallel linear projection layers, a discretization operator, and a selective scanning inference mechanism, and outputs a long-range dependent feature sequence. Mean pooling layer: The feature sequences corresponding to the same physical blood vessel node in different paths are averaged and aggregated to complete the folding and recovery of sequence to graph features; After receiving the fused features from the hybrid topology Transformer module, the feature vectors are injected, gated, scanned, and pooled to output the final high-dimensional node feature vectors to the classifier. A classifier, whose input is connected to the output of the blood flow impedance sensing Mamba sequence module, obtains the liver segment category label to which each vascular tree node belongs; the classifier includes: Channel dimensionality reduction layer, with a linear fully connected layer / MLP at the bottom: used to compress and map information from the feature vectors of high-dimensional nodes; Linear classification layer: Maps the dimensionality-reduced node features to the target category number: 9 categories, including 8 portal vein basin liver segment categories and background; Softmax layer: Normalizes the output to the probability distribution of each node belonging to each liver segment; The liver segmentation generation module maps the liver segment category labels of the vascular tree nodes output by the classifier back to the portal vein 3D pipeline model, and uses the labeled portal vein vascular tree as a seed to perform regional growth within the liver parenchyma mask to generate a complete liver segmentation mask.