A geometrically and topologically guided medical image segmentation method

The medical image segmentation method guided by geometry and topology solves the problems of boundary ambiguity and topological errors in existing technologies, and achieves high-precision, fully automated medical image segmentation that is adaptable to different imaging devices and patient image variability.

CN120997227BActive Publication Date: 2026-01-30JIANGSU SHIYU INTELLIGENT MEDICAL TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511526760.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-24
Publication Date
2026-01-30
Estimated Expiration
2045-10-24

AI Technical Summary

Technical Problem

Existing medical image segmentation methods suffer from blurred boundaries, artifacts, and topological errors when handling fine and complex segmentation tasks. They also lack automation and require complex post-processing steps to correct these issues.

Method used

By employing a geometric and topological collaborative guidance approach, and through a shared encoder, dual-path decoder, and multimodal deformation iterative refinement, combined with a multi-objective composite loss function, high-precision end-to-end segmentation is achieved.

Benefits of technology

It significantly improves segmentation accuracy and robustness, avoids topological errors, achieves full automation, adapts to different imaging devices and patient image variability, and provides high-precision segmentation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997227B_ABST
    Figure CN120997227B_ABST
Patent Text Reader

Abstract

This invention provides a geometrically and topologically guided medical image segmentation method, comprising the following steps: image preprocessing and data augmentation; shared encoder; dual-path collaborative decoder; multimodal deformation iterative refinement; and multi-objective composite loss function and optimization strategy. The beneficial effects of this invention are: significantly improved performance: through a unique geometrically and topologically guided refinement mechanism, it far surpasses existing technologies in segmentation accuracy and boundary sharpness. It actively maintains and repairs the topological correctness of anatomical structures, significantly reducing clinically unacceptable errors and improving the reliability of results. Furthermore, this invention simplifies operation, enhances stability and generalization, and fosters advanced applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of medical image processing, and in particular relates to a medical image segmentation method guided by geometry and topology. Background Technology

[0002] In the field of medical image segmentation, deep learning architectures, represented by U-Net and its variants, are the current technical standard. These methods fuse multi-scale features through encoder-decoder structures and skip connections. However, existing technologies still have significant shortcomings when dealing with intricate and complex segmentation tasks: their simple feature fusion mechanisms often lead to blurring and artifacts at low-contrast tissue boundaries; a single optimization objective often forces the network to compromise between region smoothness and boundary sharpness, sacrificing the accuracy of details. More importantly, existing methods generally lack awareness of topology, which may produce anatomically unreasonable errors, such as incorrectly connecting independent blood vessels or creating false holes in continuous organs and tissues. These defects usually require complex, non-end-to-end post-processing steps to correct, limiting their automation and reliability. Summary of the Invention

[0003] In view of this, the present invention aims to propose a medical image segmentation method guided by geometry and topology to solve at least one of the problems existing in the prior art.

[0004] To achieve the above objectives, the technical solution of the present invention is implemented as follows:

[0005] A geometrically and topologically guided medical image segmentation method includes the following steps:

[0006] S1. Perform image preprocessing and data augmentation on the input raw medical image to obtain the preprocessed image tensor;

[0007] S2. Input the preprocessed image tensor into the shared encoder to obtain the data after feature refinement;

[0008] S3. Generate core region feature maps and boundary probability maps through a dual-path collaborative decoder;

[0009] S4. Perform multimodal deformation iterative refinement on the generated core region feature map and boundary probability map to obtain the final feature map;

[0010] S5. Apply a multi-objective composite loss function and optimization strategy to the final feature map.

[0011] Furthermore, in step S1, image preprocessing and data augmentation are performed on the input raw medical image to obtain a preprocessed image tensor, including:

[0012] Intensity windowing and normalization:

[0013] The input raw medical image is first truncated with a preset window width and window level;

[0014] Subsequently, the windowed pixel intensity values ​​are linearly scaled to the [0, 1] range;

[0015] For MRI images without standard intensity units, a normalization method based on histogram percentiles is used;

[0016] Spatial dimensions and isotropic normalization:

[0017] Image data that has been intensity windowed and normalized is uniformly adjusted to a fixed high-resolution size through trilinear interpolation or bicubic interpolation;

[0018] Online data augmentation:

[0019] Online data augmentation is applied to the image data after spatial and isotropic normalization. The online data augmentation methods include random affine transformation, elastic deformation, random gamma correction, Gaussian noise addition, and random erasure to obtain the preprocessed image tensor.

[0020] Furthermore, in step S2, the preprocessed image tensor is input into the shared encoder to obtain feature-refined data, including:

[0021] The preprocessed image tensor is fed into a shared convolutional neural network encoder;

[0022] The shared convolutional neural network encoder is built from recursive residual networks. The preprocessed image tensor is processed by the recursive residual network to form the final output of the recursive residual network.

[0023] The final output of the recursive residual network is fed into the cross-dimensional dynamic attention module for feature refinement.

[0024] The process of recursive residual networks for processing preprocessed image tensors includes:

[0025] For the original input features of the preprocessed image tensor First, a 1x1 convolution is used to perform channel transformation and information integration to obtain... ;

[0026] Next, a recursive loop is performed. In the first iteration, where... , It is fed into a residual block, and the output is ;

[0027] In each subsequent iteration, among which, T is the recursion count, the output of the previous iteration. Will be compared with the initial transformation features Perform element-wise addition, and then feed the features that combine the original information and the results of previous iterations into another residual block with non-shared weights;

[0028] Its recursive process can be mathematically expressed as:

[0029] ;

[0030] in, This is the output of the first iteration. This is the output of the previous iteration. For loop;

[0031] definition The output of all iterations The data is concatenated along the channel dimension and then fused with information through a final 1x1 convolution before being combined with the original input features. Perform residual connections to form the final output of the recursive residual network;

[0032] Furthermore, the final output of the recursive residual network is fed into a cross-dimensional dynamic attention module for final feature refinement. The process includes:

[0033] First, the final output of the recursive residual network is a feature map. The cross-dimensional dynamic attention module applies a cross-dimensional dynamic attention module to the input feature map. The dimensions are decomposed and reorganized, including: first, the input feature map is transformed through two independent linear projections. Mapped to two orthogonal subspaces: one representing the channel-height plane and the other representing the channel-width plane, through the input feature map. By performing dimensional permutation and reshaping, we obtain two two-dimensional feature matrices: and ;

[0034] Secondly, a self-attention mechanism is applied to the two two-dimensional feature matrices respectively; the two two-dimensional feature matrices after self-attention processing are reshaped and permuted back to the original four-dimensional tensor format, and then compared with the input feature map. Perform a residual connection to obtain two refined features in the CH and CW dimensions, respectively. and characteristics ;

[0035] Finally, feature maps and It is fed into a dynamic fusion gate; the dynamic fusion gate includes a convolutional network, which is fed into a concatenated... As input, generate a three-dimensional dynamic weight tensor of the same size as the input feature map. Its value range is between [0, 1], and the final refined output is given by the following formula:

[0036] ;

[0037] in, It is a refined feature map along the CH dimension; It is a refined feature map along the CW dimension; It is a dynamic weight tensor; It is element-wise multiplication.

[0038] Furthermore, in step S3, a core region feature map and a boundary probability map are generated through a dual-path collaborative decoder, including:

[0039] The decoder uses a dual-path parallel approach to decompose the refined feature data into two subtasks: region internal consistency recovery and boundary accurate delineation.

[0040] The main path recovers spatial resolution and generates segmented regions through a step-by-step decoding approach. The process is as follows: in the j-th stage of decoding, the hierarchical progressive fusion module of the dual-path collaborative decoder is responsible for receiving upsampled features. Skip connection features corresponding to the encoder level ;

[0041] Will and After concatenation, the data is fed into a multi-scale kernel selection unit, which sets multiple kernels of different sizes in parallel; the attention network then selects the kernels based on the input... and The global statistical information of the concatenated features is used to dynamically generate a set of weights for each spatial location, which are then used to perform a weighted summation of the outputs of the parallel convolutional kernels to obtain the preliminarily fused features.

[0042] In the j-th stage of the decoder, the features initially fused by the multi-scale convolutional kernel selection unit are fed into the cross-level recurrent refinement unit for optimization. The cross-level recurrent refinement unit fuses the initially fused features of the current j-th stage with the context features from the (j-1)-th stage through a gated recurrent unit. Inside the cross-level recurrent refinement unit, the gated recurrent unit performs several iterations of updates. The enhanced feature map output after recurrent refinement serves as the final output of the hierarchical progressive fusion module in the current stage. After all decoding stages have completed this process, the main path decoder finally outputs the core region feature map. ;

[0043] The auxiliary boundary module runs in parallel with the main path. The auxiliary boundary path is activated to generate the boundary probability map; the process includes:

[0044] The feature maps output from the first layer of the shared encoder are aggregated through the boundary-sensitive feature aggregation module. Feature map of the second layer output of the shared encoder Features of each layer of the main decoder;

[0045] The boundary-sensitive feature aggregation module first performs the following: , Features from each layer of the main decoder are unified to the same resolution using adaptive pooling; then, a spectral attention mechanism is employed to transform each feature map to the frequency domain using a two-dimensional discrete Fourier transform; in the frequency domain, a frequency mask is generated through a three-layer convolutional network, which is used to weight different frequency components; for the output from the shared encoder... and For the features of the main decoder, the convolutional network amplifies the high-frequency components; while for the features of each layer of the main decoder, the convolutional network retains the mid-frequency and low-frequency components; after processing, the features from each source are optimized in the frequency domain to obtain the spectrally enhanced features.

[0046] After spectral weighting, all spectrally enhanced features are returned to the spatial domain via inverse Fourier transform. Finally, all spectrally enhanced features are fused across channels using concat and a boundary prior feature map is generated by the decoding head. Boundary prior feature map Finally, the boundary probability map is obtained by passing through a Sigmoid activation function.

[0047] Furthermore, in step S4, the feature map of the generated core region is... Multimodal deformation iterative refinement is performed on the boundary probability map to obtain the final feature map, including:

[0048] First, the feature map of the core region is received by the network through topological prior prediction. As input, the topological structure information of the image is predicted, and the output is a dual-channel topological prior feature map. ;

[0049] Secondly, iterative geometric-guided and topology-guided deformable refining is carried out through the multimodal deformation iterative refining module, which includes two iterative refining stages.

[0050] In the first stage of geometry-guided refinement, the offset field and modulation index quantity generate the feature map of the receiving core region of the network. Boundary prior feature maps of auxiliary paths As a joint input, the offset field and the modulation icon quantity generation network predict the offset field for the first stage. and modulate icon quantity ;

[0051] The first stage utilizes the offset field through deformable convolutional layers. and modulate icon quantity Feature map of the core area The operation yields preliminary refined characteristics. Its mathematical expression is:

[0052] ;

[0053] Where k represents the size of the convolution kernel, This represents the total number of sampling points of the convolution kernel. This represents the weight at the k-th position in the standard convolutional kernel. This represents the current output position being calculated. This represents a fixed offset of k points in a standard convolutional kernel; This represents the two-dimensional spatial offset vector predicted for the k-th sampling point of the deformable convolution kernel during the first stage of refinement. This represents the modulation scalar learned for the k-th sampling point of the deformable convolution kernel during the first stage of refinement.

[0054] In the second stage of topology-guided refinement, the offset field and modulation index generation network receives the output of the first stage. and topological prior feature maps As a joint input, the offset field and the modulation icon quantity generation network predict the offset field for the second stage. and modulate icon quantity ; through the action of the second-stage deformable convolutional layer The topology correction is completed, and the final feature map is output. .

[0055] Furthermore, in step S5, a multi-objective composite loss function and optimization strategy are applied to the final feature map, including:

[0056] Construct a composite loss function comprising six loss components, and use the composite loss function of the six loss components as the total loss. Total loss The expression is:

[0057] ;

[0058] in, It is the set of all loss terms. It is related to each loss The corresponding learnable log-variance parameter is used to quantify the uncertainty of the model's prediction for task i;

[0059] parameter Along with the network weights, end-to-end updates are performed using gradient descent, dynamically adjusting the weights of each loss term to reflect its uncertainty. The reciprocal of the value, thus achieving adaptive balancing of multiple tasks;

[0060] The six loss components are as follows:

[0061] Main segmentation loss A weighted combination of Lovász-Softmax loss and focal loss is applied to the final feature map. superior;

[0062] Explicit boundary loss Output boundary prior feature map applied to auxiliary boundary paths A combination of balanced binary cross-entropy and Dice loss is used to supervise single-pixel-wide boundary prediction.

[0063] Topological supervision loss It consists of two parts. The first part is used to supervise the topological prior feature map output by the topological prior prediction network. The second part acts on the final feature map. superior

[0064] Structural similarity loss : Employs multi-scale structural similarity loss, calculating the structural similarity loss (SSIM) at multiple scales;

[0065] Region-boundary consistency loss This is used to ensure that the boundaries of the main region segmentation result and the boundaries of the auxiliary path prediction are consistent in probability distribution. The region-boundary consistency loss is calculated as follows: First, from the final feature map... Extract its implicit boundary, and then calculate the KL divergence between the implicit boundary and the auxiliary path explicit boundary prediction map;

[0066] Regularization loss It consists of two parts: the first part is the standard L2 weight decay applied to all learnable parameters of the network; the second part is used for the multimodal deformation iterative refinement module.

[0067] Compared with existing technologies, the geometrically and topologically guided medical image segmentation method of this invention has the following advantages:

[0068] (1) The geometrically and topologically guided medical image segmentation method described in this invention, firstly, in terms of performance, significantly improves the accuracy and robustness of medical image segmentation through its unique collaborative refinement mechanism. Compared with existing technologies, this method achieves higher fit (such as higher Dice coefficient and Hausdorff distance) on target boundaries, especially low-contrast and morphologically complex boundaries. Simultaneously, due to the introduction of topological loss and topological-guided refinement, this method effectively avoids topological errors such as erroneous breaks and adhesions, ensuring the anatomical rationality of the segmentation results, which is of crucial value in clinical applications.

[0069] (2) The geometric and topological collaborative guided medical image segmentation method described in this invention achieves end-to-end full automation in operation and use, significantly improving work efficiency. It eliminates the need for complex post-processing steps common in existing technologies that rely on expert experience; users only need to input the original image to directly obtain high-precision segmentation results. This not only simplifies the entire workflow and reduces the professional skills required of operators, but also ensures the objectivity and repeatability of the results, making large-scale clinical data analysis possible.

[0070] (3) The geometric and topological collaborative guided medical image segmentation method described in this invention demonstrates stronger adaptability to image variability caused by different imaging devices, scanning protocols, and patients through adaptive feature fusion and multi-objective optimization strategies, in terms of system stability and generalization ability. Even when faced with low-quality images containing noise or artifacts, it can still maintain high segmentation stability, reduce performance degradation caused by data quality fluctuations, and enhance the practicality of the technology in real clinical environments.

[0071] (4) The medical image segmentation method guided by geometry and topology as described in this invention has promoted technological innovation in intelligent medical equipment and provided core algorithm support for the development of more advanced clinical decision support systems. The accurate and reliable segmentation results it produces are the foundation for downstream applications such as precise radiotherapy planning, navigation for complex surgeries, and automated disease assessment, and have enormous potential economic value and far-reaching social benefits. Attached Figure Description

[0072] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:

[0073] Figure 1 This is a schematic diagram of the overall method flow according to an embodiment of the present invention;

[0074] Figure 2 This is a schematic diagram of the liver tumor segmentation experiment results described in an embodiment of the present invention;

[0075] Figure 3 This is a schematic diagram of the brain tumor segmentation experiment results described in an embodiment of the present invention. Detailed Implementation

[0076] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.

[0077] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0078] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0079] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0080] like Figure 1 As shown, a medical image segmentation method guided by geometry and topology includes the following steps:

[0081] S1. Perform image preprocessing and data augmentation on the input raw medical image to obtain the preprocessed image tensor;

[0082] S2. Input the preprocessed image tensor into the shared encoder;

[0083] S3, Dual-path collaborative decoder;

[0084] S4, Multimodal Deformation Iterative Refinement;

[0085] S5. Multi-objective composite loss function and optimization strategy.

[0086] The main application area of ​​this invention relates to medical image processing, and its core is a deep learning method for high-precision, fully automated segmentation. This technical solution can be widely deployed in various clinical software and systems to process data from multiple imaging modalities such as CT and MRI. Specific applications include: accurately delineating various targets, such as tumor lesions, cardiovascular structures, and complex anatomical units like the spine, for computer-aided diagnosis and surgical planning systems; automatically identifying and protecting critical organs such as the spinal cord and optic nerve in precision radiotherapy; and performing high-throughput automated quantitative analysis of large-scale image data in clinical research to support drug evaluation and disease research.

[0087] The core technical approach of this invention lies in constructing a deep neural network architecture that works collaboratively across multiple modules. This architecture first performs adaptive multi-scale feature extraction through an innovative shared encoder. Then, it utilizes a dual-path parallel decoder to decouple the segmentation task into two sub-tasks: region generation and boundary delineation. Finally, an iterative refining module is introduced. This module innovatively integrates region features, geometric boundary priors, and a topological structure prior predicted by the network itself. Through deformable convolutions, it performs multi-stage, multi-dimensional corrections on the segmentation results, thereby achieving end-to-end, high-precision segmentation without post-processing.

[0088] This invention significantly improves performance: through a unique geometric and topological co-refinement mechanism, this method far surpasses existing technologies in segmentation accuracy and boundary clarity. More importantly, it actively maintains and repairs the topological correctness of anatomical structures, significantly reducing clinically unacceptable errors and improving the reliability of results.

[0089] This invention greatly simplifies operation: it achieves end-to-end full automation, with its integrated refining module replacing complex post-processing steps. Users can obtain high-quality segmentation results without professional parameter tuning, which improves work efficiency, lowers the barrier to entry, and ensures the objectivity and repeatability of the results.

[0090] This invention enhances stability and generalization: thanks to adaptive feature extraction and multi-objective optimization strategies, this method exhibits stronger robustness to image data from different sources and of different qualities, ensuring stable performance in varied real-world clinical environments.

[0091] This invention can foster advanced applications: The high-fidelity segmentation results generated by this invention are valuable outputs in themselves, providing a solid foundation for more accurate 3D modeling, surgical planning, quantitative analysis, and other advanced downstream applications, thus promoting the intelligentization of healthcare.

[0092] In a preferred embodiment of the present invention, image preprocessing and data enhancement include:

[0093] Before entering the network, all input raw medical images (e.g., 3D data slices from CT and MRI) must undergo a rigorous standardized preprocessing procedure.

[0094] 1. Intensity Windowing and Normalization: For images with a wide dynamic range, such as CT scans, intensity truncation is first performed using preset window widths and window levels to highlight the contrast of the target tissue. Then, the windowed pixel intensity values ​​are linearly scaled to the [0, 1] range. For images without standard intensity units, such as MRI scans, a normalization method based on histogram percentiles is used.

[0095] 2. Spatial Size and Isotropic Normalization: All images are uniformly adjusted to a fixed high-resolution size, such as 512×512 pixels, through trilinear interpolation (for 3D data) or bicubic interpolation (for 2D data). This not only meets the network's requirement for a fixed input size but also preserves the image's detailed information to the greatest extent possible through higher-order interpolation algorithms.

[0096] 3. Online Data Augmentation: During the training phase, a series of online data augmentation techniques were employed to improve the model's generalization ability and robustness to geometric changes. These techniques included: randomized affine transformations (rotation, scaling, translation, shearing), elastic deformation, randomized gamma correction, Gaussian noise addition, and random erasing. All augmentation operations were performed in real-time on the GPU to improve training efficiency.

[0097] In a preferred embodiment of the present invention, the shared encoder includes:

[0098] The preprocessed image tensor is fed into a shared convolutional neural network encoder, which is the feature extraction backbone of the entire network and consists of L (L=5) cascaded stages.

[0099] 1. Recursive Residual Network (R2-Block): The core building block of the encoder in this invention is a novel recursive residual network (R2-Block). The design of R2-Block originates from improvements to traditional ResNet and Res2Net, aiming to enhance the feature representation capability within a single module through a deeper recursive structure. Its internal structure is as follows:

[0100] For input features First, a 1x1 convolution is used to perform channel transformation and information integration to obtain... Next, the core of R2-Block is a recursive loop. In the first iteration ( ), It is fed into a standard residual block (consisting of two 3x3 convolutions and a skip connection), and the output is In each subsequent iteration ( Where T is the recursion count (a key hyperparameter), and the output of the previous iteration. Will be compared with the initial transformation features The elements are added one by one, and then this feature, which combines the original information and the results of previous iterations, is fed into a new residual block with non-shared weights. The recursive process can be rigorously expressed mathematically as follows:

[0101] ;

[0102] Among them, the definition This recursive structure allows the t-th residual block to process a feature map that deeply fuses information from all levels from the original input to the (t-1)-th iteration, thus greatly enriching the hierarchy and complexity of the features in a "deep unrolling" manner. Finally, the output of all iterations... The data is concatenated along the channel dimension and then fused with information through a final 1x1 convolution before being combined with the original input. Perform a macroscopic residual connection to form the final output of R2-Block.

[0103] 2. Cross-Dimensional Dynamic Attention (CDDA) Module: After each R2-Block processing, the feature map is not directly downsampled, but is instead fed into a cross-dimensional dynamic attention (CDDA) module for final feature refinement. The CDDA module aims to break the traditional attention mechanism's separate processing of channel attention and spatial attention, achieving dynamic collaboration and information interaction between the two within a unified framework.

[0104] The CDDA module's process begins with the input feature map. The dimensions are decomposed and reorganized. First, the original feature map (input feature map) is transformed through two independent linear projections. The features are mapped to two orthogonal subspaces: one representing the channel-height (CH) plane and the other representing the channel-width (CW) plane. Specifically, by permute and reshape the original feature map, two two-dimensional feature matrices are obtained: and .

[0105] Next, efficient self-attention mechanisms are applied to these two two-dimensional feature matrices to capture long-range dependencies. Taking the CH plane as an example, its self-attention calculation is as follows:

[0106] ;

[0107] in, It is by The query, key, and value are obtained through linear projection. This step effectively captures the interrelationships between different height positions across all channels. Similarly, self-attention computation on the CW plane captures the dependencies between different width positions.

[0108] The two feature matrices after self-attention processing are reshaped and permuted back to the original four-dimensional tensor format, and then compared with the input feature map. Perform residual connections to obtain two refined feature maps in the CH and CW dimensions, respectively. and Finally, the two feature maps are fed into a dynamic fusion gate. This gate consists of a small convolutional network that, through the concatenated feature maps,... As input, generate a three-dimensional dynamic weight tensor of the same size as the input feature map. Its value range is between [0, 1]. The final refined output is given by the following formula:

[0109] ;

[0110] in, It is the refined feature map along the CH dimension; that is, the output feature map after the first stage (geometric iterative refinement). It is a refined feature map in the CW dimension; that is, the output feature map after the second stage (topological iteration refinement). It is a dynamic weight tensor. It is element-wise multiplication.

[0111] This cross-dimensional attention mechanism and its dynamic fusion enable the network to intelligently determine, at the pixel level, whether to prioritize vertical or horizontal structural information. This is particularly effective for processing directional strip or line structures (such as blood vessels and nerve bundles). After CDDA refinement, some features are cached as skip connections, while others are downsampled through stride convolutions before entering the next encoding stage.

[0112] In a preferred embodiment of the present invention, the dual-path collaborative decoder includes:

[0113] The decoder section adopts a dual-path parallel architecture, which aims to decompose the complex segmentation task into two relatively independent subtasks: region internal consistency recovery and boundary accurate depiction.

[0114] 1. Main Region Segmentation Path and Hierarchical Progressive Fusion (HPFR) Module: The main path is responsible for recovering spatial resolution and generating the main segmented regions step by step, starting from the bottleneck features of the deepest layer of the encoder. Its core is the Hierarchical Progressive Fusion and Refinement (HPFR) module. In the j-th stage of decoding, the HPFR module receives upsampled features from deeper layers. Skip connection features corresponding to the encoder level The HPFR module employs a hierarchical structure internally. First, it... and After concatenation, the data is fed into a multi-scale kernel selection (MKS) unit. This unit sets up multiple convolutional kernels of different sizes in parallel (such as 3x3, 5x5, 7x7, and their dilated convolutional variants). The attention network then adjusts the input based on the... and The global statistics of the concatenated features (the average value of each feature channel obtained after global average pooling of the concatenated features) are used to dynamically generate a set of weights for each spatial location, which are used to perform weighted summation of the outputs of these parallel convolutional kernels to obtain the preliminary fused features.

[0115] In the j-th stage of the decoder, the features initially fused by the multi-scale convolutional kernel selection unit are fed into the cross-level recurrent refinement unit for optimization. The cross-level recurrent refinement unit, through a gated recurrent unit (GRU), fuses the initially fused features of the current j-th stage with the already refined context features from the decoding process of the j-1 stage. Since the j-1 layer is closer to the output, its feature map has higher spatial resolution. This information flow progresses from the shallowest layer (j=1) to deeper layers; therefore, for the initial layer of the decoding process, the required high-level context feature input is initialized to a zero tensor. Inside the cross-level recurrent refinement unit, the gated recurrent unit performs several iterative updates, each update constituting a recurrent refinement, to ensure sufficient fusion of the two features. The enhanced feature map output after recurrent refinement serves as the final output of the hierarchical progressive fusion module in the current stage. After all decoding stages have completed this process, the main path decoder finally outputs the core region feature map. .

[0116] 2. In the Auxiliary Boundary Path Auxiliary Path A (BSFA) module, the auxiliary boundary path runs in parallel with the main path. The auxiliary boundary path is activated to generate the boundary probability map; the process includes:

[0117] The feature maps output from the first layer of the shared encoder are aggregated through the boundary-sensitive feature aggregation module. Feature map of the second layer output of the shared encoder Features of each layer of the main decoder;

[0118] The boundary-sensitive feature aggregation module first performs the following: , Features from each layer of the main decoder are unified to the same resolution using adaptive pooling; then, a spectral attention mechanism is employed to transform each feature map to the frequency domain using a two-dimensional discrete Fourier transform; in the frequency domain, a frequency mask is generated through a three-layer convolutional network, which is used to weight different frequency components; for the output from the shared encoder... and For the features of the main decoder, the convolutional network amplifies the high-frequency components; while for the features of each layer of the main decoder, the convolutional network retains the mid-frequency and low-frequency components; after processing, the features from each source are optimized in the frequency domain to obtain the spectrally enhanced features.

[0119] After spectral weighting, all spectrally enhanced features are returned to the spatial domain via inverse Fourier transform. Finally, all spectrally enhanced features are fused across channels using concat and a boundary prior feature map is generated by the decoding head. Boundary prior feature map Finally, the boundary probability map is obtained by passing through a Sigmoid activation function.

[0120] In this embodiment, the auxiliary boundary module runs in parallel with the main path. A dedicated auxiliary boundary path is activated, aiming to generate an accurate, single-pixel-wide boundary probability map. The core of this path is the Boundary Sensitive Feature Aggregation (BSFA) module. The BSFA module intelligently aggregates features from the two shallowest layers of the encoder (… (It retains the richest high-frequency edge information) and the intermediate outputs of all levels of the main decoder.

[0121] The BSFA module first unifies these widely sourced feature maps to the same resolution using adaptive pooling. Then, it employs a spectral attention mechanism. Specifically, it transforms each feature map to the frequency domain using a two-dimensional discrete Fourier transform (DFT). In the frequency domain, a small network learns to generate a frequency mask that weights different frequency components. For features from shallow layers of the encoder, the network learns to amplify their high-frequency components (corresponding to edges and details); while for features from deeper layers of the decoder, it may retain more of their mid- and low-frequency components (corresponding to semantics and structure). After spectral weighting, the feature maps are returned to the spatial domain using an inverse Fourier transform (IDFT). This method of feature filtering and fusion in the frequency domain more fundamentally separates boundary-related features. Finally, all spectrally refined features are fused and passed through a lightweight decoder head to generate a high-precision boundary prior feature map. .

[0122] In a preferred embodiment of the present invention, the Iterative Geometry and Topology-Guided Deformable Refinement (ITG-DCR) module is responsible for the final collaborative refinement of the regional features of the main path, the geometric boundary features of the auxiliary path, and an additional topological prior information predicted by the network itself.

[0123] 1. Before performing deformable refinement, a parallel, lightweight Topology Prior Prediction Network (TPPN) is used. TPPN receives the core region feature map. As input, its goal is to predict the topological structure information of an image. Specifically, the output of TPPN is a two-channel feature map. The first channel aims to predict the "centrality" of each pixel within a connected component, i.e., its distance from the component's boundary; the second channel aims to predict "hole" regions in the image. The network is supervised by a specialized loss function based on geodesic transform and persistent homology. The feature map provides clear guidance on object connectivity and hole structure for subsequent refining.

[0124] 2. Iterative geometry and topology-guided deformable refining:

[0125] The ITG-DCR module comprises two iterative refining stages.

[0126] Its core is an Offset and Modulation Generation Network (OMGN) for multimodal input offset field and modulation pattern generation.

[0127] In the first phase (geometrically guided refinement), the OMGN receiver core region feature map Boundary prior feature maps of auxiliary paths As a joint input, OMGN processes information from both modalities through a complex fusion network (containing cross-attention and gating mechanisms) and predicts the offset field for the first stage accordingly. and modulate icon quantity A deformable convolutional layer (DCNv2) utilizes these parameters to refine the feature map of the core region. The core objective of this stage is to enable the sampling points of the convolution to "jump out" of the blurred region boundaries and actively move towards the boundary. Precisely indicated geometric boundary alignment. This is achieved through a first-stage deformable convolutional layer utilizing the offset field. and modulate icon quantity Feature map of the core area The operation yields preliminary refined characteristics. Its mathematical expression is:

[0128] ;

[0129] Where k represents the size of the convolution kernel, This represents the total number of sampling points of the convolution kernel. This represents the weight at the k-th position in the standard convolutional kernel. This represents the current output position being calculated. This represents a fixed offset of k points in a standard convolutional kernel; This represents the two-dimensional spatial offset vector predicted for the k-th sampling point of the deformable convolution kernel during the first stage of refinement. This represents the modulation scalar learned for the k-th sampling point of the deformable convolution kernel during the first-stage refinement process; the offset in this formula Mainly composed of boundary features The guidance aims to refine the geometry and obtain preliminary, refined features. .

[0130] In the second phase (topology-guided refining), OMGN (with weights that can be partially shared with the first phase) receives the output of the first phase. and topological prior feature maps As a joint input. This time, the offset field predicted by OMGN. and modulate icon quantity It is primarily guided by topological information. For example, if This indicates that a certain region should be a complete connected component, but There is an incorrect break in it, then They will be guided to "cross" this break, connecting the pixels on both sides; conversely, if There is a faulty connection (a topological "bridge") in the middle, and The instruction indicates that this should be a hole, so... This will be directed to "push away" the connection. The second DCNv2 layer acts on... The topology correction is then completed, ultimately outputting a highly accurate feature map at both the geometric and topological levels. .

[0131] In a preferred embodiment of the present invention, the multi-objective composite loss function and optimization strategy include:

[0132] In order to provide comprehensive and effective supervision of this complex network, this invention constructs a composite loss function containing six key components and optimizes it through a gradient-based uncertainty adaptive weighting method, allowing the model to learn the optimal weights for each task autonomously during training.

[0133] The composite loss function of the six loss components is the total loss. Total loss The expression is:

[0134] ;

[0135] in, It is the set of all loss terms. It is related to each loss The corresponding learnable log-variance parameter. This form is more numerically stable and can also achieve dynamic balancing of the loss terms.

[0136] The six loss components are as follows:

[0137] 1. (Main Segmentation Loss): A weighted combination of Lovász-Softmax loss and Focal Loss is applied to the final feature map. Above. Lovász-Softmax directly optimizes the IoU metric, while focus loss focuses on hard-to-distinguish samples. The combination of the two provides powerful pixel-level supervision.

[0138] 2. (Explicit Boundary Loss): Applied to the output of the auxiliary boundary path, it uses a combination of Balanced Binary Cross Entropy (Balanced BCE) and Dice loss to supervise the prediction of single-pixel-wide boundaries.

[0139] 3. (Topology Supervision Loss): This is a composite loss consisting of two parts. The first part directly supervises the topology prior feature map output by the TPPN network. The second part is a differentiable persistent homology loss, which directly affects the final feature map. The first part, by supervising intermediate feature maps, implicitly guides the network to learn effective representations of topological information, thus providing an optimization basis for the model to meet the global topological explicit constraints imposed on the final output by the second part.

[0140] The second part is to generate the final feature map. It is considered as a scalar field, and is first passed through a persistent homology operator. It is transformed into a topologically invariant persistent graph D; the topological loss is then... Quantization into prediction graph With the real mask p-Wasserstein distance between their respective persistence graphs:

[0141] ;

[0142] in, It is the p-Wasserstein distance. It is a probability graph predicted by the network. The calculated persistence graph, It is based on the real mask The calculated persistence graph; P is the segmentation probability graph. It is a persistent homology operator; since the loss function is differentiable with respect to the pixel-level probability map P of the input, its gradient can be effectively calculated during backpropagation, thereby directly guiding the network to correct topological errors in the prediction.

[0143] 4. (Structural Similarity Loss): Multi-scale structural similarity loss (MS-SSIM) is used, which calculates SSIM at multiple scales and can capture the similarity of macroscopic structures more comprehensively.

[0144] 5. (Region-Boundary Consistency Loss): This is a novel constraint. It aims to ensure that the boundaries of the main region segmentation result are consistent in probability distribution with the boundaries predicted by the auxiliary path. It is calculated by first extracting the implicit boundaries from the final feature map (using the Sobel operator), and then calculating the KL divergence between this implicit boundary and the explicit boundary prediction map of the auxiliary path. This loss forces the two parallel paths to reach a consensus on the perception of the boundaries.

[0145] 6. (Regularization loss): It consists of two parts: The first part is the standard L2 weight decay applied to all learnable parameters of the network, which prevents the model from overfitting by penalizing the sum of squares of the weights; the second part is a gradient penalty regularization term that is specifically applied to the ITG-DCR module. It enhances the stability and robustness of the function mapping by calculating and penalizing the degree to which the L2 norm of the gradient of the module's output deviates from 1 relative to its input.

[0146] The entire model is trained end-to-end using the AdamW optimizer. The learning rate scheduling strategy employs cosine annealing with warmup, using a small learning rate for linear warm-up at the beginning of training to stabilize the training process, followed by a cosine decay cycle. Through this meticulously designed architecture, innovative modules, and comprehensive supervision strategies, this invention aims to push the accuracy and robustness of medical image segmentation to a new level.

[0147] The working principle of this invention is achieved through the collaborative operation of the following core modules: a shared encoder is responsible for extracting hierarchical features from the input image; a dual-path decoder receives these features, where the main path focuses on recovering the overall region of the target, while the auxiliary path is specifically dedicated to accurately depicting its geometric boundaries; and a topology prior prediction network analyzes and predicts the topological properties of the target in parallel, such as connectivity and hole structure. The signal flow is as follows: image information is first abstracted layer by layer in the encoder, and then split into three paths to enter the main decoder, auxiliary decoder, and topology prediction network. The high-level information processed by these three paths—namely, region features, boundary features, and topological features—finally converges in an iterative deformable refinement module. This module acts as the final "decision center," using boundary features to guide the sampling points of deformable convolutions in the first stage to accurately align the geometric shapes of the region features; in the second stage, topological features are used to guide a second deformable convolution to repair the topological structure of the geometrically corrected features. Finally, the feature map, refined through two rounds of iterations, is converted into the final segmentation result.

[0148] The core differences between this invention and existing technologies are: 1. Task decoupling and collaboration: By using a dual-path decoder, regional and boundary tasks are processed separately, avoiding inherent conflicts under a single optimization objective; 2. Introduction of explicit topological constraints: For the first time, learnable topological prior information is used as an independent guiding signal, giving the network the ability to maintain topological correctness; 3. Iterative multimodal guided refinement: Abandoning simple post-processing, a deformable refinement module that is end-to-end trainable and integrates geometric and topological information is used to achieve deep and intelligent correction of the segmentation results, which is not available in existing technologies.

[0149] Advantages of this invention:

[0150] First, in terms of performance, this invention significantly improves the accuracy and robustness of medical image segmentation through its unique collaborative refinement mechanism. Compared to existing technologies, this method achieves higher fit (e.g., higher Dice coefficient and Hausdorff distance) at target boundaries, especially at low-contrast and morphologically complex boundaries. Simultaneously, by introducing topological loss and topology-guided refinement, this method effectively avoids topological errors such as erroneous breaks and adhesions, ensuring the anatomical rationality of the segmentation results, which is of crucial value in clinical applications.

[0151] Secondly, in terms of operation and use, this invention achieves end-to-end full automation, significantly improving work efficiency. It eliminates the need for complex post-processing steps common in existing technologies that rely on expert experience; users only need to input the original image to directly obtain high-precision segmentation results. This not only simplifies the entire workflow and reduces the professional skills required of operators, but also ensures the objectivity and reproducibility of the results, making large-scale clinical data analysis possible.

[0152] Furthermore, regarding system stability and generalization ability, this invention, through adaptive feature fusion and multi-objective optimization strategies, demonstrates stronger adaptability to image variability across different imaging devices, scanning protocols, and patients. Even when faced with low-quality images containing noise or artifacts, it maintains high segmentation stability, reducing performance degradation caused by data quality fluctuations and enhancing the practicality of the technology in real-world clinical environments.

[0153] Finally, the emergence of this invention has driven technological innovation in intelligent medical devices, providing core algorithmic support for the development of more advanced clinical decision support systems. The accurate and reliable segmentation results it produces form the basis for downstream applications such as precise radiotherapy planning, navigation for complex surgeries, and automated disease assessment, possessing enormous potential economic value and far-reaching social benefits.

[0154] Example 1

[0155] In the field of medical image segmentation, existing technologies have shifted from traditional methods based on thresholding, region growing, and active contour models to solutions centered on deep learning. Among these, convolutional neural network models, represented by the U-Net architecture and its variants, have become the current state-of-the-art standard. The main workflow of existing U-Net-like methods typically includes: a symmetric encoder-decoder structure, where the encoder progressively reduces the spatial resolution of the feature map through a series of convolution and pooling operations to extract multi-level abstract semantic features; the decoder then progressively restores the resolution through upsampling operations (such as transposed convolution); its core innovation lies in skip connections, which directly transfer and fuse shallow, high-resolution features from different levels of the encoder to the corresponding levels of the decoder, mitigating the loss of detail information caused by network deepening. However, despite significant progress, existing technologies still exhibit the following key drawbacks and limitations when dealing with complex clinical scenarios:

[0156] Feature fusion mechanisms are crude and information redundant: Existing skip connections often employ simple concatenation or element-wise addition operations. This "hard connection" approach cannot adaptively filter and fuse effective information from deep and shallow features, often mixing shallow noise and irrelevant textures indiscriminately with deep semantic information, resulting in blurring and artifacts in the target boundary region, making it difficult to achieve true complementary advantages.

[0157] Single-task optimization leads to an inherent conflict between boundaries and regions: Most existing models employ a single decoding path and a uniform loss function to simultaneously optimize the internal consistency of region segmentation and the geometric accuracy of boundaries. These two sub-tasks inherently conflict in their optimization objectives. In order to achieve high scores on pixel-level losses (such as Dice Loss), the network tends to generate smoother predictions, which often comes at the cost of sacrificing boundary details and sharpness, resulting in insufficient ability to depict small structures or complex boundaries.

[0158] Lack of awareness of topology: Existing technologies generally rely on pixel-level or region-level loss functions, which are completely insensitive to the topological correctness of the segmentation results (such as the connectivity of the target, the number of holes, etc.). Therefore, even if the model performs well on metrics such as the Dice coefficient, it may produce topological errors that are unacceptable in clinical practice, such as incorrectly connecting two independent blood vessels or creating false holes in continuous organs and tissues. This is a fatal flaw in fields such as vascular intervention and neurosurgery.

[0159] Post-processing dependencies and limitations of end-to-end capabilities: To compensate for the above shortcomings, many existing workflows rely on complex post-processing steps, such as Conditional Random Fields (CRFs) or morphological operations, to forcibly smooth results or correct boundaries. These post-processing modules typically cannot be jointly optimized end-to-end with neural networks, which not only increases the computational burden and system complexity, but also often depends on tedious parameter tuning and has limited generalization ability.

[0160] Therefore, to understand this invention, it is essential to recognize that existing technologies suffer from fundamental performance bottlenecks in adaptive fine-grained feature fusion, task decoupling, topology preservation, and end-to-end refinement capabilities. This invention addresses these long-standing pain points by proposing a novel, collaborative technical framework.

[0161] This invention aims to achieve end-to-end, post-processing-free, high-precision medical image segmentation, particularly achieving breakthroughs in handling complex boundaries and maintaining topological correctness. The detailed technical solution described above, through its multi-module collaborative design, fundamentally guarantees the realization of this invention's objective, as detailed below:

[0162] 1. Regarding the objective of "accurate segmentation of complex boundaries": This invention cleverly decouples the segmentation task through a dual-path collaborative decoder design. The main path focuses on the macroscopic structure of the region, while the auxiliary boundary depiction path (BSFA module) specifically extracts and aggregates boundary information from shallow features that retain the richest high-frequency information. This "division of labor" avoids the inherent contradiction of a single path in optimizing region smoothness and boundary sharpness. More importantly, in the final iterative refinement module (ITG-DCR), the accurate geometric boundary features generated by the auxiliary path are used as explicit guiding signals for the first-stage geometrically guided refinement. It guides the sampling points of deformable convolutions to actively "move" towards the real object boundary, thereby correcting the blurry or inaccurate boundaries generated by the main path and directly and specifically achieving accurate depiction of complex boundaries.

[0163] 2. Regarding the objective of "maintaining topological correctness": Existing technologies completely ignore this, while this invention ensures topological correctness through a three-layer mechanism. First, the Topology Prediction Network (TPPN) is designed to learn and predict the topological properties of the target (such as connectivity and holes), providing a clear "blueprint" for subsequent correction. Second, this topology prior plays a core role in the second stage of topology-guided refining in the ITG-DCR module. It guides deformable convolutions to "cross" erroneous breaks or "push away" erroneous adhesions, achieving intelligent repair of topological errors. Finally, the topology-supervised loss in the composite loss function (especially the part based on persistent homology) directly constrains the topological structure of the final segmentation result during training, fundamentally guiding the network to learn and generate segmentation masks with correct topological shapes. These three links are interconnected, forming a complete closed loop of topology preservation and repair.

[0164] 3. Regarding the goal of "end-to-end full automation and high robustness": This invention completely integrates the correction process into an iterative refining module that can be trained end-to-end, completely replacing the reliance on complex, non-end-to-end post-processing steps in traditional methods, thus achieving full automation from input to output. Simultaneously, the front-end shared encoder extracts highly robust and context-aware features through R2-Block and CDDA modules, while the back-end adaptive weighted multi-objective loss function automatically balances multiple conflicting optimization objectives such as pixel, boundary, structure, and topology, ensuring stable convergence of the entire complex system across different data. This design enhances the overall generalization ability and resistance to noise of the model.

[0165] In summary, this invention is not a simple improvement on existing technologies, but rather, through the core concept of "decoupling-coordination-refinement," it constructs an organic whole where each module has a clear responsibility and complementary information. It is this systematic architectural design that enables this invention to simultaneously and efficiently solve the three major challenges of boundaries, regions, and topology, thereby fully achieving its inventive objectives.

[0166] like Figures 2 to 3 As shown, where Figure 2 The results of a segmentation experiment for liver tumors. Figure 3 The results of the segmentation experiment for brain tumors.

[0167] In summary, this invention discloses a highly integrated deep learning framework specifically designed to overcome the inherent challenges of high-precision medical image segmentation. Medical image segmentation, as a cornerstone step in clinical applications such as computer-aided diagnosis, surgical planning, and radiotherapy, directly impacts the effectiveness and safety of subsequent medical decisions. However, the inherent characteristics of medical images, such as the low-contrast boundaries between target organs and surrounding soft tissues, the significant variability in lesion morphology and size, the complex topological relationships of delicate anatomical structures like microvascular vessels or nerve bundles, and the unavoidable noise and artifacts during imaging, all place extremely high demands on the robustness and accuracy of segmentation algorithms. Traditional architectures based on U-Net and its variants, while mitigating the semantic gap to some extent through their encoder-decoder structure and skip connection mechanisms, still exhibit limitations when facing challenges such as extreme scale variations, complex boundary topologies, and the effective fusion of deep features and shallow details.

[0168] To systematically address these challenges, this invention proposes a novel end-to-end collaborative network architecture. It decomposes the complex segmentation task into multiple interconnected sub-tasks through an innovative shared encoder, a dual-path parallel decoder, and an iterative multi-source information fusion module, ultimately achieving deep collaboration and complementarity of information. Specifically, this framework builds its technical advantages through the following core innovations:

[0169] Hierarchical multi-scale adaptive coding: A novel recursive residual network (R2-Block) is used as the core building block of the encoder, combined with a cross-dimensional dynamic attention mechanism (CDDA) to achieve adaptive weighting and refinement of feature maps at different scales and dimensions, thereby constructing a very rich and context-aware feature representation during the feature extraction stage.

[0170] Dual-Path Collaborative Decoding and Boundary-Region Decoupling: A parallel decoder is designed, comprising a main region segmentation path and an auxiliary boundary delineation path. The main path, through a Hierarchical Progressive Fusion and Refinement (HPFR) module, focuses on restoring the consistency within regions and the macroscopic structure; while the auxiliary path, through a Boundary-Sensitive Feature Aggregation (BSFA) module, specializes in accurately capturing boundaries. This decoupling design allows the network to handle two different types of tasks in a more focused manner.

[0171] Multimodal Deformation Iterative Refinement: At the end of the network, an Iterative Geometry and Topology-Guided Deformable Refinement (ITG-DCR) module is introduced. This module innovatively uses the regional features of the main path, the geometric boundary features of the auxiliary paths, and an additional topological prior information predicted by the network itself as guiding signals. Through two stages of iterative deformable convolution, it achieves dual correction of the final segmentation result at both the geometric boundary and topological structure levels.

[0172] Multi-objective composite loss and adaptive optimization: A comprehensive composite loss function with six components is constructed. This function is supervised not only at the pixel, boundary, and structure levels, but also introduces a topology-preserving loss based on persistent homology and a novel region-boundary consistency loss. Through an uncertainty-based adaptive weighting strategy, the loss terms are dynamically balanced to ensure stable and efficient convergence of the network under multiple constraints.

[0173] The main application areas of this invention relate to medical image processing, specifically a deep learning method and system for high-precision, fully automated segmentation of biomedical images. This invention can be widely applied to multiple key aspects of clinical medicine, including but not limited to: in computer-aided diagnosis (CADx), accurately delineating and segmenting tumors (such as gliomas, liver cancer, and lung nodules), lesion areas, and vital organs (such as the heart, liver, kidneys, and spine) in CT and MRI images, providing quantitative morphological evidence for early disease screening, benign / malignant differentiation, and staging; in precision radiotherapy planning, automatically delineating target areas (such as total tumor volume (GTV) and clinical target volume (CTV)) and organs at risk (OARs), significantly improving the efficiency and consistency of target area delineation and providing a basis for achieving optimal dose distribution; in image-guided surgery and robotic surgery, providing real-time and accurate anatomical models for intraoperative navigation systems, especially for the identification and segmentation of intricate and complex structures such as the spine, blood vessels, and nerve bundles, to improve the accuracy and safety of surgery; and in clinical research and drug evaluation, using high-throughput, reproducible quantitative analysis (such as organ volume measurement and lesion morphology tracking) of large-scale cohort study data to assess treatment response and explore disease biomarkers. This invention is applicable to various medical imaging modalities, including magnetic resonance imaging (MRI), computed tomography (CT), positron emission tomography (PET), ultrasound, and digital pathology slides, and aims to provide core technical support for the next generation of intelligent medical devices and systems.

[0174] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for geometric and topological co-guided medical image segmentation, characterized in that: The method comprises the following steps: S1, image preprocessing and data enhancement are performed on the input original medical image to obtain a preprocessed image tensor; S2, the preprocessed image tensor is input into a shared encoder to obtain data after feature refinement; S3, a core region feature map and a boundary probability map are generated through a dual-path collaborative decoder; S4, the generated core region feature map and the boundary probability map are subjected to multi-modal morphing iterative refinement to obtain a final feature map; S5, a multi-objective composite loss function and an optimization strategy are used for the final feature map; In step S4, multi-modal morphing iterative refinement is performed on the generated core region feature map and the boundary probability map to obtain a final feature map, including: First, receive the core area feature map by topology prior prediction network As input, predict the topology structure information of the image, output the double-channel topology prior feature map ; Secondly, the deformable refinement of the iterative geometric guidance and topological guidance is performed through the multi-modal morphing iterative refinement module, and the multi-modal morphing iterative refinement module comprises two iterative refinement stages; In the first stage of geometry-guided refinement, the offset field and modulation map scalar generation network receives core region feature maps and boundary prior feature maps of the auxiliary path As a joint input, the offset field and modulation map scalar generation network predicts the offset field of the first stage and the modulation map scalar ; By the first stage of deformable convolution layers with offset fields and modulation icon scalar , operating on the core region feature map to obtain a preliminary refined feature whose mathematical expression is: ; where k represents the size of the convolution kernel, represents the total number of sampling points of the convolution kernel, represents the weight of the kth position in the standard convolution kernel, represents the output position that is currently being calculated, represents the fixed offset of the k points in the standard convolution kernel; represents the two-dimensional spatial offset vector predicted for the kth sampling point of the deformable convolution kernel in the first-stage refinement process; represents the modulation scalar learned for the kth sampling point of the deformable convolution kernel in the first-stage refinement process; In the second stage of the topological guided refinement, the offset field and modulation map scalar generator network receives the output of the first stage and the topological prior feature map As a joint input, the offset field and modulation map scalar generator network predicts the offset field of the second stage and the modulation map scalar ; through the action of the deformable convolution layer of the second stage , the correction of the topological structure is completed, and the final feature map is finally output .

2. The method of claim 1, wherein: In step S1, image preprocessing and data enhancement are performed on the input original medical image to obtain a preprocessed image tensor, which comprises: Intensity windowing and normalization: The input original medical image is first subjected to intensity truncation by using a preset window width and window level; Subsequently, the pixel intensity value after windowing is linearly scaled to the interval [0, 1]; For MRI images without a standard intensity unit, a normalization method based on histogram percentiles is used; Spatial size and isotropic normalization: The image data after intensity windowing and normalization is uniformly adjusted to a fixed high-resolution size through trilinear interpolation or bicubic interpolation; Online data enhancement: The image data after spatial size and isotropic normalization is subjected to online data enhancement, and the online data enhancement methods include random affine transformation, elastic deformation, random gamma correction, Gaussian noise addition, and random erasure, to obtain the preprocessed image tensor.

3. The method of claim 1, wherein: In step S2, the preprocessed image tensor is input into a shared encoder to obtain data after feature refinement, which comprises: The preprocessed image tensor is input into a shared convolutional neural network encoder; The construction unit of the shared convolutional neural network encoder is a recursive residual network, and the preprocessed image tensor is processed through the recursive residual network to form the final output of the recursive residual network; The final output of the recursive residual network is input into a cross-dimensional dynamic attention module for feature refinement.

4. The method of claim 3, wherein: The process of the recursive residual network for processing the preprocessed image tensor comprises: For the original input features of the pre-processed image tensor , first a channel transformation and information integration is performed by a 1x1 convolution, resulting in ; Next, a recursive loop is performed, in the first iteration of which, , is fed into a residual block, the output of which is ; In each subsequent iteration, where, T is the number of recursions, the output of the previous iteration The initial transformed features Element-wise addition will be performed, and the features that fuse the original information and the previous iteration results will be fed into another weight-unshared residual block; The mathematical expression of the recursive process is: ; wherein, is the output of the first iteration, is the output of the previous iteration, is the loop; Definitions , the outputs of all iterations are concatenated along the channel dimension and fused by a final 1x1 convolution, and then concatenated with the original input features through a residual connection to form the final output of the recurrent residual network.

5. The method of claim 3, wherein: The final output of the recursive residual network is input into a cross-dimensional dynamic attention module for final feature refinement, and the process comprises: First, the final output of the recursive residual network is a feature map , the cross-dimensional dynamic attention module decomposes and reorganizes the dimensions of the input feature map , including: first, by two independent linear projections, the input feature map is mapped to two orthogonal subspaces respectively: one represents the channel-height plane, and the other represents the channel-width plane, by dimension permutation and reshaping of the input feature map , two two-dimensional feature matrices are obtained: and ; Secondly, self-attention mechanism is applied on the two two-dimensional feature matrices respectively; the two two-dimensional feature matrices processed by self-attention are reshaped and permuted back to the original four-dimensional tensor format, and are combined with the input feature map Residual connection is performed to obtain two feature maps refined in CH and CW dimensions respectively and ; Finally, the feature maps and are sent into a dynamic fusion gate; the dynamic fusion gate includes a convolution network, which takes the concatenated as input and generates a three-dimensional dynamic weight tensor with the same size as the input feature maps, whose value range is between [0, 1], and the final refined output is given by the following formula: ; wherein, is a refined feature map in the CH dimension; is a refined feature map in the CW dimension; is a dynamic weight tensor; is an element-wise multiplication.

6. The method of claim 1, wherein: In step S3, a core region feature map and a boundary probability map are generated through a dual-path collaborative decoder, which comprises: The decoder adopts a dual-path parallel mode, and the data after feature refinement is decomposed into two sub-tasks of region internal consistency recovery and boundary accurate delineation; The main path recovers spatial resolution and generates a segmentation region by a step-by-step decoding manner; the implementation process is as follows: at the jth decoding stage, the hierarchical progressive fusion module of the dual-path cooperative decoder is responsible for receiving the up-sampling features and the skip connection features of the corresponding level of the encoder ; Will and After concatenation, the data is fed into a multi-scale kernel selection unit, which sets multiple kernels of different sizes in parallel; the attention network then selects the kernels based on the input... and The global statistical information of the concatenated features is used to dynamically generate a set of weights for each spatial location, which are then used to perform a weighted summation of the outputs of the parallel convolutional kernels to obtain the preliminarily fused features. In the jth stage of the decoder, the preliminarily fused features selected by the multi-scale convolution kernel selection unit will be sent to the cross-level recurrent refinement unit for optimization; the cross-level recurrent refinement unit fuses the preliminarily fused features of the current jth stage with the context features from the j-1th stage through a gated recurrent unit; within the cross-level recurrent refinement unit, the gated recurrent unit performs several iterations of updates; the enhanced feature map output after the recurrent refinement is the final output of the hierarchical progressive fusion module in the current stage; when all the decoding stages complete this process, the core region feature map is finally output by the main path decoder ​ The auxiliary boundary module is parallel to the main path, and the auxiliary boundary path is activated to generate a boundary probability map; the process comprises: aggregating, by a boundary-sensitive feature aggregation module, feature maps of the shared encoder first layer output , feature maps of the shared encoder second layer output , and features of each level of the main decoder The boundary-sensitive feature aggregation module first unifies , and the features of each level of the main decoder to the same resolution through adaptive pooling; then, a spectral attention mechanism is adopted to convert each feature map to the frequency domain through two-dimensional discrete Fourier transform; in the frequency domain, a three-layer convolutional network is used to generate a frequency mask, which is used to weight different frequency components; for the features from and , the convolutional network amplifies their high-frequency components; while for the features of each level of the main decoder, the convolutional network retains the high and low frequency components thereof; after the processing is completed, the features of each source are optimized in the frequency domain to obtain the features after the spectral enhancement; After spectrum weighting, all the spectrum-enhanced features are transformed back to the spatial domain by inverse Fourier transform; finally, all the spectrum-enhanced features are fused by concat in the channel, and the boundary prior feature map is generated by the decoding head , the boundary prior feature map Finally, the boundary probability map is obtained through a layer of Sigmoid activation function.

7. The method of claim 1, wherein: In step S5, a multi-objective composite loss function and an optimization strategy are used for the final feature map, which comprises: A composite loss function comprising six loss components is constructed; wherein the composite loss function of the six loss components is the total loss , total loss is expressed as: ; wherein, is a set of all loss terms, is a per-task loss corresponding learnable log-variance parameter quantifying the model's uncertainty in the prediction for task i; Parameters The network weights are updated end-to-end by gradient descent, and the weights of each loss are dynamically adjusted to their uncertainty, i.e. The inverse of the reciprocal of the inverse of the inverse of the inverse of the inverse of the inverse of the inverse of the inverse of the inverse of the inverse of the inverse of the inverse of the inverse of the inverse of the inverse of the inverse of the inverse of the inverse of the inverse of the inverse of the inverse of the inverse of the inverse of the inverse of the inverse of the inverse of the inverse of the inverse of the inverse of the inverse of the The six loss components are respectively: main split loss : a weighted combination of Lovász-Softmax loss and focal loss, acting on the final feature map upper explicit boundary loss : output boundary prior feature maps acting on auxiliary boundary paths , a combination of balanced binary cross-entropy and Dice loss, for supervised single-pixel wide boundary prediction; topology supervision loss : includes two parts, the first part is used for supervising the topology prior feature map output by the topology prior prediction network ; the second part acts on the final feature map ; structural similarity loss : a multi-scale structural similarity loss is adopted, and the structural similarity loss SSIM is calculated at multiple scales; Region-bound consistency loss : to ensure that the boundary of the main region segmentation result is consistent with the boundary predicted by the auxiliary path in the probability distribution, the calculation method of the region-bound consistency loss is as follows: first, the implicit boundary is extracted from the final feature map , and then the KL divergence between the implicit boundary and the explicit boundary prediction map of the auxiliary path is calculated. regularization loss : includes two parts: the first part is the standard L2 weight decay applied to all learnable parameters of the network; the second part is for the multi-modal morphing iterative refinement module.

Citation Information

Patent Citations

  • CT image segmentation and classification system based on segmentation feature guidance

    CN120747515A