Tubular structure image segmentation method based on topology perception position coding

By using a topology-aware location coding method, the centerline and bounding box of the tubular structure are predicted using an encoder-decoder network and a state-space model (SSM), which solves the problem of breakage and misconnection in tubular structure segmentation in existing technologies and achieves more efficient segmentation accuracy.

CN121120669APending Publication Date: 2025-12-12BEIJING UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511167346.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-20
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

Existing medical imaging technologies struggle to accurately segment the topological features of tubular structures, leading to fragmented and misconnected segmentation results. Furthermore, the scarcity of labeled samples and the scanning method limit the learning effectiveness of deep learning models.

Method used

A topology-aware location coding method is adopted, which predicts the centerline and bounding box of the tubular structure through an encoder-decoder network, and combines the state-space model (SSM) for location coding learning. By utilizing the spatial path and location information of the tubular structure, the accuracy of the segmentation model is enhanced.

Benefits of technology

It improves the accuracy and integrity of tubular structure segmentation, reduces interference from irrelevant information, and maintains the ability to capture the spatial continuity of the target structure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121120669A_ABST
    Figure CN121120669A_ABST
Patent Text Reader

Abstract

The invention discloses a tubular structure image segmentation method based on topology perception position coding, and relates to the field of medical image processing. The method comprises the following steps: firstly, predicting an offset graph to extract a center line, obtaining bounding box coordinates containing a target as prompt information, then locking a segmented region through center line migration, carrying out position coding on features of the region, and enabling a model to fully learn tubular structure knowledge by using a space path and position information at the same time. Compared with a conventional deep learning method, the tubular structure image segmentation method based on topology perception position coding provided by the invention can more efficiently learn the feature representation of the tubular structure, and maintains the capability of capturing the spatial continuity of the target structure while reducing irrelevant information interference, thereby improving the segmentation precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical image processing, and in particular to a method for segmenting tubular structure images based on topology-aware location coding. Background Technology

[0002] Tubular structures (such as blood vessels, nerve bundles, and bronchi) are key components of human anatomy. Precise segmentation of their morphology and topological features is of significant clinical importance for disease diagnosis (such as stroke and tumor invasion), surgical planning (such as vascular intervention and nerve decompression), and prognostic assessment. However, the complex nature of these structures and the limitations of current technologies present multiple challenges for segmentation. These challenges stem from both the anatomical characteristics of the structures themselves and the inadequacies of imaging techniques and algorithms.

[0003] Current medical imaging techniques have significant limitations in capturing the course of tubular structures. Commonly used techniques such as CT and MRI often exhibit anisotropic spatial resolution, and the difference between slice thickness and planar resolution disrupts the continuity of the structure in the depth direction, making it difficult to establish a complete contextual relationship along the natural course of the tubular structure. Simultaneously, the contradiction between scanning field of view and resolution persists: while high-resolution scans can reveal local details, they struggle to cover the entire tubular network, while large-field-of-view imaging loses information about small branches, making it difficult to effectively capture the global coherence of the structural course. This presents a natural obstacle to coherent modeling along tubular structures.

[0004] The scale diversity of tubular structures further increases the difficulty of segmentation. The diameter can vary by several times or even tens of times from the main trunk to the terminal branches. For example, there are significant scale differences between aorta and capillaries, and between main bronchus and bronchioles. Moreover, the branching morphology is complex and varied. This requires the segmentation model to be able to identify the thicker main trunk structure and accurately capture the thin terminal branches. How to take into account the feature extraction and recognition of different scales in a single model has always been a difficult point for technological breakthroughs.

[0005] More importantly, the topological integrity of tubular structures is crucial for clinical applications. Their connectivity and the accuracy of branching relationships directly impact disease diagnosis, such as whether blood vessels are occluded or nerves are continuous. However, current segmentation results often contain topological errors, either due to structural breaks leading to incompleteness, or due to misconnections forming false connections, or even missing key branches. These problems stem from the low contrast between tubular structures and surrounding tissues, blurred boundaries, and insufficient modeling of topological constraints by algorithms. Simultaneously, the scarcity and difficulty of labeled samples make it difficult for models to learn sufficient structural features. Introducing additional features to assist segmentation may increase the computational burden due to redundant information, thus affecting the model's accurate identification of topological structures. These intertwined factors make accurate segmentation of tubular structures a bottleneck that urgently needs to be overcome in the field of medical image analysis.

[0006] In recent years, intelligent analysis of medical images based on computer vision and deep learning has become a research hotspot, and automatic medical image segmentation provides a reliable reference for tasks such as clinical diagnosis, surgical planning, and clinical teaching.

[0007] In the field of deep learning, medical image tubular structure segmentation methods can be roughly classified into two main directions: one is based on network architecture design. This type of method is designed to address the characteristics of tubular structures, such as their slenderness and small proportion. It guides the model to focus on key areas through customized networks (such as introducing attention mechanisms and multi-scale feature fusion modules) in an attempt to enhance the perception of fine structures. The other type is based on feature enhancement. It incorporates additional information such as geometric features (such as curvature and direction vectors) and topological features (such as connectivity and branching patterns) of tubular structures to help the model understand the spatial properties of the structure. In addition, there are methods that combine semi-supervised / unsupervised learning to address the problem of scarce labeled samples. The model is trained with a small amount of labeled data or unlabeled data to reduce the dependence on manual annotation. For accurate segmentation of tubular structures, the following problems may exist: (1) few labeled samples; (2) the inherent scanning method makes it difficult for the collected image data to completely retain the global context relationship during the movement of the tubular structure, which makes it difficult for the deep learning model to learn the continuous shape and overall topology of the structure, and easily leads to problems such as breakage and misconnection in the segmentation results. Summary of the Invention

[0008] This invention provides a method for segmenting tubular structure images based on topology-aware location coding, the method comprising:

[0009] In the tubular structure centerline prediction module, the offset map generated by the tubular structure target template data is used as the label, and the corresponding tubular structure image data is used as the input to train the encoder-decoder network 1 to obtain the tubular structure offset map prediction model.

[0010] A tubular structure migration prediction model is used to predict the migration map of the input tubular structure image. The centerline of the target region is formed by using the "local maxima of the migration" as the reference. Subsequently, a bounding box extraction process is performed, taking the centerline of the tubular structure as the reference and extracting its discrete sampling point sequence P. i (i = 0, 1, 2, ...), where each P i For three-dimensional coordinates (x) i ,y i ,z i ), serving as the center of the corresponding local region. For each center P i It extends to a certain scale in three orthogonal directions in three-dimensional space (defined along the radial and axial directions of the tubular structure), specifically:

[0011] (1) Radial expansion: In a plane perpendicular to the tangent of the center line, it expands symmetrically to both sides along the X and Y axes (or the radial axes of the local coordinate system), with an expansion distance of r (to ensure coverage of the radius of the tubular structure and possible boundary errors);

[0012] (2) Axial expansion: It extends forward and backward along the tangent direction of the center line (Z-axis or local axial direction), and the expansion length r (can be dynamically adjusted according to the curvature of the tubular structure to avoid missed detection).

[0013] Each local region is a closed interval including its boundary, and its 3D bounding box coordinates are determined and stored in the following way:

[0014] Along the X-axis: [x i -r,x i +r], recorded as x min,i and x max,i ;

[0015] Along the Y-axis: [y i -r,y i +r], recorded as y min,i and y max,i ;

[0016] Along the Z-axis: [z i -r,z i +r], recorded as z min,i and z max,i ;

[0017] The final storage format is shown in formula (1), which obtains the bounding box coordinate information centered on the point on the center line, providing information for subsequent location encoding;

[0018] bbox i =(x min,i x max,i y min,i y max,i , z min,i , z max,i (i = 0, 1, 2, ...)(1)

[0019] In the tubular structure accurate segmentation module, the tubular structure image is used as input, and the corresponding tubular structure target template data is used as labels to train the encoder-decoder network 2 to obtain the tubular structure segmentation model.

[0020] In codec network 2, a centerline-based scanning position embedding encoding module is added. Specifically, the feature map obtained after downsampling by the encoder is mapped using the bounding box coordinate information mentioned above. Note that this bounding box coordinate information is the coordinate information obtained from codec network 1 after mapping. Specifically, the original feature map size is (B0, C0, H0, D0, W0), where B0 is the stride, C0 is the number of channels, H0 is the height, D0 is the depth, and W0 is the width. The image feature size input to the module is (B, C, H, D, W). Let the sampling rate be s, and the mapped coordinate information be bboxes' = [b ... i '], i = 0, 1, 2, 3, ...., bbox i As shown in formula (2), where s x =H / H0,s y =D / D0,s z =W / W0, representing the sampling ratios in the three dimensions. Effective features are extracted from the image features based on the mapped coordinates.

[0021] bbox′ i =(x min,i ×s x x max,i ×s x y min,i ×s y y max,i ×s y , z min,i ×s z , z max,i ×s z (2)

[0022] After flattening and normalizing the obtained effective features, the sequence length may be too long, which is not conducive to efficient processing. To address this, a block operation is performed using bounding boxes to split the long sequence into several shorter sequences for processing one by one, thereby improving processing efficiency while ensuring the integrity of local features.

[0023] Specifically, after dividing the target region features into blocks using bounding box coordinate information, the features of each block are flattened into a sequence. At this time, the feature size is adjusted from the original (B,C,H,D,W) to (B,L,C). Here, L represents the length of the sequence after flattening each block, and its value is equal to the product of the dimensions of the bounding box in each dimension, as shown in formula (3). This corresponds exactly to the spatial size of the block region.

[0024] L=(x max,i ×s x -x min,i ×s x )×(y max,i ×sy -y min,i ×s y )×(z max,i ×s z -z min,i ×s z (3)

[0025] The input is then fed into the Mamba layer for sequence modeling, and positional encoding is learned through selective scanning using State Space Models (SSMs). Although SSMs are essentially linear time-invariant (LTI) systems, their implementation in the Mamba module has undergone a key evolution: unlike the fixed A, B, C, and D coefficients in traditional SSMs, Mamba dynamically calculates these core coefficients based on the input data—that is, the coefficients change in real time with the input content. This transforms the original linear time-invariant system into a linear time-varying (LTV) system, thereby breaking through the static limitations of traditional SSMs and more flexibly adapting to the dynamic characteristics of the input sequence. Specifically, in the classic state-space model, two basic equations are established, namely the state equation and the observation equation, which simulate the relationship between the input ()∈R and the output ()∈R through the N-dimensional hidden state h()∈R at the current time t. This process is shown in equations (4) and (5).

[0026] h′(t)=Ah(t)+Bx(t) (4)

[0027] y(t)=Ch(t)+Dx(t) (5)

[0028] Where h'() is the derivative of the current state h(), A∈R N×N It is a state transition matrix that describes how the state changes over time, B∈R N×1 It is the input matrix that controls how the input affects the state change, C∈R 1×N This represents the output matrix that generates the output based on the current state, and D∈R represents the command coefficients that determine how the input directly affects the output.

[0029] The original feature map is then restored, and using the obtained bounding box coordinate information, the target region features are placed back into their corresponding positions in the original feature map, ensuring the spatial structure integrity of the decoder input. Finally, the tubular structure image is predicted using a tubular structure segmentation model to obtain the result.

[0030] Optionally, the encoding / decoding network can be selected according to actual needs, and is not limited to a certain structure of encoding / decoding network, and the two encoding / decoding network structures do not necessarily have to be the same.

[0031] Optionally, when calculating the coordinate range of the target region's bounding box, the pixel range can be extended in each direction of the three-dimensional space according to the actual prediction requirements, based on the offset map of the image to be predicted.

[0032] Optionally, when adding a scanning position embedding encoding module based on centerline walking, it can be adjusted according to the actual downstream task. The module can be placed after any stage of encoder downsampling or decoder upsampling. The optional positions are indicated by dashed lines, and the number of modules can be arbitrary.

[0033] Optionally, when mapping bounding box coordinate information, the mapping can be adjusted according to the actual module placement position. After the module is placed in different stages of the codec, the mapped coordinate information matches the spatial receptive field scale of the corresponding codec layer.

[0034] The technical solution provided in this application offers a method for tubular structure image segmentation based on topology-aware location encoding, used for computer-aided tubular structure segmentation. This method first extracts the centerline from a predicted offset map, obtaining the bounding box coordinates containing the target as cue information. Then, it uses the centerline to locate the segmentation region and encodes the features of this region, allowing the model to utilize both spatial path and location information to fully learn tubular structure knowledge. Compared with conventional deep learning methods, the tubular structure image segmentation method based on topology-aware location encoding provided by this invention can learn the feature representation of tubular structures more efficiently, reducing interference from irrelevant information while maintaining the ability to capture the spatial continuity of the target structure, thereby improving segmentation accuracy.

[0035] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and to make the above technical solution, its purpose, features and advantages more obvious and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0036] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0037] Figure 1 An architecture diagram of the tubular structure image segmentation method based on topology-aware location coding provided by the present invention is shown.

[0038] Figure 2 An example diagram is shown below illustrating the tubular structure image segmentation method based on topology-aware location coding provided by the present invention. Detailed Implementation

[0039] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.

[0040] This method fully utilizes the centerline of tubular structures to mine their topological features. In tubular structure images, the spatial topological relationships of the tubular structure are constructed based on the centerline. By focusing on key areas around the centerline, the continuity and branching directions of the tubular structure are highlighted, reducing interference from surrounding non-target tissues during feature extraction. This allows the model to have higher sensitivity to the fine topological morphology of the tubular structure, enabling the network to more clearly distinguish the tubular structure from the features of surrounding tissues. This invention proposes a tubular structure image segmentation method based on topology-aware location coding, such as... Figure 1 As shown, in this method, the center line is extracted by predicting the offset map, and the coordinates of the bounding box containing the target are obtained as prompt information. Then, the segmentation region is locked by walking along the center line, and the bounding box coordinate information of the target region is generated. By taking the tubular structure image and the bounding box coordinates as input, the U-Mamba network is used to achieve accurate segmentation: for the skips[1] feature that retains rich spatial details, after embedding the center line walking position, Mamba is used to model local association; for the skips[-1] feature containing global context, the long-distance dependency capture ability is directly enhanced by Mamba. The model can use both spatial path and position information to fully learn the knowledge of tubular structures and improve the accuracy of tubular structure prediction. Example operation is as follows Figure 2 As shown.

[0041] The following description, in conjunction with the accompanying drawings, illustrates various embodiments of the present invention:

[0042] This invention uses the publicly available dataset MSD Hepatic Vessel for training, validation, and testing. This dataset contains 303 3D CT data points, with a training, validation, and test set ratio of 8:1:1.

[0043] 1) Tubular structure centerline prediction module:

[0044] Step 1: Predict the offset map to obtain the centerline. Using the offset map generated from the target template as the GroundTruth label, the corresponding tubular structure image is used as input to train an encoder-decoder network as the tubular structure centerline prediction module. In this experiment, the U-Mamba network is directly selected as this encoder-decoder network, and the Dice loss function and cross-entropy loss function are used during training. When the tubular structure image is input to the tubular structure centerline prediction module, its offset map is predicted to extract the centerline.

[0045] Step 2: Generate the target bounding box coordinate information. Using the centerline obtained in Step 1, and taking the centerline of the tubular structure as a reference, obtain its discrete sampling point sequence P. i (i = 0, 1, 2, ...), where each P i For three-dimensional coordinates (x) i ,y i ,z i ), serving as the center of the corresponding local region. For each center P i It extends to a certain scale in three orthogonal directions in three-dimensional space (defined along the radial and axial directions of the tubular structure), specifically:

[0046] (1) Radial expansion: In a plane perpendicular to the tangent of the center line, it expands symmetrically to both sides along the X and Y axes (or the radial axes of the local coordinate system), with an expansion distance of r (to ensure coverage of the radius of the tubular structure and possible boundary errors);

[0047] (2) Axial expansion: It extends forward and backward along the tangent direction of the center line (Z-axis or local axial direction), and the expansion length r (can be dynamically adjusted according to the curvature of the tubular structure to avoid missed detection).

[0048] Each local region is a closed interval including its boundary, and its 3D bounding box coordinates are determined and stored in the following way:

[0049] Along the X-axis: [x i -r,x i +r], recorded as x min,i and x max,i ;

[0050] Along the Y-axis: [y i -r,y i +r], recorded as y min,i and y max,i ;

[0051] Along the Z-axis: [z i -r,z i +r], recorded as z min,i and z max,i ;

[0052] The final storage format is shown in formula (6), which obtains the bounding box coordinate information centered on the point on the center line, providing information for subsequent location encoding;

[0053] bbox i =(x min,i x max,i y min,i y max,i , z min,i , z max,i (i = 0, 1, 2, ...) (6)

[0054] 2) Tubular structure precise segmentation module:

[0055] The tubular structure image and the bounding box coordinates generated in step 1) are used together as network input, and the corresponding labeled images are used as labels to train another encoder-decoder network as the accurate segmentation module for the tubular structure. In this experiment, the U-Mamba network is also directly selected as the encoder-decoder network, and the Dice loss function and cross-entropy loss function are used during training. In this encoder-decoder network, the encoder stage includes a stem layer, which is used to initially extract low-level features and unify the number of feature channels from the input channels to the first stage; feature extraction in multiple stages, each stage includes: BasicResBlock: used for downsampling (controlled by stride) and channel number adjustment; BasicBlockD: deepens the network depth and enhances the feature extraction capability (the number is specified by n_blocks_per_stage), and then outputs skips (feature maps of each stage). The core parameters are: `input_channels`: the number of channels in the input image; `n_stages`: the number of encoding stages (the number of layers for multi-scale feature extraction); `features_per_stage`: the number of output feature channels per stage ([32, 64, 128, 256]); `conv_op`: the type of convolution operation; `kernel_sizes`: the kernel size of each stage; `strides`: the stride of each stage (set to 2); `n_blocks_per_stage`: the number of residual blocks in each stage. Based on this, a new parameter `mamba_stage` is added to specify the stage into which the Mamba layer is introduced. In this experiment, it is set to 1, corresponding to stage index 1, i.e., ... Figure 1The position of the number ②. Specifically, when processing the stage corresponding to mamba_stage, feature extraction is first completed through the residual block of the stage; since the skips[1] feature of this stage retains rich spatial details, it is necessary to first perform scanning position embedding encoding processing based on the center line walk. Through the "prior structure" of the center line, the detailed features directly related to the tubular structure can be highlighted and irrelevant background interference can be suppressed. Then input the Mamba layer initialized with the feature dimension of this stage (features_per_stage[mamba_stage]) to model the relationship between local details; the processed features will be stored in the skips list, and the feature maps of the other stages will be retained in the original way. After the encoder is processed, the skips[-1] feature output by the last stage (corresponding to Figure 1 The position indicated by number ④ will be directly input into the Mamba layer for sequence modeling. The skips[-1] feature in this stage contains global context information, eliminating the need for additional scanning position embedding encoding based on centerline walks; leveraging the Mamba layer's ability to capture long-distance dependencies, the global semantic modeling effect can be effectively enhanced. The decoder starts from the output of the Mamba layer in the last stage and gradually restores the feature map resolution through a combination of upsampling, skip connections (fusing the skips features of the corresponding stage from the encoder), and residual blocks. Each stage outputs a segmentation result at the corresponding resolution, while fusing the features of the corresponding stage from the encoder (skip connections), and finally outputs the segmentation result, supporting a deep supervision mechanism.

[0056] 3) Centerline-based scanning position embedding encoding module

[0057] Step 1: The feature map obtained from feature extraction via the residual block of the second stage in step 2) above is input into this module for feature extraction along the centerline. Since the input coordinate information is extracted based on the original feature map size, the coordinate information of the downsampled image features needs to be mapped. The original feature map size is (B0, C0, H0, D0, W0), where B0 is the stride, C0 is the number of channels, H0 is the height, D0 is the depth, and W0 is the width. The image feature size input to the module is (B, C, H, D, W). Let the sampling rate be s, and the mapped coordinate information be bboxes' = [b ... i '], i = 0, 1, 2, 3, ...., bbox i As shown in formula (7), where s x =H / H0,s y =D / D0,s z=W / W0, representing the sampling ratios in the three dimensions. Effective features are extracted from the image features based on the mapped coordinates.

[0058] bbox′ i =(x min,i ×s x x max,i ×s x y min,i ×s y y max,i ×s y , z min,u ×s z , z max,i ×s z (7)

[0059] Step 2: After flattening and normalizing the effective features obtained in Step 1, the sequence length may be too long, which is not conducive to efficient processing. Therefore, this experiment uses bounding boxes to perform block operations, splitting the long sequence into several short sequences for processing one by one, thereby improving processing efficiency while ensuring the integrity of local features.

[0060] Specifically, after dividing the target region features into blocks using bounding box coordinate information, the features of each block are flattened into a sequence. At this time, the feature size is adjusted from the original (B,C,H,D,W) to (B,L,C). Here, L represents the sequence length of each block after flattening, and its value is equal to the product of the dimensions of the bounding box in each dimension, as shown in formula (8). This corresponds exactly to the spatial size of the block region.

[0061] L=(x max,i ×s x -x min,i ×s x )×(y max,i ×s y -y min,i ×s y )×(z max,i ×s z -z min,i ×s z (8)

[0062] The input is then fed into the Mamba layer for sequence modeling, and position encoding is learned through selective scanning using SSMs (State Space Models). Although SSMs (State Space Models) are essentially linear time-invariant systems (LTI), their implementation in the Mamba module has undergone a key evolution: unlike the fixed A, B, C, and D coefficients in traditional SSMs, Mamba dynamically calculates these core coefficients through the input data—that is, the coefficients change in real time with the input content. This transforms the original linear time-invariant system into a linear time-varying system (LTV), thereby breaking through the static limitations of traditional SSMs and more flexibly adapting to the dynamic characteristics of the input sequence. Specifically, in the classic state-space model, two basic equations are established, namely the state equation and the observation equation, which simulate the relationship between the input ()∈R and the output ()∈R through the N-dimensional hidden state h()∈R at the current time t. This process is shown in formulas (9) and (10).

[0063] h′(t)=Ah(t)+Bx(t) (9)

[0064] y(t)=Ch(t)+Dx(t) (10)

[0065] Where h'() is the derivative of the current state h(), A∈R N×N It is a state transition matrix that describes how the state changes over time, B∈R N×1 It is the input matrix that controls how the input affects the state change, C∈R 1×N Let D represent the output matrix that generates the output based on the current state. D∈R represents the command coefficient that determines how the input directly affects the output. In this experiment, D=0 is set, which can be considered as a skip connection in a deep learning model.

[0066] The original feature map is then restored, and using the obtained bounding box coordinate information, the target region features are placed back into their corresponding positions in the original feature map, ensuring the spatial structure integrity of the decoder input. Finally, the tubular structure image is input into the trained model for prediction to obtain the result.

[0067] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0068] Similarly, it should be understood that, in order to simplify the invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof. However, this disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into this detailed description, wherein each claim itself is a separate embodiment of the invention.

[0069] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims.

Claims

1. A tubular structure image segmentation method based on topological position encoding, characterized by: In the tubular structure centerline prediction module, the offset map generated by the tubular structure target template data is used as the label, and the corresponding tubular structure image data is used as the input to train the encoding-decoding network 1 to obtain a tubular structure offset map prediction model; The input tubular structure image is predicted by using a tubular structure offset map prediction model, and the center axis of the target region, i.e. the center line, is formed by using the local maximum points of the offset amount; then a bounding box extraction process is performed, and the center line of the tubular structure is taken as the reference to obtain a discrete sampling point sequence P i (i = 0, 1, 2,...), wherein each P i is a three-dimensional coordinate point (x i , y i , z i ) as the center of the corresponding local region; for each center P i , a range of a certain scale is expanded in three orthogonal directions of the three-dimensional space, specifically: (1) Radial expansion: in the plane perpendicular to the centerline tangent direction, symmetrically expand along the X and Y axes to both sides, and the expansion distance is r; (2) Axial expansion: expand forward and backward along the tangent direction of the centerline, and the expansion length is r; Each local region is a closed interval containing the boundary, and its three-dimensional bounding box coordinates are determined and stored by the following method: Along the X axis: [x i - r, x i + r], recorded as x min,i and x max,i ; Along the Y axis: [y i - r, y i + r], recorded as y min,i and y max,i ; Along the Z axis: [z i - r, z i + r], recorded as z min,i and z max,i ; The final storage format is shown in formula (1), and the bounding box coordinate information centered on the point on the centerline is obtained, which provides information for subsequent position encoding; bbox i = (x min,i , x max,i , y min,i , y max,i , z min,i , z max,i )(i = 0, 1, 2, …) (1) In the tubular structure precise segmentation module, the tubular structure image is used as the input, and the corresponding tubular structure target template data is used as the label to train the encoding-decoding network 2 to obtain a tubular structure segmentation model; In the coding network 2, a scanning position embedding coding module based on center line walking is added, and the specific operation is to map the feature map obtained after the encoder downsampling according to the above bounding box coordinate information. The bounding box coordinate information here is the coordinate information obtained by the bounding box coordinate information of the coding and decoding network 1; specifically, the original feature map size is (B0, C0, H0, D0, W0), wherein B0 is the step, C0 is the channel number, H0 is the height, D0 is the depth, and W0 is the width; the image feature size input to the module is (B, C, H, D, W), then set the sampling rate as s, and the mapped coordinate information is bboxes’=[bbox i ’],i=0,1,2,3,....,bbox i ’ as shown in formula (2), wherein s x =H / H0, s y =D / D0, s z =W / W0, respectively, are the sampling rates of the three dimensions; and the effective features in the image features are extracted based on the mapped coordinates; bbox i =(x min,i ×s x x max,i ×s x y min,i ×s y y max,i ×s y , z min,i ×s z , z max,i ×s z (2) After flattening and normalizing the obtained effective features, the target region features are divided into blocks by the bounding box coordinate information, and then the features of each block are flattened into a sequence. At this time, the feature size is adjusted from the original (B,C,H,D,W) to (B,L,C); where L represents the sequence length of each block after flattening, and its value is equal to the product of the dimensions of the bounding box in each dimension, as shown in formula (3); which corresponds exactly to the spatial size of the block region. L = (x max,i x s x - x min,i x s x ) x (y max,i x s y - y min,i x s y ) x (z max,i x s z - z min,i x s z ) (3) Then input to the Mamba layer for sequence modeling, and learn the position encoding through selective scanning by the state space model SSM (State Space Model); In the model, two basic equations are formulated, namely the state equation and the observation equation, which simulate the relationship between the input () ∈R and the output () ∈R through the N-dimensional hidden state h() ∈R at the current time t; The process is shown in formulas (4) and (5); h'(t)=Ah(t)+Bx(t) (4) y(t)=Ch(t)+Dx(t) (5) where h'( ) is the derivative of the current state h(), A e R N×N is a state transition matrix that describes how the state changes over time, B e R N×1 is an input matrix that describes how the control input influences the state change, C e R 1×N represents an output matrix that generates an output based on the current state, set D = 0; Then restore to the original feature map, use the obtained bounding box coordinate information to put the target region features back to the corresponding position of the original feature map, and finally predict the tubular structure image through the tubular image segmentation model to obtain the result. 2.The method of claim 1, characterized by: The encoding-decoding network 1 or 2 selects a U-Mamba network, and the Dice loss function and the cross-entropy loss function are used during training. 3.The method of claim 2, characterized by: In the encoder-decoder network, the encoder stage includes a stem layer, which is used to initially extract low-level features and unify the number of feature channels from the input channels to the first stage. Multiple stages are used for feature extraction. Each stage includes: BasicResBlock: used for downsampling and channel number adjustment; BasicBlockD: deepens the network depth, enhances feature extraction capabilities, and then outputs skips, i.e., feature maps for each stage. Key parameters include: input_channels: the number of channels in the input image; n_stages: the number of encoding stages, i.e., the number of multi-scale feature extraction layers; features_per_stage: the number of output feature channels for each stage ([32,64,128,256]); conv_op: the type of convolution operation; kernel_sizes: the kernel size for each stage; strides: the stride for each stage is set to 2; n_blocks_per_stage: the number of residual blocks in each stage. In addition, a new mamba_stage parameter is added to specify the stage in which the Mamba layer is introduced. The encoder adds the mamba_stage parameter, which is set to 1, corresponding to stage index 1. Specifically, when processing the stage corresponding to mamba_stage, feature extraction is first completed through the residual block of that stage; the skips features of this stage are first processed by scanning position embedding encoding based on centerline walking, and then input into the Mamba layer initialized with the feature dimension of that stage through the "prior structure" of the centerline. The processed features are stored in the skips list, and the feature maps of the other stages are retained in the original way; after the encoder is completed, the skips[-1] features output by the last stage are directly input into the Mamba layer for sequence modeling.

4. The method according to claim 3, characterized in that: The decoder starts from the output of the Mamba layer of the last stage and gradually restores the feature map resolution through a combination of upsampling, skip connections and residual blocks; each stage outputs a segmentation at the corresponding resolution, and the features of the encoder at the corresponding stage are fused together to finally output the segmentation result.