Spine image generation method and device based on scale enhanced diffusion model and bidirectional diffusion model
By combining the scale-enhanced diffusion model with the Brownian bridge bidirectional diffusion model, the problems of unstable image generation quality and data scarcity in the early screening of adolescent idiopathic scoliosis were solved, realizing low-cost, radiation-free large-scale screening and constructing a secure data resource to support model training and validation.
Patent Information
- Application Number
- CN202511904005.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-17
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2045-12-17
AI Technical Summary
Existing technologies cannot achieve low-cost, radiation-free, scalable, and highly accurate screening for early screening of adolescent idiopathic scoliosis. Furthermore, data scarcity and patient privacy protection issues have not been effectively addressed. Existing diffusion models exhibit unstable image generation quality and insufficient cross-domain consistency in medical settings.
A spinal image generation method based on scale-enhanced diffusion model and bidirectional diffusion model is adopted. By constructing first and second datasets, the image generation quality is improved by using learnable and non-learnable scale enhancement modules, and a reliable cross-domain mapping from natural images to X-ray images is achieved through Brownian bridge bidirectional diffusion model. A third dataset without real patient image data is constructed.
It achieves the generation of diverse natural spine images and highly consistent mapping of cross-domain spine images, provides low-cost, radiation-free large-scale screening capabilities, avoids privacy risks, and builds rich data resources to support model training and validation.
Smart Images

Figure CN121708138B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method and apparatus for generating spinal images based on a scale-enhanced diffusion model and a bidirectional diffusion model, belonging to the application of computer vision technology in the medical field. Background Technology
[0002] Adolescent idiopathic scoliosis is one of the most common spinal diseases in adolescents, characterized by abnormal curvature of the spine in the coronal plane, often accompanied by rotational deformities. Current clinical research indicates that most patients are already in the progressive stage of the disease at their first visit, thus missing the optimal time for non-surgical intervention. Therefore, developing an early screening technology that can be applied to a large population without specialized operation or radiation risks is crucial for preventing further disease progression. Existing clinical screening procedures typically rely on experienced professionals to assess patients' back signs and combine this with physical tests to identify suspected cases, but final diagnosis still depends on radiological imaging. This process is not only complex and costly but also relies on subjective judgment, leading to a high false-negative rate and making it difficult to meet the needs of widespread screening. In the field of image simulation, some studies have attempted to use Monte Carlo simulation to achieve X-ray imaging, but its computational demands are extremely high, making it difficult to apply in clinical or large-scale screening environments. Although fast ray tracing methods and real-time visualization simulation systems have been proposed to improve simulation speed, they still have limitations in generating actual medical images and generalizing to real-world scenarios.
[0003] With the development of generative deep learning technology, multi-domain and diverse medical image generation methods have shown great potential in assisted diagnosis, data augmentation, and medical training. However, methods such as Pix2xray, which generate X-ray images from natural images, often rely on accurate 3D models and specialized acquisition conditions, limiting their application in large-scale screening. Furthermore, the acquisition of medical imaging data is severely restricted by patient privacy protection and strict data sharing regulations, resulting in a scarcity of high-quality, paired natural spine and X-ray image datasets, further hindering the development and evaluation of data-driven models. In contrast, readily available 2D natural images, if used as input for reliable X-ray image generation, would have greater universality and deployment advantages. In recent years, diffusion models have made significant progress in high-quality image generation tasks. Related research shows that simply fine-tuning the bias terms of the U-Net in the pre-trained diffusion model can efficiently adapt to downstream tasks, thereby reducing training costs. However, existing diffusion model fine-tuning methods may still suffer from insufficient structural detail and unstable generation quality in medical image generation tasks, especially in tasks requiring accurate representation of spinal structure morphology. Furthermore, most existing cross-domain image generation methods are designed as conditional generation tasks, requiring additional conditional network branches for control. These methods still have shortcomings in terms of cross-domain consistency, generation stability, and training efficiency.
[0004] Overall, current technologies still cannot simultaneously meet the requirements of low cost, radiation-free operation, scalability, and high structural consistency between natural images and X-ray images in the early screening of adolescent idiopathic scoliosis. At the data level, how to construct training and testing data that does not infringe on patient privacy while adequately covering the diversity of clinical pathology remains a pressing issue. Current diffusion models still have room for optimization in medical scenarios, and cross-domain image generation lacks a unified framework that can directly model the transformation relationships between different image domains. Therefore, a novel image generation method is urgently needed that can generate diverse natural spinal images and reliably map them to corresponding X-ray images. This would support large-scale, convenient, and highly accurate scoliosis screening and other spinal disease auxiliary diagnostic applications. The generated non-realistic patient data could also effectively avoid privacy risks, providing a safe and rich data source for model training and validation, thereby promoting the development of spinal disease auxiliary diagnostic applications. Summary of the Invention
[0005] Objective: To overcome the shortcomings of existing technologies, this invention provides a method and apparatus for generating spinal images based on a scale-enhanced diffusion model and a bidirectional diffusion model. This method aims firstly to achieve radiation-free, non-professional spinal image generation and conversion, enabling the generation of diverse natural spinal images from two-dimensional natural back images without radiation or professional clinical procedures. Furthermore, it can reliably map natural spinal images to cross-domain spinal images, thereby obtaining cross-domain image results highly consistent with actual spinal morphology, providing a feasible technical approach for large-scale, low-cost early screening of scoliosis. Simultaneously, this method aims to address the long-standing data scarcity and patient privacy dilemmas in the field of medical imaging: through the above generation process, paired natural spinal image and cross-domain spinal image datasets derived from non-real patients can be directly constructed. The constructed datasets, while avoiding the privacy risks and data sharing limitations of real patients, provide rich, controllable, and pathologically comprehensive data resources for scoliosis detection model training, algorithm verification, and related research, alleviating the core bottleneck of difficulty in obtaining high-quality medical paired data and promoting the safe and efficient development of assisted diagnostic technologies.
[0006] Technical solution: To achieve the above objectives, the technical solution adopted by this invention is as follows:
[0007] A method for generating spinal images based on a scale-enhanced diffusion model and a bidirectional diffusion model includes the following steps:
[0008] S01. Collect natural back images and corresponding X-ray images of patients with scoliosis to construct the first dataset and the second dataset; the samples in the first dataset are natural back images, and the samples in the second dataset are paired natural back images and X-ray images.
[0009] S02. Preprocess the back natural images in the first dataset, and input the preprocessed back natural images into the encoder to obtain the latent space representation.
[0010] S03. Perform a forward diffusion process on the latent space representation, and gradually add noise to generate intermediate states during the process. The final state converges to a noise representation that follows a Gaussian distribution.
[0011] S04. The noise representation obtained from the forward diffusion process is input into the scale-enhanced diffusion model to perform the reverse diffusion process, gradually reconstructing the noise representation into a latent space representation. Finally, the decoder generates a natural back image. To distinguish it from the natural back images in the first dataset, the generated natural back image is called a natural spine image. The scale-enhanced diffusion model is designed based on the U-Net architecture, which integrates a learnable scale enhancement module I and a non-learnable scale enhancement module II. The learnable scale enhancement module I is used to realize data distribution alignment and model transfer, while the non-learnable scale enhancement module II improves denoising and feature representation capabilities through channel adaptive enhancement and low-frequency suppression.
[0012] S05. Construct a Brownian bridge bidirectional diffusion model. Using the second dataset as input, establish cross-domain diffusion paths with paired back natural images and X-ray images as the starting and ending points, respectively, to achieve radiation-free cross-domain synthesis from the back natural image to the X-ray image, and ensure that the spinal curvature in the synthesized X-ray image is strictly aligned with the back natural image. To distinguish it from the original X-ray image, the generated X-ray image is called a cross-domain spinal image.
[0013] S06. Train the scale-enhanced diffusion model based on the first dataset and calculate the noise prediction loss of the reverse diffusion process; train the Brownian bridge bidirectional diffusion model based on the second dataset and calculate the evidence lower bound loss; update the parameters of the scale-enhanced diffusion model and the Brownian bridge bidirectional diffusion model using a gradient-based optimization strategy to optimize the generation of natural spine images and cross-domain spine images.
[0014] S07. Based on the trained Brownian bridge bidirectional diffusion model, the corresponding cross-domain spinal image is generated using the natural spinal image generated in step S05 as input. A third dataset is constructed, in which the samples are paired natural spinal images and cross-domain spinal images. The samples in the third dataset do not contain any real patient image data, thereby avoiding privacy risks.
[0015] Specifically, in step S03, the forward diffusion process follows the framework of a denoised diffusion probability model, using a fixed Markov chain to gradually represent the latent space according to the variance scheduling parameters. Add Gaussian noise, after Each diffusion time step represents the latent space. The perturbation is represented as a noise that follows a Gaussian distribution. :
[0016]
[0017]
[0018] in: This is used to control the intensity of added noise; Indicates the first The variance scheduling parameters for each diffusion time step. Indicates the first The intermediate state of a diffusion time step; This represents the probability distribution of the forward diffusion process. Indicates a given intermediate state When calculating intermediate states The probability distribution; Indicates from arrive Multiplying each term by itself, that is ; Represents a Gaussian distribution, the first parameter The second parameter represents a random variable. The third parameter represents the mean. Describing covariance, Let represent the identity matrix, and let represent the noise, where each element is independently and identically distributed in each dimension.
[0019] Specifically, in step S04, when the scale-enhanced diffusion model performs the reverse diffusion process, it first introduces textual conditions, encodes these conditions into semantic condition vectors using a text encoder, and injects these semantic condition vectors into the multi-layer structure of the U-Net architecture, ensuring that each diffusion time step is guided by the semantic condition vectors. Then, it returns to the final state of the forward diffusion process. As a starting point, through another parameter-controlled path The control conditions are represented step by step by the Markov chain. Reducing to latent space representation :
[0020]
[0021]
[0022] in: This represents the set of all learnable parameters in the U-Net architecture; Indicates the first The intermediate state of a diffusion time step. ; Indicates that the parameter is The conditional probability distribution of control. Indicates a given intermediate state At that time, the predicted intermediate state The conditional probability distribution; Indicates from arrive Multiply each term; This represents a Gaussian distribution, specifically the Gaussian distribution predicted by the denoising U-Net network, with a mean of... Covariance By parameters The network represented is obtained.
[0023] Specifically, in step S04, the learnable scale enhancement module I is inserted into the multi-head self-attention block, feedforward network, and layer normalization layer within the U-Net architecture, using a learnable scale factor. Adjust the bias term and layer normalization parameters; insert the non-learnable scale enhancement module II into the backbone feature processing path and skip connection feature processing path in the U-Net architecture, based on the non-learnable scale factor. Channel adaptive enhancement is achieved using a perceptual scaling method, utilizing a non-learnable scaling factor. Frequency domain low-frequency suppression using Fourier masks; using scale factor and scale factor The contribution ratios of the backbone feature map and the skip connection feature map are adjusted separately to improve the multi-scale feature fusion capability and denoising quality of the scale-enhanced diffusion model.
[0024] Specifically, in the scale-enhanced diffusion model, the scale factor is... Insert the multi-head self-attention block, feedforward network, and layer normalization layer into the U-Net architecture, and initialize them. During the training of the scale-enhanced diffusion model, based on the scale factor... The bias term and layer normalization parameters are trained while other weight parameters are frozen to make the distribution of the generated natural spine image closely resemble the distribution of the target back natural image; the scale factor is adjusted accordingly. During the optimization process, a gradient-based optimization strategy is used to adjust the scaling factor. Perform iterative updates to find the optimal scaling factor. .
[0025] Specifically, in the scale-enhanced diffusion model, a scale factor is introduced into the backbone feature processing path of each block of the decoder in the U-Net architecture. This is used to achieve channel-adaptive enhancement of the backbone feature map, based on the scale factor. Constructing a backbone factor map ; the decoder The backbone feature map output by each block Recorded as , decoder Scale factor introduced in each block Recorded as , decoder Bone factor map of individual blocks Recorded as Bone factor plot It is a scale factor As control variables, using average feature mapping A parameterized function of the independent variable, formally expressed as: Using backbone factor plot Backbone feature map Perform adaptive, content-relevant feature modulation; first, based on the backbone feature map... Adaptive adjustment of skeletal factor map Then, a perceptual scaling method is used to align the backbone feature maps. This includes the following processes:
[0026] First, calculate the backbone feature map along the channel dimension. Average feature mapping :
[0027]
[0028] in: Representation of backbone feature map The One channel, Indicates the number of channels. This indicates the backbone feature map. The two-dimensional spatial mapping obtained by averaging along the channel dimension, which fuses multi-channel information by averaging along the channel dimension, represents the average activation intensity of the feature map at each spatial location.
[0029] Then, through average feature mapping Adaptive adjustment of skeletal factor map :
[0030]
[0031] in: It is a scalar constant greater than 1. Represents the average eigenmap The minimum pixel value at all spatial locations in the array. Represents the average eigenmap The formula first uses the maximum pixel value at all spatial locations; Calculate the average feature map Normalization to interval, then with Multiplication achieves scaling, and the final addition... Obtain the backbone factor map Bone factor plot Mapped to interval;
[0032] Finally, based on the backbone factor map Backbone feature map Amplify half of the channels:
[0033]
[0034] in: Indicates the channel adaptive enhancement , This indicates element-wise multiplication.
[0035] Specifically, in the scale-enhanced diffusion model, a scale factor is introduced into the skip connection feature processing path of each block of the decoder in the U-Net architecture. Based on scale factor Construct a Fourier mask This is used to selectively suppress low-frequency components of the skip connection feature map; it includes the following process:
[0036] First, for the U-Net decoder... The skip connection feature map of each block The One channel Perform a Fourier transform to convert it into a frequency domain representation. , Indicates Fourier transform;
[0037] Then, the frequency domain representation With Fourier mask Perform element-wise multiplication to suppress skip connection feature maps Low-frequency components:
[0038]
[0039]
[0040] in: This indicates element-wise multiplication; Indicates correspondence The Fourier mask, derived from the scale factor and frequency radius Joint decision; Indicates the decoder's first Scale factor introduced in each block ; Indicates the threshold frequency, generally ;
[0041] Finally, the modulated frequency domain features Performing an inverse Fourier transform restores the data to the spatial domain, yielding the modulated skip connection feature map. , This represents the inverse Fourier transform.
[0042] Specifically, in step S05, the Brown bridge bidirectional diffusion model anchors the start and end points of the cross-domain diffusion path, enabling the image migration path in the latent space to form a controlled bridge between the start and end points, including the Brown bridge forward diffusion process and the Brown bridge reverse diffusion process. In the Brown bridge forward diffusion process, a noisy conversion path is constructed with the X-ray image as the start point and the back natural image as the end point, mapping the latent vector of the X-ray image to the latent vector of the back natural image. In the Brown bridge reverse diffusion process, with the back natural image as the start point, the mean and variance of each diffusion time step are predicted by a neural network, and reverse denoising is performed step by step to output an X-ray image with the spinal curvature strictly aligned with the back natural image, thus achieving radiation-free cross-domain synthesis.
[0043] A spinal image generation device based on a scale-enhanced diffusion model and a bidirectional diffusion model includes a data preparation unit, an image preprocessing and encoding unit, a forward diffusion unit, a scale-enhanced diffusion model, a Brownian bridge bidirectional diffusion model, a parameter optimization unit, and a dataset generation unit.
[0044] The data preparation unit is used to collect natural back images and corresponding X-ray images of scoliosis patients, construct a first dataset and a second dataset, and provide basic data support for subsequent model training; the samples in the first dataset are natural back images, and the samples in the second dataset are paired natural back images and X-ray images;
[0045] The image preprocessing and encoding unit is used to preprocess the back natural images in the first dataset, input the preprocessed back natural images into the encoder to obtain the latent space representation, which is used to construct stable diffusion input features;
[0046] The forward diffusion unit is used to perform a forward diffusion process on the latent space representation, and gradually add noise during the process to generate intermediate states, and the final state converges to a noise representation that follows a Gaussian distribution;
[0047] The scale-enhanced diffusion model performs a reverse diffusion process on the input noise representation, gradually reconstructing the noise representation into a latent space representation. This model is based on the U-Net architecture, integrating a learnable scale enhancement module I and a non-learnable scale enhancement module II. The learnable scale enhancement module I is inserted into the multi-head self-attention block, feedforward network, and layer normalization layer within the U-Net architecture, utilizing a learnable scale factor. Adjust the bias term and layer normalization parameters; insert the non-learnable scale enhancement module II into the backbone feature processing path and skip connection feature processing path in the U-Net architecture, based on the non-learnable scale factor. Channel adaptive enhancement is achieved using a perceptual scaling method, utilizing a non-learnable scaling factor. Frequency domain low-frequency suppression is performed using Fourier masks;
[0048] The Brown Bridge bidirectional diffusion model establishes cross-domain diffusion paths using paired natural back images and X-ray images as the starting and ending points, respectively, to achieve radiation-free cross-domain synthesis from natural back images to X-ray images, and ensures that the spinal curvature in the synthesized X-ray image is strictly aligned with the natural back image.
[0049] The parameter optimization unit trains a scale-enhanced diffusion model based on the first dataset and calculates the noise prediction loss of the reverse diffusion process; it trains a Brownian bridge bidirectional diffusion model based on the second dataset and calculates the lower bound evidence loss; it performs a weighted summation of the noise prediction loss and the lower bound evidence loss, and updates the parameters of the overall spine image generation system composed of the scale-enhanced diffusion model and the Brownian bridge bidirectional diffusion model through a gradient-based optimization strategy, thereby achieving end-to-end high-quality natural spine image generation and having the ability to generate cross-domain spine images.
[0050] The dataset generation unit, based on the trained Brown Bridge bidirectional diffusion model, takes the natural spine image obtained through the scale-enhanced diffusion model as input, and obtains the corresponding cross-domain spine image through the Brown Bridge bidirectional diffusion model, thereby constructing a third dataset. The samples in the third dataset are paired natural spine images and cross-domain spine images. The third dataset does not contain any real patient image data, thereby avoiding privacy risks.
[0051] Beneficial Effects: The spinal image generation method and apparatus based on scale-enhanced diffusion model and bidirectional diffusion model provided by this invention have the following advantages over existing technologies: 1. By integrating learnable and non-learnable scale enhancement modules into the U-Net architecture of the scale-enhanced diffusion model, the contribution of multi-scale features can be dynamically adjusted during the diffusion generation process. This not only improves the structural detail expression ability of natural spinal images but also generates diverse natural images that conform to the real morphological changes of the spine. Compared with traditional generation methods, this invention achieves higher generation quality and morphological diversity while maintaining structural consistency. 2. By adopting the scale-enhanced diffusion model and through the efficient collaboration of forward diffusion and reverse denoising processes, accurate modeling of the morphology of natural spinal images is achieved. This invention gradually reconstructs the morphological features of the spine during image generation, effectively preserving the structural information of the natural image, thereby enhancing the realism, continuity, and stability of the generated image. 3. By constructing a bidirectional diffusion model and guiding cross-domain transformation with the natural image as the starting point and the X-ray image as the ending point during the generation process, this invention can ensure that the generated cross-domain spinal image is strictly aligned with the spinal curvature in the natural image, making the cross-domain image have higher consistency in structural correspondence. This approach significantly improves the reliability and application value of cross-domain images. 4. This invention enables end-to-end training by optimizing the noise prediction loss of the scale-enhanced diffusion model and the evidence lower bound loss of the bidirectional diffusion model. Simultaneously, by optimizing the weighted combination of multi-task losses, this invention improves denoising accuracy and cross-domain mapping accuracy in generating cross-domain spine images from natural spine images, and reduces structural bias and generation errors during training, thereby enhancing the overall model's stability, robustness, and generalization ability. Attached Figure Description
[0052] Figure 1 This is a schematic diagram illustrating the implementation process of the method of the present invention;
[0053] Figure 2 This is a schematic diagram of the structure of the learnable scale enhancement module I;
[0054] Figure 3 This is a schematic diagram of the structure of the non-learnable scale enhancement module II;
[0055] Figure 4 This is a schematic diagram of the scale-enhanced diffusion model.
[0056] Figure 5 This is a schematic diagram of the Brownian bridge bidirectional diffusion model.
[0057] Figure 6 This is a schematic diagram of the overall spinal image generation system. Detailed Implementation
[0058] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0059] A method for generating spinal images based on a scale-enhanced diffusion model and a bidirectional diffusion model is proposed. To address the shortcomings of existing medical image generation methods in terms of structural detail depiction, cross-domain consistency, generation stability, and large-scale application, an end-to-end deep generation framework is constructed to achieve diversified generation of natural spinal images. Furthermore, it enables reliable cross-domain mapping of natural spinal images to corresponding X-ray images, thereby meeting the urgent need for low-cost, radiation-free, and large-scale deployment in early screening of adolescent scoliosis.
[0060] This method first constructs a first dataset and a second dataset, and extracts the latent space representation of the natural back images in the first dataset. Then, it performs a progressively noisy forward diffusion process on the latent space representation. Next, it integrates a learnable scale enhancement module I and a non-learnable scale enhancement module II into the U-Net architecture to construct a scale-enhanced diffusion model, enabling the generation of diverse natural spine images. Then, it constructs a Brownian bridge bidirectional diffusion model, establishing a cross-domain diffusion path with the natural back image and the X-ray image as endpoints, and generates an X-ray image that is strictly aligned with the structure of the natural back image through inverse denoising. Finally, it trains the scale-enhanced diffusion model and the Brownian bridge bidirectional diffusion model using the first and second datasets, and updates the parameters of the overall spine image generation system through a gradient-based optimization method, enabling the overall spine image generation system to have the ability to generate high-quality natural spine images and cross-domain spine images with stronger structural consistency.
[0061] This method realizes a unified generation framework that can generate diverse natural spine images and reliably map natural spine images to corresponding cross-domain spine images. It can be widely used in scenarios such as adolescent scoliosis screening, disease auxiliary diagnosis, and related medical image analysis.
[0062] like Figure 1 The diagram shows a flowchart of a spinal image generation method based on a scale-enhanced diffusion model and a bidirectional diffusion model. The specific steps are explained below.
[0063] S01: Data Preparation Stage
[0064] The data preparation unit collects natural back images and corresponding X-ray images of scoliosis patients and constructs a dataset. To meet the needs of subsequent model training and evaluation, two datasets at different levels need to be constructed: the first dataset contains natural back images, and the second dataset contains paired natural back images and X-ray images.
[0065] S02: Image Preprocessing and Encoding Stage
[0066] This is used to systematically preprocess the back natural images in the first dataset to improve data quality and adapt to the input requirements of subsequent models. The preprocessing process mainly performs data augmentation operations on the original images by random rotation to expand the data scale, improve the generalization ability of the model, and reduce the risk of overfitting.
[0067] The enhanced images are input into the encoder, which extracts features from these images, extracting key deep feature vectors that can characterize features such as the shape of the back, and generating their corresponding latent space representations; these latent space representations will serve as important input features for the model training task.
[0068] S03: Forward diffusion step
[0069] The latent space representation is subjected to a forward diffusion process by forward diffusion units, and noise is gradually added during the process to generate intermediate states. The final state converges to a noise representation that follows a Gaussian distribution.
[0070] The forward diffusion unit follows the framework of the denoising diffusion probability model, and is represented by a fixed Markov chain gradually into the latent space according to the variance scheduling parameters. Add Gaussian noise, after Each diffusion time step represents the latent space. The perturbation is represented as a noise that follows a Gaussian distribution. :
[0071]
[0072]
[0073] in: , Indicates the first The variance scheduling parameters for each diffusion time step. Indicates the first The intermediate state of a diffusion time step; This represents the probability distribution of the forward diffusion process. Indicates a given intermediate state Calculate intermediate states The probability distribution; Represents a Gaussian distribution, the first parameter The second parameter represents a random variable. The third parameter represents the mean. Describing covariance, Represents the identity matrix.
[0074] Representing the latent space through a forward diffusion process Gradual perturbation as noise representation .
[0075] S04: Construct a scale-enhanced diffusion model and perform the reverse diffusion step.
[0076] The noise obtained from the forward diffusion process is represented as... The input scale-enhanced diffusion model performs a reverse diffusion process, progressively reconstructing the noise representation into a latent space representation. Finally, a natural back image is generated by the decoder; noise conforming to a standard Gaussian distribution is gradually represented using a scale-enhanced diffusion model. Transform the data into data that conforms to the target data distribution.
[0077] The scale-enhanced diffusion model is designed based on the U-Net architecture and integrates a learnable scale enhancement module I and a non-learnable scale enhancement module II. The learnable scale enhancement module I is used to realize data distribution alignment and model transfer, while the non-learnable scale enhancement module II improves denoising and feature representation capabilities through channel adaptive enhancement and low-frequency suppression.
[0078] (a) Learnable Scale Enhancement Module I
[0079] The Learnable Scale Enhancement Module I is introduced to make the generated natural spine image closer to the target data distribution, and to further align the natural spine image with the natural back image.
[0080] The learnable scale enhancement module I is designed based on the StableDiffusion model that has been pre-trained on a large-scale dataset, assuming that the large-scale dataset follows a data distribution. The first dataset is used as the target dataset, and the target dataset follows the data distribution. To achieve the transformation from the standard Gaussian distribution to the target data distribution Effective generation, assuming data distribution and There is a linear mapping relationship between them. ,and Dependent on learnable scaling factor Therefore, a scale factor is introduced into the learnable scale enhancement module I. .
[0081] like Figure 2 As shown, the scaling factor Insert the multi-head self-attention block, feedforward network, and layer normalization layer into the U-Net architecture, and initialize them. During the training of the scale-enhanced diffusion model, based on the scale factor... The training bias term and layer normalization parameters are adjusted while other weight parameters are frozen to reduce the amount of parameter data required for training the model. This reduces computational overhead while ensuring that the distribution of the generated natural spine image closely resembles the distribution of the target back image. (Scale factor...) During the optimization process, a gradient-based optimization strategy is used to adjust the scaling factor. Perform iterative updates to find the optimal scaling factor. .
[0082] Through the learnable scale enhancement module I, the StableDiffusion model, already trained on large-scale datasets, can be transferred to the task of generating natural spine images, effectively generating images with a distribution similar to the target data. High-quality, closely aligned natural spine images.
[0083] (II) Unlearnable Scale Enhancement Module II
[0084] The scale-enhanced diffusion model employs a U-Net architecture consisting of a backbone network and a skip connection, which facilitates the transfer of information between the encoder and decoder. By analyzing these two main functions of the U-Net architecture, a non-learnable scale enhancement module II is introduced. By controlling the weights of the backbone network and skip connections, the denoising capability of the scale-enhanced diffusion model is improved, and the quality of the generated natural spine image is enhanced.
[0085] like Figure 3 As shown, the non-learnable scale enhancement module II is inserted into the backbone feature processing path and skip connection feature processing path in the U-Net architecture, based on the non-learnable scale factor. Channel adaptive enhancement is achieved using a perceptual scaling method, utilizing a non-learnable scaling factor. Frequency domain low-frequency suppression is performed using Fourier masks.
[0086] (1) Introduce a non-learnable scaling factor
[0087] In the scale-enhanced diffusion model, a scale factor is introduced into the backbone feature processing path of each block of the decoder in the U-Net architecture. This is used to achieve channel-adaptive enhancement of the backbone feature map, based on the scale factor. Constructing a backbone factor map ; the decoder The backbone feature map output by each block Recorded as , decoder Scale factor introduced in each block Recorded as , decoder Bone factor map of individual blocks Recorded as Bone factor plot It is a scale factor As control variables, using average feature mapping A parameterized function of the independent variable, formally expressed as: Using backbone factor plot Backbone feature map Perform adaptive, content-relevant feature modulation; first, based on the backbone feature map... Adaptive adjustment of skeletal factor map Then, a perceptual scaling method is used to align the backbone feature maps. This includes the following processes:
[0088] First, calculate the backbone feature map along the channel dimension. Average feature mapping :
[0089]
[0090] in: Representation of backbone feature map The One channel, Indicates the number of channels. This indicates the backbone feature map The two-dimensional spatial mapping obtained by averaging along the channel dimension, which fuses multi-channel information by averaging along the channel dimension, represents the average activation intensity of the feature map at each spatial location.
[0091] Then, through average feature mapping Adaptive adjustment of skeletal factor map :
[0092]
[0093] in: It is a scalar constant greater than 1. Represents the average eigenmap The minimum pixel value at all spatial locations in the array. Represents the average feature map The formula first uses the maximum pixel value at all spatial locations; Calculate the average feature map Normalization to interval, then with Multiplication achieves scaling, and the final addition... Obtain the backbone factor map Bone factor plot Mapped to interval;
[0094] Finally, based on the backbone factor map Backbone feature map Amplify half of the channels:
[0095]
[0096] in: Indicates the channel adaptive enhancement , This indicates element-wise multiplication.
[0097] (2) Introduce a non-learnable scaling factor
[0098] In the scale-enhanced diffusion model, to prevent blurring and loss of detail during generation, a scale factor is introduced into the skip connection feature processing path of each block in the decoder of the U-Net architecture. This achieves low-frequency noise suppression in the frequency domain of the skip connection feature map. Based on the scale factor... Construct a Fourier mask This method is used to selectively suppress low-frequency components of skip connection feature maps. Low-frequency components may contain unwanted noise, so suppressing them can preserve high-frequency details of the image. The process includes the following steps:
[0099] First, for the U-Net decoder... The skip connection feature map of each block The One channel Perform a Fourier transform to convert it into a frequency domain representation. , Indicates Fourier transform;
[0100] Then, the frequency domain representation With Fourier mask Element-wise multiplication is performed, and the weights of low-frequency components are adjusted in the frequency domain to suppress skip connections in the feature map. Low-frequency components:
[0101]
[0102]
[0103] in: Indicates correspondence The Fourier mask, derived from the scale factor and frequency radius Joint decision; Indicates the decoder's first Scale factor introduced in each block ; Indicates the threshold frequency, generally ;
[0104] Finally, the modulated frequency domain features Performing an inverse Fourier transform restores the data to the spatial domain, yielding the modulated skip connection feature map. , This represents the inverse Fourier transform.
[0105] Based on the non-learnable scale enhancement module II, the model enhances the denoising ability of the generated image through perceptual scale, adaptive feature adjustment and selective suppression of frequency components, and further preserves the details of the image through frequency domain adjustment, thereby improving the generation effect without additional training.
[0106] (iii) Reverse diffusion
[0107] The final state of the forward diffusion process is represented by an approximately isotropic Gaussian noise distribution. That is, after After gradually adding Gaussian noise at each diffusion time step, the final state obtained satisfies .
[0108] like Figure 4 As shown, in the inverse denoising process of the scale-enhanced diffusion model, textual conditions are first introduced. These conditions are then encoded into semantic condition vectors by a text encoder. These semantic condition vectors are injected into the multi-layer structure of the U-Net architecture, ensuring that each diffusion time step is guided by the semantic condition vectors. Then, the final state of the forward diffusion process is used... As a starting point, through another parameter-controlled path The control conditions are represented step by step by the Markov chain. Reducing to latent space representation :
[0109]
[0110]
[0111] in: This represents the set of all learnable parameters in the U-Net architecture, including weights and biases; Indicates the first The intermediate state of a diffusion time step. ; Indicates that the parameter is affected The conditional probability distribution of control. Indicates a given intermediate state At that time, the predicted intermediate state The conditional probability distribution; Indicates from arrive Multiply each term; This represents a Gaussian distribution, specifically the Gaussian distribution predicted by the denoising U-Net network, with a mean of... Covariance By parameters The network represented is obtained.
[0112] Through this reverse denoising generation process, the noise is represented Clean representation of latent space The data is then further processed by a decoder to generate natural spine images with diverse lateral curvature angles. At the same time, the introduction of textual conditions effectively constrains the direction of noise prediction, ensuring that the reconstructed latent space representation remains consistent with the textual description in terms of structure, posture, and pathological semantics.
[0113] (iv) Noise prediction loss
[0114] The inverse denoising of the scale-enhanced diffusion model is performed using noise prediction loss for supervised training.
[0115]
[0116] in: It represents the mathematical expectation of a random variable and is used to average different noise levels, samples, and noise during training, so that the model can obtain a consistent training signal throughout the diffusion phase. The square of the Euclidean norm, or mean squared error, is used to measure the difference between the model's predicted noise and the actual noise; symbol This represents the actual data noise added during the forward diffusion process, which follows a standard normal distribution and is the real noise used as a supervision signal during training; correspondingly, For parameters Controlled denoising U-Net network at a given diffusion time step Noisy input and conditional input The core idea of this loss function is to measure the mean square error of the noise predicted by the scale-enhanced diffusion model at different noise levels, thereby guiding the denoising U-Net network to learn the correct back diffusion process. This loss function minimizes the difference between the model's predicted noise and the actual noise, enabling the neural network to gradually learn accurate back diffusion dynamics, thus achieving high-quality data generation.
[0117] The use of a scale-enhanced diffusion model for inverse denoising not only improves the richness and realism of the training data but also enhances the adaptability of the deep learning model for scoliosis detection to different curvatures, body types, and postures. Ultimately, this generative capability can be used to construct a large-scale, non-invasive, and widely covered scoliosis screening dataset, providing crucial support for achieving radiation-free and convenient initial scoliosis screening.
[0118] S05: Constructing a Brownian bridge bidirectional diffusion model to generate transdomain spine images
[0119] The Brownian Bridge bidirectional diffusion model models image-to-image transformation as a Brownian Bridge. This model anchors the start and end points of the cross-domain diffusion path, creating a controlled bridge between the start and end points of the image migration path in the latent space, thus achieving stable and efficient cross-domain image transformation. During the training phase, the Brownian Bridge bidirectional diffusion model includes a forward diffusion process and a backward diffusion process. In the forward diffusion process, a noisy transformation path is constructed starting from the X-ray image and ending with the natural back image, mapping the latent vectors of the corresponding X-ray image to the latent vectors of the natural back image. In the backward diffusion process, starting from the natural back image, the mean and variance of each diffusion time step are predicted by a neural network, progressively performing backward denoising to output an X-ray image with spinal curvature strictly aligned with the natural back image, achieving radiation-free cross-domain synthesis.
[0120] For a paired back natural image-X-ray image sample, the latent vector of the back natural image is denoted as... The latent vector of an X-ray image is denoted as ;
[0121] (a) Brown Bridge Forward Diffusion Process
[0122] In the latent space, the latent variables of the X-ray image Starting with the latent variables of the natural back image To achieve the endpoint, perform the Brownian bridge forward diffusion process, which is defined as follows:
[0123]
[0124]
[0125] in: Indicates the first The intermediate state of a diffusion time step; Let represent the probability distribution of the forward diffusion process of the Brownian bridge, and let represent the probability distribution under given conditions. Below, intermediate state The probability distribution; Indicates a Gaussian distribution. Indicates the first Brownian bridge mean at each diffusion time step Represents the variance term; This represents the total number of steps in the diffusion process. Represents the time interpolation coefficients of the Brownian bridge; when hour, The mean is exactly equal to ;when hour, The mean value reaches the target latent vector completely. The intermediate time intervals are linear interpolations.
[0126] The Brownian bridge forward diffusion process can be understood as follows: During training, a path from the initial latent vector is first constructed in the latent space. to target latent vector A noisy transition path, which at each time step They are all modeled as random variables following a Gaussian distribution, with their means following the... The form shifts linearly from the starting point to the ending point; simultaneously, its variance changes from... By controlling the diffusion process, noise is gradually injected throughout the diffusion process. In this way, the Brownian bridge model achieves a smooth connection between the latent vectors of X-ray images and the latent vectors of natural images, providing a learnable noise trajectory for the inverse denoising generation process.
[0127] (ii) Brownian bridge reverse diffusion process
[0128] In the latent space, the latent variables of the back natural image are... Starting from [the point], the Brownian bridge reverse diffusion process is executed. The Brownian bridge reverse diffusion process is defined as follows:
[0129]
[0130] in: This represents the set of all learnable parameters in the Brownian bridge bidirectional diffusion model; Indicates the first The intermediate state of a diffusion time step. ; This represents the probability distribution of the Brownian bridge backward diffusion process, and the modeling of this probability distribution will... Return to The generation process; Indicates a Gaussian distribution. This represents the mean function of the predicted noise, which needs to be obtained through the maximum likelihood criterion. It is the noise variance at each step. It is the identity matrix, used to represent that the covariance matrix is Gaussian noise with independent and homoscedastic dimensions.
[0131] The Brownian bridge reverse diffusion process can be understood as follows: the reverse diffusion process is mediated by a parameterized model. To predict time steps latent variables The condition is the latent variable at the current time step. and target latent vector The goal of the reverse diffusion process is to gradually denoise the latent variables, restoring them from their intermediate states to the target distribution.
[0132] (iii) Loss of the lower limit of evidence
[0133] The training process of the Brownian bridge bidirectional diffusion model uses the evidence lower bound function (ELBO) for supervised training:
[0134]
[0135] in: The objective function used for training the Brown bridge bidirectional diffusion model is to measure the noise of a real Brown bridge. With model prediction noise The weighted squared error between the noise and target latent vectors is minimized to enable the model to learn to perform Brownian bridge back diffusion, thus completing the generation from the noise latent vector to the target latent vector. This means that during the training process, the latent vectors need to be processed separately. Latent vectors of the target image and random noise sampled from the standard normal distribution Sampling is performed, and the loss values are averaged to ensure that the model achieves stable optimization across the overall data distribution; This represents the time-related weighting coefficients derived from the Brownian bridge, used to adjust different diffusion steps. The loss contribution at the location; It represents the square of the Euclidean norm, used to measure the difference between the model's predicted noise and the actual noise; This represents the time interpolation coefficients of the Brownian bridge, used to control the time from the starting point. To the finish line The linear transition ratio; This represents the variance of time-dependent noise; Indicates standard Gaussian noise; This represents the noise predicted by the neural network, which is the learning target of the model.
[0136] like Figure 5As shown, in the inference stage, based on the Brownian bridge bidirectional diffusion model, the back natural image in the second dataset is used as input. First, the encoder extracts its latent vector, and then the proposed Brownian bridge process maps the latent vector of the back natural image to the corresponding latent vector in the X-ray image. Finally, the decoder translates and generates the X-ray image.
[0137] S06: Joint Optimization
[0138] The scale-enhanced diffusion model is trained based on the first dataset, and the noise prediction loss for the reverse diffusion process is calculated. A Brownian bridge bidirectional diffusion model was trained based on the second dataset, and the lower bound loss of evidence was calculated. The weighted total loss is , This represents the weighting coefficient.
[0139] S07: Constructing the Third Dataset
[0140] Based on the trained Brownian bridge bidirectional diffusion model, natural spine images generated by a scale-enhanced diffusion model are used as input to obtain corresponding cross-domain spine images through the Brownian bridge bidirectional diffusion model. This results in a third dataset: the samples in the third dataset are paired natural spine images and cross-domain spine images. None of the samples in this dataset contain any real patient image data, thus avoiding privacy risks.
[0141] A gradient-based optimization strategy was used to update the parameters of the scale-enhanced diffusion model and the Brownian bridge bidirectional diffusion model, optimizing the generation of natural spine images and cross-domain spine images. Specifically, an end-to-end method was used to train a complete spine image generation system consisting of a learnable scale enhancement module I, a non-learnable scale enhancement module II, a scale-enhanced diffusion model, and a Brownian bridge bidirectional diffusion model. First, the learnable scale enhancement module I was trained, introducing a learnable scale factor. The feature representations at different noise stages are dynamically adjusted; then, the non-learnable scale enhancement module II is trained to introduce a non-learnable scale factor into the backbone network and skip connection structure of the diffusion model. and The model's denoising quality is improved by adjusting the contributions of skeletal features and skip connection features. Next, a scale-enhanced diffusion model is trained based on the first dataset to generate diverse natural spine images through forward diffusion and reverse denoising. Finally, a Brownian bridge bidirectional diffusion model is trained to establish a cross-domain diffusion path with the natural back image and X-ray image as endpoints, achieving radioactive cross-domain synthesis from the natural back image to the X-ray image, and ensuring that the spinal curvature in the synthesized X-ray image is strictly aligned with the natural back image.
[0142] This invention provides a spinal image generation method based on a scale-enhanced diffusion model and a bidirectional diffusion model. The scale-enhanced diffusion model integrates a learnable scale enhancement module and a non-learnable scale enhancement module within its U-Net architecture. In the learnable scale enhancement module, a learnable scale factor is introduced to adaptively adjust the feature responses at different noise stages, enabling the generation process to maintain overall structural consistency while achieving higher detail representation of spinal texture. In the non-learnable scale enhancement module, two non-learnable scale factors are introduced into the backbone feature processing path and the skip connection path of the U-Net architecture, respectively, to adjust the fusion ratio of the backbone feature map and the skip connection feature map. This allows the scale-enhanced diffusion model to effectively balance local details and overall spinal morphology in multi-scale structural reconstruction, thereby enhancing denoising stability and reducing structural shift. In the scale-enhanced diffusion model, noise is gradually added through forward diffusion to generate intermediate states, and then the natural spinal image is gradually restored through inverse denoising. Combined with the scale enhancement strategy, high-fidelity reconstruction of spinal curvature, contour, and soft tissue texture is achieved, generating natural spinal images with diverse lateral curvature angles and structural variations. In the Brown Bridge bidirectional diffusion model, a cross-domain diffusion path is constructed starting from the natural back image and ending at the X-ray image. A noisy trajectory from the X-ray image to the natural back image is constructed through Brown Bridge forward diffusion, and then Brown Bridge reverse diffusion gradually restores the natural back image to the X-ray image strictly aligned with the spinal curvature. This makes the generated cross-domain spinal image closer to the real image in terms of structural consistency and density distribution. By jointly employing the scale-enhanced diffusion model and the Brown Bridge bidirectional diffusion model, this invention can generate diverse natural spinal images while also generating cross-domain spinal images that strictly correspond to the natural spinal images without radiation. This significantly improves the robustness of the model in cross-domain imaging, spinal structure reconstruction, and morphological consistency, providing reliable technical support for large-scale, low-cost, and high-precision scoliosis screening. Furthermore, this invention can be fully implemented by computer without manual intervention; this indicates that it can achieve batch automated processing, greatly improving processing efficiency and reducing labor costs.
[0143] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the above embodiments do not limit the present invention in any way, and all technical solutions obtained by equivalent substitution or equivalent transformation fall within the protection scope of the present invention.
Claims
1. A method for generating spinal images based on a scale-enhanced diffusion model and a bidirectional diffusion model, characterized in that: Includes the following steps: S01. Collect natural back images and corresponding X-ray images of patients with scoliosis to construct the first dataset and the second dataset; the samples in the first dataset are natural back images, and the samples in the second dataset are paired natural back images and X-ray images. S02. Preprocess the back natural images in the first dataset, and input the preprocessed back natural images into the encoder to obtain the latent space representation. S03. Perform a forward diffusion process on the latent space representation, and gradually add noise to generate intermediate states during the process. The final state converges to a noise representation that follows a Gaussian distribution. S04. Input the noise representation obtained from the forward diffusion process into the scale-enhanced diffusion model to perform the reverse diffusion process, gradually reconstructing the noise representation into the latent space representation. Finally, the decoder generates a natural back image. In order to distinguish it from the natural back image in the first dataset, the generated natural back image is called a natural spine image. The scale-enhanced diffusion model is designed based on the U-Net architecture, which integrates a learnable scale enhancement module I and a non-learnable scale enhancement module II. The learnable scale enhancement module I is used to realize data distribution alignment and model transfer, while the non-learnable scale enhancement module II improves denoising and feature representation capabilities through channel adaptive enhancement and low-frequency suppression. S05. Construct a Brownian bridge bidirectional diffusion model. Using the second dataset as input, establish cross-domain diffusion paths with paired back natural images and X-ray images as the starting and ending points, respectively, to achieve radiation-free cross-domain synthesis from the back natural image to the X-ray image, and ensure that the spinal curvature in the synthesized X-ray image is strictly aligned with the back natural image. To distinguish it from the original X-ray image, the generated X-ray image is called a cross-domain spinal image. S06. Train the scale-enhanced diffusion model based on the first dataset and calculate the noise prediction loss for the reverse diffusion process; The Brown Bridge bidirectional diffusion model was trained based on the second dataset, and the evidence lower bound loss was calculated. The parameters of the scale-enhancing diffusion model and the Brown Bridge bidirectional diffusion model were updated using a gradient-based optimization strategy to optimize the generation of natural spine images and cross-domain spine images. S07. Based on the trained Brownian bridge bidirectional diffusion model, take the natural spine image generated in step S05 as input to generate the corresponding cross-domain spine image; construct a third dataset, in which the samples are paired natural spine images and cross-domain spine images.
2. The spinal image generation method based on scale-enhanced diffusion model and bidirectional diffusion model according to claim 1, characterized in that: In step S03, the forward diffusion process follows the framework of a denoised diffusion probability model, using a fixed Markov chain to gradually represent the latent space according to the variance scheduling parameters. Add Gaussian noise, after Each diffusion time step represents the latent space. The perturbation is represented as a noise that follows a Gaussian distribution. : , , in: , Indicates the first The variance scheduling parameters for each diffusion time step. Indicates the first The intermediate state of a diffusion time step; This represents the probability distribution of the forward diffusion process. Indicates a given intermediate state Calculate intermediate states The probability distribution; Represents a Gaussian distribution, the first parameter The second parameter represents a random variable. The third parameter represents the mean. Describing covariance, Represents the identity matrix.
3. The spinal image generation method based on scale-enhanced diffusion model and bidirectional diffusion model according to claim 1, characterized in that: In step S04, when the scale-enhanced diffusion model performs the reverse diffusion process, it first introduces textual conditions, encodes these conditions into semantic condition vectors using a text encoder, and injects these semantic condition vectors into the multi-layer structure of the U-Net architecture, ensuring that each diffusion time step is guided by the semantic condition vectors. Then, it returns to the final state of the forward diffusion process. As a starting point, through another parameter-controlled path The control conditions are represented step by step by the Markov chain. Reducing to latent space representation : , , in: This represents the set of all learnable parameters in the U-Net architecture; Indicates the first The intermediate state of a diffusion time step. ; Indicates that the parameter is The conditional probability distribution of control. Indicates a given intermediate state At that time, the predicted intermediate state The conditional probability distribution; and By parameters The network represented is obtained.
4. The spinal image generation method based on scale-enhanced diffusion model and bidirectional diffusion model according to claim 1, characterized in that: In step S04, the learnable scale enhancement module I is inserted into the multi-head self-attention block, feedforward network, and layer normalization layer within the U-Net architecture, using a learnable scale factor. Adjust the bias term and layer normalization parameters; insert the non-learnable scale enhancement module II into the backbone feature processing path and skip connection feature processing path in the U-Net architecture, based on the non-learnable scale factor. A perceptual scaling method is used for channel adaptive enhancement, utilizing a non-learnable scaling factor. Frequency domain low-frequency suppression is performed using Fourier masks.
5. The spinal image generation method based on scale-enhanced diffusion model and bidirectional diffusion model according to claim 4, characterized in that: In the scale-enhanced diffusion model, the scale factor Insert the multi-head self-attention block, feedforward network, and layer normalization layer into the U-Net architecture, and initialize them. ; In the process of training the scale-enhanced diffusion model, based on the scale factor The bias term and layer normalization parameters are trained while other weight parameters are frozen to make the distribution of the generated natural spine image closely resemble the distribution of the target back natural image. In scale factor During the optimization process, a gradient-based optimization strategy is used to adjust the scale factor. Perform iterative updates to find the optimal scaling factor. .
6. The spinal image generation method based on the scale-enhanced diffusion model and the bidirectional diffusion model according to claim 4, characterized in that: In the scale-enhanced diffusion model, a scale factor is introduced into the backbone feature processing path of each block of the decoder in the U-Net architecture. This is used to achieve channel-adaptive enhancement of the backbone feature map, based on the scale factor. Constructing a backbone factor map ; the decoder The backbone feature map output by each block Recorded as , decoder Scale factor introduced in each block Recorded as , decoder Bone factor map of individual blocks Recorded as First, based on the backbone feature diagram Adaptive adjustment of skeletal factor map Then, a perceptual scaling method is used to align the backbone feature maps. This includes the following processes: First, calculate the backbone feature map along the channel dimension. Average feature mapping : , in: Representation of backbone feature map The One channel, Indicates the number of channels; Then, through average feature mapping Adaptive adjustment of skeletal factor map : , in: It is a scalar constant greater than 1. Represents the average eigenmap The minimum pixel value at all spatial locations in the array. Represents the average eigenmap The maximum pixel value at all spatial locations; Finally, based on the backbone factor map Backbone feature map Amplify half of the channels: , in: Indicates the channel adaptive enhancement , This indicates element-wise multiplication.
7. The spinal image generation method based on the scale-enhanced diffusion model and the bidirectional diffusion model according to claim 4, characterized in that: In the scale-enhanced diffusion model, a scale factor is introduced into the skip connection feature processing path of each block of the decoder in the U-Net architecture. Based on scale factor Construct a Fourier mask This is used to selectively suppress low-frequency components of the skip connection feature map; it includes the following process: First, for the U-Net decoder... The skip connection feature map of each block The One channel Perform a Fourier transform to convert it into a frequency domain representation. , Indicates Fourier transform; Then, the frequency domain representation With Fourier mask Perform element-wise multiplication to suppress skip connection feature maps Low-frequency components: , , in: This indicates element-wise multiplication; Indicates correspondence The Fourier mask, derived from the scale factor and frequency radius Joint decision; Indicates the decoder's first Scale factor introduced in each block ; Indicates the threshold frequency; Finally, the modulated frequency domain features Performing an inverse Fourier transform restores the data to the spatial domain, yielding the modulated skip connection feature map. , This represents the inverse Fourier transform.
8. The spinal image generation method based on scale-enhanced diffusion model and bidirectional diffusion model according to claim 1, characterized in that: In step S05, the Brown bridge bidirectional diffusion model anchors the start and end points of the cross-domain diffusion path, so that the image migration path in the latent space forms a controlled bridge between the start and end points, including the Brown bridge forward diffusion process and the Brown bridge reverse diffusion process. During the forward diffusion of the Brown Bridge, a noisy transformation path is constructed starting from the X-ray image and ending with the natural back image, mapping the latent vectors of the X-ray image to the latent vectors of the natural back image. During the backward diffusion of the Brown Bridge, starting from the natural back image, the mean and variance of each diffusion time step are predicted by a neural network, and backward denoising is performed step by step to output an X-ray image whose spinal curvature is strictly aligned with the natural back image, thus achieving radiation-free cross-domain synthesis.
9. A spinal image generation device based on a scale-enhanced diffusion model and a bidirectional diffusion model, characterized in that: It includes a data preparation unit, an image preprocessing and encoding unit, a forward diffusion unit, a scale-enhanced diffusion model, a Brownian bridge bidirectional diffusion model, a parameter optimization unit, and a dataset generation unit; The data preparation unit is used to collect natural back images and corresponding X-ray images of scoliosis patients, construct the first dataset and the second dataset, and provide basic data support for subsequent model training. The samples in the first dataset are natural back images, and the samples in the second dataset are paired natural back images and X-ray images; The image preprocessing and encoding unit is used to preprocess the back natural images in the first dataset, input the preprocessed back natural images into the encoder to obtain the latent space representation, which is used to construct stable diffusion input features; The forward diffusion unit is used to perform a forward diffusion process on the latent space representation, and gradually add noise during the process to generate intermediate states, and the final state converges to a noise representation that follows a Gaussian distribution; The scale-enhanced diffusion model performs a reverse diffusion process on the input noise representation, gradually reconstructing the noise representation into a latent space representation; The scale-enhancing diffusion model is based on the U-Net architecture, which integrates a learnable scale enhancement module I and a non-learnable scale enhancement module II. The learnable scale enhancement module I is inserted into the multi-head self-attention block, feedforward network, and layer normalization layer within the U-Net architecture, using a learnable scale factor. Adjust the bias term and layer normalization parameters; insert the non-learnable scale enhancement module II into the backbone feature processing path and skip connection feature processing path in the U-Net architecture, based on the non-learnable scale factor. Channel adaptive enhancement is achieved using a perceptual scaling method, utilizing a non-learnable scaling factor. Frequency domain low-frequency suppression is performed using Fourier masks; The Brown Bridge bidirectional diffusion model establishes cross-domain diffusion paths using paired natural back images and X-ray images as the starting and ending points, respectively, to achieve radiation-free cross-domain synthesis from natural back images to X-ray images, and ensures that the spinal curvature in the synthesized X-ray image is strictly aligned with the natural back image. The parameter optimization unit trains a scale-enhanced diffusion model based on the first dataset and calculates the noise prediction loss for the reverse diffusion process. The Brownian bridge bidirectional diffusion model was trained based on the second dataset, and the evidence lower bound loss was calculated. The noise prediction loss and the evidence lower bound loss were weighted and summed, and the parameters of the overall spine image generation system consisting of the scale-enhanced diffusion model and the Brownian bridge bidirectional diffusion model were updated through a gradient-based optimization strategy. The dataset generation unit, based on the trained Brown Bridge bidirectional diffusion model, takes the natural spine image obtained through the scale-enhanced diffusion model as input, and obtains the corresponding cross-domain spine image through the Brown Bridge bidirectional diffusion model, thereby constructing a third dataset. The samples in the third dataset are paired natural spine images and cross-domain spine images. The third dataset does not contain any real patient image data, thereby avoiding privacy risks.
Citation Information
Patent Citations
Cross-domain adaptive spine CT image segmentation method
CN119888237A
Clinical vertebra image segmentation method and apparatus for assisting pedicle screw placement surgery
WO2025236278A1
