Zero-shot cross-domain diffusion segmentation method based on anatomical structure probability transmission guidance

By constructing a dual-stream collaborative learning framework and hierarchical probabilistic structure transmission, the performance degradation problem of traditional medical image segmentation models in cross-domain scenarios is solved, achieving zero-shot cross-domain segmentation, improving segmentation accuracy and robustness, and adapting to the medical image segmentation needs of different devices and modalities.

CN121121104BActive Publication Date: 2026-04-17BEIJING ZHENXINGDA TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING ZHENXINGDA TECHNOLOGY CO LTD
Filing Date
2025-08-27
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Traditional medical image segmentation models suffer from performance degradation in cross-domain scenarios. Existing methods cannot achieve true zero-shot generalization, and are particularly difficult to apply effectively under significant appearance differences between different devices and modalities.

Method used

We employ a zero-shot cross-domain diffusion segmentation method guided by anatomical structure probabilistic transport. By constructing a two-stream collaborative learning framework, we utilize a shared structure encoder, anatomical decoder, and image appearance decoder, combined with anatomical loss and structural loss for training, to achieve zero-shot cross-domain segmentation. We then use hierarchical probabilistic structure transport to dynamically guide the back-diffusion process.

Benefits of technology

It achieves zero-sample cross-domain segmentation, reduces data acquisition and model iteration costs, improves segmentation accuracy and structural fidelity, enhances model robustness and interpretability, and adapts to different clinical scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121121104B_ABST
    Figure CN121121104B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of medical image processing, and discloses a zero-sample cross-domain diffusion segmentation method based on anatomical structure probability transmission guidance. The method constructs a double-flow collaborative learning framework, extracts multi-scale features through a shared structure encoder, learns unconditioned anatomy prior through an anatomical decoder, strengthens modal-independent structure perception through an image appearance decoder, and realizes appearance and structure decoupling. In the reasoning stage, a hierarchical probability structure transmission (H-PST) mechanism is introduced, multi-scale features are extracted from unknown target domain images and masks in the generation process, a slice Wasserstein distance is used to measure the structure distribution difference, and a gradient is used as a structure transmission force to dynamically guide the reverse diffusion, so that the general anatomical prior is refined into a segmentation mask aligned with the target image. The application can realize cross-modal / equipment zero-sample segmentation without target domain data, improve accuracy, structure fidelity, robustness and interpretability, and reduce clinical deployment cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical image processing technology, and more specifically to a zero-sample cross-domain diffusion segmentation method based on anatomical structure probability transfer guidance. Background Technology

[0002] Medical images exhibit significant appearance differences across different devices, protocols, and modalities (such as CT, MRI, and PET), causing traditional supervised learning-based segmentation models to experience a sharp decline in performance in cross-domain scenarios. Existing methods, such as unsupervised domain adaptation (UDA) and image style transfer, rely on target domain data or introduce structural distortions, failing to achieve true zero-shot generalization.

[0003] Based on this, the present invention proposes a zero-sample cross-domain diffusion segmentation method guided by anatomical structure probability transmission to solve the above problems. Summary of the Invention

[0004] To overcome the aforementioned deficiencies of the prior art, this invention provides a zero-sample cross-domain diffusion segmentation method based on anatomical structure probability transmission guidance, in order to solve the problems existing in the background art.

[0005] This invention provides the following technical solution: a zero-sample cross-domain diffusion segmentation method based on anatomical structure probability transfer guidance, comprising the following steps:

[0006] S1. Construct a dual-stream collaborative learning framework: Design a noise prediction network that includes a shared structure encoder, an anatomical decoder, and an image appearance decoder. A stream selector controls the input of noisy data to the corresponding decoder. The shared structure encoder is used to map the input noisy data to multi-scale latent features. The anatomical decoder is used to reconstruct the anatomical structure from the latent features and predict mask noise. The image appearance decoder is used to reconstruct the image texture intensity from the latent features and predict image noise.

[0007] S2. Training the Anatomical Prior and Structure-Aware Model: Dual-stream collaborative training is performed using the source domain dataset. This includes generating noisy data by adding noise to the source domain image and segmentation mask; calculating the anatomical loss through the anatomical prior learning stream composed of the shared structure encoder and the anatomical decoder to learn the unconditional segmentation mask generation prior; and calculating the structural loss through the structure-aware learning stream composed of the shared structure encoder and the image appearance decoder to train the shared structure encoder to learn modality-independent structural information. The anatomical loss is the weighted average square error of the predicted noise of the noisy mask and the original Gaussian noise, and the structural loss is the weighted average square error of the predicted noise of the noisy image and the original Gaussian noise. The network parameters are optimized based on the weighted sum of the anatomical loss and the structural loss.

[0008] S3. Zero-shot inference and hierarchical probabilistic structure transfer: For an unknown target domain image, a dynamically guided backdiffusion process is performed, including initializing a pure noise mask and setting a diffusion time step, adding noise to the target image to match the noise level of the current time step, and extracting features through dual-path parallel processing: extracting multi-scale structural features of the target image from the noisy target image through the intermediate layer of the image appearance decoder, and extracting intermediate anatomical structural features of the current noisy mask from the intermediate layer of the anatomical decoder. The slice Wasserstein distance is used to measure the difference of multi-level features, and the weighted sum of the multi-level slice Wasserstein distances is used to construct the guided loss. The structure transfer force is generated based on the gradient of the guided loss. The noisy mask is updated to the previous time step by combining the unguided noise prediction and the structure transfer force. After iterating through all time steps, the generated results are post-processed to obtain the segmentation mask.

[0009] As a further aspect of the present invention: in step S1, the noise prediction network is a U-Net-based network architecture, the shared structure encoder corresponds to the downsampling path of U-Net, the dissection decoder and the image appearance decoder correspond to the upsampling path of U-Net, and the output layer parameters of the dissection decoder and the image appearance decoder are set independently.

[0010] As a further aspect of the present invention: In step S2, the process of adding noise to the source domain image and the segmentation mask follows the DDPM forward diffusion process, specifically as follows:

[0011]

[0012] in, and These are a noisy mask and a noisy image, respectively. and These are the original segmentation mask and the source domain image, respectively. For noise dispatch coefficient, and It is Gaussian noise.

[0013] As a further aspect of the present invention: in step S2, the formula for calculating the anatomical loss is:

[0014]

[0015] in, To share structure encoder parameters, For the parameters of the dissection decoder, For the loss weight function, For expectation operator, Original Gaussian noise, For the noise prediction network output, For noisy masking, For time steps, This represents the anatomical prior learning flow. This indicates the mean square error.

[0016] As a further aspect of the present invention: in step S2, the formula for calculating the structural loss is:

[0017]

[0018] in, For image appearance decoder parameters, The original Gaussian noise, For noisy images, This represents the structure-aware learning flow.

[0019] As a further aspect of the present invention: in step S3, the dual-path parallel feature extraction specifically includes: extracting a multi-scale structural feature set from the noisy target image through the intermediate layer of the image appearance decoder. Multi-scale anatomical feature sets are extracted from the current noisy mask through the intermediate layer of the dissection decoder. .

[0020] As a further aspect of the present invention: in step S3, the probability distribution distance is the slice Wasserstein distance (SWD), used to measure the distribution difference of the corresponding level feature maps, and the calculation formula is:

[0021]

[0022] in, and For the feature map of the corresponding level, For random projection direction, for 1-dimensional hypersphere and The flattened feature vectors The distance is Wasserstein-2.

[0023] As a further aspect of the present invention: in step S3, the guiding loss is a weighted sum of the distances of multiple probability distributions, calculated using the following formula:

[0024]

[0025] in, For hierarchical weights, The number of feature levels, For the target domain image.

[0026] As a further aspect of the present invention: in step S3, the structural transmission force is the gradient of the guiding loss with respect to the current noisy mask, that is: .

[0027] The technical effects and advantages of this invention are as follows:

[0028] (1) Achieve zero-sample cross-domain segmentation. Through the "prior learning and reasoning-guided separation" paradigm, it can be directly applied to unknown modalities or devices without target domain data, which greatly reduces the cost of data collection, annotation and model iteration, and improves the scalability of clinical deployment.

[0029] (2) Improve the accuracy of unknown domain segmentation and structural fidelity. Dual-stream collaborative learning decouples appearance and structure. The H-PST mechanism guides through multi-scale feature distribution, avoids artifact accumulation and alignment failure, and ensures high accuracy and fidelity of dissected topology and boundaries.

[0030] (3) Enhance robustness and interpretability. H-PST is based on differentiable optimal transmission metric and is not sensitive to modal noise. The segmentation process is decomposed into "prior generation-structure guidance", the decision is interpretable, and it is convenient for model debugging.

[0031] (4) Provides a flexible and controllable reasoning process. H-PST includes adjustable parameters such as guidance intensity and hierarchical weight, which can balance the rationality of the anatomy and the fit of the target, and adapt to the needs of clinical scenarios such as lesions. Attached Figure Description

[0032] The invention will now be further described with reference to the accompanying drawings.

[0033] Figure 1 This is a flowchart illustrating the overall architecture of the present invention;

[0034] Figure 2 Flowchart of the dual-stream collaborative learning framework;

[0035] Figure 3 Flowchart for hierarchical probability structure transmission guidance;

[0036] Figure 4 Flowchart for zero-sample inference;

[0037] Figure 5 This is a schematic diagram of the cross-modal segmentation results of zero-sample brain tumors in Example 2;

[0038] Figure 6 This is a schematic diagram of the zero-sample DSA segmentation results in Example 3. Detailed Implementation

[0039] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. These embodiments are only used to explain the present invention and are not intended to limit the scope of protection of the present invention.

[0040] Example 1: This example is used to provide a detailed description of the technical solution of the present invention:

[0041] Model Architecture

[0042] We design a unified noise prediction network based on U-Net. Its parameter set is The network contains three core components: a shared structural encoder. The parameters are This encoder is responsible for mapping the noisy input data (whether it's an image or a mask) to a series of multi-scale latent features. An anatomical decoder... The parameters are This decoder is specifically designed to reconstruct the anatomical structure from latent features, i.e., predict the noise added to the clean mask. An image appearance decoder. The parameters are This decoder is specifically responsible for reconstructing image texture and intensity from latent features, i.e., predicting the noise added to the clean image. Therefore, the total parameter set is... The network input is a tuple. ,in In time step Noisy data, and It is a binary stream selector used to indicate whether the current stream being processed is an anatomical stream. ) or image stream ( ).according to The value of the encoder The output will be routed to the corresponding decoder. or .

[0043] Dual-stream collaborative training process

[0044] We utilize the source domain dataset Training was conducted, among which It is a source domain image. This corresponds to a multi-class or single-class segmentation mask. The training objective is to simultaneously optimize two parallel denoising tasks. For each training sample... :

[0045] We first sample a uniform time step. and two independent Gaussian noises .

[0046] According to the standard DDPM forward process We generate noisy masks and images:

[0047]

[0048] in These are predefined noise scheduling coefficients. , These represent the original, noise-free segmentation mask and the image, respectively. , It is Gaussian noise sampled from a standard normal distribution, with the same size as the original data. It is a predefined noise scheduling coefficient whose value gradually decreases from close to 1 (when t is small) to close to 0 (when t is large) with time step t.

[0049] Next, we calculate the losses in two parallel steps:

[0050] Anatomy Prior Learning Stream We will use a noisy mask. The data is fed into the model, with the goal of predicting noise. This only activated the path. .

[0051]

[0052] The corresponding loss function is the dissection loss. It forces the model to learn a powerful, unconditional segmentation mask generator. :

[0053]

[0054] in It is an optional loss weight function. This indicates the representation of all possible primitive masks. ,noise The expected value is calculated at time step t, which means calculating the average loss over the entire training dataset and all noisy steps. This indicates the mean square error.

[0055] StructurePerceptionLearningStream We will add noisy images The data is fed into the model, with the goal of predicting noise. This activated the path. .

[0056]

[0057] The corresponding loss function is structural loss. Its core purpose is not to generate high-quality images, but rather to serve as a powerful self-supervised task, forcing a shared encoder. and image decoder Learn low-level structural information in images that is independent of mode (such as edges, contours, and region homogeneity).

[0058]

[0059] The overall training objective is the weighted sum of these two losses:

[0060]

[0061] We jointly update the parameters of the entire model by optimizing this total loss. Hyperparameters This balances the importance of the two tasks. The brilliance of this collaborative training lies in sharing the encoder to minimize both losses simultaneously. It is forced to learn a more general and decoupled feature representation that can both capture the abstract geometry of anatomical shapes and understand the intrinsic structure of images. It learns not "this is what an MRI T1 liver looks like," but rather more fundamental structural descriptions such as "an ellipsoidal object with smooth boundaries and uniform internal texture." This lays a solid foundation for zero-shot generalization.

[0062] Part Two: Zero-Shot Inference and Hierarchical Probabilistic Structure Transfer

[0063] Once training is complete, we will have a powerful anatomical prior generator. A keen image structure perceptron During the inference phase, given an image from a completely unknown target domain... Our goal is to utilize Generate its segmentation mask. The core challenge here is: how to... How can information be effectively passed to a generative model that has never seen it before? Our answer is Hierarchical Probabilistic Structure Transfer (H-PST).

[0064] H-PST is a dynamic guidance mechanism that is executed at each step of backdiffusion. It does not rely on any fixed conditional inputs, but instead "sculpts" the generation process in real time by calculating the distance between the "structure distribution" of the intermediate state in the generation process and the "structure distribution" of the target image, and using the gradient of that distance.

[0065] 2.1. Core mechanism of dynamic boot: H-PST

[0066] The entire reasoning process is a process that starts from pure noise. Start by gradually denoising and generating. A reverse Markov chain. At each time step from arrive During the conversion, we perform the following sophisticated bootstrapping steps:

[0067] Step A: Dual-path parallel feature extraction

[0068] At time step We have the current mask to be denoised. and the given target image .

[0069] Target image structural feature extraction: We first extract the target image Simulation spread to the same time step , to match The noise level is crucial for comparing the structures of the two:

[0070]

[0071] Then we will The image stream input into our trained model (i.e.) However, we don't care about the final noise prediction. Instead, we intercept and collect the image decoder. A series of layers in the middle The output feature maps. These feature maps represent image structural information at different scales and levels of abstraction. We denote this feature set as... :

[0072]

[0073] in The table represents the set of multi-scale feature maps extracted from the target image stream at time step t. It is an abstract representation, meaning from the decoder of the model. Extract the activations (i.e. feature maps) of intermediate layers from the specified set of layers L. This is the result of the encoder processing the noisy target image. Importantly, this process takes place within the `torch.no_grad()` context because it only provides the guiding target and does not participate in gradient calculation.

[0074] Nascent anatomical feature extraction: Simultaneously, we will extract the current denoising mask. Input into the model's anatomical flow (i.e. Similarly, we start from the anatomical decoder. same level Extract the corresponding intermediate feature maps. These feature maps represent... The anatomical structure of nascent that is currently "emerging" at this stage. We denote this feature set as... :

[0075]

[0076] in This represents the set of multi-scale feature maps extracted from the generated mask stream at time step t. The structure of this formula is similar to that for extracting image features, but the input is a noisy mask. And features from the anatomical decoder Extracted from.

[0077] This process requires tracking about The gradient is because this is the variable we are guiding.

[0078] Step B: Measurement and Transmission of Structural Distribution

[0079] We now have two sets of feature maps at the same semantic level but from different data sources (nascentmask vs. targetimage). Our goal is to... The structural distribution is as close as possible to The structural distribution of features. We do not use simple L1 or L2 distances because they only compare the mean of features, ignoring their rich intrinsic geometry. We employ the Sliced ​​Wasserstein Distance (SWD), a computationally efficient and differentiable approximation of the optimal transmission distance. For each pair of feature maps corresponding to different levels... We consider them as two point clouds (each pixel is a point cloud). (Eigenvectors of the dimensionality). SWD works by projecting these two high-dimensional distributions onto a large number of random one-dimensional lines and then calculating the mean of the Wasserstein-2 distances between these one-dimensional projected distributions.

[0080]

[0081] in This represents calculating the slice Wasserstein distance between two sets of feature maps $G_{l_i}$ and $F_{l_i}$. and It is the flattened feature vector. It is a random projection direction. In practice, we sample... The desired outcome is approximated by a projection direction. This represents randomly sampling a projection direction from a C-1 dimensional unit hypersphere (i.e., the set of all C-dimensional unit vectors). . and This represents each C-dimensional feature vector in the feature map. or Projected into a one-dimensional direction The result is a scalar value. This represents the calculation of the Wasserstein-2 distance between two one-dimensional distributions (consisting of all projected points).

[0082] Step C: Construction of H-PST guided loss and gradient calculation

[0083] We sum the SWD distances from all levels using weighted averages to form the total H-PST guiding loss. Weights It can be used to control the importance of structures at different scales (for example, focusing more on coarse structures at low resolution in the early stages of denoising, and more on fine boundaries at high resolution in the later stages).

[0084]

[0085] in It is the guiding loss function of Hierarchical Probabilistic Structure Transport (H-PST). The weights represent the weights of the i-th layer, used to adjust the importance of structural information at different scales (levels) in the guidance process.

[0086] This loss function is fully differentiable. Now, the most crucial step is to calculate this guiding loss with respect to the variable we want to manipulate—the noisy mask. The gradient of ——. This gradient vector Intuitively, it points to the method that can reduce [the problem] most quickly. Structure and The direction of the differences between structures.

[0087]

[0088] Formula explanation: Where For structural force transmission, This indicates the calculation of the H-PST guidance loss function. Regarding the current noisy mask The gradient. This gradient vector indicates... How should we fine-tune it to make its internal structural features approximate the target image as quickly as possible? Structural features.

[0089] This gradient is our structure transport force, which will... The evolutionary trajectory shifted from purely anatomical a priori "pulling" towards... A path with a consistent structure.

[0090] Step D: Guided Backsampling

[0091] We now have two forces to decide. The form: one is the "internal driving force" from the anatomical prior model itself, driven by unguided noise prediction. The other force is the "external traction force" from the target image, transmitted through the structure. This is reflected in our approach. We draw inspiration from the concept of classifier-free guidance and combine the two.

[0092] Modified guided noise prediction The calculation is as follows:

[0093]

[0094] Here It is a step over time The variable guidance strength scalar. It controls how well we follow the structure of the target image. It is a theoretically reasonable scaling factor used to balance the magnitude of noise prediction and gradient guidance.

[0095] Finally, we use this guided noise prediction. To perform standard DDPM or DDIM sampling procedures and calculate Using the DDIM sampling formula:

[0096]

[0097]

[0098] in Controlling the randomness of sampling, This is the core update step of the DDIM sampler, used to calculate the mask of the previous time step. .

[0099] By from arrive Through this iterative process, we finally obtain It is a system that conforms to general anatomical principles (by...) (ensuring), and structurally related to the target domain image. Precisely aligned segmentation results. Finally, for... The final discrete mask can be obtained by performing thresholding or argmax operation.

[0100] The present invention will be described below with reference to specific embodiments.

[0101] Example 2: Zero-sample cross-modal segmentation of brain tumors based on APPT-Seg

[0102] This embodiment aims to illustrate how to apply the present invention to train on a dataset containing only T1-weighted contrast-enhanced (T1-Gd) MRI scans and their segmentation labels, and then perform accurate brain tumor segmentation on FLAIR MRI scans from completely different modalities without any additional training or data.

[0103] Step 1: System Environment and Model Construction

[0104] Hardware environment: This embodiment is executed on a server equipped with an NVIDIA A100 80GB GPU.

[0105] Software environment: Operating system is Ubuntu 20.04, deep learning framework is PyTorch 1.12, CUDA version is 11.6.

[0106] Model architecture instantiation:

[0107] Noise prediction network The architecture is based on U-Net, with a backbone network depth of 4 layers and the number of channels starting from 64, doubling with each layer, i.e. [64, 128, 256, 512].

[0108] Shared encoder This corresponds to the downsampling path in U-Net. Each downsampling block contains two convolutional layers (3x3 convolution, GroupNorm, SiLU activation) and one max pooling layer.

[0109] Anatomical Decoder and image appearance decoder This corresponds to the upsampling path of U-Net. They share the same upsampling structure, with each upsampling block containing a transposed convolution, a skip-connection to the features of the corresponding layer in the encoder, and two convolutional blocks. To achieve expert decoding, the last convolutional layer (output layer) of both decoders uses independent parameters.

[0110] During forward propagation, the stream selector c is embedded as an additional condition into the time-step (t) embedding vector of each convolutional block to guide the computation flow to the correct decoder output layer. The input image and mask size are preprocessed to a uniform 256x256 pixels.

[0111] Step 2: Model Training

[0112] Training data: The publicly available BraTS2029 dataset was used. Source domain data. T1-Gd weighted image ( ) and its corresponding multi-class tumor segmentation mask ( The mask is composed of multiple channels, each channel representing a tumor subregion (such as necrotic core, enhancing tumor, etc.).

[0113] Training parameter settings:

[0114] Total diffusion steps .

[0115] Noise scheduling uses a linear betaschedule, from arrive .

[0116] The optimizer uses AdamW with a learning rate of The weight decays to 0.01.

[0117] Set the batch size (BatchSize) to 8.

[0118] Structural loss weights Set it to 0.1 to ensure that the model focuses its main efforts on learning anatomical priors while gaining sufficient structural awareness.

[0119] Training process:

[0120] from Randomly sample a batch .

[0121] For each sample in the batch, a time step is randomly sampled. .

[0122] Generate a noisy image based on the forward process formula. and noisy mask .

[0123] Anatomical prior learning: Input Model Noise prediction is obtained. ,calculate .

[0124] Structure-aware learning: Input Model Noise prediction is obtained. ,calculate .

[0125] Calculate total loss .

[0126] Perform backpropagation and update model parameters .

[0127] Repeat this process until the model converges, for example, by training for 200 epochs.

[0128] Step 3: Zero-Shot Reasoning and Guidance

[0129] Inference input: Given a FLAIR MRI brain scan image from an unknown domain that has not been trained in any way. The dimensions are also 256x256.

[0130] Inference initialization: Sample a pure noise tensor from a standard normal distribution. .

[0131] Iterative denoising and guidance (from) arrive ):

[0132] A. Parallel feature extraction:

[0133] Target features: Target image Add noise The image stream input to the model ( From the image decoder. Intermediate feature maps are extracted from the outputs of the three upsampling blocks, denoted as... .

[0134] nascent feature: the current mask to be denoised Anatomical flow input to the model ( From the anatomical decoder. Extract intermediate feature maps from the same three locations, denoted as .

[0135] B. Structural distribution measure:

[0136] For each pair of feature maps corresponding to the level The slice Wasserstein distance (SWD) is approximated using 512 random projection directions.

[0137] CH-PST Loss and Gradient:

[0138] Sum the SWD distances of all three levels to obtain the total guidance loss. In this embodiment, all levels of weights Set it to 1.

[0139] Automatic differentiation calculates the loss with respect to gradient .

[0140] D. Guided backsampling:

[0141] First, calculate the unguided noise prediction. .

[0142] Then, calculate the noise after guidance. Guiding strength Set it to a constant of 2.0.

[0143] Using the DDIM sampler, according to calculate To accelerate inference, the total number of sampling steps is set to 100.

[0144] Post-processing of results:

[0145] After the iteration is complete, the generated continuous value mask is obtained. .

[0146] right The Sigmoid function is applied to each channel, and binarization is performed with a threshold of 0.5 to obtain the final segmentation result.

[0147] Example 3: Zero-sample MRA to DSA brain vessel segmentation based on APPT-Seg

[0148] This embodiment aims to illustrate how to apply the present invention to train on a dataset containing only brain magnetic resonance angiography (MRA) and its vessel segmentation labels, and then perform accurate brain vessel segmentation on two-dimensional digital subtraction angiography (DSA) images from completely different imaging principles without any additional training or data.

[0149] Step 1: System Environment and Model Construction

[0150] Hardware and software environment: Same as in Example 1, using a server equipped with an NVIDIA A100 GPU and the PyTorch framework.

[0151] Model architecture instantiation:

[0152] Noise prediction network The U-Net architecture is adopted. Considering that blood vessel structures are usually delicate and complex, the input image and mask size are uniformly preprocessed to 512x512 pixels to preserve high-frequency details.

[0153] The U-Net backbone network is set to a depth of 5 layers to provide richer multi-scale feature representations, and the number of channels is set to [64, 128, 256, 512, 1024].

[0154] Shared encoder Anatomical decoder and image appearance decoder The structure and basic principle are consistent with the aforementioned embodiments, with the activation path controlled by a flow selector c. Since vessel segmentation is a single-class task, the model's input / output mask channel count is 1.

[0155] Step 2: Model Training

[0156] Training data: A public or internal 3D Time-of-Flight (TOF) MRA dataset is used. Source domain data. 2D axial slices extracted from 3DMRA volume ( ) and its corresponding binary blood vessel segmentation mask ( It consists of ) . In the mask, a pixel value of 1 represents a blood vessel, and 0 represents the background.

[0157] Training parameter settings:

[0158] Total diffusion steps A linear beta schedule is used.

[0159] The optimizer uses AdamW with a learning rate of .

[0160] The batch size is set to 4 to accommodate high-resolution inputs of 512x512.

[0161] Structural loss weights Setting it to 0.2 appropriately increases the emphasis on image structure perception, which helps the model learn more general linear and tubular structural features.

[0162] Training process:

[0163] from Randomly sample a batch of MRA slices ( ) and vascular mask ( ).

[0164] For each sample in the batch, the random sampling time step Generate noisy and .

[0165] Anatomical prior learning ( ):Will Input model, predict noise ,calculate This process forces the model to learn a strong generative prior about "vascular morphology" (such as bifurcation, tortuosity, and tubular continuity).

[0166] Structure-aware learning ( ):Will Input model, predict noise ,calculate This process enables the shared encoder to learn to identify underlying patterns related to vascular structures in MRA images.

[0167] Calculate total loss And update the model parameters .

[0168] Repeat this process until the model's performance converges on the validation set.

[0169] Step 3: Zero-Shot Reasoning and Guidance

[0170] Inference Input: Given a clinical, untrained 2D cerebral vascular DSA image. The image size is 512x512. DSA images are typically subjected to background subtraction to primarily highlight blood vessels filled with contrast agent.

[0171] Inference initialization: Sample a pure noise tensor from a standard normal distribution. .

[0172] Iterative denoising and guidance (from) arrive ):

[0173] A. Parallel feature extraction:

[0174] Target features: Target DSA image Add noise The image stream input to the model ( From the image decoder. Intermediate feature maps are extracted from the outputs of all four upsampling blocks to form a feature set. .

[0175] nascent feature: the current mask to be denoised Anatomical flow input to the model ( From the anatomical decoder Extracting feature sets from the same location .

[0176] B. Structural distribution measure:

[0177] For each pair of feature maps at corresponding levels, 1024 random projection directions are used to approximate its slice Wasserstein distance (SWD) to more accurately capture the distribution of fine vascular structures.

[0178] CH-PST Loss and Gradient:

[0179] Innovative Application (Targeted Weighting): Considering the extreme dependence of vessel segmentation tasks on high-frequency details, this embodiment assigns fixed but differentiated weights to the guiding loss at different levels. Feature layers closer to the output and with higher resolution in the decoder receive higher weights for their SWD distance. For example, the weights from the deepest to the shallowest layer can be set to... This forces the model to prioritize aligning fine blood vessel boundaries and capillaries during the generation process.

[0180] Calculate the weighted total guiding loss and its related gradient .

[0181] D. Guided backsampling:

[0182] Calculate unguided noise and post-guided noise Guiding strength Set it to a high constant, such as 4.0, to strongly ensure that the generated vascular structures strictly follow the visible paths in the DSA images.

[0183] Using the DDIM sampler and setting 150 sampling steps, a balance is struck between inference speed and segmentation accuracy.

[0184] Post-processing of results:

[0185] After the iteration is complete, the generated continuous value blood vessel probability map is obtained. .

[0186] right The final binary blood vessel segmentation mask is generated by applying the Sigmoid function and binarizing with a threshold of 0.5. Optionally, morphological post-processing (such as removing small connected components) can be applied to further improve the smoothness and accuracy of the results.

[0187] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A zero-sample cross-domain diffusion segmentation method based on anatomical structure probability transfer guidance, characterized in that, Includes the following steps: S1. Construct a dual-stream collaborative learning framework: Design a noise prediction network that includes a shared structure encoder, an anatomical decoder, and an image appearance decoder. A stream selector controls the input of noisy data to the corresponding decoder. The shared structure encoder is used to map the input noisy data to multi-scale latent features. The anatomical decoder is used to reconstruct the anatomical structure from the latent features and predict mask noise. The image appearance decoder is used to reconstruct the image texture intensity from the latent features and predict image noise. S2. Training the Anatomical Prior and Structure-Aware Model: Dual-stream collaborative training is performed using the source domain dataset. This includes generating noisy data by adding noise to the source domain image and segmentation mask; calculating the anatomical loss through the anatomical prior learning stream composed of the shared structure encoder and the anatomical decoder to learn the unconditional segmentation mask generation prior; and calculating the structural loss through the structure-aware learning stream composed of the shared structure encoder and the image appearance decoder to train the shared structure encoder to learn modality-independent structural information. The anatomical loss is the weighted average square error of the predicted noise of the noisy mask and the original Gaussian noise, and the structural loss is the weighted average square error of the predicted noise of the noisy image and the original Gaussian noise. The network parameters are optimized based on the weighted sum of the anatomical and structural losses. S3. Zero-shot inference and hierarchical probabilistic structure transfer: For an unknown target domain image, a dynamically guided backdiffusion process is performed, including initializing a pure noise mask and setting a diffusion time step, adding noise to the target image to match the noise level of the current time step, and extracting features through dual-path parallel processing: extracting multi-scale structural features of the target image from the noisy target image through the intermediate layer of the image appearance decoder, and extracting intermediate anatomical structural features of the current noisy mask from the intermediate layer of the anatomical decoder. The slice Wasserstein distance is used to measure the difference of multi-level features, and the weighted sum of the multi-level slice Wasserstein distances is used to construct the guided loss. The structure transfer force is generated based on the gradient of the guided loss. The noisy mask is updated to the previous time step by combining the unguided noise prediction and the structure transfer force. After iterating through all time steps, the generated results are post-processed to obtain the segmentation mask.

2. The zero-sample cross-domain diffusion segmentation method based on anatomical structure probability transfer guided by claim 1, characterized in that: In step S1, the noise prediction network is a U-Net-based network architecture, the shared structure encoder corresponds to the downsampling path of U-Net, the dissection decoder and the image appearance decoder correspond to the upsampling path of U-Net, and the output layer parameters of the dissection decoder and the image appearance decoder are set independently.

3. The zero-sample cross-domain diffusion segmentation method based on anatomical structure probability transfer guided by claim 1, characterized in that: In step S2, the process of adding noise to the source domain image and segmentation mask follows the DDPM forward diffusion process, specifically as follows: in, and These are a noisy mask and a noisy image, respectively. and These are the original segmentation mask and the source domain image, respectively. For noise dispatch coefficient, and It is Gaussian noise.

4. The zero-sample cross-domain diffusion segmentation method based on anatomical structure probability transfer guided by claim 1, characterized in that: In step S2, the formula for calculating the anatomical loss is: in, To share structure encoder parameters, For the parameters of the dissection decoder, For the loss weight function, For expectation operator, Original Gaussian noise, For the noise prediction network output, For noisy masking, For time steps, This represents the anatomical prior learning flow. This indicates the mean square error.

5. The zero-sample cross-domain diffusion segmentation method based on anatomical structure probability transfer guided by claim 4, characterized in that: In step S2, the formula for calculating the structural loss is: in, For image appearance decoder parameters, The original Gaussian noise, For noisy images, This represents the structure-aware learning flow.

6. The zero-sample cross-domain diffusion segmentation method based on anatomical structure probability transfer guided by claim 1, characterized in that: In step S3, the dual-path parallel feature extraction specifically includes: extracting a multi-scale structural feature set from the noisy target image through the intermediate layer of the image appearance decoder. Multi-scale anatomical feature sets are extracted from the current noisy mask through the intermediate layer of the dissection decoder. .

7. The zero-sample cross-domain diffusion segmentation method based on anatomical structure probability transfer guided by claim 4, characterized in that: In step S3, the probability distribution distance is the slice Wasserstein distance (SWD), which is used to measure the distribution difference of the feature maps at the corresponding level. The calculation formula is as follows: in, and For the feature map of the corresponding level, For random projection direction, for 1-dimensional hypersphere and The flattened feature vectors The distance is Wasserstein-2.

8. The zero-sample cross-domain diffusion segmentation method based on anatomical structure probability transfer guided by claim 7, characterized in that: In step S3, the guiding loss is a weighted sum of the distances of the multi-level probability distributions, calculated using the following formula: in, For hierarchical weights, The number of feature levels, For the target domain image.

9. The zero-sample cross-domain diffusion segmentation method based on anatomical structure probability transfer guided by claim 8, characterized in that: In step S3, the structural transmission force is the gradient of the guiding loss with respect to the current noisy mask, that is: .

Citation Information

Patent Citations

  • Image processing method based on few-sample learning and related equipment

    CN116310008A

  • Semi-supervised segmentation method based on potential diffusion model and multi-level context cross consistency

    CN116958554A