Pathological image multi-channel virtual staining method based on physical prior and frequency domain decoupling
Patent Information
- Application Number
- CN202610903319.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-23
- Publication Date
- 2026-10-16
AI Technical Summary
但是存在忽视宏观组织基底(如基质、肿瘤巢边界)与微观细胞细节(如核膜突变)的尺度差异,导致特征尺度解耦不足等问题
本发明提供了一种基于物理先验与频域解耦的病理图像多通道虚拟染色方法,针对现有技术将宏观组织与微观细胞混合处理导致特征串扰的问题,创造性地构建了双频段解耦隐式先验编码机制,对所述待测病理图像进行频域解耦得到宏观组织的目标低频先验特征和微观细胞边界的目标高频先验特征,独立捕捉宏观组织拓扑与微观细胞核细节。这种设计不再将形态学信息视为同质化的浅层输入条件,而是将其抽象为包含全局解剖拓扑与局部核形态的结构化特征金字塔。这为后续的多通道分子生成提供了从宏观形态到微观纹理的完备且互不干扰的信息源,有效解决了传统方法因特征提取混合导致的形态学对齐偏差与表达串扰问题。
Smart Images

Figure CN122929359A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image generation technology, and in particular to a multi-channel virtual staining method for pathological images based on physical priors and frequency domain decoupling. Background Technology
[0002] In the fields of pathology and spatial multi-omics, conventional pathological images such as hematoxylin and eosin (H&E) staining and multi-channel molecular imaging such as imaging mass cytometry (IMC) are two highly complementary key imaging modalities. H&E slide images provide comprehensive anatomical information on the macroscopic structure and cellular morphology of tissues and are currently the gold standard for clinical pathological diagnosis; while multi-channel imaging technologies such as IMC can simultaneously achieve precise qualitative and quantitative expression analysis of dozens of target proteins (such as immune markers of the tumor microenvironment) at single-cell resolution. The combination of the two has irreplaceable clinical value for tumor heterogeneity analysis, immune microenvironment assessment, and precise targeted therapy planning. Currently, spatial multi-omics imaging equipment such as IMC is extremely expensive, has a long detection cycle, requires high costs for antibody panel customization, and is destructive, which greatly limits its application in large-scale clinical cohorts and routine rapid pathological screening.
[0003] Currently, cross-modal image generation techniques for specific molecular staining based on conventional pathological images have become a research hotspot in computational pathology. Existing mainstream methods typically construct image translation networks based on deep learning frameworks. These methods achieve some progress in generating single stains or macroscopic texture transformations by learning the statistical distribution mapping between the source and target domains and optimizing it with pixel-level reconstruction loss. However, when faced with multi-channel molecular image generation tasks involving numerous channels, extremely high spatial heterogeneity, and stringent clinical accuracy requirements, existing technologies still suffer from key bottlenecks, severely hindering their practical clinical translation.
[0004] First, existing methods for extracting morphological cues mostly employ global convolution or shallow attention mechanisms, failing to effectively decouple the multi-scale features of pathological images. This results in the model's inability to separate the macroscopic tissue substrate from the microscopic cellular structure. As network depth increases, deep networks are prone to morphological misalignment when generating specific protein molecules, even producing severe phantom false positives in regions lacking biological morphological support. Second, existing models heavily rely on extremely stringent pairing data and force pixel-level alignment loss for isotropic optimization. However, in actual pathological slide preparation, H&E and IMC images inevitably originate from adjacent continuous slices, resulting in unavoidable physical misalignment and non-rigid deformation at the cellular level. Forced pixel-level alignment leads to the model forcibly fitting misalignment noise, causing extremely blurred edges of generated protein molecule expression and severe loss of high-frequency spatial heterogeneity features of multicellular clusters. Furthermore, existing generative models purely pursue visual realism, lacking explicit physical constraints on underlying biomolecular dynamics. The diffusion and distribution of certain key proteins in the tissue microenvironment strictly follow hydrodynamic or biodynamic laws. The spatial gradient of protein concentration generated by purely visual models often violates these physical laws, causing quantitative results to deviate from the true physiological state and making it difficult to support reliable downstream clinical molecular subtyping and prognostic prediction tasks.
[0005] A search of existing technical literature revealed a patent with publication number CN121685984A, titled: "Multi-modal Representation-Guided Super-Resolution Method and Device for Pathological Images of Multiple Cancer Types Based on Diffusion Model." The method includes: acquiring a high-resolution image dataset; constructing a frequency domain information mining model; designing a frequency domain joint guidance loss function; constructing a multi-modal representation extraction model; constructing a multi-modal representation encoding model; constructing an improved image denoising network; inputting the test set into the trained image denoising network to obtain the super-resolution results for visualization. This patent achieves end-to-end super-resolution reconstruction of pathological images; extracts accurate high-frequency and low-frequency information from low-resolution images as prior information to guide the diffusion model generation, thereby improving the detail information of the generated images; designs a multi-modal representation attention module to guide the diffusion model, thereby ensuring the pathological consistency of the generated images; and designs a frequency domain joint guidance loss function to constrain the diffusion model training in both the pixel and frequency domains, thereby improving the model's frequency domain reconstruction capability. However, it suffers from problems such as neglecting the scale difference between macroscopic tissue substrates (e.g., stroma, tumor nest boundaries) and microscopic cellular details (e.g., nuclear membrane mutations), leading to insufficient decoupling of feature scales. Summary of the Invention
[0006] Therefore, it is necessary to provide a multi-channel virtual staining method for pathological images based on physical priors and frequency domain decoupling to address the above-mentioned technical problems, so as to realize the generation of virtual staining images with high morphological consistency, high molecular expression accuracy and clinical reliability from conventional pathological images.
[0007] To solve the above-mentioned technical problems, the present invention provides the following technical solution: This invention provides a multi-channel virtual staining method for pathological images based on physical priors and frequency domain decoupling, the method comprising: S1: Obtain the pathological image to be tested and the target channel mask vector, perform frequency domain decoupling on the pathological image to be tested to obtain the target low-frequency prior features and the target high-frequency prior features, and generate a pure Gaussian noise latent variable that matches the resolution of the pathological image to be tested. S2: Input the target low-frequency prior features, the target high-frequency prior features, the target channel mask vector, and the pure Gaussian noise latent variable into a preset denoising model, output the final latent variable, decode the final latent variable, and obtain the predicted multi-channel molecular image. The predicted multi-channel molecular image is the image of the pathological image to be tested after virtual staining of specific protein molecules.
[0008] Preferably, after obtaining low-frequency implicit feature maps and high-frequency implicit feature maps by frequency domain decoupling based on preset pathological images, the U-Net network is improved using the low-frequency implicit feature maps and the high-frequency implicit feature maps to construct the preset denoising model.
[0009] Preferably, the construction of the preset denoising model includes the following steps: S201: Obtain a multimodal weak registration training set, which includes a preset pathological image, a preset multi-channel molecular image, and a preset channel mask vector; S202: Perform a two-dimensional discrete wavelet transform on the preset pathological image to obtain a preset low-frequency component and a preset high-frequency component set; S203: A low-frequency encoder and a high-frequency encoder are constructed using a Transformer encoder network. The preset low-frequency components are input into the low-frequency encoder to obtain a low-frequency implicit feature map. The preset high-frequency components are concatenated along the channel dimension and then input into the high-frequency encoder to obtain a high-frequency implicit feature map. S204: The encoder using a variational autoencoder maps the preset multi-channel molecular image to a low-dimensional latent space to obtain an initial latent variable. Gaussian noise is gradually injected into the initial latent variable, and after reaching a preset maximum diffusion time step, a noisy latent variable is obtained. S205: Perform convolution mapping on the low-frequency implicit feature map and the high-frequency implicit feature map respectively to generate a first affine parameter and a second affine parameter. Perform hierarchical spatial modulation on the U-Net network according to the first affine parameter and the second affine parameter to obtain the modulated U-Net network. S206: Define a global protein semantic dictionary matrix in the modulated U-Net network according to a preset global protein semantic dictionary. Extract semantic vectors from the global protein semantic dictionary matrix according to the preset channel mask vector and concatenate them to obtain a dynamic conditional sequence. Use the low-frequency implicit feature map and the high-frequency implicit feature map as query matrices, and the dynamic conditional sequence as key matrix and value matrix to perform dynamic channel attention cross-modulation on the modulated U-Net network to obtain the preset denoising model.
[0010] Preferably, hierarchical spatial modulation is performed within the U-Net network based on the first affine parameter and the second affine parameter, including: The first affine parameters are used to perform a point-by-point affine transformation on the deep layers of the U-Net network; The second affine parameter is used to perform a point-by-point affine transformation on the shallow layers of the U-Net network.
[0011] Preferably, before step S2, the following steps are also included: A preset loss function is constructed based on the distance of the slice bulldozer. The preset denoising model is trained using the preset loss function until the loss function converges, and then the preset denoising model is updated.
[0012] Preferably, the preset loss function The calculation expression is as follows:
[0013]
[0014] in, This represents the conventional denoising diffusion loss. express The weight, Indicates the distance loss of the slicing bulldozer. express The weight, Indicates random orthogonal directions. Indicates the desired operation. Indicates the distance of the second-order bulldozer. Indicates the direction projection operator. This indicates that only the distribution matching of valid channels is calculated. This represents the predicted channel molecular image output by the model. express The corresponding real channel molecular image.
[0015] Preferably, step S1 includes: The pathological image to be tested and the target channel mask vector are obtained. The pathological image to be tested is subjected to two-dimensional discrete wavelet transform to obtain the target low-frequency component and the target high-frequency component set. The target low-frequency component is extracted by a low-frequency encoder with frozen weights to obtain the target low-frequency prior features. The target high-frequency component set is extracted by a high-frequency encoder with frozen weights to obtain the target high-frequency prior features. A variational autoencoder is used to process the pathological image under test to generate a pure Gaussian noise latent variable that matches the resolution of the pathological image under test.
[0016] Preferably, step S2 includes: The pure Gaussian noise latent variable is denoised in reverse iteratively in the preset denoising model according to the target low-frequency prior features, the target high-frequency prior features and the target channel mask vector at preset time steps. After the time step is iterated to one, the final latent variable is output. The final latent variable is decoded using a variational autoencoder to obtain a predicted multichannel molecular image.
[0017] Preferably, at each time step, a physical information-guided formula is used to correct the sampling trajectory of the latent variables after denoising at that time step.
[0018] Preferably, the physical information-guided formula is calculated as follows:
[0019] in, express Latent variables after time-step denoising express Latent variables after time step correction This represents the step size parameter that controls the strength of physical constraints. This indicates the Laplace penalty gradient. express Latent variables after time step correction This represents the low-frequency prior features of the target.
[0020] Compared with the prior art, the beneficial effects of the present invention are: This invention provides a multi-channel virtual staining method for pathological images based on physical priors and frequency domain decoupling. Addressing the problem of feature crosstalk caused by the mixed processing of macroscopic tissues and microscopic cells in existing technologies, this invention creatively constructs a dual-band decoupled implicit prior coding mechanism. By performing frequency domain decoupling on the pathological image to be tested, target low-frequency prior features of macroscopic tissues and target high-frequency prior features of microscopic cell boundaries are obtained, independently capturing macroscopic tissue topology and microscopic cell nuclear details. This design no longer treats morphological information as homogeneous, shallow input conditions, but rather abstracts it into a structured feature pyramid containing global anatomical topology and local nuclear morphology. This provides a complete and non-interfering information source from macroscopic morphology to microscopic texture for subsequent multi-channel molecular generation, effectively solving the problems of morphological alignment deviation and expression crosstalk caused by the mixed feature extraction in traditional methods. Attached Figure Description
[0021] Figure 1 This is a schematic diagram of the process of the multi-channel virtual staining method for pathological images based on physical prior and frequency domain decoupling in an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the process of constructing, training, and applying a preset denoising model for a multi-channel virtual staining method for pathological images based on physical priors and frequency domain decoupling in an embodiment of the present invention. Figure 3 This is a schematic diagram of the high- and low-frequency feature coding network architecture of the multi-channel virtual staining method for pathological images based on physical prior and frequency domain decoupling in an embodiment of the present invention; Figure 4 This is a schematic diagram of the preset denoising model architecture for a multi-channel virtual staining method for pathological images based on physical priors and frequency domain decoupling in an embodiment of the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0023] Example 1 like Figure 1 As shown, this embodiment proposes a multi-channel virtual staining method for pathological images based on physical priors and frequency domain decoupling. The method includes: S1: Obtain the pathological image to be tested and the target channel mask vector, perform frequency domain decoupling on the pathological image to be tested to obtain the target low-frequency prior features and the target high-frequency prior features, and generate a pure Gaussian noise latent variable that matches the resolution of the pathological image to be tested. S2: Input the target low-frequency prior features, the target high-frequency prior features, the target channel mask vector, and the pure Gaussian noise latent variable into a preset denoising model, output the final latent variable, decode the final latent variable, and obtain the predicted multi-channel molecular image. The predicted multi-channel molecular image is the image of the pathological image to be tested after virtual staining of specific protein molecules.
[0024] Example 2 This embodiment further supplements the description of the multi-channel virtual staining method for pathological images based on physical priors and frequency domain decoupling proposed in Embodiment 1.
[0025] In one optional embodiment, after obtaining low-frequency implicit feature maps and high-frequency implicit feature maps by frequency domain decoupling from a preset pathological image, the U-Net network is improved using the low-frequency implicit feature maps and the high-frequency implicit feature maps to construct the preset denoising model. This includes the following steps: S201: Obtain a multimodal weak registration training set, which includes a preset pathological image, a preset multi-channel molecular image, and a preset channel mask vector; S202: Perform a two-dimensional discrete wavelet transform on the preset pathological image to obtain a preset low-frequency component and a preset high-frequency component set; S203: A low-frequency encoder and a high-frequency encoder are constructed using a Transformer encoder network. The preset low-frequency components are input into the low-frequency encoder to obtain a low-frequency implicit feature map. The preset high-frequency components are concatenated along the channel dimension and then input into the high-frequency encoder to obtain a high-frequency implicit feature map. S204: The encoder using a variational autoencoder maps the preset multi-channel molecular image to a low-dimensional latent space to obtain an initial latent variable. Gaussian noise is gradually injected into the initial latent variable, and after reaching a preset maximum diffusion time step, a noisy latent variable is obtained. S205: Perform convolution mapping on the low-frequency implicit feature map and the high-frequency implicit feature map respectively to generate a first affine parameter and a second affine parameter. Perform hierarchical spatial modulation on the U-Net network according to the first affine parameter and the second affine parameter to obtain the modulated U-Net network. S206: Define a global protein semantic dictionary matrix in the modulated U-Net network, extract semantic vectors from the global protein semantic dictionary matrix according to the preset channel mask vector, concatenate them to obtain a dynamic condition sequence, use the noisy latent variable as the query matrix, and use the dynamic condition sequence as the key matrix and value matrix to perform dynamic channel attention cross-modulation on the modulated U-Net network to obtain the preset denoising model.
[0026] In the specific implementation process, step S201 involves obtaining the multimodal weak registration training set. Multimodal weak registration training dataset. .in, The preset pathological image is, in this embodiment, specifically, an H&E slide image; To pre-define multi-channel molecular images, this embodiment specifically has... Multiple IMC images with multiple feature channels. Due to the physical characteristics of continuous tissue sections, and Rigid and non-rigid deformations exist at the single-cell scale. A preset dynamic channel mask vector is used to indicate samples. Effective protein channels exist within it.
[0027] Step S202 is the frequency domain decoupling of the H&E image based on discrete wavelet transform. For example... Figure 3 As shown, in order to separate macroscopic tissue topology from microscopic cellular details, the input H&E image is processed. Perform a two-dimensional Haar discrete wavelet transform to decompose it into subbands containing information from different frequency bands:
[0028] in, The low-frequency components are preset to characterize the macroscopic tissue topological basis; Form a preset high-frequency component set Characterizes microscopic cell nuclear edges and high-frequency texture mutations.
[0029] Step S203 involves constructing a dual-band implicit feature extraction network to extract multi-scale frequency domain priors. For example... Figure 3 As shown, two independent Transformer encoder networks (low-frequency encoder and high-frequency encoder) are constructed. The preset low-frequency component... The low-frequency implicit feature map representing the macroscopic organizational structure is extracted from the input low-frequency encoder. Set the preset high-frequency components After concatenation along the channel dimension, the high-frequency implicit feature map representing the microscopic cell boundary is extracted into the high-frequency encoder. The frequency domain splitting mechanism described above can effectively reduce the fitting burden of a single feature extraction network and achieve multi-scale feature decoupling.
[0030] Step S204 involves compressing multi-channel data using a variational autoencoder and performing a forward noise addition process. The encoder utilizes a variational autoencoder. High-dimensional IMC tensor Mapping to a low-dimensional latent space to obtain initial latent variables At the set maximum diffusion time step Internally, based on variance scheduling parameters To the initial latent variable Gaussian noise is gradually injected into the middle. Any time step The noisy latent variables are obtained from the reparameterized formula:
[0031] in, , Finally, the diffusion time step was obtained. The noisy latent variables are obtained.
[0032] Step S205 involves performing hierarchical spatial modulation with frequency domain decoupling in the denoising network. A conditional U-Net denoising network containing both encoding and decoding paths is constructed. To accurately inject frequency domain priors, a hierarchical spatial modulation module is set up inside the network: in the deep layers of the denoising network, low-frequency implicit feature maps are utilized. Affine scaling and bias parameters (first affine parameters) generated by convolutional mapping are used to perform pointwise affine transformations on the deep layers of the U-Net network to achieve spatial normalization of the deep feature maps, thereby dominating the generation of the macroscopic structure. In the shallow layers of the denoising network, high-frequency implicit feature maps are utilized. Affine scaling and bias parameters (second affine parameters) are generated to normalize the shallow feature map, thereby enhancing the reconstruction of microscopic cellular details and ultimately obtaining the modulated U-Net network. This end-to-end deep modulation mechanism acts as an anchor point for the microenvironment structure, forcing the model to strictly adhere to the spatial constraints of the H&E anatomical boundaries at every step in recovering the molecular expression map from Gaussian noise. This achieves precise and flexible injection of morphological conditional information into the global topology and cellular details.
[0033] Step S206 involves performing dynamic channel attention cross-modulation based on the global protein semantic dictionary. A learnable global protein semantic dictionary matrix is defined in the modulated U-Net network. . It is a learnable embedding matrix, which is equivalent to assigning a trainable semantic vector to each channel. It is initialized (there are two options for initialization: (1) random initialization (standard normal distribution), and the network learns meaningful semantic clusters on its own; (2) if there is a known channel-label type prior (such as green channel corresponding to GFP, red channel corresponding to DsRed, etc.), the prior can be used for bounded lookup table initialization, but the backbone parameter space of the dictionary is still open and updated by training data to ensure generalization) and then trained with the model. Extract the semantic vector corresponding to the index with a value of 1, and concatenate them into a dynamic conditional sequence. In the deep interaction module of the network, the low-frequency implicit feature map and the high-frequency implicit feature map obtained in step S203 are used as the query matrix. Cross-attention computation is performed using the key and value matrices, allowing the network to focus solely on reconstruction. The molecular expression characteristics of specified channels are used to obtain the preset denoising model, the architecture of which is as follows: Figure 4 As shown.
[0034] In an optional embodiment, before step S2, the following steps are further included: A preset loss function is constructed based on the distance of the slice bulldozer. The preset denoising model is trained using the preset loss function until the loss function converges, and then the preset denoising model is updated.
[0035] In the specific implementation process, the preset denoising model predicts noise based on dual-modulation output. This leads to the predicted IMC distribution. The distribution of the real IMC image is denoted as To overcome the inherent physical spatial misalignment between H&E and IMC images, strict pixel-level absolute mean square error is abandoned, and the Sliced Wasserstein Distance (SWD) based on optimal transport theory is introduced. This is achieved by using multiple random orthogonal directions... Projecting the distance onto the feature space:
[0036] This mechanism abandons strict absolute pixel alignment and instead imposes topological constraints on the spatial distribution manifold of the target protein expression, effectively overcoming gradient interference caused by physical slicing deformation. The final preset loss function... Defined as conventional denoising diffusion loss and the above Weighted sum:
[0037] in, This represents the conventional denoising diffusion loss. express The weight, Indicates the distance loss of the slicing bulldozer. express The weight, Indicates random orthogonal directions. Indicates the desired operation. Indicates the distance of the second-order bulldozer. Indicates the direction projection operator. This indicates that only the distribution matching of valid channels is calculated. This represents the predicted IMC image output by the model. express The corresponding real IMC image. Based on this preset loss function. By using gradient descent to update network parameters, optimal transmission alignment at the manifold topology level can be achieved.
[0038] In summary, the complete process of the pre-defined denoising model of this invention from construction and training to application is as follows: Figure 2 As shown. Addressing the issue of feature crosstalk caused by the mixed processing of macroscopic tissues and microscopic cells in existing technologies, this invention introduces discrete wavelet transform and a dual-band implicit feature extraction network to independently capture macroscopic tissue topology and microscopic cell nuclear details. Combining multi-level spatial adaptive modulation and a dynamic channel cross-attention mechanism, these multi-scale spatial priors and target protein semantics are injected layer by layer into the generation network. This mechanism enables the model to intelligently allocate generation resources based on frequency band characteristics and mask instructions, prioritizing the accurate reconstruction of specific molecules within specific cell compartments, effectively solving common problems in existing methods such as cell boundary blurring, expression signal crosstalk, and false positive artifacts. Furthermore, this invention strives to establish strict tissue morphological consistency during the generation process involving cross-modal and physical misalignment. Addressing the generation drift and misalignment blurring caused by the inherent weak registration state of continuous pathological sections, it breaks through the constraints of traditional pixel-level strong alignment mapping by introducing slice Wasserstein distance to construct an optimal transmission loss function. This design forces the generated IMC molecular expression manifold to maintain global consistency with the morphological distribution of the source H&E image in topological space, effectively eliminating gradient interference caused by non-rigid deformation of the slices, ensuring that the generated image is geometrically faithful to the original slice structure, and avoiding the biological illusion that is detached from the support of real anatomical morphology.
[0039] Example 3 This embodiment further supplements the description of the multi-channel virtual staining method for pathological images based on physical priors and frequency domain decoupling proposed in the above embodiments.
[0040] In an optional embodiment, step S1 includes: The pathological image to be tested and the target channel mask vector are obtained. The pathological image to be tested is subjected to two-dimensional discrete wavelet transform to obtain the target low-frequency component and the target high-frequency component set. The target low-frequency component is extracted by a low-frequency encoder with frozen weights to obtain the target low-frequency prior features. The target high-frequency component set is extracted by a high-frequency encoder with frozen weights to obtain the target high-frequency prior features. A variational autoencoder is used to process the pathological image to be tested, generating a pure Gaussian noise latent variable that matches the resolution of the pathological image to be tested.
[0041] In the specific implementation process, the target patient's H&E images are acquired. and clinically specified target channel mask vector .right A two-dimensional Haar discrete wavelet transform is performed to decompose the target into a set of target low-frequency components and a set of target high-frequency components. Then, the target low-frequency prior features are extracted by using a low-frequency encoder and a high-frequency encoder with frozen weights. High-frequency prior features of the target Simultaneously, in the low-dimensional latent space corresponding to the variational autoencoder, the image is generated. Resolution-matched pure Gaussian noise latent variables .
[0042] In an optional embodiment, step S2 includes: The pure Gaussian noise latent variable is denoised in reverse iteratively in the preset denoising model according to the target low-frequency prior features, the target high-frequency prior features and the target channel mask vector at preset time steps. After the time step is iterated to one, the final latent variable is output. The final latent variable is decoded using a variational autoencoder to obtain a predicted multichannel molecular image.
[0043] In the specific implementation process, a pre-trained denoising model is used to denoise at time step from Iterative denoising sampling is performed as the noise decreases to zero. At each time step, the latent variable of pure Gaussian noise... It is guided not only by the target's low-frequency prior features, high-frequency prior features, and target channel mask vector, but also by the constraints of biophysical dynamics. Specifically, the diffusion of molecules in the microenvironment is defined as following a reaction-diffusion physical partial differential equation, and intermediate latent variables are obtained through conventional denoising sampling. Based on this, calculate the regular Laplace penalty gradient in the current feature space. At each time step, the sampling trajectory of the denoised latent variables at that time step is corrected using a physical information-guided formula. The calculation expression of the physical information-guided formula is as follows:
[0044] in, express Latent variables after time-step denoising express Latent variables after time step correction This represents the step size parameter that controls the strength of physical constraints. This indicates the Laplace penalty gradient. express Latent variables after time step correction This step represents the low-frequency prior features of the target. It forcibly corrects the spatial decay gradient of the concentration of virtual expression hotspots generated by the model, ensuring it strictly conforms to the laws of real biochemical molecular diffusion and eliminating false positives that violate physical laws. This design directly imposes explicit physical constraints on the concentration decay gradient of specific molecules in tissue space, forcing the neural network not only to learn visually perceived textures but also to follow the biochemical molecular diffusion laws within the real tumor microenvironment. This ensures that the generated digital multichannel staining images possess high accuracy, interpretability, and biological reliability in reflecting key clinical indicators such as single-cell quantitative expression and spatial aggregation patterns.
[0045] After iterating to time step one, the final latent variable, corrected by the reaction-diffusion physical partial differential equation and completely denoised, will be... Decoder for input variational autoencoder After decoding and mapping back to the high-dimensional pixel space, the output obtains a target channel mask vector. The instruction requires a target multichannel virtual staining image that is precisely aligned with the tissue morphology and conforms to biophysical logic, i.e., a predicted multichannel molecular image.
[0046] In summary, this invention innovatively introduces a biological reaction-diffusion partial differential equation (PDE) as the underlying physical guide term during the sampling generation stage, forcibly constraining the spatial gradient of the generated target protein expression concentration to conform to the diffusion laws of the real microenvironment. This makes the generated virtual staining images not only visually highly realistic, but also highly consistent with the real physiological state in key quantitative indicators such as spatial point aggregation patterns and relative abundance of target proteins. The generated results can effectively replace expensive equipment and be applied in clinical scenarios such as tumor heterogeneity analysis, molecular marker screening, and immune microenvironment assessment, serving as an efficient, non-invasive, and highly reliable digital pathology-assisted diagnostic tool.
Claims
1. A multi-channel virtual staining method for pathological images based on physical priors and frequency domain decoupling, characterized in that, include: S1: Obtain the pathological image to be tested and the target channel mask vector, perform frequency domain decoupling on the pathological image to be tested to obtain the target low-frequency prior features and the target high-frequency prior features, and generate a pure Gaussian noise latent variable that matches the resolution of the pathological image to be tested. S2: Input the target low-frequency prior features, the target high-frequency prior features, the target channel mask vector, and the pure Gaussian noise latent variable into a preset denoising model, output the final latent variable, decode the final latent variable, and obtain the predicted multi-channel molecular image. The predicted multi-channel molecular image is the image of the pathological image to be tested after virtual staining of specific protein molecules.
2. The multi-channel virtual staining method for pathological images based on physical priors and frequency domain decoupling as described in claim 1, characterized in that, After obtaining low-frequency implicit feature maps and high-frequency implicit feature maps by frequency domain decoupling based on preset pathological images, the U-Net network is improved using the low-frequency implicit feature maps and the high-frequency implicit feature maps to construct the preset denoising model.
3. The multi-channel virtual staining method for pathological images based on physical priors and frequency domain decoupling as described in claim 2, characterized in that, The pre-defined denoising model is constructed through the following steps: S201: Obtain a multimodal weak registration training set, which includes a preset pathological image, a preset multi-channel molecular image, and a preset channel mask vector; S202: Perform a two-dimensional discrete wavelet transform on the preset pathological image to obtain a preset low-frequency component and a preset high-frequency component set; S203: A low-frequency encoder and a high-frequency encoder are constructed using a Transformer encoder network. The preset low-frequency components are input into the low-frequency encoder to obtain a low-frequency implicit feature map. The preset high-frequency components are concatenated along the channel dimension and then input into the high-frequency encoder to obtain a high-frequency implicit feature map. S204: The encoder using a variational autoencoder maps the preset multi-channel molecular image to a low-dimensional latent space to obtain an initial latent variable. Gaussian noise is gradually injected into the initial latent variable, and after reaching a preset maximum diffusion time step, a noisy latent variable is obtained. S205: Perform convolution mapping on the low-frequency implicit feature map and the high-frequency implicit feature map respectively to generate a first affine parameter and a second affine parameter. Perform hierarchical spatial modulation on the U-Net network according to the first affine parameter and the second affine parameter to obtain the modulated U-Net network. S206: Define a global protein semantic dictionary matrix in the modulated U-Net network, extract semantic vectors from the global protein semantic dictionary matrix according to the preset channel mask vector, and concatenate them to obtain a dynamic condition sequence. Use the low-frequency implicit feature map and the high-frequency implicit feature map as query matrices, and the dynamic condition sequence as key matrix and value matrix to perform dynamic channel attention cross-modulation on the modulated U-Net network to obtain the preset denoising model.
4. The multi-channel virtual staining method for pathological images based on physical priors and frequency domain decoupling as described in claim 3, characterized in that, Hierarchical spatial modulation is performed within the U-Net network based on the first affine parameter and the second affine parameter, including: The first affine parameters are used to perform a point-by-point affine transformation on the deep layers of the U-Net network; The second affine parameter is used to perform a point-by-point affine transformation on the shallow layers of the U-Net network.
5. The multi-channel virtual staining method for pathological images based on physical priors and frequency domain decoupling as described in claim 2, characterized in that, Before step S2, the following steps are also included: A preset loss function is constructed based on the distance of the slice bulldozer. The preset denoising model is trained using the preset loss function until the loss function converges, and then the preset denoising model is updated.
6. The multi-channel virtual staining method for pathological images based on physical priors and frequency domain decoupling as described in claim 5, characterized in that, The preset loss function The calculation expression is as follows: in, This represents the conventional denoising diffusion loss. express The weight, Indicates the distance loss of the slicing bulldozer. express The weight, Indicates random orthogonal directions. Indicates the desired operation. Indicates the distance of the second-order bulldozer. Indicates the direction projection operator. This indicates that only the distribution matching of valid channels is calculated. This represents the predicted channel molecular image output by the model. express The corresponding real channel molecular image.
7. The multi-channel virtual staining method for pathological images based on physical priors and frequency domain decoupling as described in claim 1, characterized in that, Step S1 includes: The pathological image to be tested and the target channel mask vector are obtained. The pathological image to be tested is subjected to two-dimensional discrete wavelet transform to obtain the target low-frequency component and the target high-frequency component set. The target low-frequency component is extracted by a low-frequency encoder with frozen weights to obtain the target low-frequency prior features. The target high-frequency component set is extracted by a high-frequency encoder with frozen weights to obtain the target high-frequency prior features. A variational autoencoder is used to process the pathological image to be tested, generating a pure Gaussian noise latent variable that matches the resolution of the pathological image to be tested.
8. The multi-channel virtual staining method for pathological images based on physical priors and frequency domain decoupling as described in claim 7, characterized in that, Step S2 includes: The pure Gaussian noise latent variable is denoised in reverse iteratively in the preset denoising model according to the target low-frequency prior features, the target high-frequency prior features and the target channel mask vector at preset time steps. After the time step is iterated to one, the final latent variable is output. The final latent variable is decoded using a variational autoencoder to obtain a predicted multichannel molecular image.
9. The multi-channel virtual staining method for pathological images based on physical priors and frequency domain decoupling as described in claim 8, characterized in that, At each time step, the sampling trajectory of the latent variables after denoising at that time step is corrected using a formula guided by physical information.
10. The multi-channel virtual staining method for pathological images based on physical priors and frequency domain decoupling according to claim 9, characterized in that, The formula for calculating the physical information guidance is as follows: in, express Latent variables after time-step denoising express Latent variables after time step correction This represents the step size parameter that controls the strength of physical constraints. This indicates the Laplace penalty gradient. express Latent variables after time step correction This represents the low-frequency prior features of the target.
Citation Information
Patent Citations
Multi-modal characterization guided multi-cancer pathology image super-division method and device based on diffusion model
CN121685984A