Cross-modality medical image segmentation method and device based on structure and strength dual alignment
By combining adaptive histogram alignment and density map alignment, the problem of intensity and structural differences in cross-modal medical image segmentation is solved, achieving a more robust cross-modal adaptive segmentation effect and improving the model's performance in CT-MR tasks.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- THE FIRST AFFILIATED HOSPITAL OF XIAMEN UNIV
- Filing Date
- 2026-03-23
- Publication Date
- 2026-06-12
AI Technical Summary
Existing cross-modal medical image segmentation models have difficulty generalizing to unseen modalities after training, and traditional histogram matching is difficult to integrate into deep learning frameworks, resulting in limited model performance in cross-modal adaptive tasks.
An adaptive histogram alignment module is used for learnable histogram alignment. Combined with a density map alignment module, global intensity alignment and local structural consistency are achieved through soft histogram and CDF matching and bin offset guided by style and structural features, thus constructing a cross-modal medical image segmentation network.
It significantly improves the model's performance in cross-modal medical image segmentation tasks, especially in CT-MR tasks, enhancing the model's cross-domain generalization ability and the fidelity of anatomical structures.
Smart Images

Figure CN121883505B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image segmentation technology, and in particular to a cross-modal medical image segmentation method and apparatus based on structure and intensity dual alignment. Background Technology
[0002] Medical imaging encompasses multiple imaging modalities, such as MRI, CT, and X-ray, each providing complementary diagnostic information. Deep learning has greatly advanced the development of medical image segmentation; however, models trained on one modality often struggle to generalize to other unseen modalities, primarily due to significant inter-domain discrepancies.
[0003] This problem is further exacerbated by the scarcity of pixel-level labeled data. High-quality annotation is typically costly and relies on specialized knowledge. To alleviate these limitations, unsupervised domain adaptation (UDA) has become an important solution, aiming to transfer labeled source domain knowledge to an unlabeled target domain.
[0004] Unsupervised Domain Adaptation (UDA) aims to enable models trained on labeled data to generalize to unlabeled domains and has been extensively studied in the field of medical imaging. Early research mainly relied on generative image translation methods, among which CycleGAN-based methods, such as SASAN and SIFA, generate target domain style representations by aligning at the image level and feature level. Subsequently, contrastive learning gradually emerged as an effective strategy for learning domain-invariant representations, such as MPSCL and SSC. Class-level alignment methods further reduce semantic mismatch problems by aligning class prototypes. In recent years, probabilistic modeling methods have gradually emerged, such as PUTF and FSUDA, which combine normalizing flows, optimal transport, and frequency-spatial domain information to improve the robustness of models to domain shifts. Overall, UDA methods in the field of medical imaging have gradually evolved from early generative models to a framework of contrastive learning and probabilistic modeling, continuously enhancing the model's ability to adapt to inter-domain differences.
[0005] Most existing UDA methods rely on adversarial learning, performing domain alignment at the image or feature level, while recent research has attempted to combine both. Although these methods have achieved some success, adversarial strategies are often unstable to train and difficult to optimize, thus requiring simpler and more robust alternatives.
[0006] In cross-modal adaptive tasks (such as CT-MR), model performance is often affected by both intensity distribution differences and structural differences. Traditional histogram matching provides a direct and effective method for reducing intensity differences, but due to its non-differentiable and non-learnable nature, it is difficult to integrate seamlessly into deep learning frameworks. Furthermore, simply aligning pixel intensities is insufficient because the anatomical structures themselves change significantly between different modalities. Summary of the Invention
[0007] To address the above issues, this invention proposes a cross-modal medical image segmentation method and apparatus based on dual alignment of structure and intensity. An adaptive histogram alignment module performs learnable histogram alignment, achieving flexible and robust intensity alignment across domains while preserving anatomical structural information to the greatest extent possible. A density map alignment module enhances structural consistency by aligning feature-generated density maps with label-generated density maps, ensuring that the learned representations maintain consistency at both the statistical distribution and anatomical structure levels. This combined strategy of "global distribution alignment + local structural alignment" can simultaneously reduce intensity and structural gaps, significantly improving model performance in cross-modal unsupervised adaptive segmentation tasks such as CT-MR.
[0008] On the one hand, the cross-modal medical image segmentation method based on structure and intensity dual alignment has the following specific steps:
[0009] S1, acquire the source domain image and target domain image of the medical image; perform data augmentation on the target domain image based on the source domain image and the target domain image, and randomly crop the image region from the source domain image using the CutMix data augmentation method and fuse it with the target domain image at the region level to generate the enhanced target domain image;
[0010] S2, Construct and train a cross-modal medical image segmentation network to obtain a trained cross-modal medical image segmentation network;
[0011] The cross-modal medical image segmentation network includes an adaptive histogram alignment module, an average teacher network, and a density map alignment module;
[0012] The adaptive histogram alignment module performs learnable histogram alignment on the source domain image and the target domain image to obtain a source domain image aligned to the target domain.
[0013] The average teacher network takes a target domain image as input and outputs a teacher target domain segmentation prediction. The student network takes a source domain image aligned to the target domain and an enhanced target domain image as input and outputs a source domain image segmentation prediction and a target domain image segmentation prediction, respectively. A supervised segmentation loss is constructed based on the source domain image segmentation prediction and the ground truth label of the source domain image. An unsupervised consistency loss is constructed based on the target domain image segmentation prediction and the teacher target domain segmentation prediction.
[0014] The density map alignment module extracts the intermediate feature maps of the intermediate layers of the student network and calculates their feature density maps, and constructs a density alignment loss based on the feature density maps.
[0015] The total loss function during training of the cross-modal medical image segmentation network is a weighted sum of supervised segmentation loss, density alignment loss, and unsupervised consistency loss;
[0016] S3 uses a trained cross-modal medical image segmentation network for medical image segmentation.
[0017] Preferably, the adaptive histogram alignment module is as follows:
[0018] Normalize the source domain image and the target domain image;
[0019] Binning is performed, and each pixel is assigned to a bin using a Gaussian kernel weighting method to construct a soft histogram;
[0020] The soft histogram is calculated as the normalized mean of the bin membership, and then the cumulative distribution function is calculated on the bins;
[0021] The soft mapping between bins is constructed using differentiable soft-argmin, and is represented as follows:
[0022] ;
[0023] in, Represents a soft mapping function; express function; The cumulative distribution function of the source domain image is represented by . The cumulative distribution function represents the target domain image; This represents the source domain image histogram binning index. This represents the binning index of the target domain image histogram; Represents absolute value; Indicates the center of the compartment;
[0024] Construct learnable bin offsets Specifically: extract style features from the shallow layer of the target domain; extract deep features from the deep layer of the source domain and regularize them using density maps to obtain structural features; fuse the style features and structural features to obtain the offset of each bin.
[0025] The final mapping function is constructed as follows:
[0026] ;
[0027] in, Represents the final mapping function; The scaling factor that controls the intensity of the adjustment; This represents the learnable bin offset per minute;
[0028] The source domain image is remapped using the final mapping function to generate a source domain image aligned to the target domain.
[0029] Preferably, the density map alignment module is as follows:
[0030] Extract intermediate feature maps from the intermediate layers of the student network, and extract a set of dilated neighborhoods for each pixel of the intermediate feature map;
[0031] Calculate the cosine similarity between the center pixel and its neighbors in each dilated neighborhood; convert the cosine similarity to distance and average it within the neighborhood to obtain the density score of each pixel; the density scores of all pixels constitute the feature density map; use the same process on the real label mask to obtain the feature density map of the label;
[0032] The density alignment loss is constructed and expressed as:
[0033] ;
[0034] in, Indicates density alignment loss; Represents the feature density map; The feature density map represents the label; This represents the L1 distance.
[0035] Preferably, the receptive field range of the expanded neighborhood is adjusted by setting the value of the expansion factor.
[0036] Preferably, the data augmentation employs the CutMix method.
[0037] Preferably, the total loss function is expressed as:
[0038] ;
[0039] in, Represents the total loss function; Indicates the loss from monitoring the segmentation; This represents the unsupervised consistency loss; Indicates density alignment loss; and This represents the tradeoff coefficient.
[0040] On the other hand, a cross-modal medical image segmentation device based on structure and strength dual alignment includes the following:
[0041] The medical image acquisition module is used to acquire source and target domain images of medical images; and to perform data augmentation on the target domain image to obtain an enhanced target domain image.
[0042] The network construction and training module is used to construct and train a cross-modal medical image segmentation network to obtain a trained cross-modal medical image segmentation network.
[0043] The cross-modal medical image segmentation network includes an adaptive histogram alignment module, an average teacher network, and a density map alignment module;
[0044] The adaptive histogram alignment module performs learnable histogram alignment on the source domain image and the target domain image to obtain a source domain image aligned to the target domain.
[0045] The average teacher network takes a target domain image as input and outputs a teacher target domain segmentation prediction. The student network takes a source domain image aligned to the target domain and an enhanced target domain image as input and outputs a source domain image segmentation prediction and a target domain image segmentation prediction, respectively. A supervised segmentation loss is constructed based on the source domain image segmentation prediction and the ground truth label of the source domain image. An unsupervised consistency loss is constructed based on the target domain image segmentation prediction and the teacher target domain segmentation prediction.
[0046] The density map alignment module extracts the intermediate feature maps of the intermediate layers of the student network and calculates their feature density maps, and constructs a density alignment loss based on the feature density maps.
[0047] The total loss function during training of the cross-modal medical image segmentation network is a weighted sum of supervised segmentation loss, density alignment loss, and unsupervised consistency loss;
[0048] The medical image segmentation module is used to segment medical images using a pre-trained cross-modal medical image segmentation network.
[0049] Compared with the prior art, the present invention has the following beneficial effects:
[0050] (1) This invention redesigns traditional histogram matching into a differentiable and learnable module, matches it with CDF using soft histograms, and combines it with adaptive bin offset guided by style features and structural features to achieve robust global strength alignment.
[0051] (2) The density map alignment mechanism of the present invention enhances the consistency of local structure by matching the density map generated by the feature with the density map generated by the label.
[0052] (3) The present invention can effectively bridge the intensity difference and structural difference through the joint alignment strategy of “global distribution alignment + local structure” alignment, and achieves significant performance improvement in cross-modal medical image segmentation tasks. Attached Figure Description
[0053] The present invention will now be described in further detail with reference to the accompanying drawings;
[0054] Figure 1 This is a flowchart of a cross-modal medical image segmentation method based on structure and strength dual alignment according to an embodiment of the present invention;
[0055] Figure 2 This is a diagram of the cross-modal medical image segmentation network framework of the cross-modal medical image segmentation method based on structure and strength dual alignment according to an embodiment of the present invention.
[0056] Figure 3 This is a visual comparison of different segmentation methods based on the structure and strength dual alignment of the cross-modal medical image segmentation method according to an embodiment of the present invention; wherein, the first row of images represents the cardiac dataset; the second row represents the abdominal multi-organ dataset;
[0057] Figure 4 The UMAP distribution of magnetic resonance imaging (MRI) and CT images is visualized for the cross-modal medical image segmentation method based on structure and intensity dual alignment according to an embodiment of the present invention; wherein, the left figure represents the original distribution and the right figure represents the aligned distribution;
[0058] Figure 5 This is a visual comparison diagram of the DMA module of the cross-modal medical image segmentation method based on structure and intensity dual alignment according to an embodiment of the present invention.
[0059] Figure 6 This is a structural block diagram of a cross-modal medical image segmentation device based on dual alignment of structure and strength according to an embodiment of the present invention. Detailed Implementation
[0060] The present invention will be further described below through specific embodiments.
[0061] like Figure 1 As shown, the cross-modal medical image segmentation method based on structure and intensity dual alignment has the following specific steps:
[0062] S1: Obtain the source and target domain images of the medical image; perform data augmentation on the target domain image based on the source and target domain images. Specifically, the CutMix data augmentation method is used to randomly crop image regions from the source domain image and fuse them with the target domain image at the region level to generate an enhanced target domain image.
[0063] S2. Construct and train a cross-modal medical image segmentation network to obtain a trained cross-modal medical image segmentation network.
[0064] The cross-modal medical image segmentation network comprises an adaptive histogram alignment module, a mean teacher network, and a density map alignment module. The adaptive histogram alignment module aligns the source and target domain images using learnable histograms to obtain a source domain image aligned to the target domain. The mean teacher network takes the target domain image as input and outputs a teacher-level target domain segmentation prediction. Its student network takes the source domain image aligned to the target domain and the enhanced target domain image as input, and outputs source domain image segmentation predictions and target domain image segmentation predictions, respectively. A supervised segmentation loss is constructed based on the source domain image segmentation predictions and the ground truth labels of the source domain images. An unsupervised consistency loss is constructed based on the target domain image segmentation predictions and the teacher-level target domain segmentation predictions. The density map alignment module extracts the intermediate feature maps from the intermediate layers of the student network and calculates their feature density maps, constructing a density alignment loss based on these feature density maps.
[0065] This method addresses the cross-modal domain adaptation problem in medical image segmentation by simultaneously resolving global intensity shift and local structural misalignment. As shown in Figure 2, it comprises two complementary modules:
[0066] The adaptive histogram alignment module reformulates histogram matching as a differentiable module guided by domain-specific cues. Shallow features from the target domain encode style information, while density maps derived from the source domain capture structural patterns. The two prediction heads fuse these cues to predict adaptive offsets that flexibly adjust the soft histogram mapping, thereby achieving style- and structure-aware global intensity alignment.
[0067] The density map alignment module computes feature density maps by measuring neighborhood distances and using an expansion factor to control the receptive field size. These density maps are then aligned with the density maps generated from the labels to enforce structural consistency in a contrastive manner.
[0068] These two modules work together to achieve global-local alignment, which reduces strength differences while maintaining structural fidelity, thereby enabling robust cross-modal adaptation.
[0069] Adaptive Histogram Alignment Module (AdaHist).
[0070] To address the issue of modality-related intensity variations, this method proposes Adaptive Histogram Alignment (AdaHist) as a differentiable alternative to traditional histogram matching. Unlike static mapping, AdaHist is fully learnable and can be seamlessly integrated into deep networks, achieving adaptive intensity transfer while preserving anatomical structure. Its design is based on two principles: (1) approximations of soft histograms and CDFs to achieve stable and GPU-parallel optimization; and (2) predictable bin offsets from style and structural cues for domain-aware adaptation.
[0071] Construct a soft histogram and calculate the cumulative distribution function (CDF).
[0072] Given a source image normalized to ([0,1]) ) and target image ( First, a soft histogram is constructed by assigning each pixel to bins using a Gaussian kernel weighting method.
[0073] ;
[0074] in: Represents the weighting function; It is the center of the b-th sub-box; The smoothness of the assignment is controlled. Then, the histogram is calculated as the normalized mean of the bin memberships, followed by the cumulative distribution function (CDF) calculated on the bins, expressed as:
[0075] ;
[0076] in, This indicates the number of pixels in the source or target image.
[0077] Construct differentiable mappings; to align the source and target domain distributions, construct soft mappings between bins using differentiable soft-argmin, represented as:
[0078] ;
[0079] in, and This indicates the histogram binning index. This represents the source domain image histogram binning index. This represents the binning index of the target domain image histogram. The cumulative distribution function of the source domain image is represented by . The cumulative distribution function represents the target domain image. It is the first The center of each bin. This form ensures smooth, end-to-end gradient propagation, in contrast to discrete histogram matching.
[0080] Perform learnable offset prediction.
[0081] While soft mapping can capture global distribution offsets, it remains static across different samples. To achieve adaptive alignment, learnable per-bin offsets are introduced. .
[0082] These offsets are predicted by fusing style features and structural features. Style features ( Extracted from shallow layers of the target domain, it is used to encode mode-specific intensity statistics; structural features ( The data originates from deep features of the source domain and is regularized using a density map to emphasize anatomical integrity.
[0083] This fusion provides domain-aware adjustment to histogram binning, enabling the mapping to dynamically adapt to different modal gaps. Therefore, the transformed source image retains anatomical integrity while achieving a similar intensity distribution to the target domain, thus facilitating more reliable cross-modal transfer.
[0084] The final mapping is constructed as follows:
[0085] ;
[0086] in, It is a scaling factor that controls the intensity of the adjustment.
[0087] Perform output reconstruction.
[0088] Subsequently, each source domain pixel uses Perform remapping to generate an aligned image under the original spatial layout. This differentiable flow ensures computational efficiency and anatomical consistency, making AdaHist a robust module for cross-modal intensity alignment.
[0089] Density map alignment module.
[0090] Although global histogram alignment reduces modal differences at the intensity level, structural misalignment often persists, especially near anatomical boundaries. To address this issue, a density map alignment (DMA) module is proposed, which explicitly regularizes the spatial organization of features by comparing the learned feature neighborhood with structural priors derived from the labels.
[0091] Perform expansion neighborhood construction.
[0092] Given a feature map F, a set of dilated neighborhoods is extracted for each pixel. The dilation factor d determines the receptive field size: when d=1, only direct boundary neighbors are considered; a larger d expands the range and captures a wider range of contextual information.
[0093] Formalized, the central pixel The neighborhood is defined as:
[0094] ;
[0095] in, This indicates the boundary of the expansion window.
[0096] Perform density calculations.
[0097] For the center pixel and its neighborhood Calculate cosine similarity Then, it is converted to distance and averaged within the neighborhood to obtain the density fraction, expressed as:
[0098] ;
[0099] The resulting feature density map ( This reflects the smoothness of the local structure, where: small values indicate compactness within the class; large values indicate potential boundaries or inconsistent regions. This represents the total number of elements in the neighborhood.
[0100] Align the feature density map with the exported label density.
[0101] To provide structural supervision, the same process is used to construct a label-derived density map on the segmentation mask. .
[0102] Minimizing the difference between the two using L1 loss is expressed as:
[0103] ;
[0104] This objective enforces local structure fidelity in the feature space, ensuring that pixels of the same type remain compact while different categories are better separated.
[0105] Training strategy for cross-modal medical image segmentation networks.
[0106] The Mean Teacher framework is adopted to effectively utilize labeled source domain data and unlabeled target domain data. The student network is optimized through three losses, including: (i) supervised segmentation loss ( (ii) Unsupervised consistency loss (iii) Density alignment loss () ), defined as the L1 distance between the density maps of the source and target domains.
[0107] The overall training objective is defined as:
[0108] ;
[0109] in, and This is a weighting factor.
[0110] The supervised loss is: ,in Common Dice loss, This is a standard cross-entropy calculation.
[0111] Unsupervised loss is: ,in, This is a mixed tag constructed based on cutmix. This represents the model's prediction results for the mixed images.
[0112] This joint optimization encourages student models to learn reliable supervision in the source domain while aligning their representations with the structure and density characteristics of the target domain.
[0113] S3 uses a trained cross-modal medical image segmentation network for medical image segmentation.
[0114] The following experiments will verify this method.
[0115] Select Datasets.
[0116] The MM-WHS dataset, specifically the MM-WHS 2017 benchmark dataset, provides 20 CT scans and 20 MRI scans, including annotations for four cardiac structures (AA, LAC, LVC, MYO). Following the SIFA setup, publicly available preprocessed data is used, and two transfer tasks are constructed: CT→MR and MR→CT. The abdominal multi-organ dataset uses 30 CT scans from the literature and 20 MRI scans from the CHAOS challenge. This dataset includes annotations for the liver, spleen, and both kidneys. Similar to MM-WHS, preprocessed data provided by SIFA is used, and two transfer tasks are designed: CT→MR and MR→CT.
[0117] Comparison with State-of-the-Art Methods.
[0118] Our method is compared with a series of representative domain adaptation methods, and the specific results are summarized in Table 1. As reference boundaries, we also show: (i) direct transfer without adaptation (w / o adaptation) as the lower bound; and (ii) fully supervised training on the target domain as the upper bound.
[0119] Compared to state-of-the-art domain-adaptive methods, our proposed method achieves the best overall Dice scores on both abdominal MRI→CT and cardiac CT→MRI tasks. In particular, it significantly outperforms the previously best-performing FSUDA method, demonstrating substantial improvements in liver and spleen segmentation on the abdominal task, while also achieving stable improvements across all cardiac structures. A visual comparison of the segmentation results from each method is shown below. Figure 3As shown in the figure. These results demonstrate that the framework of this method has significant advantages in enhancing cross-domain generalization ability, especially in challenging organ boundary regions.
[0120] Table 1: Performance of different domain adaptation algorithms.
[0121]
[0122] The symbol † represents the result of reproduction.
[0123] Conduct ablation studies.
[0124] As shown in Table 2, introducing either the AdaHist or DMA module alone can improve performance on the baseline model, while combining the two yields the best results, achieving a significant improvement (+4.9) in average Dice (mDice) while reducing the average symmetric surface distance (mASD). This result validates the complementary advantages between global intensity alignment and local structural consistency in the framework of our proposed method.
[0125] Table 2: Ablation experiments based on the Cardiac dataset to validate the effectiveness of different modules (Cardiac MRI) CT scan.
[0126]
[0127] Conduct comparative experiments on learnable histogram transfer.
[0128] Our proposed learnable histogram transfer method is compared with the following methods: StyleRandomization, FDA, CycleGAN, and traditional histogram matching. Unlike these static methods, our method adaptively adjusts the bin offset using domain-specific features, thus achieving superior performance. Figure 4 As shown, the UMAP visualization results further validate its effectiveness. After adaptation, the CT and MR feature clusters can be well blended, demonstrating better cross-modal alignment.
[0129] Table 3: Effectiveness of different style transfer methods.
[0130]
[0131] Perform visual analysis of the DMA module.
[0132] like Figure 5 As shown, the effect of the DMA module is visualized. The results show that the module can generate more compact and well-separated feature clusters, further highlighting its role in enhancing structural consistency.
[0133] In summary, this method provides a dual alignment framework. At the global level, histogram matching is redesigned as a differentiable, learnable module (AdaHist). This module is based on soft histogram and CDF matching mechanisms, and uses style features and structural features to jointly predict the adaptive offset of each bin, thereby achieving flexible and robust intensity alignment across domains while preserving anatomical structural information to the greatest extent. At the local level, a density map alignment (MAP) mechanism is proposed, which strengthens structural consistency by aligning the density maps generated by features with those generated by labels, ensuring that the learned representations are consistent at both the statistical distribution and anatomical structure levels. Through this joint strategy of "global distribution alignment + local structural alignment," the framework of this method can simultaneously reduce intensity and structural gaps, significantly improving model performance in cross-modal unsupervised adaptive segmentation tasks such as CT-MR. The proposed UDA method was validated on cardiac and abdominal datasets, and experimental results show that it consistently outperforms state-of-the-art methods on all metrics.
[0134] like Figure 6 As shown, the present invention also discloses a cross-modal medical image segmentation device based on structure and strength dual alignment, comprising:
[0135] The medical image acquisition module 601 is used to acquire source domain images and target domain images of medical images; and to perform data augmentation on the target domain image to obtain an enhanced target domain image.
[0136] The network construction and training module 602 is used to construct and train a cross-modal medical image segmentation network to obtain a trained cross-modal medical image segmentation network.
[0137] The cross-modal medical image segmentation network includes an adaptive histogram alignment module, an average teacher network, and a density map alignment module;
[0138] The adaptive histogram alignment module performs learnable histogram alignment on the source domain image and the target domain image to obtain a source domain image aligned to the target domain.
[0139] The average teacher network takes a target domain image as input and outputs a teacher target domain segmentation prediction. The student network takes a source domain image aligned to the target domain and an enhanced target domain image as input and outputs a source domain image segmentation prediction and a target domain image segmentation prediction, respectively. A supervised segmentation loss is constructed based on the source domain image segmentation prediction and the ground truth label of the source domain image. An unsupervised consistency loss is constructed based on the target domain image segmentation prediction and the teacher target domain segmentation prediction.
[0140] The density map alignment module extracts the intermediate feature maps of the intermediate layers of the student network and calculates their feature density maps, and constructs a density alignment loss based on the feature density maps.
[0141] The medical image segmentation module 603 is used for medical image segmentation using a trained cross-modal medical image segmentation network.
[0142] The specific implementation of the cross-modal medical image segmentation device based on structure and strength alignment is the same as that of the cross-modal medical image segmentation method based on structure and strength alignment, and will not be described again in this embodiment.
[0143] The above are merely specific embodiments of the present invention, but the design concept of the present invention is not limited thereto. Any non-substantial modifications made to the present invention using this concept shall be considered as infringing upon the protection scope of the present invention.
Claims
1. A cross-modal medical image segmentation method based on structure and intensity dual alignment, characterized in that, Includes the following steps: S1, acquire the source domain image and target domain image of the medical image; perform data augmentation on the target domain image to obtain the augmented target domain image; S2, Construct and train a cross-modal medical image segmentation network to obtain a trained cross-modal medical image segmentation network; The cross-modal medical image segmentation network includes an adaptive histogram alignment module, an average teacher network, and a density map alignment module; The adaptive histogram alignment module performs learnable histogram alignment on the source domain image and the target domain image to obtain a source domain image aligned to the target domain. The average teacher network takes the target domain image as input and outputs a teacher target domain segmentation prediction. The student network takes a source domain image aligned to the target domain and an enhanced target domain image as input, and outputs a source domain image segmentation prediction and a target domain image segmentation prediction, respectively. A supervised segmentation loss is constructed based on the source domain image segmentation prediction and the ground truth label of the source domain image. An unsupervised consistency loss is constructed based on the target domain image segmentation prediction and the teacher's target domain segmentation prediction. The density map alignment module extracts the intermediate feature maps of the intermediate layers of the student network and calculates their feature density maps, and constructs the density alignment loss based on the feature density maps. The total loss function during training of the cross-modal medical image segmentation network is a weighted sum of supervised segmentation loss, density alignment loss, and unsupervised consistency loss; S3, using a trained cross-modal medical image segmentation network for medical image segmentation; The density map alignment module is as follows: Extract intermediate feature maps from the intermediate layers of the student network, and extract a set of dilated neighborhoods for each pixel of the intermediate feature map; Calculate the cosine similarity between the center pixel and its neighbors in each dilated neighborhood; convert the cosine similarity to distance and average it within the neighborhood to obtain the density score of each pixel; the density scores of all pixels constitute the feature density map; use the same process on the real label mask to obtain the feature density map of the label; The density alignment loss is constructed and expressed as: ; in, Indicates density alignment loss; Represents the feature density map; The feature density map represents the label; This represents the L1 distance.
2. The cross-modal medical image segmentation method based on structure and intensity dual alignment according to claim 1, characterized in that, The adaptive histogram alignment module is as follows: Normalize the source domain image and the target domain image; Binning is performed, and each pixel is assigned to a bin using a Gaussian kernel weighting method to construct a soft histogram; The soft histogram is calculated as the normalized mean of the bin membership, and then the cumulative distribution function is calculated on the bins; The soft mapping between bins is constructed using differentiable soft-argmin, and is represented as follows: ; in, Represents a soft mapping function; express function; The cumulative distribution function of the source domain image is represented by . The cumulative distribution function represents the target domain image; This represents the source domain image histogram binning index. This represents the binning index of the target domain image histogram; Represents absolute value; Indicates the center of the compartment; Construct learnable bin offsets Specifically: extract style features from the shallow layer of the target domain; extract deep features from the deep layer of the source domain and regularize them using density maps to obtain structural features; fuse the style features and structural features to obtain the offset of each bin. The final mapping function is constructed as follows: ; in, Represents the final mapping function; The scaling factor that controls the intensity of the adjustment; This represents the learnable bin offset per minute; The source domain image is remapped using the final mapping function to generate a source domain image aligned to the target domain.
3. The cross-modal medical image segmentation method based on structure and intensity dual alignment according to claim 1, characterized in that, The receptive field range of the inflated neighborhood can be adjusted by setting the value of the inflated factor.
4. The cross-modal medical image segmentation method based on structure and intensity dual alignment according to claim 1, characterized in that, The data augmentation employs the CutMix method.
5. The cross-modal medical image segmentation method based on structure and intensity dual alignment according to claim 1, characterized in that, The total loss function is expressed as: ; in, Represents the total loss function; Indicates the loss from monitoring and segmentation; This represents the loss of unsupervised consistency. Indicates density alignment loss; and This represents the tradeoff coefficient.
6. A cross-modal medical image segmentation device based on structure and strength dual alignment, characterized in that, Including the following: The medical image acquisition module is used to acquire source and target domain images of medical images; and to perform data augmentation on the target domain image to obtain an enhanced target domain image. The network construction and training module is used to construct and train a cross-modal medical image segmentation network to obtain a trained cross-modal medical image segmentation network. The cross-modal medical image segmentation network includes an adaptive histogram alignment module, an average teacher network, and a density map alignment module; The adaptive histogram alignment module performs learnable histogram alignment on the source domain image and the target domain image to obtain a source domain image aligned to the target domain. The average teacher network takes the target domain image as input and outputs a teacher target domain segmentation prediction. The student network takes a source domain image aligned to the target domain and an enhanced target domain image as input, and outputs a source domain image segmentation prediction and a target domain image segmentation prediction, respectively. A supervised segmentation loss is constructed based on the source domain image segmentation prediction and the ground truth label of the source domain image. An unsupervised consistency loss is constructed based on the target domain image segmentation prediction and the teacher's target domain segmentation prediction. The density map alignment module extracts the intermediate feature maps of the intermediate layers of the student network and calculates their feature density maps, and constructs the density alignment loss based on the feature density maps. The total loss function during training of the cross-modal medical image segmentation network is a weighted sum of supervised segmentation loss, density alignment loss, and unsupervised consistency loss; The medical image segmentation module is used to segment medical images using a pre-trained cross-modal medical image segmentation network. The density map alignment module is as follows: Extract intermediate feature maps from the intermediate layers of the student network, and extract a set of dilated neighborhoods for each pixel of the intermediate feature map; Calculate the cosine similarity between the center pixel and its neighbors in each dilated neighborhood; convert the cosine similarity to distance and average it within the neighborhood to obtain the density score of each pixel; the density scores of all pixels constitute the feature density map; use the same process on the real label mask to obtain the feature density map of the label; The density alignment loss is constructed and expressed as: ; in, Indicates density alignment loss; Represents the feature density map; The feature density map represents the label; This represents the L1 distance.
Citation Information
Patent Citations
Unsupervised domain adaptive medical image segmentation method based on teacher fusion model
CN118941797A