A skeleton mass-driven tubular structure segmentation closed-loop optimization method and system

By employing a skeleton quality-driven closed-loop optimization method, topological defects in medical images are detected and a defect density weight map is generated. This solves the problem of inconsistency between the segmentation model and the skeletonization quality requirements, and achieves incremental optimization of the segmentation model and improvement of skeleton quality.

CN122176420APending Publication Date: 2026-06-09SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI
Filing Date
2026-04-10
Publication Date
2026-06-09

Smart Images

  • Figure CN122176420A_ABST
    Figure CN122176420A_ABST
Patent Text Reader

Abstract

The application discloses a skeleton quality driven tubular structure segmentation closed loop optimization method and system, which is applied to the technical field of biomedical image processing and computer aided diagnosis, and the method comprises the following steps: using a trained segmentation model to infer medical volume data to obtain a segmentation mask; skeletonizing the segmentation mask to extract a skeleton graph; performing topological defect detection on the skeleton graph to obtain a structured defect report; reversely mapping three-dimensional coordinates in the report back to a voxel space, taking each defect point as a center, a preset radius as a range, and generating a defect density weight graph according to a severity score; and using the weight graph as a spatial weighting parameter of a loss function to optimize the segmentation model; and the application reversely maps the topological defects detected by skeletonization into a weight graph and integrates the weight graph into a loss function for closed loop iteration, realizes directional repair on high-occurrence areas such as fractures and false branches, and improves the conduction efficiency of segmentation improvement to skeleton quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of biomedical image processing and computer-aided diagnosis, and in particular to a skeleton quality-driven closed-loop optimization method and system for tubular structure segmentation. Background Technology

[0002] Segmentation and skeletonization of tubular structures (such as microvascular networks and bronchial trees) in medical images are fundamental for quantitative topological analysis, hemodynamic simulation, and disease diagnosis. A typical processing flow includes "image acquisition → foreground segmentation → skeletonization." The quality of the mask output by the segmentation model directly determines the accuracy of subsequent skeleton extraction.

[0003] The current standard technical chain from raw medical images to tubular structure skeleton maps consists of three sequential stages: image acquisition, foreground segmentation, and skeletonization. Segmentation quality directly determines the upper limit of skeletonization quality, and the topological quality of the skeletonized skeleton is the ultimate core requirement of this technical chain. In recent years, deep learning-based segmentation models have achieved high pixel-level accuracy in medical tubular structure segmentation tasks. Mainstream solutions use pixel-level loss functions such as Dice loss and cross-entropy loss as optimization targets. Some improved solutions introduce topology-aware losses such as soft-clDice, using soft skeletonization to approximate and optimize the connectivity of tubular structures. Simultaneously, existing technologies also include post-hoc evaluation schemes for skeleton quality, which quantitatively evaluate skeleton quality by calculating indicators such as the completeness and correctness of the generated skeleton compared to the gold standard skeleton. For the construction of high-precision skeleton datasets, current mainstream solutions rely on domain experts to manually perform topological correction on the skeleton, correcting defects such as breaks and false branches.

[0004] However, there is a discrepancy between the optimization objectives of current segmentation models (pixel overlap or soft skeleton approximation) and the requirements of downstream skeletonization tasks for topological quality such as connectivity and glitch-free properties. For example, tiny glitches at the boundaries of the segmentation mask have little impact on the Dice loss, but may generate a large number of spurious branches after skeletonization. Furthermore, skeleton quality is typically evaluated posteriorly, and the results are not effectively fed back into the training process of the segmentation model.

[0005] To overcome these shortcomings, this application proposes a skeleton quality-driven closed-loop optimization method and system for tubular structure segmentation. Summary of the Invention

[0006] The purpose of this application is to provide a skeleton quality-driven closed-loop optimization method and system for tubular structure segmentation, which aims to solve the problem that skeleton topological defects cannot be automatically classified and transformed into segmentation model optimization signals due to the inconsistency between the optimization objective of the segmentation model and the downstream skeletonization quality requirements.

[0007] To achieve the above objectives, this application provides the following technical solution: In a first aspect, this application provides a skeleton quality-driven closed-loop optimization method for tubular structure segmentation, comprising the following steps: The trained segmentation model is used to infer the medical body data to obtain the segmentation mask; The segmentation mask is skeletonized, and a skeleton diagram aligned with the spatial coordinate system of the segmentation mask is extracted. The skeleton graph is subjected to topological defect detection to obtain a structured defect report containing defect type, three-dimensional spatial coordinates and severity score; The three-dimensional spatial coordinates in the structured defect report are inversely mapped to the voxel space corresponding to the segmentation mask, and a defect density weight map is generated based on the severity score, with each defect point as the center and a preset influence radius as the range. The segmentation model is optimized by using the defect density weight map as the spatial weighting parameter of the loss function; Based on the optimized segmentation model, an updated defect report is obtained. The segmentation model is then iteratively optimized using the updated defect report until a preset iteration termination condition is met, at which point the final segmentation model is output.

[0008] Secondly, this application provides a skeleton quality-driven closed-loop optimization system for tubular structure segmentation, specifically including: The segmentation inference module is used to infer the medical body data using a trained segmentation model to obtain a segmentation mask; The skeleton extraction module is used to perform skeletonization processing on the segmentation mask and extract the skeleton image aligned with the spatial coordinate system of the segmentation mask. The defect detection module is used to perform topological defect detection on the skeleton graph and obtain a structured defect report containing defect type, three-dimensional spatial coordinates and severity score; The weight map generation module is used to reverse map the three-dimensional spatial coordinates in the structured defect report to the voxel space corresponding to the segmentation mask, and generate a defect density weight map with each defect point as the center and a preset influence radius as the range, based on the severity score. The model optimization module is used to optimize the segmentation model by using the defect density weight map as the spatial weighting parameter of the loss function; The closed-loop iteration module is used to obtain an updated defect report based on the optimized segmentation model, and iteratively optimize the segmentation model with the updated defect report until the preset iteration termination condition is met, and then output the final segmentation model.

[0009] Thirdly, this application provides a computer device, the computer device including a processor and a memory coupled to the processor, wherein the memory stores program instructions for implementing a skeleton quality-driven tubular structure segmentation closed-loop optimization method; the processor is used to execute the program instructions stored in the memory to implement a skeleton quality-driven tubular structure segmentation closed-loop optimization.

[0010] Fourthly, this application provides a computer-readable storage medium storing processor-executable program instructions for executing a skeleton quality-driven tubular structure segmentation closed-loop optimization method.

[0011] This application provides a skeleton quality-driven closed-loop optimization method and system for tubular structure segmentation, which has the following beneficial effects: This application establishes a closed-loop feedback mechanism from skeleton quality assessment to segmentation training by inversely mapping the detected topological defects after skeletonization to the segmentation mask voxel space and generating a defect density weight map. This weight map is then used as the spatial weighting parameter of the loss function to optimize the segmentation model. Simultaneously, based on the optimized model, an updated defect report is obtained, and the above process is iteratively executed until a termination condition is met. This solves the problem of the lack of a quality feedback channel between segmentation model training and skeletonization processing in existing technologies. Specifically, by performing systematic topological defect detection on the skeleton graph, defects are classified into node-view defects, connection-view defects, and topological statistical defects. Differential severity scores are assigned to each type of defect, ensuring that the defect report not only includes the spatial location of the defect but also quantifies the degree of damage to the skeleton quality caused by different types of defects. Furthermore, by utilizing the fact that skeletonization does not change the properties of the spatial coordinate system, the three-dimensional coordinates of the defects are directly inversely mapped. Mapped to the segmentation mask voxel space, and with each defect point as the center and a preset influence radius as the range, a defect density weight map is generated by combining severity scores and decay kernel functions. This weight map reflects the spatial distribution density and type importance differences of defects. After incorporating this weight map into the loss function, the weighted Dice loss imposes a higher penalty on false positives and false negatives in high-defect areas. During backpropagation, these areas receive stronger gradient signals, driving the segmentation model parameters to update in the direction of correcting errors in these areas. Simultaneously, the weighted Dice loss and soft-clDice loss are linearly combined, making pixel-level spatial orientation optimization and global topological constraints complementary. This application uses multiple rounds of closed-loop iteration to dynamically update the weight map as the defect distribution changes. The optimization pressure gradually focuses on the most prominent quality weaknesses in the current round, driving the segmentation quality and skeleton quality to converge progressively until the preset iteration termination condition is met, at which point the final segmentation model is output. Attached Figure Description

[0012] Figure 1This is a schematic flowchart of a skeleton quality-driven tubular structure segmentation closed-loop optimization method according to Embodiment 1 of this application; Figure 2 This is a flowchart of a skeleton quality-driven tubular structure segmentation closed-loop optimization method according to Embodiment 1 of this application; Figure 3 This is a schematic diagram of the skeleton topological defect classification system of Embodiment 1 of this application; Figure 4 This is a schematic diagram of defect reverse mapping and weight graph generation in Embodiment 1 of this application; Figure 5 This is a schematic diagram of the skeleton matching degree evaluation framework of Embodiment 1 of this application; Figure 6 This is a schematic diagram of the convergence curve of the joint skeleton quality score Q_skeleton in Embodiment 1 of this application; Figure 7 This is a schematic diagram of the convergence curve of the overall quality of the skeleton in Embodiment 1 of this application; Figure 8 This is a schematic diagram illustrating the change in the total number of defects as of iteration in Embodiment 1 of this application; Figure 9 This is a schematic diagram showing the breakdown of the number of various defects in Embodiment 1 of this application; Figure 10 This is a schematic diagram of a skeleton quality-driven tubular structure segmentation closed-loop optimization system according to Embodiment 2 of this application; Figure 11 This is a schematic diagram of the computer device structure according to Embodiment 3 of this application; Figure 12 This is a schematic diagram of the storage medium structure of Embodiment 4 of this application. Detailed Implementation

[0013] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0014] The following analysis, based on relevant technologies, examines existing solutions.

[0015] The following limitations exist in the processing chain from segmentation to skeletonization: (1) There is a systematic misalignment between the optimization objective of the segmentation model and the requirements for skeleton quality. The segmentation model trained with Dice loss or cross-entropy loss focuses on the overlap at the voxel level, rather than the connectivity and simplicity of the topological structure. For example, local depressions or minor breaks on the segmentation mask have little impact on the IoU index, but after skeletonization, they lead to the generation of false branches or the fundamental destruction of network connectivity, respectively. Although soft-clDice loss introduces a soft skeleton approximation, there is still a deviation between its output and that of true skeletonization (such as geometric shrinkage or morphological refinement), making it difficult to completely replace the downstream true skeleton quality feedback.

[0016] (2) The skeleton quality assessment information was not used for segmentation training. In the prior art, indicators such as the completeness and correctness of the skeleton matching degree, or the topological defect statistics based on graph theory, are used for the posterior evaluation of the generated skeleton. These assessment results are presented in the form of reports to measure the quality of the final output of the model, but they are not used as feedback signals to reintegrate into the training or fine-tuning process of the segmentation model, resulting in an information gap between assessment and optimization.

[0017] (3) Lack of means to transform skeleton defects into segmentation optimization signals. Different types of skeleton defects (such as fractures, false branches, and node redundancy) have different generation mechanisms. For example, fractures may originate from missed detections in low-contrast regions, while false branches are often related to burrs at segmentation boundaries. Existing technologies cannot map these structured defect types and spatial location information back into segmentation training to guide the model to make targeted corrections to specific regions or specific types of errors.

[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0019] Example 1 Please see Figure 1 This is a flowchart illustrating a skeleton quality-driven closed-loop optimization method for tubular structure segmentation according to Embodiment 1 of this application; the steps include: S1: Use the trained segmentation model to infer the medical body data and obtain the segmentation mask.

[0020] In this embodiment, three-dimensional brain microvascular images acquired by two-photon fluorescence microscopy are used as medical volume data. Each volume data sample has a size of 512×512×128 voxels, with a voxel resolution of [missing information]. (Anisotropy). The segmentation model employs a U-shaped encoder-decoder architecture, such as 3D U-Net, FC-DenseNet, or V-Net. This embodiment uses V-Net as an example for illustration. The model has completed one round of regular training on a labeled brain microvessel training dataset, with 200 training rounds and the standard Dice loss function.

[0021] During the inference phase, the trained V-Net model parameters are loaded into memory, and complete inference is performed on each volume data instance in the training set. No random data augmentation is performed during inference; the input is the original volume data to ensure that the output segmentation mask is strictly aligned with the original volume data in spatial coordinates. For volume data exceeding the GPU memory capacity for a single inference (512×512×128), a sliding window strategy is adopted: the window size is 256×256×64, the stride is 192×192×48, and overlapping regions (16 voxels overlap) are set between windows to eliminate splicing boundary effects. The inference output is a probability map of each voxel belonging to the foreground (blood vessel), which, after Sigmoid activation, is thresholded. Binarization yields a binary segmentation mask M, whose spatial dimension is the same as the original volume data. .

[0022] Subsequently, a morphological opening operation is performed on the binary mask, using a 3×3×3 elliptical structuring element to remove small-area isolated noise points (connected components with an area less than 10 voxels), resulting in a cleaned segmentation mask; this segmentation mask serves as the input for subsequent skeletonization processing.

[0023] S2: Perform skeletonization processing on the segmentation mask and extract the skeleton diagram aligned with the spatial coordinate system of the segmentation mask.

[0024] In this embodiment, a geometric skeletonization method based on Laplace shrinkage is employed to skeletonize the segmentation mask. First, the Marching Cubes algorithm is used to extract isosurface triangular meshes from the segmentation mask. These meshes, composed of vertices and triangular faces, represent the surface geometry of the tubular structure. Then, by iteratively solving the constrained Laplace equation, the mesh vertices shrink towards their volume center: in each iteration, the Laplace coordinates of each vertex are calculated, and the vertex is moved along the curvature direction while a volume-preserving constraint is applied to prevent excessive shrinkage. The number of iterations is set to 50, and the mesh is re-meshed after each iteration to maintain uniform sampling.

[0025] When the mesh degenerates into an approximately one-dimensional curved structure, topological refinement is performed: non-branching nodes with a degree of 2 are deleted, collinear edges are merged, and overhanging short branches (less than 3 voxels in length) with a degree of 1 are pruned. The final result is a curved skeleton diagram S, which consists of nodes (3D point coordinates) and edges (line segments connecting nodes). Since the entire skeletonization process is performed only within the voxel space of the segmentation mask and does not change the origin and orientation of the coordinate system, the skeleton diagram S maintains the exact same spatial coordinate system as the segmentation mask. That is, the coordinates (x, y, z) of each node in the skeleton diagram can directly correspond to the voxel at the same coordinate position in the segmentation mask. In this embodiment, the skeletonization method can also be replaced by a morphological refinement algorithm or a distance transformation method, as long as the skeleton output maintains spatial coordinate alignment.

[0026] S3: Perform topological defect detection on the skeleton graph to obtain a structured defect report containing defect type, three-dimensional spatial coordinates and severity score.

[0027] In this embodiment, to comprehensively evaluate the quality of the tubular structure skeleton, skeleton topological defects are divided into three categories: node-view defects, connection-view defects, and topological statistical defects. For each type of defect, a detection algorithm based on skeleton graph topological attributes, a differential severity score, and spatial coordinate recording rules are defined, ultimately generating a structured defect report.

[0028] To address node-based perspective defects, the first step is to detect spurious nodes. Traverse all branch nodes in the skeleton graph with a degree (number of adjacent nodes) ≥ 3. For each branch node, check the length of each skeleton edge it connects to. If the length of a skeleton edge is lower than a preset threshold (e.g., ...), then... If the edge and its terminal node are identified as spurious branches caused by surface burrs, the terminal node is marked as a spurious node. The 3D coordinates of this node are recorded, and a severity score of 1.5 is assigned. Next, redundant nodes are detected. The search space distance is less than... For voxel branch node pairs, if the skeleton path length between the two nodes is ≤3 voxels and they are each connected to different main skeleton segments (i.e., they belong to parallel vascular structures that should have been separated), then they are considered redundant node pairs caused by segmentation adhesion. The midpoint coordinates of this node pair are recorded, and a severity score of 2.0 is assigned. Finally, missing nodes are detected. The generated skeleton map S is compared with the reference skeleton. Spatial matching is performed using a gold standard framework constructed by experts, with a matching tolerance radius of [missing information]. voxels. For the reference skeleton Each branch node in S Search for a matching node within the neighborhood. If no matching node is found, mark it as a missing node. Record the node's position in the neighborhood. The coordinates in the graph are assigned a severity score of 3.0, as they directly lead to the loss of network topology.

[0029] For defects in the viewpoint of connecting lines, first detect broken connecting lines. Search for all endpoints with a degree of 1 in the skeleton graph, and for each endpoint, in its Within the neighborhood ( The voxels are searched for the other endpoint of a different connected component. If such an endpoint pair exists, a break is determined, meaning that two tubular segments that should be connected have broken during the segmentation. The midpoint coordinates of the two broken endpoints are recorded, and a severity score of 3.0 is assigned, which is the highest priority because it directly destroys the network's connectivity. Next, spurious connections are detected. For each edge in the generated skeleton S, it is checked whether all voxels on that edge fall within the reference mask (the real foreground mask annotated by experts). If the voxels on that edge exceed a certain threshold... If a voxel is not within the reference mask, the connection is determined to be a false connection, i.e., a skeleton segment generated by missegmentation due to background noise. Record the coordinates of the midpoint of the edge and assign a severity score of 1.0.

[0030] To address topological statistical defects, the first step is to detect excessive branch nodes. This involves counting skeleton voxels with a degree (number of neighbors) > 4. Branch nodes in normal tubular structures are typically tees (degree 3) or quadrilaterals (degree 4), while nodes with a degree of 5 or higher usually originate from the merging of multiple tubular structures at the split boundary. For each node with a degree ≥ 5, its coordinates are recorded, and a severity score of 3.0 is assigned. Next, spurious loops are detected. The first Betti number of the skeleton graph is calculated. ,in The number of connected components. Let Euler's characteristic number be . This indicates the number of independent loops in the graph. The spatial location of pseudo-loops is determined by detecting the smallest loop in the skeleton graph and recording the geometric center coordinates of that loop, with a severity score of 1.0 assigned.

[0031] After completing the above tests, a structured defect report is generated. ,in Defect type (marked from the seven subcategories above). In three-dimensional space coordinates, The severity level is assigned a score. This defect report is stored in JSON format and includes the type label, spatial location, and weight score for each defect, for use in subsequent reverse mapping steps. In practical applications, if no reference skeleton or reference mask is available, the detection of missing nodes and spurious connections can be skipped initially, and only the remaining five types of defects can be detected. After several rounds of model optimization, gold-standard data can be introduced for validation.

[0032] S4: Reverse map the three-dimensional spatial coordinates in the structured defect report to the voxel space corresponding to the segmentation mask, and generate a defect density weight map based on the severity score, with each defect point as the center and a preset influence radius as the range.

[0033] In this embodiment, coordinate alignment is performed first. Since the skeletonization operation in step S2 does not change the spatial coordinate system, the node coordinates in the skeleton diagram directly correspond to the voxel coordinates of the segmentation mask. Therefore, the three-dimensional coordinates in the structured defect report output in step S3 are... It can be directly mapped back to the voxel space of the segmentation mask without any additional coordinate transformation. Specifically, the coordinates of each defect point correspond to the voxel at the same coordinate position in the segmentation mask. Next, the influence region of each defect point is defined. For each defect point... Centered on it and with a pre-set radius of influence A voxel defines a spherical region of influence. The radius is chosen to cover the local context of the defect within the segmentation mask.

[0034] Construct a three-dimensional defect density weight map in the complete voxel space of the segmentation mask. For any voxel position Its weight value is calculated by summing the influence contributions of all defect points, and is specifically defined as: ,in For the decay kernel function, this embodiment uses a Gaussian kernel function. This results in voxels closer to the defect point receiving a higher weight contribution, and the weight decreases smoothly with distance. The global weight gain coefficient is taken as... This is used to adjust the magnification factor of the defect area relative to the background area. The distance function is Euclidean. The baseline weight is 1 to ensure that non-defect regions (i.e., voxels outside the influence range of all defect points) still participate in training with normal weights. The severity scores of different defect types are directly multiplied into the cumulative term, so that fracture defects (severity=3.0) have the highest peak influence, while spurious nodes (severity=1.0) have a relatively low influence, thus achieving differentiated weighting.

[0035] After generating the initial weighted graph, it is then normalized to its mean. ,in for The average value of all voxels. The purpose of normalization is to maintain the overall numerical scale of the loss function without shifting due to weighting, so as to maintain the comparability of the weighted loss and the standard loss.

[0036] Finally, the dimensionality of the weight map is adapted according to the training dimensionality of the segmentation model. This embodiment uses a two-dimensional slice-level training method (i.e., inputting a single two-dimensional slice each time). Therefore, during the data loading phase, when loading the training samples of the z-th frame slice (z=1,...,128), the dimensionality of the weight map is adjusted from the three-dimensional normalized weight map. The corresponding slice section is extracted and used as the pixel-level weight matrix for that sample. This weight matrix remains unchanged within the current outer loop iteration, does not participate in gradient calculation, and only serves as an external static parameter of the loss function. It is regenerated at the start of the next outer loop iteration based on the updated defect report. For other implementations using 3D volumetric training, a 3D sub-block corresponding to the spatial region of the weight map is extracted when loading the 3D sub-block.

[0037] S5: Optimize the segmentation model by using the defect density weight map as the spatial weighting parameter of the loss function.

[0038] In this embodiment, the defect density weight map is incorporated into the Dice loss function to construct a weighted Dice loss function; the segmentation model is fine-tuned and optimized using the weighted Dice loss function as the optimization objective to obtain the optimized segmentation model.

[0039] Specifically, a weighted Dice loss function is constructed. Its definition is: ; in, This is the probability map predicted by the model (output after Sigmoid activation). To accurately label the mask, This is the smoothing constant. The calculation process of this loss function is as follows: For each voxel location, the weight map is... The corresponding values ​​are multiplied by and the true value Then sum over the entire image. In areas with high defect rates, This amplifies the contribution of false positive (P=1, G=0) and false negative (P=0, G=1) pixels to the loss value within that region; in defect-free regions, The training behavior is consistent with the standard Dice loss. During backpropagation, the gradient signal intensity in the defect region is correspondingly enhanced, driving the model parameters to be updated in the direction of correcting errors in that region. The weighted Dice loss directly affects pixel-level prediction, achieving targeted optimization of defect-prone areas.

[0040] To further enhance topological integrity, the weighted Dice loss and soft-clDice loss are linearly combined to form the total loss function: ; in The topology-aware weight coefficients are set to α=0.3. The soft-clDice loss constrains the topology of the predicted mask through a differentiable soft skeletonization operation, but it does not perform spatial weighting during its calculation to maintain its dependence on global connectivity. The weighted Dice loss enhances the pixel accuracy of defective regions from a spatial dimension, while the soft-clDice loss globally constrains the connectivity of the tubular topology from a structural dimension; the two complement each other.

[0041] Furthermore, the optimal model parameters saved in the previous inner loop are used as initialization, and the learning rate is set to 1 / 10 of the initial learning rate. In this embodiment, the initial learning rate for the first complete training round is... The final learning rate is Therefore, the learning rate during the fine-tuning phase is set to The number of fine-tuned training epochs was set to half the number of the initial full training epochs, i.e., 100 epochs (the initial training epochs were 200). In each iteration, the training data employed the same data augmentation strategy as the initial training epoch. Instance normalization was used for the normalization layer because it calculates statistics independently for each sample, thus avoiding cross-sample statistical interference due to differences in weight distribution between samples when using the defect-weighted graph. During training, the weight graph... These parameters remain unchanged, do not participate in gradient updates, and are only used as external static parameters of the loss function. After each round of fine-tuning training, the optimized model parameters are saved for subsequent iterative evaluation or as the final output.

[0042] S6: Obtain an updated defect report based on the optimized segmentation model, and iteratively optimize the segmentation model using the updated defect report until the preset iteration termination condition is met, and then output the final segmentation model.

[0043] In this embodiment, the model parameters saved after fine-tuning in step S5 are first loaded as the current segmentation model. Then, steps S1 to S3 are repeated: that is, the model is fully inferred on all training data to obtain a new segmentation mask; the new segmentation mask is skeletonized to extract a new skeleton graph; topological defect detection is performed on the new skeleton graph to generate an updated structured defect report. This updated defect report reflects the quality status of the current model at the skeleton level, where the defect type, spatial coordinates, and severity score are recalculated based on the latest segmentation results.

[0044] Furthermore, a multi-dimensional skeleton quality assessment is performed to determine whether the iteration termination condition is met. The assessment includes skeleton matching degree evaluation and skeleton topology health evaluation. During the skeleton matching degree evaluation, the new skeleton graph... With reference skeleton (Gold standard skeleton) is used for spatial matching, and a tolerance radius is set. Voxels, computational completeness, correctness, and overall quality. When assessing the health of the skeleton topology, the new skeleton diagram... Perform defect detection and count the total number of defects. (Including isolated points, pseudo-loops, excessive branch nodes, etc.), and calculate the defect rate. Then, the joint skeleton quality score is calculated: ; For the weighting coefficients, take... .

[0045] The preset iteration termination condition is that any of the following conditions are met: the joint skeleton quality score exceeds a preset target threshold; the joint skeleton quality score does not improve by more than a preset magnitude threshold in a preset number of consecutive iterations; or the preset maximum number of iterations is reached. That is, the joint skeleton quality score... Exceeding the target threshold (e.g., 0.80); in consecutive preset rounds (e.g., 3 rounds) of iteration, The improvement rate did not exceed the preset threshold (e.g., 0.5%); and the preset maximum number of iterations was reached (e.g., 5 iterations).

[0046] If no termination condition is met, the updated defect report is used as input to step S4 to regenerate the defect density weight map (the weight map will be updated as the defect distribution changes), and then the fine-tuning optimization in step S5 is performed again, forming a new round of closed-loop iteration. If the termination condition is met, the iteration stops, and the currently optimized segmentation model is output as the final segmentation model. This final model meets the preset requirements in terms of skeleton matching degree and topological health, and can be directly used for subsequent quantitative analysis or 3D reconstruction of tubular structures.

[0047] Through the aforementioned closed-loop iterative mechanism, incremental optimization driven by skeleton quality is achieved. In each iteration, the weight map is dynamically adjusted based on the latest defect distribution, ensuring that the optimization pressure is always focused on the most prominent quality weakness.

[0048] Please see Figure 2This is a flowchart of a skeleton quality-driven closed-loop optimization method for tubular structure segmentation according to Embodiment 1 of this application. The method is divided into two main parts: an inner loop and an outer loop. The inner loop corresponds to the training or fine-tuning process of the segmentation model. The input is three-dimensional volume data and the corresponding labeled mask, and conventional training or weighted fine-tuning is performed. After the inner loop is completed, the outer loop process begins: First, deterministic complete inference is performed, and the segmentation mask is output under the condition of no data augmentation and maintaining spatial coordinate alignment; then, the skeleton graph is extracted using the Laplacian shrinkage skeletonization method; next, the skeleton graph is automatically detected and classified for topological defects, and a structured defect report is output, including defect type, coordinates, and severity score; the defect report is inversely mapped and a normalized weight graph is generated to construct a weighted loss combination; then, multi-dimensional skeleton quality evaluation is performed, and the matching degree and joint quality score are calculated; finally, it is determined whether convergence has occurred. If convergence has occurred, the optimized model is output; if convergence has not occurred, the process returns to the inner loop for the next round of weighted fine-tuning.

[0049] Please see Figure 3 This is a schematic diagram of the skeleton topology defect classification system of Embodiment 1 of this application. The figure intuitively demonstrates the specific morphology and causes of each defect: Node perspective: including "false nodes" caused by surface burrs, "redundant nodes" caused by parallel blood vessel adhesion, and "missing nodes" caused by missed division of fine branches. Connection perspective: including "broken connections" caused by deep signal attenuation and "false connections" caused by background noise missegmentation. Topology perspective: including "excessive branch nodes" (degree > 4) and "pseudo-loops" caused by complex intersections. The figure is marked with a severity rating axis from low to high, intuitively reflecting the difference in topology damage caused by false nodes / pseudo-loops (low severity) to broken connections / excessive branch nodes (high severity).

[0050] Please see Figure 4 This diagram illustrates the defect inverse mapping and weight map generation in Embodiment 1 of this application. First, based on the invariant coordinate system of the skeleton and segmentation mask space, the three-dimensional coordinates of the skeleton defects are aligned and labeled. Then, an influence radius is set centered on each defect point, and combined with a Gaussian decay kernel function and severity score, local defect density weight values ​​are generated in the three-dimensional voxel space. Finally, these values ​​are accumulated to obtain the overall three-dimensional defect density weight map. The diagram below further illustrates the dimension adaptation mechanism: in two-dimensional slice-level training, how to extract a specific two-dimensional slice from the three-dimensional weight map based on the corresponding coordinates as the pixel-level weight matrix of the current sample.

[0051] Please see Figure 5Figures (a), (b), and (c) illustrate the framework for skeleton matching evaluation in Embodiment 1 of this application. Figures (a), (b), and (c) explain, from a principle perspective, how to calculate completeness, correctness, and overall quality indicators by the cross-coverage rate between the generated skeleton and the reference skeleton, given a tolerance radius. Figures (d)-(g) provide an intuitive visualization of the matching evaluation using real microvascular images. Successfully matched portions (bidirectional intersection), missing skeleton portions (green / red solid lines), and spurious skeleton portions generated by the model are distinguished by color, intuitively mapping the defective performance of the segmentation model.

[0052] Please see Figures 6 to 9 The figures are schematic diagrams of the convergence curve of the joint skeleton quality score Q_skeleton, the convergence curve of the overall skeleton quality Quality, the total number of defects changing with iteration, and the decomposition of the number of various defects, respectively, as shown in Embodiment 1 of this application. The actual convergence effect and index change trend of the closed-loop iterative optimization experiment are presented through four sets of line graphs / bar charts. Figure 6 The data shows that the value steadily increased from 0.713 at the baseline (Round 0) to 0.754 after three rounds of external circulation. Figure 7 The incremental optimization process, which improved the accuracy from 72.18% to 74.81%, was verified. Figure 8 It shows a significant decreasing trend in the average total number of defects per frame with iteration (from 174.1 at the baseline to 121.3, an overall decrease of 30.3%). Figure 9 By refining the defect types in each round, this application reveals that it can produce a highly significant targeted repair effect on certain frequently occurring defects (such as "excessive branch nodes"), effectively solving the problem of topological disorder caused by boundary accuracy.

[0053] Furthermore, existing experiments in two-photon fluorescence microscopy for brain vessel segmentation have verified that improvements in segmentation metrics can effectively translate to improved skeletal matching accuracy, as shown in Table 1.

[0054]

[0055] Table 1 shows the correspondence between segmentation metrics and skeleton matching degree for each model (mean ± standard deviation). IoU is the mean of 2D slices, clDice is the 3D volumetric calculation, and the skeleton matching degree tolerance radius is... Pixel.

[0056] As can be seen, from the baseline FC-DenseNet to the optimized segmentation model, the IoU improved by 6.83 percentage points, the overall skeleton quality improved by 3.38 percentage points, and the transmission rate was approximately 49.5%. This transmission relationship provides the basis for the closed-loop feedback mechanism of this invention: segmentation improvement can be transmitted to skeleton quality, and conversely, segmentation optimization with skeleton quality as the target will achieve more efficient transmission.

[0057] A systematic topological health assessment was performed on the skeleton graph output by the optimized segmentation model, and the results are shown in Table 2.

[0058]

[0059] Table 2 shows the skeleton topology health statistics (frame-by-frame mean ± standard deviation).

[0060] Excessive branch nodes account for 89.4% of the total defects, representing a major bottleneck in skeleton quality. This defect is primarily caused by local burrs at the segmentation boundaries; the weighted Dice loss in this application imposes a higher error cost on these regions, directly reducing the occurrence rate of such defects.

[0061] Using the first round of training results of the optimized segmentation model as the baseline (Round 0), perform 3 rounds of outer loop fine-tuning (each round fine-tuning for 80 epochs, with a learning rate of [missing information]). The results are shown in Table 3.

[0062]

[0063] Table 3 shows the changes in skeleton quality and defect quantity in each round of closed-loop iteration. Round 0 represents the baseline results after the first round of complete training. Rounds 1-3 each underwent 80 epochs of fine-tuning training. .

[0064] After three rounds of external iterations, the segmentation IoU improved from 76.92% to 77.83, the overall skeleton quality improved from 72.18% to 74.81% (+2.63 percentage points), and the total number of defects decreased from 174.10 to 121.30 (a decrease of 30.3%). Notably, the excessive branch nodes, a major bottleneck, decreased from 155.58 to 110.35 (a decrease of 29.1%), validating the targeted repair effect of weighted Dice loss on boundary accuracy defects. Furthermore, unlike Table 1, the overall skeleton quality index increased significantly despite a slight improvement in IoU, demonstrating the effectiveness of this application in improving skeleton quality and completing the core quality optimization loop. Simultaneously... The score rose steadily from 0.713 to 0.754. The increment from Round 2 to Round 3 (Quality +0.29%, total defects -5.40) was significantly smaller than in the previous two rounds, indicating that the closed-loop optimization approached convergence in fewer rounds.

[0065] In summary, Embodiment 1 of this application achieves cross-stage feedback iteration between the segmentation model and skeletonization by constructing a skeleton quality-driven closed-loop optimization process. First, a trained segmentation model is used to perform complete inference on medical body data to obtain a segmentation mask. Then, the segmentation mask is skeletonized, and a skeleton graph aligned with the spatial coordinate system of the segmentation mask is extracted. Automated topological defect detection is performed on the skeleton graph, generating a structured defect report containing defect type, three-dimensional spatial coordinates, and severity score. The three-dimensional coordinates in the defect report are inversely mapped back to the voxel space of the segmentation mask. A defect density weight map is generated with each defect point as the center, a preset influence radius as the range, and based on the severity score. This weight map is used as the spatial weighting parameter of the loss function to fine-tune and optimize the segmentation model. Based on this, an updated defect report is obtained again based on the optimized segmentation model, and the above inference, skeletonization, defect detection, weight map generation, and fine-tuning optimization processes are repeated until a preset iteration termination condition is met, at which point the final segmentation model is output. This method explicitly feeds back the skeleton quality assessment results to the segmentation training, realizing closed-loop iterative optimization across stages. Experiments show that it can significantly reduce the number of skeleton topological defects, improve the overall quality of the skeleton, and has a fast convergence speed.

[0066] Example 2 Please see Figure 10 This is a schematic diagram of a skeleton quality-driven tubular structure segmentation closed-loop optimization system according to Embodiment 2 of this application; the specific content includes: The segmentation inference module 100 is used to infer the medical body data using a trained segmentation model to obtain a segmentation mask; The skeleton extraction module 200 is used to perform skeletonization processing on the segmentation mask and extract the skeleton diagram aligned with the spatial coordinate system of the segmentation mask. The defect detection module 300 is used to perform topological defect detection on the skeleton graph to obtain a structured defect report containing defect type, three-dimensional spatial coordinates and severity score. The weight map generation module 400 is used to reverse map the three-dimensional spatial coordinates in the structured defect report to the voxel space corresponding to the segmentation mask, and generate a defect density weight map with each defect point as the center and a preset influence radius as the range, based on the severity score. The model optimization module 500 is used to optimize the segmentation model by using the defect density weight map as the spatial weighting parameter of the loss function; The closed-loop iteration module 600 is used to obtain an updated defect report based on the optimized segmentation model, and iteratively optimize the segmentation model with the updated defect report until the preset iteration termination condition is met, and then output the final segmentation model.

[0067] In this embodiment, the segmentation inference module 100 is used to perform complete inference on the medical volume data using a trained segmentation model to obtain a segmentation mask. This module does not perform random data augmentation during inference, ensuring that the segmentation mask and the original volume data are strictly aligned in spatial coordinates. For large-volume data, a sliding window strategy is used to stitch the data together for output.

[0068] The skeleton extraction module 200 is used to skeletonize the segmentation mask output by the segmentation inference module 100, extracting a skeleton graph aligned with the spatial coordinate system of the segmentation mask. This module can employ a geometric skeletonization method based on Laplacian contraction or a morphological thinning algorithm to output a curved skeleton graph composed of nodes and edges.

[0069] The defect detection module 300 performs topological defect detection on the skeleton graph output by the skeleton extraction module 200, generating a structured defect report that includes defect type, three-dimensional spatial coordinates, and severity score. Specifically, defects are divided into three main categories: node-view defects, connection-view defects, and topological statistical defects, totaling seven subcategories, and a differentiated severity score is assigned to each category of defects.

[0070] The weighted map generation module 400 is used to inversely map the three-dimensional spatial coordinates in the structured defect report output by the defect detection module 300 to the voxel space corresponding to the segmentation mask, and generate a defect density weighted map based on the severity score, with each defect point as the center and a preset influence radius as the range. Specifically, a Gaussian decay kernel function is used to accumulate the influence of each defect point, and the generated weighted map is normalized to the mean.

[0071] The model optimization module 500 uses the defect density weight map output by the weight map generation module 400 as the spatial weighting parameter of the loss function to fine-tune and optimize the segmentation model. Specifically, it uses a linear combination of the weighted Dice loss and the soft-clDice loss as the total loss function, and updates the parameters with a small learning rate and a small number of training epochs.

[0072] The closed-loop iteration module 600 is used to trigger the re-execution of the segmentation inference module 100 to the model optimization module 500 based on the segmentation model optimized by the model optimization module 500, obtain the updated defect report, and iteratively optimize the segmentation model until the preset iteration termination conditions are met (the joint skeleton quality score exceeds the threshold, there is no significant improvement in multiple consecutive rounds, or the maximum number of iteration rounds is reached) and then the final segmentation model is output.

[0073] Through the collaborative work of the above modules, the system achieves closed-loop iterative optimization driven by skeleton quality, which can reduce skeleton topology problems caused by segmentation defects from the source.

[0074] For further details regarding the implementation techniques of each module in the skeleton quality-driven tubular structure segmentation closed-loop optimization system of the above embodiments, please refer to the description in the skeleton quality-driven tubular structure segmentation closed-loop optimization method of the above embodiments, which will not be repeated here.

[0075] Example 3 Please see Figure 11 This is a schematic diagram of the computer device structure according to Embodiment 3 of this application. The computer device 50 includes a processor 51 and a memory 52 coupled to the processor 51.

[0076] The memory 52 stores program instructions for implementing the above-described skeleton quality-driven tubular structure segmentation closed-loop optimization method.

[0077] The processor 51 is used to execute program instructions stored in the memory 52 to implement a skeleton quality-driven tubular structure segmentation closed-loop optimization.

[0078] The processor 51 can also be referred to as a CPU (Central Processing Unit).

[0079] Processor 51 may be an integrated circuit chip with signal processing capabilities. Processor 51 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor.

[0080] Example 4 Please see Figure 12 This is a schematic diagram of the storage medium in Embodiment 4 of this application. The storage medium in this embodiment stores a program file 61 capable of implementing all the above methods. This program file 61 can be stored in the storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, or devices such as computers, servers, mobile phones, and tablets.

[0081] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0082] The above description is only a preferred embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural changes made based on the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

[0083] Although embodiments of this application have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the appended claims and their equivalents.

[0084] Of course, the present invention may have many other embodiments. Based on this embodiment, other embodiments obtained by those skilled in the art without any creative effort are all within the scope of protection of the present invention.

Claims

1. A skeleton-mass-driven closed-loop optimization method for segmenting tubular structures, characterized in that, include: The trained segmentation model is used to infer the medical body data to obtain the segmentation mask; The segmentation mask is skeletonized, and a skeleton diagram aligned with the spatial coordinate system of the segmentation mask is extracted. The skeleton graph is subjected to topological defect detection to obtain a structured defect report containing defect type, three-dimensional spatial coordinates and severity score; The three-dimensional spatial coordinates in the structured defect report are inversely mapped to the voxel space corresponding to the segmentation mask, and a defect density weight map is generated based on the severity score, with each defect point as the center and a preset influence radius as the range. The segmentation model is optimized by using the defect density weight map as the spatial weighting parameter of the loss function; Based on the optimized segmentation model, an updated defect report is obtained. The segmentation model is then iteratively optimized using the updated defect report until a preset iteration termination condition is met, at which point the final segmentation model is output.

2. The skeleton-mass-driven tubular structure segmentation closed-loop optimization method according to claim 1, characterized in that, The step of performing topological defect detection on the skeleton graph to obtain a structured defect report containing defect type, three-dimensional spatial coordinates, and severity score specifically includes: Skeleton topology defects are classified into node-perspective defects, connection-perspective defects, and topology statistical defects. Among them, node-perspective defects include spurious nodes, redundant nodes, and missing nodes; connection-perspective defects include broken connections and spurious connections; and topology statistical defects include excessive branch nodes and pseudo-loops. For each type of topological defect, detection is performed based on the topological attributes of the skeleton graph, the corresponding severity score is matched, the three-dimensional spatial coordinates of each defect are recorded, and the structured defect report is generated.

3. The skeleton-mass-driven tubular structure segmentation closed-loop optimization method according to claim 1, characterized in that, The step of inversely mapping the three-dimensional spatial coordinates in the structured defect report to the voxel space corresponding to the segmentation mask, and generating a defect density weight map based on the severity score with each defect point as the center and a preset influence radius as the range, specifically includes: Based on the consistency of the spatial coordinate system in skeletonization processing, the three-dimensional spatial coordinates are mapped to the voxel space of the segmentation mask; A spherical influence area for each defect is defined, centered on the three-dimensional spatial coordinates of each defect point and within a preset influence radius. Within the voxel space of the segmentation mask, the weight value of each voxel is calculated based on the severity score, the preset decay kernel function, and the global weight gain coefficient, and an initial weight map is generated. The initial weight map is normalized by mean to obtain the defect density weight map.

4. The skeleton quality-driven tubular structure segmentation closed-loop optimization method according to claim 1, characterized in that, The step of optimizing the segmentation model using the defect density weight map as a spatial weighting parameter of the loss function specifically includes: The defect density weight map is incorporated into the Dice loss function to construct a weighted Dice loss function. Using the weighted Dice loss function as the optimization objective, the segmentation model is fine-tuned to obtain the optimized segmentation model.

5. The skeleton quality-driven tubular structure segmentation closed-loop optimization method according to claim 4, characterized in that, The step of fine-tuning the parameters of the segmentation model with the weighted Dice loss function as the optimization objective specifically includes: The weighted Dice loss function and the topology-aware loss function are linearly combined to construct the total loss function; The topology-aware loss function does not undergo spatial weighting.

6. The skeleton quality-driven tubular structure segmentation closed-loop optimization method according to claim 1, characterized in that, The preset iteration termination condition is to satisfy any of the following conditions: The joint skeleton quality score exceeded the preset target threshold; In a series of preset iterations, the joint skeleton quality score did not improve by more than a preset magnitude threshold. The preset maximum number of iterations has been reached.

7. A skeleton-mass-driven tubular structure segmentation closed-loop optimization system, characterized in that, A method for executing the skeleton mass-driven tubular structure segmentation closed-loop optimization method according to any one of claims 1 to 6, wherein the skeleton mass-driven tubular structure segmentation closed-loop optimization system comprises: The segmentation inference module is used to infer the medical body data using a trained segmentation model to obtain a segmentation mask; The skeleton extraction module is used to perform skeletonization processing on the segmentation mask and extract the skeleton image aligned with the spatial coordinate system of the segmentation mask. The defect detection module is used to perform topological defect detection on the skeleton graph and obtain a structured defect report containing defect type, three-dimensional spatial coordinates and severity score; The weight map generation module is used to reverse map the three-dimensional spatial coordinates in the structured defect report to the voxel space corresponding to the segmentation mask, and generate a defect density weight map with each defect point as the center and a preset influence radius as the range, based on the severity score. The model optimization module is used to optimize the segmentation model by using the defect density weight map as the spatial weighting parameter of the loss function; The closed-loop iteration module is used to obtain an updated defect report based on the optimized segmentation model, and iteratively optimize the segmentation model with the updated defect report until the preset iteration termination condition is met, and then output the final segmentation model.

8. A computer device, characterized in that, The computer device includes a processor and a memory coupled to the processor, wherein the memory stores program instructions for implementing the skeleton quality-driven tubular structure segmentation closed-loop optimization method according to any one of claims 1-6; the processor is used to execute the program instructions stored in the memory to implement skeleton quality-driven tubular structure segmentation closed-loop optimization.

9. A computer-readable storage medium, characterized in that, The system stores processor-executable program instructions for performing the skeleton quality-driven tubular structure segmentation closed-loop optimization method according to any one of claims 1-6.