A method and apparatus for cross-domain segmentation of medical images based on adaptive frequency domain alignment networks
The Adaptive Frequency Alignment Network (AFDAN) is used to achieve cross-domain segmentation of medical images, which solves the problems of high annotation costs and insufficient segmentation accuracy caused by annotation differences. By aligning and fusing frequency domain features, the accuracy and robustness of medical image segmentation are improved, and it is suitable for a variety of cross-domain segmentation tasks of medical images.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TIANJIN UNIV
- Filing Date
- 2026-01-29
- Publication Date
- 2026-06-02
AI Technical Summary
Existing medical image segmentation methods suffer from high annotation costs, long cycles, and insufficient segmentation accuracy in cross-domain transfer. They are particularly difficult to adapt to negative transfer caused by annotation differences and the segmentation of subtle lesions, and they do not make full use of frequency domain characteristics to separate structural and semantic information.
An Adaptive Frequency Alignment Network (AFDAN) is adopted, which achieves efficient transfer of source domain knowledge to the target domain by hierarchical alignment of frequency domain features and deep fusion of spatial and frequency domain features, including a source-target frequency domain fusion module, a domain adversarial learning module, and a spatial-frequency domain integration module, thereby improving segmentation accuracy and robustness.
The cross-union ratios (CUNRs) achieved were 90.9% and 82.6% in vitiligo and retinal vessel segmentation tasks, respectively, significantly improving segmentation accuracy and generalization ability. It is applicable to various cross-domain segmentation scenarios for medical images.
Smart Images

Figure CN122135024A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of medical image processing and deep learning technology, and in particular to a method and apparatus for cross-domain segmentation of medical images based on an adaptive frequency domain alignment network. Background Technology
[0002] Medical image segmentation is a core technological support for clinical auxiliary diagnosis, disease assessment, and treatment plan formulation, and its performance highly depends on large-scale, high-quality pixel-level labeled data. However, medical image annotation requires time-consuming work by senior domain experts, resulting in high annotation costs and long cycles, leading to a scarcity of labeled data in most clinical scenarios. To alleviate annotation dependence, cross-domain knowledge transfer has become a research hotspot, but existing methods often assume that the source and target domains share the same annotation categories, making it difficult to adapt to real clinical scenarios. In practical applications, the source domain may only contain annotations of normal anatomical structures, while the target domain needs to segment pathological regions; or the source domain may have multi-class annotations, while the target domain only focuses on a subset. Such annotation differences can cause deep semantic gaps, leading to negative transfer or domain adaptation failure.
[0003] Existing domain adaptation methods mitigate inter-domain differences through partial feature alignment and pseudo-label generation, but fail to fully utilize frequency domain characteristics to separate structural and semantic information, easily damaging the core structural integrity of the anatomy / lesion. At the same time, existing methods do not design dedicated fusion strategies for "label space mismatch", resulting in low cross-domain transfer efficiency and insufficient segmentation accuracy, failing to meet clinical needs for segmenting subtle lesions (such as microvessels and skin lesion edges). Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a cross-domain segmentation method for medical images based on an adaptive frequency domain alignment network. By hierarchical alignment of frequency domain features and deep fusion of spatial and frequency domain features, this method achieves efficient transfer of source domain knowledge to the target domain without relying on large-scale labeled data in the target domain, thereby improving the accuracy and robustness of cross-domain segmentation of medical images.
[0005] In a first aspect, embodiments of the present invention provide a cross-domain segmentation method for medical images based on an adaptive frequency domain alignment network, comprising:
[0006] S1. Obtain the source domain medical image set and the target domain medical image set, and preprocess the source domain medical image set and the target domain medical image set;
[0007] S2. Train the AFDAN model based on the preprocessed source domain medical image set and target domain medical image set;
[0008] S3. Optimize the trained AFDAN model to obtain the final AFDAN model;
[0009] S4. Based on the final AFDAN model, segmentation inference is performed on the target domain image to obtain high-precision medical image segmentation results.
[0010] Furthermore, training the AFDAN model based on the preprocessed source domain medical image set and target domain medical image set includes:
[0011] S21. Based on the source-target frequency domain fusion module, the source domain medical image set and the target domain medical image set are decomposed and recombined to obtain the initial frequency domain features;
[0012] S22. Based on the domain adversarial learning module, the initial frequency domain features are transformed into the final frequency domain features;
[0013] S23. Based on the spatial-frequency domain integration module, spatial features are extracted from the source domain medical image set and the target domain medical image set. Based on the spatial features and the final frequency domain features, fusion features are obtained. Based on the cross-domain attention module, the final segmentation features are generated according to the fusion features.
[0014] Furthermore, based on the source-target frequency domain fusion module, the source domain medical image set and the target domain medical image set are decomposed and recombined to obtain initial frequency domain features including:
[0015] S201. Based on the adaptive frequency domain alignment network, perform two-dimensional fast Fourier transform on the source domain medical image set and the target domain medical image set, so that the source domain medical image set and the target domain medical image set can be decomposed into source domain frequency domain features and target domain frequency domain features.
[0016] S202. Use Gaussian filtering to separate the source domain amplitude spectrum in the source domain frequency domain features and the target domain amplitude spectrum in the target domain frequency domain features, and extract the low-frequency components in the source domain amplitude spectrum and the target domain amplitude spectrum respectively.
[0017] S203. A random weighting strategy is used to fuse the low-frequency components in the source domain amplitude spectrum and the target domain amplitude spectrum to construct a dense and continuous intermediate amplitude distribution between the source domain and the target domain, thus obtaining the fused low-frequency amplitude spectrum.
[0018] Furthermore, the domain adversarial learning module includes a generator G and a discriminator D;
[0019] Based on the domain adversarial learning module, the transformation of initial frequency domain features into final frequency domain features includes:
[0020] S205. Define an adversarial loss function to constrain the adversarial training of generator G and discriminator D, so that generator G generates an amplitude spectrum consistent with the distribution of the target domain.
[0021] S206. Alternately iteratively optimize the generator G and the discriminator D, and improve the domain camouflage capability of the pseudo-target domain amplitude spectrum by minimizing the amplitude spectrum that is consistent with the distribution of the target domain through the generator, and maximize the amplitude spectrum that is consistent with the distribution of the target domain through the discriminator to enhance the domain differentiation capability.
[0022] S207. Input the initial frequency domain features into the optimized generator and output the final frequency domain features.
[0023] Furthermore, the spatial-frequency domain integration module includes a SegFormer backbone network and a cross-domain attention model;
[0024] Based on the spatial-frequency domain integration module, spatial features are extracted from the source domain medical image set and the target domain medical image set. Fusion features are obtained based on the spatial features and the final frequency domain features. Finally, based on the cross-domain attention model, the final segmentation features are generated according to the fusion features, including:
[0025] S209. Perform bilinear interpolation resampling on the final frequency domain features according to the scale, so that the spatial size of the final frequency domain features is consistent with the spatial features of the corresponding scale, and the topological relationship of the feature space remains unchanged, to obtain the resampled spatial features.
[0026] S210. By stitching together spatial features and resampled spatial features of the same scale according to the channel dimension, a fused feature is obtained;
[0027] S211. Input the fused features into the cross-domain attention model. After the fused features are processed by two layers of convolution and Sigmoid normalization, an initial spatial attention map is generated. The initial spatial attention map is then scaled to match the initial segmentation features using bilinear interpolation. Figure 1 The final spatial attention map is obtained by determining the exact dimensions.
[0028] S212. By using the element-wise multiplication method, the initial segmentation feature map is modulated using the final spatial attention map to enhance the lesion region features and suppress background noise, and the final segmentation feature map is output.
[0029] Furthermore, the feature is that a Dropout layer is added to the generator G and the discriminator D to avoid overfitting.
[0030] Furthermore, the trained AFDAN model is optimized to obtain the final AFDAN model, which includes:
[0031] S31. Establish Dice loss constraints to limit segmentation accuracy;
[0032] S32. Establish the total loss function based on the Dice loss constraint on segmentation accuracy;
[0033] S33. By using the Adam optimizer to minimize the total loss function, the trained AFDAN model is optimized to obtain the final AFDAN model.
[0034] Secondly, embodiments of the present invention provide a medical image cross-domain segmentation device based on an adaptive frequency domain alignment network, comprising:
[0035] The dataset preprocessing unit is used to acquire source domain medical image sets and target domain medical image sets, and to preprocess the source domain medical image sets and target domain medical image sets.
[0036] The model training unit is used to train the AFDAN model based on the preprocessed source domain medical image set and target domain medical image set;
[0037] The model optimization unit is used to optimize the AFDAN model to obtain the final AFDAN model.
[0038] The segmentation inference unit is used to perform segmentation inference on the target domain image based on the final AFDAN model to obtain high-precision medical image segmentation results.
[0039] Thirdly, embodiments of the present invention provide a computing device, including:
[0040] One or more processing units;
[0041] A storage unit is used to store one or more programs.
[0042] Wherein, when the one or more programs are executed by the one or more processing units, the one or more processing units perform the method described in the first aspect.
[0043] Fourthly, embodiments of the present invention provide a computer-readable storage medium having processor-executable non-volatile program code, which, when executed by a processor, implements the method described in the first aspect.
[0044] The beneficial effects of the embodiments of the present invention are as follows: The present invention effectively solves the negative transfer problem caused by scarce annotations, domain offset and annotation differences in medical image segmentation by frequency domain-spatial domain dual-dimensional feature collaboration and precise inter-domain alignment. It achieves cross-union ratios of 90.9% and 82.6% in vitiligo segmentation and retinal vessel segmentation tasks, respectively, significantly improving segmentation accuracy and generalization ability.
[0045] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.
[0046] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0047] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0048] Figure 1 This is a flowchart illustrating the cross-domain segmentation method for medical images based on an adaptive frequency domain alignment network provided in an embodiment of the present invention.
[0049] Figure 2 The architecture diagram of the AFDAN model for the cross-domain segmentation method of medical images based on an adaptive frequency domain alignment network provided in the embodiments of the present invention;
[0050] Figure 3a The image shows the segmentation result of vitiligo using the medical image cross-domain segmentation method based on an adaptive frequency domain alignment network provided in this embodiment of the invention.
[0051] Figure 3b The image shows the retinal vessel segmentation results of the medical image cross-domain segmentation method based on an adaptive frequency domain alignment network provided in this embodiment of the invention. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0053] Example 1
[0054] To facilitate understanding of this embodiment, in conjunction with Figure 1 , Figure 2 This invention provides a detailed description of the cross-domain medical image segmentation method based on an adaptive frequency domain alignment network disclosed in this embodiment. The cross-domain medical image segmentation method based on an adaptive frequency domain alignment network provided in this embodiment includes:
[0055] S1. Obtain the source domain medical image set and the target domain medical image set, and preprocess the source domain medical image set and the target domain medical image set.
[0056] The source domain medical image set includes labeled medical images semantically similar to the target domain (such as ISIC 2018 dermatology images and Fundus-AVSeg fundus images), whose expression is: The target domain medical image set includes scarce labeled medical images to be segmented (such as VITILIGO2025 vitiligo images and DRIVE retinal vascular images), and its expression is: .
[0057] Based on this, in S1, preprocessing is performed on the source domain medical image set and the target domain medical image set, including:
[0058] S11. Unify the size of all medical images in the source domain medical image set and the target domain medical image set to [the specified size]. Pixel values normalized to .
[0059] S12. Perform data augmentation on all medical images in the source domain medical image set and the target domain medical image set.
[0060] Data augmentation includes random cropping, horizontal / vertical flipping enhancement, and color jittering. In this embodiment, color jittering is disabled for the vitiligo segmentation task.
[0061] S2. The Adaptive Frequency Alignment Network (AFDAN) model is trained based on the preprocessed source domain medical image set and target domain medical image set.
[0062] Among them, the AFDAN model is an adaptive frequency domain alignment network model.
[0063] Based on this, in S2, training the AFDAN model using the preprocessed source domain medical image set and target domain medical image set includes:
[0064] S21. Based on the source-target frequency domain fusion module, the source domain medical image set and the target domain medical image set are decomposed and recombined to obtain the initial frequency domain features.
[0065] The initial frequency domain features refer to the frequency domain features that are initially aligned with the target domain.
[0066] Based on this, in S21, the source domain medical image set and the target domain medical image set are decomposed and recombined using the source-target frequency domain fusion module to obtain initial frequency domain features, including:
[0067] S201. Based on the adaptive frequency domain alignment network, perform two-dimensional fast Fourier transform (FFT) on the source domain medical image set and the target domain medical image set, so that the source domain medical image set and the target domain medical image set can be decomposed into source domain frequency domain features and target domain frequency domain features.
[0068] The expressions for the source domain frequency domain features and the target domain frequency domain features are as follows:
[0069]
[0070]
[0071] In the formula, Source domain frequency domain characteristics; For the target domain frequency domain features, and These are the source domain amplitude spectrum and the target domain amplitude spectrum, respectively. and These are the source domain phase spectrum and the target domain phase spectrum, respectively. .
[0072] Among them, the source domain amplitude spectrum and target domain amplitude spectrum Used to carry semantic style information, source domain phase spectrum and target domain amplitude spectrum Used to carry spatial structure information.
[0073] S202. Use Gaussian filtering to separate the source domain amplitude spectrum in the source domain frequency domain features and the target domain amplitude spectrum in the target domain frequency domain features, and extract the low-frequency components in the source domain amplitude spectrum and the target domain amplitude spectrum respectively.
[0074] Among them, the low-frequency component in the source domain amplitude spectrum is The low-frequency components in the target domain amplitude spectrum are , and Both are the main carriers of stylistic differences between domains.
[0075] S203. A random weighting strategy is used to fuse the low-frequency components in the source domain amplitude spectrum and the target domain amplitude spectrum to construct a dense and continuous intermediate amplitude distribution between the source domain and the target domain, thus obtaining the fused low-frequency amplitude spectrum.
[0076] The expression for the low-frequency amplitude spectrum is:
[0077]
[0078] In the formula, These are uniformly distributed random mixing coefficients used to balance source domain style features and target domain style features.
[0079] S204. Retain the source domain phase spectrum, and reconstruct the low-frequency amplitude spectrum with the high-frequency components in the source domain amplitude spectrum and the source domain phase spectrum to obtain the initial frequency domain characteristics.
[0080] Here, preserving the source domain phase spectrum is to maintain the integrity of the anatomical / lesion structure; the expression for the initial frequency domain features is: .
[0081] S22. Based on the domain adversarial learning module, the initial frequency domain features are transformed into the final frequency domain features.
[0082] The domain adversarial learning module includes a generator G and a discriminator D. The generator G employs a three-layer convolutional neural network, and the source domain amplitude spectrum is input to the generator G. It can output the amplitude spectrum of the pseudo-target domain. Discriminator D employs a 2-layer convolutional architecture with sigmoid activation, and the true target domain amplitude spectrum is input into discriminator D. or pseudo-target domain amplitude spectrum It can output the probability that it belongs to the target domain. The final frequency domain feature refers to the frequency domain feature that is perfectly aligned with the target domain. The expression for the final frequency domain feature is: .
[0083] As a preferred implementation, a Dropout layer is added to both the generator G and the discriminator D to avoid overfitting. In this embodiment, the dropout rate is 0.1.
[0084] Based on this, in S22, the initial frequency domain features are transformed into final frequency domain features using the domain adversarial learning module, including:
[0085] S205. Define an adversarial loss function to constrain the adversarial training of generator G and discriminator D, so that generator G generates an amplitude spectrum consistent with the distribution of the target domain.
[0086] The expression for the amplitude spectrum consistent with the target domain distribution is:
[0087]
[0088] S206. Alternately iteratively optimize the generator G and the discriminator D. The generator minimizes the amplitude spectrum that is consistent with the distribution of the target domain to improve the domain camouflage capability of the pseudo-target domain amplitude spectrum, while the discriminator maximizes the amplitude spectrum that is consistent with the distribution of the target domain to enhance the domain differentiation capability.
[0089] The generator G and discriminator D converge after 50 alternating iterations.
[0090] S207. Input the initial frequency domain features into the optimized generator and output the final frequency domain features.
[0091] S23. Based on the spatial-frequency domain integration module, spatial features are extracted from the source domain medical image set and the target domain medical image set. Based on the spatial features and the final frequency domain features, fusion features are obtained. Based on the cross-domain attention module, the final segmentation features are generated according to the fusion features.
[0092] The spatial-frequency domain integration module includes a SegFormer backbone network and a cross-domain attention model.
[0093] Building upon this, in S23, spatial features are extracted from the source and target domain medical image sets using the spatial-frequency domain integration module. Fusion features are obtained based on the spatial features and the final frequency domain features. Finally, based on the cross-domain attention model, the final segmentation features are generated according to the fusion features, including:
[0094] S208. Input the source domain medical image set and the target domain medical image set into the SegFormer backbone network to extract spatial features, which can capture local details and semantic information of lesions.
[0095] The spatial features described herein have four scales (features are downsampled at different ratios in the backbone network; extracting multi-scale features can improve accuracy), and the expression for the spatial features is as follows:
[0096]
[0097] In the formula, B is the batch size. H represents the number of channels, and H and W represent the image dimensions. .
[0098] In this embodiment, since the backbone network downsamples features by different factors, the use of spatial features with multiple scales can improve accuracy.
[0099] S209. Perform bilinear interpolation resampling on the final frequency domain features according to the scale, so that the spatial size of the final frequency domain features is consistent with the spatial features of the corresponding scale, and the topological relationship of the feature space remains unchanged, to obtain the resampled spatial features.
[0100] The expression for the resampled spatial features is:
[0101]
[0102] S210. By stitching together spatial features and resampled spatial features of the same scale according to the channel dimension, a fused feature is obtained.
[0103] The expression for the fusion feature is:
[0104]
[0105] The expression for the number of channels in the fused feature is:
[0106]
[0107] S211. Input the fused features into the cross-domain attention model. After the fused features are processed by two layers of convolution and Sigmoid normalization, an initial spatial attention map is generated. The initial spatial attention map is then scaled to match the initial segmentation features using bilinear interpolation. Figure 1 The final spatial attention map is obtained by determining the exact dimensions.
[0108] The expression for the initial spatial attention map is:
[0109]
[0110] S212. By using the element-wise multiplication method (Hadamard product), the initial segmentation feature map is modulated using the final spatial attention map to enhance the lesion region features and suppress background noise, and the final segmentation feature map is output.
[0111] The expression for the final segmentation feature map is:
[0112]
[0113] In the formula, logits is the initial segmentation feature map, and A is the final segmentation feature map.
[0114] S3. Optimize the trained AFDAN model to obtain the final AFDAN model.
[0115] In S3, the trained AFDAN model is optimized to obtain the final AFDAN model, which includes:
[0116] S31. Establish Dice loss to constrain segmentation accuracy.
[0117] Among them, the Dice loss constrains segmentation accuracy and is suitable for imbalanced medical image categories. Its expression is:
[0118]
[0119] In the formula, i and j are pixel coordinates, P is the model prediction probability map, and G is the ground truth mask. To smooth the term, it avoids the denominator from approaching zero. In this embodiment, .
[0120] S32. Establish the total loss function based on the Dice loss constraint on segmentation accuracy.
[0121] The total loss function balances segmentation accuracy and domain alignment effectiveness, and its expression is:
[0122]
[0123] In the formula, This refers to the loss weighting coefficients for the amplitude spectrum that are consistent with the target domain distribution. In this embodiment, .
[0124] S33. By using the Adam optimizer to minimize the total loss function, the trained AFDAN model is optimized to obtain the final AFDAN model.
[0125] The training consists of 100 rounds, with model performance validated every 10 rounds. The model weights with the highest IoU on the validation set are saved. The learning rate of the Adam optimizer is set to... The batch size is 16.
[0126] S4. Based on the final AFDAN model, segmentation inference is performed on the target domain image to obtain high-precision medical image segmentation results.
[0127] In S4, segmentation inference is performed on the target domain medical image set based on the final AFDAN model, including:
[0128] S41. Input the target domain medical image set to be segmented into the final AFDAN model.
[0129] S42. The final AFDAN model executes step S2 and outputs the segmentation result.
[0130] The segmentation results include pixel-level segmentation masks.
[0131] S43. The segmentation results are evaluated using evaluation indicators to obtain high-precision medical image segmentation results.
[0132] The evaluation metrics include Intersection over Union (IoU), Dice similarity coefficient, precision, and recall.
[0133] To further verify the beneficial effects of the method provided in this embodiment, this embodiment will verify the performance of the final AFDAN model through experiments, as detailed below:
[0134] (I) Experimental Environment
[0135] In this embodiment, the experiment was conducted based on the PyTorch 1.18 deep learning framework, and the training / inference hardware was an NVIDIA RTX 4090 GPU (24GB VRAM).
[0136] The operating system is Ubuntu 20.04, and the Python version is 3.8.
[0137] Source Domain Medical Image Sets: ISIC 2018 (Vitiligo Segmentation Task, 2594 Annotated Skin Disease Images), Fundus-AVSeg (Retinal Vessel Segmentation Task, 100 Annotated Fundus Images);
[0138] Target domain medical image datasets: VITILIGO2025 (856 vitiligo images, pixel-level lesion annotation), DRIVE (40 fundus images, of which 20 fundus images are used for training and 20 fundus images are used for testing).
[0139] After preprocessing, the source domain medical image set and the target domain medical image set are uniformly sized to 640×640, and the pixel values are normalized to [0,1].
[0140] (II) Model Training Details
[0141] Model initialization: ImageNet pre-trained weights are used for the SegFormer backbone network in the Spatial-Frequency Integration (SFI) module, and He normal distribution random initialization is used for the generator / discriminator in the Domain Adversarial Learning (ADL) module.
[0142] Training phases are divided into: the first 50 rounds of pre-training source-target frequency domain fusion (STFF) module and domain adversarial learning (ADL) module, which only optimize frequency domain alignment-related parameters; the last 50 rounds of joint training space-frequency domain integration (SFI) module, which optimizes the parameters of the entire network.
[0143] Data augmentation strategies: Random cropping and horizontal / vertical flipping (probability 0.5) are used during the training phase; color jitter is disabled for the vitiligo segmentation task.
[0144] Regularization strategy: Add Dropout layers (dropout rate=0.1) to the generator G and discriminator D to avoid overfitting.
[0145] (III) Verification of Experimental Results
[0146] 1. Source domain validity verification
[0147] The SegFormer backbone network was trained based on a target domain medical image set: the IoU for vitiligo segmentation was 76.8%, and the IoU for retinal vessel segmentation was 78.1%.
[0148] The SegFormer backbone network was trained based on the source domain medical image set and the target domain medical image set: the IoU for vitiligo segmentation was 80.3% (+3.5%), and the IoU for retinal vessel segmentation was 76.5% (-1.6%).
[0149] The initial AFDAN model was trained based on the source domain medical image set and the target domain medical image set: vitiligo segmentation IoU was 90.9% (+14.1%), and retinal vessel segmentation IoU was 82.6% (+4.5%).
[0150] Verifying the source domain medical image set requires combining it with the cross-domain alignment module of this invention to effectively improve performance and avoid negative migration.
[0151] 2. Ablation experiment verification
[0152] Using the SegFormer backbone network as the baseline model, the contribution (IoU, %) of each module to performance is evaluated:
[0153] Table 1. Experimental data results of the domain generalization semantic segmentation method
[0154]
[0155] The results show that the STFF module, ADL module, and SFI module work together to significantly improve the model's cross-domain adaptability. Among them, the STFF module makes the most significant contribution to domain alignment, while the SFI module makes the most outstanding improvement to segmentation accuracy.
[0156] 3. Multi-model comparison and validation
[0157] On the VITILIGO2025 dataset, the final AFDAN model achieved an IoU of 90.9%, which is 2.4 percentage points higher than YOLO11 (88.5%) and 1.1 percentage points higher than the domain adaptive model DSTC-SSDA (89.8%).
[0158] On the DRIVE dataset, the AFDAN model achieved an IoU of 82.6%, which is 4.8 percentage points higher than YOLO11 (77.8%) and 2.4 percentage points higher than DSTC-SSDA (80.2%). The AFDAN model can accurately segment lesions with blurred boundaries and small retinal vessels, with significantly lower false negative and false positive rates than the comparison models.
[0159] like Figure 3a , 3b As shown in the figure, this image displays the visualization output of the AFDAN model in the tasks of vitiligo segmentation (first row) and retinal vessel segmentation (second row), where the predicted target regions (vitiligo lesions, retinal vessels) are highlighted in red (details can be more clearly distinguished in color mode). All visualization results are obtained based on the cross-domain training framework proposed in this paper—the model is trained with the assistance of source domain data, achieving high-precision segmentation of the target domain without relying on a large number of target task-specific annotations.
[0160] Combination Figure 3a, 3b As can be seen, the AFDAN model ultimately demonstrated excellent segmentation performance: In the vitiligo segmentation task, despite challenges such as complex background textures and blurred lesion boundaries, the model was still able to accurately capture the lesion edge contours, effectively covering the vast majority of the target area, with no obvious missed or false detections; In the retinal vessel segmentation task, facing the core challenge of identifying small and branching vessels in a monotonous background, the model successfully achieved complete segmentation of vessels of different thicknesses, ensuring accurate localization of main vessels and accurately capturing the morphological structure of delicate vessels, with few instances of vessel breakage or background misjudgment. The visualization results and quantitative indicators for both tasks were consistent, fully validating the reliability and robustness of the AFDAN model in complex medical scenarios.
[0161] Based on the above, the beneficial effects of this embodiment are as follows:
[0162] The STFF module focuses on the fusion of low-frequency components in the frequency domain, accurately aligning style differences between the source and target domains while preserving the structural information of the phase spectrum, thus avoiding anatomical / lesion structure distortion caused by cross-domain migration. The ADL module designs an adversarial learning strategy for the amplitude spectrum, targeting and eliminating semantic biases between domains, solving the negative transfer problem caused by "labeling space mismatch", and improving the efficiency of source domain knowledge transfer. The SFI module integrates the local detail advantages of spatial features with the global structural advantages of frequency domain features, dynamically enhancing lesion region features through attention modulation, significantly improving the segmentation accuracy of subtle lesions (such as microvessels and skin lesion edges).
[0163] Experimental results show that the present invention achieves an IoU of 90.9% on the VITILIGO2025 dataset and an IoU of 82.6% on the DRIVE dataset, which is significantly better than existing mainstream segmentation models and domain adaptation models. It has strong generalization ability and is suitable for various cross-domain segmentation scenarios of medical images.
[0164] Example 2
[0165] The medical image cross-domain segmentation device based on an adaptive frequency domain alignment network disclosed in this invention includes:
[0166] The dataset preprocessing unit is used to obtain the source domain medical image set and the target domain medical image set, and to preprocess the source domain medical image set and the target domain medical image set.
[0167] The model training unit is used to train the AFDAN model based on the preprocessed source domain medical image set and target domain medical image set.
[0168] The model optimization unit is used to optimize the AFDAN model to obtain the final AFDAN model.
[0169] The segmentation inference unit is used to perform segmentation inference on the target domain image based on the final AFDAN model to obtain high-precision medical image segmentation results.
[0170] It should be noted that the medical image cross-domain segmentation device based on adaptive frequency domain alignment network disclosed in this embodiment can realize all the contents of the medical image cross-domain segmentation method based on adaptive frequency domain alignment network provided in Embodiment 1, and will not be repeated here.
[0171] Example 3
[0172] A computing device disclosed in an embodiment of the present invention includes:
[0173] One or more processing units;
[0174] A storage unit is used to store one or more programs.
[0175] Wherein, when one or more programs are executed by one or more processing units, the one or more processing units are able to execute all the contents of the medical image cross-domain segmentation method based on adaptive frequency domain alignment network disclosed in Embodiment 1 of this application.
[0176] Example 4
[0177] The present invention discloses a computer-readable storage medium having processor-executable non-volatile program code.
[0178] When the computer program is executed by the processor, it can implement all the contents of the cross-domain segmentation method for medical images based on an adaptive frequency domain alignment network disclosed in Embodiment 1 of this application.
[0179] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0180] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A cross-domain segmentation method for medical images based on an adaptive frequency domain alignment network, characterized in that, include: S1. Obtain the source domain medical image set and the target domain medical image set, and preprocess the source domain medical image set and the target domain medical image set; S2. Train the AFDAN model based on the preprocessed source domain medical image set and target domain medical image set; S3. Optimize the trained AFDAN model to obtain the final AFDAN model; S4. Based on the final AFDAN model, segmentation inference is performed on the target domain image to obtain high-precision medical image segmentation results.
2. The medical image cross-domain segmentation method based on an adaptive frequency domain alignment network according to claim 1, characterized in that, Training the AFDAN model based on the preprocessed source domain medical image set and target domain medical image set includes: S21. Based on the source-target frequency domain fusion module, the source domain medical image set and the target domain medical image set are decomposed and recombined to obtain the initial frequency domain features; S22. Based on the domain adversarial learning module, the initial frequency domain features are transformed into the final frequency domain features; S23. Based on the spatial-frequency domain integration module, spatial features are extracted from the source domain medical image set and the target domain medical image set. Based on the spatial features and the final frequency domain features, fusion features are obtained. Based on the cross-domain attention module, the final segmentation features are generated according to the fusion features.
3. The medical image cross-domain segmentation method based on an adaptive frequency domain alignment network according to claim 2, characterized in that, Based on the source-target frequency domain fusion module, the source domain medical image set and the target domain medical image set are decomposed and recombined to obtain the initial frequency domain features, including: S201. Based on the adaptive frequency domain alignment network, perform two-dimensional fast Fourier transform on the source domain medical image set and the target domain medical image set, so that the source domain medical image set and the target domain medical image set can be decomposed into source domain frequency domain features and target domain frequency domain features. S202. Use Gaussian filtering to separate the source domain amplitude spectrum in the source domain frequency domain features and the target domain amplitude spectrum in the target domain frequency domain features, and extract the low-frequency components in the source domain amplitude spectrum and the target domain amplitude spectrum respectively. S203. A random weighting strategy is used to fuse the low-frequency components in the source domain amplitude spectrum and the target domain amplitude spectrum to construct a dense and continuous intermediate amplitude distribution between the source domain and the target domain, thus obtaining the fused low-frequency amplitude spectrum.
4. The medical image cross-domain segmentation method based on an adaptive frequency domain alignment network according to claim 2, characterized in that, The domain adversarial learning module includes a generator G and a discriminator D; Based on the domain adversarial learning module, the transformation of initial frequency domain features into final frequency domain features includes: S205. Define an adversarial loss function to constrain the adversarial training of generator G and discriminator D, so that generator G generates an amplitude spectrum consistent with the distribution of the target domain. S206. Alternately iteratively optimize the generator G and the discriminator D, and improve the domain camouflage capability of the pseudo-target domain amplitude spectrum by minimizing the amplitude spectrum that is consistent with the distribution of the target domain through the generator, and maximize the amplitude spectrum that is consistent with the distribution of the target domain through the discriminator to enhance the domain differentiation capability. S207. Input the initial frequency domain features into the optimized generator and output the final frequency domain features.
5. The medical image cross-domain segmentation method based on an adaptive frequency domain alignment network according to claim 2, characterized in that, The spatial-frequency domain integration module includes a SegFormer backbone network and a cross-domain attention model; Based on the spatial-frequency domain integration module, spatial features are extracted from the source domain medical image set and the target domain medical image set. Fusion features are obtained based on the spatial features and the final frequency domain features. Finally, based on the cross-domain attention model, the final segmentation features are generated according to the fusion features, including: S209. Perform bilinear interpolation resampling on the final frequency domain features according to the scale, so that the spatial size of the final frequency domain features is consistent with the spatial features of the corresponding scale, and the topological relationship of the feature space remains unchanged, to obtain the resampled spatial features. S210. By stitching together spatial features and resampled spatial features of the same scale according to the channel dimension, a fused feature is obtained; S211. Input the fusion feature into the cross-domain attention model. After the fusion feature is processed by two layers of convolution and Sigmoid normalization, it can generate an initial spatial attention map. The initial spatial attention map is scaled to the same size as the initial segmentation feature map by bilinear interpolation to obtain the final spatial attention map. S212. By using the element-wise multiplication method, the initial segmentation feature map is modulated using the final spatial attention map to enhance the lesion region features and suppress background noise, and the final segmentation feature map is output.
6. The medical image cross-domain segmentation method based on an adaptive frequency domain alignment network according to claim 4, characterized in that, Add Dropout layers to the generator G and discriminator D to avoid overfitting.
7. The medical image cross-domain segmentation method based on an adaptive frequency domain alignment network according to claim 1, characterized in that, The trained AFDAN model was optimized to obtain the final AFDAN model, which includes: S31. Establish Dice loss constraints to limit segmentation accuracy; S32. Establish the total loss function based on the Dice loss constraint on segmentation accuracy; S33. By using the Adam optimizer to minimize the total loss function, the trained AFDAN model is optimized to obtain the final AFDAN model.
8. A medical image cross-domain segmentation device based on an adaptive frequency domain alignment network, characterized in that, include: The dataset preprocessing unit is used to acquire source domain medical image sets and target domain medical image sets, and to preprocess the source domain medical image sets and target domain medical image sets. The model training unit is used to train the AFDAN model based on the preprocessed source domain medical image set and target domain medical image set; The model optimization unit is used to optimize the AFDAN model to obtain the final AFDAN model. The segmentation inference unit is used to perform segmentation inference on the target domain image based on the final AFDAN model to obtain high-precision medical image segmentation results.
9. An electronic device, characterized in that, It includes a communication interface, a processor, a memory, and a bus, wherein the communication interface, the processor, and the memory are interconnected via the bus; The memory stores machine-readable instructions, and the processor executes the steps of the method as described in any one of claims 1 to 7 by invoking the machine-readable instructions.
10. A computer-readable storage medium having processor-executable non-volatile program code, characterized in that, When the program code is executed by the processor, it implements the steps of the method as described in any one of claims 1 to 7.