Method for improving medical tubular structure segmentation topological connectivity
Through deep learning technology, traditional closed operation is transformed and deep closed operation model is constructed, which solves the limitations of tubular structure connectivity in medical image segmentation, realizes higher quality tubular structure segmentation and reconstruction, and improves the accuracy and reliability of medical diagnosis.
Patent Information
- Application Number
- CN202411647914.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-02-25
AI Technical Summary
The existing medical imaging segmentation methods have limitations in maintaining the topological performance of segmentation results, especially in maintaining connectivity, making it difficult to effectively deal with tubular structures of complex morphology and diverse sizes.
A method of transforming traditional closed operation is proposed by combining deep learning technology with the traditional closed operation, called deep closed operation. By constructing a deep closed operation model architecture, including an autoencoder, a simple point corrosion module, a dynamic mask generator and an iterative multi-scale tubular structure scaler, the segmentation effect of tubular structures in medical images is improved.
The recognition and reconstruction quality of tubular structures in medical images is significantly improved, especially in the presence of fracture or loss, which enhances the reconstruction ability of broken tubular structures in the image and reduces diagnostic errors caused by image defects.
Smart Images

Figure CN119515910A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of computer medical image tubular structure segmentation. Background Art
[0002] In medical images, tubular structures such as blood vessels and trachea constitute important anatomical features. Accurate segmentation of tubular structures such as blood vessels or nerves in the human body is of great clinical significance in various medical applications. However, existing segmentation methods often show limitations in maintaining the topological performance of segmentation results, especially in maintaining connectivity. Although deep learning technology has made remarkable achievements in medical image segmentation, the complex morphology and diverse sizes of these structures make their accurate segmentation still challenging. At present, although topological perception methods and label refinement techniques have improved the topological performance to a certain extent, they are still mainly limited by the loss function based on coincidence, which limits the further improvement of topological performance. In addition, although some general post-processing methods are effective in natural image segmentation, their performance in medical tubular datasets is generally poor. This is mainly because the professionalism and structural complexity of medical images and the high requirements for accurate topology make standard post-processing techniques difficult to apply.
[0003] Traditional closing techniques are specifically designed to connect tiny gaps in shapes. However, although traditional closing techniques are easy to implement and have wide applicability, their performance is fundamentally limited. The proper selection of structural elements in the closing operation, such as the kernel size, is crucial. Improper selection may lead to insufficient gap closure or unexpected fusion and smoothing of adjacent structures. Summary of the invention
[0004] In order to solve the limitations of existing medical image segmentation methods in terms of tubular structure connectivity, the present invention proposes a method for improving the topological connectivity of medical tubular structure segmentation. This method re-expands and transforms the traditional closing operation through deep learning technology, called "deep closing operation", to improve the accurate segmentation effect of tubular structures (such as blood vessels, nerves, etc.) in medical images.
[0005] The present invention achieves the above-mentioned purpose through the following technical solutions:
[0006] A method for improving topological connectivity of medical tubular structure segmentation, comprising the following steps:
[0007] Step 1: Medical tubular structure dataset preparation:
[0008] Step 2: construct a deep closed operation model architecture, wherein the deep closed operation model architecture includes an autoencoder, a simple point corrosion module, a dynamic mask generator, and an iterative multi-scale tubular structure scaler;
[0009] Step 3: Train and optimize the deep closing operation model:
[0010] Step 4: Based on the trained deep closing operation model, perform inference operations on the tubular structure image to be processed.
[0011] Beneficial effects of the present invention:
[0012] The present invention improves the recognition and reconstruction quality of tubular structures in medical images, especially in the presence of breaks or missing parts;
[0013] The present invention introduces a more advanced and reliable technical solution to the field of medical image processing to improve the accuracy and efficiency of complex tubular structure recognition;
[0014] The present invention significantly improves the reconstruction capability of broken tubular structures in images through the application of advanced mask self-encoding technology and topological constraints, thereby reducing diagnostic errors caused by image defects.
[0015] The present invention aims to provide doctors with more complete and continuous images of tubular structures, thereby improving the accuracy, reliability and interpretability of medical diagnosis;
[0016] In addition, the present invention can also maintain efficient and stable performance when processing data sets of heterogeneous data, making it widely applicable and valuable in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a schematic flow diagram of the method of the present invention.
[0018] Figure 2 It is a schematic diagram of a simple point corrosion module of the deep closing operation model of the present invention.
[0019] Figure 3 It is a flow chart of fundus image segmentation connectivity reconstruction according to an embodiment of the present invention. DETAILED DESCRIPTION
[0020] This paper uses deep learning and digital topology knowledge to propose a segmentation topology enhancement method for medical tubular structures, which has significant generalization capabilities in terms of model independence and transferability. Even when source data is limited or unavailable, the model can learn shape priors from other data and effectively migrate to new data sources.
[0021] The technical solution provided by the present application will be further described below in conjunction with specific embodiments and accompanying drawings. The advantages and features of the present application will become more apparent with the following description.
[0022] A method for improving topological connectivity of medical tubular structure segmentation, comprising the following steps:
[0023] Step 1: Prepare medical tubular structure dataset.
[0024] Firstly, medical tubular structure images (in DICOM or PNG format) and their segmentation annotations (label domain is 0 or 1) are collected from hospitals and online public datasets.
[0025] Secondly, preprocessing is performed, including data cleaning and data normalization. In the data cleaning process, poor quality or incomplete images and annotations are removed. In data normalization, images of different sources and sizes are cut into 256x256 blocks (label synchronization blocks) and normalized according to the mean variance.
[0026] Then, a medical tubular structure dataset is established, and a training set and a test set are divided according to a ratio, for example, the dataset is divided according to a ratio of 80% for training and 20% for testing.
[0027] Step 2: Build the deep closed operation model architecture.
[0028] The deep closed operation model architecture includes an autoencoder, a simple point corrosion module, a dynamic mask generator, and an iterative tubular structure scaler. The following is an introduction to each component:
[0029] Component 1: Autoencoder
[0030] The autoencoder is composed of a fully convolutional, encoder-decoder architecture. The autoencoder is the only part of the present invention that requires updating of intrinsic parameters through training. The present invention designs a training mode for the autoencoder to make it sensitive to disconnected areas in medical tubular structures, thereby marking these areas. The trained autoencoder accepts the medical tubular segmentation result to be processed as input, and outputs the repaired tubular structure and its marked highlight part.
[0031] Component 2: Simple Pitting Module
[0032] The simple point corrosion module is used to efficiently and parallelly identify and corrode points (i.e., simple points) in the structure that do not affect the topological structure, thereby assisting in realizing some functions of the present invention. It includes four partial operations: constructing a simple point lookup table (SPLT), parallel simple point classification (PSPC) operation, iterative simple point corrosion (RSPE) and simple component corrosion (SCE) operations, which are performed in sequence:
[0033] First, a simple point lookup table (SPLT) is constructed. Specifically, an efficient and fast mapping of image patches of size 3x3 to their simple point labels is constructed, which is the cornerstone for implementing the remaining three operations.
[0034] Secondly, the parallel simple point classification operation (PSPC) is to determine whether the center point of all image neighborhoods divided by 3x3 pixels in the image is a simple point in topology. Since this operation improves efficiency by utilizing non-mutually exclusive partitioning strategies to execute in parallel, it is called parallel simple point classification.
[0035] Next, iterative simple point erosion (RSPE) is performed to iteratively classify simple points in parallel. The reason for the need for iteration is based on the properties of "simple points" in digital topology: in each round of erosion, only the outermost simple points will be eroded, and the simple points inside will be exposed and become the next target.
[0036] Finally, the simple component erosion operation (SCE) is a further encapsulation of the iterative simple point erosion function, so that the overall erosion of simple components can be completed within the operation. The simple component refers to a component composed of one or more connected pixels whose topological structure is not changed by addition or subtraction.
[0037] The following is a detailed introduction to the construction of simple point query table, parallel simple point classification operation, iterative simple point corrosion and simple component corrosion operation:
[0038] Furthermore, a simple point lookup table (SPLT) is constructed:
[0039] Let D = {(x1,y1),(x2,y2),…,(x 512 ,y 512 )} represents a simple point data set, where each x i ∈{0,1} 3×3 Represents a binary image block consisting of 3x3 pixels, for example y i ∈{0,1} is x i Whether the center pixel is a simple point label (the blocks with label value 0 constitute a non-simple point set, and the blocks with label value 1 constitute a simple point set). Construct a simple point query table SPLT. The purpose of this query table is to construct a fast and parallel mapping from 3x3 pixel binary image blocks to their simple point labels (for example, when SPLT simultaneously accepts 1000 query requests for 3x3 pixel binary image blocks, it can efficiently return the simple point labels corresponding to these 1000 image blocks). When constructing SPLT, serialize each 3x3 pixel binary image block (matrix) in D into a binary string, and then convert it into a unique decimal index. For example, image block The corresponding binary string (001010100)2 is converted to decimal 84. This index serves as the index in the SPLT. The simple point label corresponding to each image block is stored in the SPLT (e.g., image block The "simple point" label "0" is stored at the index subscript 84 of SPLT). This process is exemplified as Figure 2 (1) as shown.
[0040] Let P = {p1, p2, p3, p4, ..., p m} represents a 3x3 pixel block sequence of size m, where p i ∈{0,1} 3×3 The simple point lookup table (SPLT) can be applied in parallel to each slice and return its corresponding simple point label: S = SPLT (P), S = (s1, s2, ..., s m ), where S is a tuple of simple point labels corresponding to P, and
[0041] Further, Parallel Simple Point Classification (PSPC):
[0042] Using the simple point lookup table (SPLT), in the structure to be processed T∈{0,1} H×W Simple points are identified in parallel in a specified area of M. T Definition, M T ∈{0,1} H×W , specifies where to perform simple point classification, H and W represent the height and width of the input structure respectively. T The part with a value of 1 in represents the specified area, and only simple points within this area will be considered and processed.
[0043] In addition, a set of predefined binary masks is constructed in PSPC, denoted as M = {m1,m2,m3,m4}, where each mask m is defined by the following condition:
[0044]
[0045] where m(x,y) represents the value of the mask m at the position of row x and column y. These masks divide the image into four sub-regions, ensuring that for any foreground point within the mask, there are no other foreground points within its 3×3 pixel neighborhood.
[0046] Define a local slice extractor E(p e |T,M T ,i), it is in the T and mask m i Extract all 3x3 pixel blocks at the intersection of the defined area. Then return the extracted block sequence P e .
[0047] The workflow of PSPC is described in Algorithm 1 and Figure 2(2) is shown. First, we input a binary matrix T representing the structure to be processed and a binary matrix M defining a specific region. T , and a mask index i to select one of four predefined masks, each of which divides the image into sub-regions according to specific conditions of row and column indices; through the local block extractor, from the M T and the selected mask m i Extract all 3×3 pixel blocks in the defined intersection area. Then, use the simple point lookup table (SPLT) to determine which points in these blocks are simple points. Finally, return a label set S, which identifies which points in the specified area and mask are simple points (1 for simple points, 0 for non-simple points). This method achieves efficient parallel processing by dividing the tasks by mask.
[0048]
[0049] Further, iterative simple point corrosion (RSPE):
[0050] The iterative simple point corrosion is formally described as follows Algorithm 2, where PSPC represents the aforementioned parallel simple point classification, T represents the input tensor, T0 is the initial value of T, and T i is the updated value of T after the i-th iteration. Mask M T Ensures that all modifications are confined to the specified region, i.e., the region where the mask value is 1. This allows precise control over the region of the tensor being modified.
[0051] The workflow of RSPE is described in Algorithm 2 and Figure 2 (3) is shown. Algorithm 2 (Iterative Simple Point Erosion, RSPE) is used to gradually remove simple points in a binary matrix. The input includes the structure to be processed T, the mask M that defines a specific area T , and the maximum number of iterations k. First, T0 is initially assigned to T. Then, k iterations are performed, and each iteration applies four masks m1, m2, m3, and m4 in turn to perform parallel simple point classification (PSPC), remove simple points in the specified area, and update the structure. After each iteration, the outermost simple points will be removed. Finally, the structure T after k iterations is returned k This process allows precise control over the area modified, and the maximum number of iterations k determines how deep the algorithm is executed.
[0052]
[0053] Further, Simple Component Corrosion (SCE):
[0054] In this section, a component-level topology-preserving erosion operation is performed. To determine whether a component is simple, one can simply remove (add) it and then check whether the topological properties (such as connected components and rings) are affected. However, this is computationally inefficient because a full-graph level analysis may be required for each local component. In order to efficiently identify all specified components at the same time, this application designs an algorithm using the characteristics of simple points.
[0055] For a component C containing n pixels, let M c ∈{0,1} H×W is the region mask of C, where Assume T c The structure of T after full corrosion can be expressed as:
[0056]
[0057] According to T c The state of component C is used to determine whether it is a simple component: if and only if ∑T c ⊙M c = 0, C is a simple component. The core of the judgment condition is to verify whether the component disappears completely after sufficient corrosion. Simple component corrosion (SCE) gradually corrodes component C by continuously iterating simple point corrosion (RSPE) operations until a stable state T is reached. c . Use region mask M c , if in T c The sum of the pixels in the mask area is 0 (i.e., ∑T c ⊙M c =0), then component C is considered simple. This means that all pixels of this component can be removed without changing the topological properties of the overall structure, such as connectivity or the number of rings. In simple terms, this condition ensures that removing a component will not affect the topological structure.
[0058] Using the above iterative simple point corrosion (RSPE) operation, simple component corrosion (SCE) can corrode simple points globally and in parallel, and can distinguish simple components from non-simple components at the same time.
[0059] like Figure 2 As shown in (4), the workflow of the simple component corrosion operation is as follows:
[0060] The first step is to get M T =TI is the generated potential disconnection region, which is the residual between T and I. I∈{0,1} H×W is the input binary tensor to be processed, T∈{0,1} H×W is the output of I after depth expansion.
[0061] The second step is to TAssign a connected component label to each foreground pixel in:
[0062] L cc (x,y)=f cc (x,y,M T )
[0063] where f cc represents the connected component function, x and y are M T The pixel position index of L. cc represents the connected component label graph, L cc (x,y) is the label of the pixel at position (x,y).
[0064] The third step is to T Perform iterative simple point corrosion (RSPE) on T to obtain Calculate M T The remaining labels in the region are L′ cc =M T ⊙T M , then count L cc All the different tags in .
[0065] Step 4: For L cc Each remaining connected component label in M T Retrieve components with the same value from and add them to I, and finally obtain the final result that retains all non-simple components. (This process is in Figure 2 is called retrieval).
[0066] Component 3: Dynamic Mask Generator
[0067] The mask generator is used to generate dynamic masks controlled by hyperparameters p (tile size) and r (mask ratio). The execution process is as follows: First, a tensor filled with zeros is created, whose shape is the same as the input binary label map L. Subsequently, this tensor is padded to the nearest multiple of the tile size. After that, the padded tensor is divided into p h ×p w We then take the slices of the binary image and transform the ratio r of these slices into a mask filled with 1s. We then apply affine transformations such as rotation and shearing to the binary mask. Finally, we crop the resulting mask M to match the size of L.
[0068] Component 4: Iterative Tubular Scaler
[0069] The iterative tubular scaler is used to effectively expand tubular structures of different scales. During the training process, an iterative simple point corrosion operation is performed on the input L, and k is randomly selected. r :
[0070] L′=RSPE(L,0,kr )
[0071] Where L′ is a randomly scaled label map and 0 represents an h×w zero map. This process can be visualized as Figure 1 As shown in Figure 2, it shows how L is gradually eroded while preserving the structural topology. Finally, the mask input L M It can be expressed as:
[0072] L M =RSPE(L,0,k r )
[0073] Step 3: Train and optimize the deep closed operation model architecture
[0074] The autoencoder is trained by modeling the mask image (shape) and enhanced by the proposed topological constraints. After training, the autoencoder can serve as an indicator of disconnected regions.
[0075] The goal of training optimization is to guide the autoencoder f from the shape L perturbed by the mask M M The complete tubular structure L′ is reconstructed in , thereby embedding the shape prior of connectivity into the autoencoder.
[0076] In the training phase, an autoencoder is used to learn the topological connectivity of the tubular structure. The following is a chronological introduction to the steps in one training iteration:
[0077] Step 3.1 uses a dynamic mask generator to dynamically generate a mask, ie, M.
[0078] Step 3.2 extracts annotations from the dataset collected in step 1, and then uses an iterative tubular structure scaler to generate multi-scale tubular structures, i.e., L′.
[0079] Step 3.3 multiplies the multi-scale tubular structure L′ generated in step 3.2 by the mask generated in step 3.1 by M to generate a perturbed tubular structure (simulating potential disconnection), i.e., L M This step L M =(1-M)⊙L′. In this step, the mask M is the area of simulated disconnection, and the area with a value of 1 in M will clear any foreground point at the corresponding position in L′, thereby achieving the effect of simulating disconnection.
[0080] Step 3.4: The perturbed tubular structure L generated in step 3.3 M Input to the autoencoder to get the output of the model, i.e. f(L M ).
[0081] Step 3.5 In the simulated disconnection disturbance of step 3.3, since M is dynamic and random, the disturbance to the structure L′ can be divided into two categories. One is the disturbance that changes the topological structure of L′, and the other is the disturbance that does not change the topological structure. In order to guide the sensitivity to the disconnected area in the subsequent autoencoder training, the former area is indicated for the subsequent stage in this step. However, it is computationally inefficient to find and distinguish these areas in real time during the training process. Therefore, the present invention attempts to use the characteristics of RSPE to efficiently and parallelly find a series of topological key points to represent the searched area. The topological key point calculation method here corresponds to M ns The calculation method is
[0082]
[0083] Its working principle is to perform parallel global erosion on the perturbation area M of the structure L′. According to the principles and characteristics of RSPE mentioned above, all perturbations in the perturbation area M that do not change the topological structure will be completely eroded, while the perturbations that change the topological structure of L′ will always retain a series of topological key points, namely M ns .
[0084] Step 3.6: Based on the reconstruction result f(L M ), compared with the tubular structure shape L′ before mask perturbation and calculate the reconstruction loss Loss rec At the same time, the topological key points extracted in step 3.5 are used to calculate an additional topological loss Loss topo , which is used to guide the model to focus on these key areas; finally, the two losses are combined to obtain the comprehensive loss Loss of the current training iteration. total .
[0085] The mean square error (MSE) is used as the reconstruction loss:
[0086]
[0087] Where σ represents the sigmoid function.
[0088] In order to encourage the autoencoder f to prioritize topological key structures, an additional topological loss Loss is introduced topo , the loss is defined as follows:
[0089]
[0090] In the formula, Represents a non-simple point in the mask area M after undergoing sufficient iterative simple point erosion. Figure 1 Showing M ns Visualization of the structure, where blue pixels represent M ns .
[0091] The comprehensive loss formula is as follows:
[0092] Loss total =Loss rec +αLoss topo
[0093] where α is a weight that controls the importance of the topological loss.
[0094] Step 3.7 performs back propagation based on the comprehensive loss in 3.6 to update the parameters of the autoencoder.
[0095] Above, steps 3.1 to 3.7 are the steps of one iteration during training. After enough iterations, the loss will gradually converge and stabilize, and finally the parameters of the autoencoder will be obtained.
[0096] Step 4: Based on the trained deep closed operation model architecture, the inference phase of the processed tubular structure image is used:
[0097] The usage in the inference phase consists of two operations: deep dilation and simple component erosion.
[0098] Deep dilation: The input tubular structure image to be processed is fed into the trained autoencoder network to indicate potential disconnected areas and mark the locations of the areas.
[0099] Let f be the autoencoder trained in step 3 and T be the pre-segmented binary image. Using the autoencoder f to indicate potential disconnected areas, the process is expressed as:
[0100] T dd =σ′(f(T))
[0101] Where T dd is the result of deep expansion, and σ′ represents the sigmoid activation and threshold operation.
[0102] Simple component erosion: Perform simple component erosion on the deep dilation result to remove topologically unimportant areas, thereby obtaining a topologically optimized segmentation result that is more coherent. The process is expressed as:
[0103] T dc =SCE(T dd )
[0104] Where T dc is the final result of the deep closing operation.
[0105] Specifically, the implementation steps include:
[0106] Step 4.1 prepare / obtain the tubular structure segmentation map T to be processed and perform preprocessing;
[0107] Step 4.2 uses the autoencoder weights trained in step 3 and loads them into the autoencoder f in the current scenario.
[0108] Step 4.3: Input the segmentation map in step 4.1 into the autoencoder in step 4.2, and then obtain the reconstruction result f(L M ), and the corresponding depth expansion result T dd .
[0109] Step 4.4 performs a simple component corrosion operation on the deep expansion result in step 4.3 to ensure that all deep expansion areas in step 4.3 are topologically important, and obtains the final deep closing operation result T dc .
[0110] On the one hand, the present invention can improve the topological connectivity (generalization) of the results of the medical tubular structure segmentation model under various existing architectures and designs. On the other hand, it demonstrates effective transferability. When the source domain data is lacking or cannot be used to train the autoencoder, this method can learn similar shape priors from foreign domain data and migrate them to the source domain (transferability). Through the present invention, the model's ability to segment tubular structures in complex medical images can be effectively improved, thereby reducing risks and improving accuracy for medical decisions involving medical tubular structures (such as blood vessels and airways). The present invention provides a new technical solution for future medical tubular-assisted diagnosis.
[0111] Example: Fundus vascular reconstruction task
[0112] This embodiment takes the task of fundus vascular reconstruction as an example to demonstrate how to apply the method of the present invention to reconstruct and enhance the connectivity of fundus vascular. The structure of fundus vascular is complex and the connectivity requirement is high. Through the method of the present invention, efficient processing of fundus vascular images can be achieved, and the connectivity of the reconstructed vascular network can be enhanced.
[0113] Data preparation and training phase:
[0114] In the data preparation stage, first, prepare the labeled fundus vascular image dataset, each image contains the vascular structure label annotated by experts. Then, perform preprocessing, including: data cleaning, removing poor quality or incomplete images; unifying the size and normalization. Finally, divide the training set and test set into 80% and 20% ratios.
[0115] During the training phase, first, a dynamic mask is generated using a dynamic mask generator, which creates a zero tensor of the same shape as the label map according to hyperparameters and applies affine transformations such as rotation and shearing to the binary mask to finally generate a matching mask. Next, an iterative tubular scaler is used to iteratively perform simple point corrosion operations on the input label map to generate a randomly scaled label map. Then, the degraded shape of the mask is input to the autoencoder for reconstruction. Mean square error (MSE) and additional topological losses are used for training until the model converges.
[0116] Use phase:
[0117] (See the usage process of this embodiment. Figure 3 )
[0118] First, a pre-trained segmentation model is used to perform preliminary segmentation on the input fundus image to be inferred, and a preliminary blood vessel segmentation result, that is, a preliminary segmented binary image, is obtained.
[0119] Then, the trained autoencoder is used to process the initially segmented binary image as follows:
[0120] Deep expansion: Use the autoencoder f to perform deep expansion on the initially segmented binary image to generate a deep expansion result.
[0121] Simple component erosion: Apply a simple component erosion (SCE) operation to the deep dilation result to remove topologically unimportant areas and obtain the final deep closing operation result.
[0122] After the above steps, the fundus vascular images will have significantly improved vascular structure and enhanced connectivity. The trained autoencoder can effectively reconstruct the disconnected vascular network, and the simple component corrosion step further refines the results, removes unnecessary noise and breakpoints, and enhances the connectivity of the vascular network.
[0123] Since the deep closing operation of the present invention can clearly distinguish the reconstructed area from the original shape area, the newly added vascular structure can be handed over to the doctor as a prompt area for interactive repair. The doctor can further review and confirm the accuracy of the vascular reconstruction based on the prompt area and make manual corrections when necessary. In addition, in many cases, the reconstruction results can be directly used for repair, reducing the doctor's workload and improving diagnostic efficiency.
[0124] The main contributions of the present invention include: (1) The present invention proposes a new paradigm for enhancing topological connectivity in medical tubular structure segmentation. By re-expanding and transforming the traditional closing operation through deep learning technology, the present invention can effectively improve the topological connectivity in medical tubular structure segmentation and has good generalization and transferability; (2) The present invention designs a simple point corrosion module based on digital topology knowledge, which can effectively eliminate points that do not affect the topology in a parallel process, thereby identifying topological key points and providing enhanced topological guidance.
[0125] The above description is only a description of the preferred embodiments of the present application, and is not intended to limit the scope of the present application. Any changes or modifications made by any person skilled in the art based on the above disclosed technical contents shall be deemed as equivalent effective embodiments and shall fall within the scope of protection of the technical solution of the present application.
Claims
1. A method for improving the topological connectivity of medical tubular structure segmentation, characterized in that: The following steps are involved: Step 1: Medical tubular structure dataset preparation: Step 2: construct a deep closed operation model architecture, wherein the deep closed operation model architecture includes an autoencoder, a simple point corrosion module, a dynamic mask generator, and an iterative multi-scale tubular structure scaler; Step 3: Train and optimize the deep closing operation model: Step 4: Based on the trained deep closing operation model, perform inference operations on the tubular structure image to be processed.
2. The method for improving the topological connectivity of medical tubular structure segmentation according to claim 1, characterized in that: Step 1: First, we collect medical tubular structure images and their segmentation annotations from hospitals and online public datasets; Secondly, preprocessing is performed, including data cleaning and data normalization; Then, a medical tubular structure dataset is established and divided into training set and test set according to the ratio.
3. The method for improving the topological connectivity of medical tubular structure segmentation according to claim 1, characterized in that: Step 2: The autoencoder is composed of a fully convolutional encoder-decoder architecture; the training mode of the autoencoder is designed to make it sensitive to disconnected areas in the medical tubular structure, thereby marking these areas; The trained autoencoder accepts the medical tubular segmentation result to be processed as input and outputs the repaired tubular structure and its marked highlighted parts.
4. The method for improving the topological connectivity of medical tubular structure segmentation according to claim 1, characterized in that: Step 2: The simple point corrosion module is used to efficiently and in parallel identify and corrode points in the structure that do not affect the topological structure, namely simple points, and includes four partial operations, which are performed in sequence: First, a simple point lookup table (SPLT) is constructed. Specifically, an efficient and fast mapping of image blocks of size 3x3 pixels to their simple point labels is constructed; Secondly, the parallel simple point classification operation (PSPC) is to determine whether the center point of all image neighborhoods divided by 3x3 pixels in the image is a simple point in topology. Since this operation improves efficiency by using non-mutually exclusive partitioning strategies to execute in parallel, it is called parallel simple point classification. Next, iterative simple point erosion (RSPE) is performed, specifically, iteratively classifying the image in parallel; Finally, the simple component erosion operation (SCE) is a further encapsulation of the iterative simple point erosion function, so that the overall erosion of the simple component can be completed within the operation; the simple component refers to a component composed of one or more connected pixels whose addition or subtraction does not change the topological structure.
5. A method for improving topological connectivity of medical tubular structure segmentation according to claim 4, It is characterized in that Among them, a simple point query table (SPLT) is constructed, specifically: Let D = {(x1,y1),(x2,y2),…,(x 512 ,y 512 )} represents a simple point data set, where each x i ∈{0,1} 3×3 Represents a binary image block consisting of 3x3 pixels, y i ∈{0,1} is x i Whether the central pixel is a simple point label, the blocks with label value 0 constitute a non-simple point set, and the blocks with label value 1 constitute a simple point set; construct a simple point query table SPLT, the purpose of which is to construct a fast and parallel mapping from a 3x3 pixel binary image block to its simple point label; when constructing SPLT, serialize each 3x3 pixel binary image block in D into a binary string, and then convert it into a unique decimal index; Among them, the parallel simple point classification (PSPC) is specifically: Using the simple point lookup table (SPLT), in the structure to be processed T∈{0,1} H×W Simple points are identified in parallel within a specified area of M T Definition, M T ∈{0,1} H×W , specifies where to perform simple point classification, H and W represent the height and width of the input structure respectively; M T The part with a value of 1 in represents the specified area, and only the simple points within this area will be considered and processed; A set of predefined binary masks is constructed, denoted as M = {m1,m2,m3,m4}, where each mask m is defined by the following conditions: Where m(x,y) represents the value of the mask m at the position of the xth row and yth column. These masks divide the image into four sub-regions, ensuring that foreground points within any mask, there are no other foreground points within their 3×3 pixel neighborhood; Define a local slice extractor E(p e |T,M T ,i), it is in the T and mask m i Extract all 3x3 pixel blocks at the intersection of the defined area; then return the extracted block sequence P e ; The workflow of PSPC is as follows: First, we input a binary matrix T representing the structure to be processed and a binary matrix M defining a specific region. T , and a mask index i to select one of four predefined masks, each of which divides the image into sub-regions according to specific conditions of row and column indices; through the local block extractor, from the M T and the selected mask m i Extract all 3×3 pixel blocks in the defined intersection area; then, use the simple point lookup table (SPLT) to determine which points in these blocks are simple points; finally, return a label set S, which identifies which points in the specified area and mask are simple points, 1 represents a simple point, and 0 represents a non-simple point; Among them, iterative simple point corrosion (RSPE) is specifically: RSPE is used to gradually remove simple points in a binary matrix. The workflow of RSPE is as follows: First, the input includes the structure to be processed T and the mask M that defines a specific area. T , and the maximum number of iterations k, T is initially assigned to T0; then, k iterations are performed, and each iteration applies four masks m1, m2, m3, and m4 in turn to perform parallel simple point classification (PSPC), remove simple points in the specified area and update the structure; after each iteration, the outermost simple points will be removed; finally, the structure T after k iterations is returned k ; This process allows precise control over the modified area, and the maximum number of iterations k determines the depth of algorithm execution; Among them, simple component corrosion (SCE) is specifically: For a component C containing n pixels, let M c ∈{0,1} H×W is the region mask of C, where Assume T c The structure of T after full corrosion is expressed as: According to T c The state of component C is used to determine whether it is a simple component: if and only if ∑T c ⊙M c = 0, C is a simple component; the core of the judgment condition is to verify whether the component disappears completely after sufficient corrosion; Simple Component Corrosion (SCE) gradually corrodes component C by continuously iterating simple point corrosion (RSPE) operations until a stable state T is reached. c ; Using the above iterative simple point corrosion (RSPE) operation, simple component corrosion (SCE) can corrode simple points in global parallel while distinguishing simple components from non-simple components; SCE workflow: The first step is to get M T =TI is the generated potential disconnection region, which is the residual between T and I, I∈{0,1} H×W is the input binary tensor to be processed, T∈{0,1} H×W is the output of I after deep expansion; The second step is to T Assign a connected component label to each foreground pixel in: L cc (x,y)=f cc (x,y,M T ) where f cc represents the connected component function, x and y are M T The pixel position index, L cc represents the connected component label graph, L cc (x,y) is the label of the pixel at position (x,y); The third step is to T Perform iterative simple point corrosion (RSPE) on T to obtain Calculate M T The remaining labels in the region are L′ cc =M T ⊙T M , then count L cc All the different tags in; Step 4: For L cc Each remaining connected component label in M T The components with the same value are retrieved from and added to I, and finally the final result is obtained by retaining all non-simple components.
6. The method for improving the topological connectivity of medical tubular structure segmentation according to claim 1, characterized in that: Step 2: The mask generator is used to generate a dynamic mask controlled by hyperparameters p and r, where p is the tile size and r is the mask ratio; The execution process is as follows: First, a tensor filled with zeros is created, whose shape is the same as the input binary label map L; then, this tensor is padded to the nearest multiple of the tile size; then, the padded tensor is divided into pieces of size p h ×p w Then, affine transformations such as rotation and shearing are applied to the binary mask; finally, the resulting mask M is cropped to match the size of L.
7. The method for improving the topological connectivity of medical tubular structure segmentation according to claim 1, characterized in that: Step 2: The iterative tubular scaler is used to effectively expand tubular structures of different scales. During the training process, an iterative simple point corrosion operation is performed on the input L, and k is randomly selected. r : L′=RSPE(L,0,k r ) Here, L′ is a randomly scaled label map and 0 represents an h×w zero map.
8. The method for improving the topological connectivity of medical tubular structure segmentation according to claim 1, characterized in that: Step 3: The goal of training optimization is to guide the autoencoder f from the shape L perturbed by the mask M M The complete tubular structure L′ is reconstructed in , thereby embedding the shape prior of connectivity into the autoencoder; After training, the autoencoder serves as an indicator of disconnected regions; In the training phase, an autoencoder is used to learn the topological connectivity of the tubular structure. The steps in one training iteration are: Step 3.1: Use a dynamic mask generator to dynamically generate a mask, ie, M; Step 3.2 extracts annotations from the dataset collected in step 1, and then uses an iterative tubular structure scaler to generate multi-scale tubular structures, i.e., L′; Step 3.3 multiplies the multi-scale tubular structure L′ generated in step 3.2 by the mask generated in step 3.1 by corresponding elements M to generate a perturbed tubular structure simulating potential disconnection, i.e., L M , this step L M =(1-M)⊙L′, where mask M is the area where disconnection is simulated. The area with a value of 1 in M will clear any foreground point at the corresponding position in L′, thereby achieving the effect of simulating disconnection; Step 3.4: The perturbed tubular structure L generated in step 3.3 M Input to the autoencoder to get the output of the model, i.e. f(L M ); Step 3.5: In order to guide the sensitivity of the subsequent autoencoder training to the disconnected area and indicate the area of the former for the subsequent stage, the characteristics of RSPE are used to efficiently and parallelly search for a series of topological key points globally to represent the searched area; The calculation method of topological key points here corresponds to the M ns The calculation method is Step 3.6: Based on the reconstruction result f(L M ), compared with the tubular structure shape L′ before mask perturbation and calculate the reconstruction loss Loss rec At the same time, the topological key points extracted in step 3.5 are used to calculate an additional topological loss Loss topo , which is used to guide the model to focus on these key areas; finally, the two losses are combined to obtain the comprehensive loss Loss of the current training iteration. total ; The mean square error (MSE) is used as the reconstruction loss. rec , defined as follows: Where σ represents the sigmoid function; Topological loss Loss topo , defined as follows: In the formula, Represents a non-simple point in the mask area M after undergoing sufficient iterative simple point corrosion; Comprehensive loss total as follows: Loss total =Loss rec +αLoss topo Where α is the weight that controls the importance of topological loss; Step 3.7 performs back propagation based on the comprehensive loss in 3.6 to update the parameters of the autoencoder; The above steps 3.1 to 3.7 are the steps of one iteration during training. After enough iterations, the loss will gradually converge and stabilize, and finally the parameters of the autoencoder will be obtained.
9. The method for improving the topological connectivity of medical tubular structure segmentation according to claim 1, characterized in that: Step 4: The use in the inference phase consists of two operations: deep dilation and simple component erosion, where: Deep dilation: The input tubular structure image to be processed is fed into the trained autoencoder network to indicate the potential disconnected area and mark the location of the area; Let f be the trained autoencoder, T be the pre-segmented binary image, and use the autoencoder f to indicate the potential disconnected areas. The process is expressed as: T dd =σ′(f(T)) Where T dd is the result of deep expansion, σ′ represents sigmoid activation and threshold operation; Simple component erosion: Perform simple component erosion on the deep dilation result to remove topologically unimportant areas, thereby obtaining a topologically optimized segmentation result that is more coherent. The process is expressed as: T dc =SCE(T dd ) Where T dc is the final result of the deep closing operation; Specifically, the implementation steps include: Step 4.1 prepare / obtain the tubular structure segmentation map T to be processed and perform preprocessing; Step 4.2 uses the trained autoencoder weights to load into the autoencoder f in the current scenario; Step 4.3: Input the segmentation map in step 4.1 into the autoencoder in step 4.2, and then obtain the reconstruction result f(L M ), and the corresponding depth expansion result T dd ; Step 4.4 performs a simple component corrosion operation on the deep expansion result in step 4.3 to ensure that all deep expansion areas in step 4.3 are topologically important, and obtains the final deep closing operation result T dc .
Citation Information
Patent Citations
Apparatus and method for tubular structure segmentation
CN115965637A