Pathological section virtual staining image generation method based on Gaussian mixture model

By using Gaussian mixed model for virtual staining of pathological sections, the high cost and complexity of existing methods are solved, and low-cost and efficient virtual staining is achieved, which is suitable for rapid clinical diagnosis.

CN119888003APending Publication Date: 2025-04-25THE FIRST AFFILIATED HOSPITAL OF MEDICAL COLLEGE OF XIAN JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411876679.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing virtual staining method for pathological slices based on GAN and CycleGAN has problems such as high cost, high computing resource consumption, complex model structure, opaque training process, and poor adaptability to new data.

Method used

The Gaussian mixed model (GMM) was used for virtual staining of pathological sections. By converting the H&E stained images to the YUV color space, significant maps and gradient maps were extracted, weighted attention maps were generated, and the GMM model was constructed using the EM algorithm for iterative optimization to maintain the gradient information of the original image.

Benefits of technology

It reduces the demand for training data, simplifies the training and inference process, reduces the consumption of computing resources, improves the interpretability and adaptability of the model, and realizes real-time or quasi-real-time virtual staining to meet the needs of rapid clinical diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119888003A_ABST
    Figure CN119888003A_ABST
Patent Text Reader

Abstract

The invention discloses a method for generating a virtual staining image of a pathological section based on a Gaussian mixture model, and belongs to the technical field of medical image processing. The method comprises the following steps: firstly, passing through Hamp; e dyeing serves as a source image data set, and pathological section images subjected to IHC dyeing serve as a target image data set; converting an image in the source image data set into a corresponding YUV color space; extracting a saliency map and a gradient map of the source image, and generating a weighted attention map; then constructing GMM modeling, performing iterative optimization by using an EM algorithm, and introducing a regularization item to maintain gradient information of an original image; and iterating repeatedly until a satisfactory virtual dyeing result is obtained. According to the method, the preprocessed pathological section weighted attention map is used as the input of the GMM model, the tissue component boundary is judged through the information of different components, and the accuracy and reconstruction effect of the generated virtual dyeing image are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical image processing, and in particular to a method for generating a virtual stained image of a pathological section based on a Gaussian mixture model. Background Art

[0002] In recent years, methods based on generative adversarial networks (GAN) and CycleGAN have been widely used in the field of virtual staining of pathological sections to convert H&E stained tissue sections into a variety of stained images. However, these deep learning methods still have some obvious shortcomings. First, the training of these models usually requires a large amount of labeled data, and the high cost of data collection and annotation limits their widespread application. Secondly, the training and inference process of GAN and CycleGAN consumes a lot of computing resources. In addition, these models have complex structures and opaque training processes, which makes their interpretation and debugging difficult. Finally, GAN and CycleGAN have poor adaptability to new data and unknown environments, and often require frequent adjustments and retraining to cope with new tasks, which increases the cost of development and application.

[0003] Gaussian mixture model (GMM) is a probabilistic model widely used in data analysis and pattern recognition. By representing data as a linear combination of multiple Gaussian distributions, it can effectively capture the complex structure and multimodal characteristics of data. In addition, GMM is based on a probabilistic framework and can provide a clear description of the data generation process. In recent years, it has played an important role in image processing, speech recognition, biomedicine and other fields. Using GMM for virtual staining has many advantages:

[0004] (1) The demand for training data is low, and good results can be achieved under limited data conditions;

[0005] (2) Its training and inference processes are relatively simple, consume low computing resources, and are suitable for running on ordinary computing devices;

[0006] (3) GMM is based on a probability model, and each Gaussian component corresponds to a subgroup of the data. It has good interpretability and transparency, making it easy to understand and debug;

[0007] (4) The GMM method is used to optimize pixel-by-pixel color. There is no need for prior knowledge and results such as registration and segmentation. The calculation speed is faster and real-time or quasi-real-time virtual staining can be achieved to meet the needs of rapid clinical diagnosis.

[0008] Using Gaussian mixture models for virtual staining can effectively solve the time-consuming and labor-intensive problems of traditional staining methods, while overcoming the high cost and complexity of deep learning methods, providing an efficient, low-cost, and easy-to-operate solution for clinical diagnosis. Summary of the invention

[0009] In order to solve the above technical problems, the present invention provides a method for generating virtual stained images of pathological sections based on a Gaussian mixture model, which belongs to the field of medical image processing technology. First, the H&E stained pathological section images are used as the source image data set, and the IHC stained pathological section images are used as the target image data set; and the images in the source image data set are converted to the corresponding YUV color space; the saliency map and gradient map of the source image are extracted to generate a weighted attention map; then the GMM modeling is constructed, and the EM algorithm is used for iterative optimization, while the regularization term is introduced to maintain the gradient information of the original image; it is repeated until a satisfactory virtual staining result is obtained. The present invention uses the preprocessed weighted attention map of the pathological section as the input of the GMM model, judges the boundaries of tissue components through the information of different components, and improves the accuracy and reconstruction effect of the generated virtual staining image.

[0010] The specific steps of the technical solution of the present invention are as follows:

[0011] S1, obtaining a data set: using a pathological section image stained with hematoxylin and eosin (H&E) as a source image data set; using a pathological section image stained with immunohistochemistry (IHC) as a target image data set;

[0012] S2, preprocessing the H&E stained images in the source image dataset to obtain the source images;

[0013] S3, extracts the saliency map and gradient map of the source image and generates a weighted attention map;

[0014] S4, construct the GMM model;

[0015] S5, iteratively optimize the GMM model through the EM algorithm;

[0016] S6, inputting the image to be dyed into the optimized GMM model, and obtaining a virtual dyed image through color mapping;

[0017] S7, evaluate the performance of the GMM model.

[0018] Further, in S2, the preprocessing process of the H&E staining image is as follows:

[0019] S2.1, format conversion: convert tiff format images to .png or .jpg format images;

[0020] S2.2, image cropping: crop the .png or .jpg format image into image blocks with a resolution of 512×512, ensuring that there is overlap in the x-axis and y-axis directions to avoid large color differences between adjacent image blocks in the generated image;

[0021] S2.3, image conversion: convert the cropped H&E stained image from RGB space to YUV color space according to the following formula, and then perform color statistics; in order to better process color information; the conversion method selects ITU-R BT.601 (SDTV) conversion standard;

[0022]

[0023] Among them, Y, U, and V are the pixel values ​​in the color channels of the Gaussian filtered reference image; R, G, and B represent the red, green, and blue color channels of the H&E stained image, respectively;

[0024] S2.4, convert the YUV image after color conversion operation back to RGB space, the conversion formula is as follows:

[0025]

[0026] Further, in S3, the saliency map extraction method is as follows:

[0027] S3.1, calculate the mean of the pixels of the three channels of the source image YUV color space;

[0028] S3.2, smoothing the source image: performing a 5×5 separable binomial kernel Gaussian filter on the source image to reduce noise while maintaining edge information;

[0029] The specific separable binomial kernel Gaussian filtering method is as follows:

[0030] Perform a one-dimensional convolution on the GMM model pre-input image I(x, y) in the x-axis direction to obtain the intermediate image J(x, y):

[0031]

[0032] Perform a one-dimensional convolution on the intermediate image J(x, y) in the y-axis direction to obtain the final output image I′(x, y):

[0033]

[0034] Among them, x, y represent the coordinate values ​​of the image pixels; h k represents the horizontal filter weight; h z represents the vertical filter weight; k and z represent the different scales of the convolution kernel, k, z∈{-2,-1,0,1,2}, corresponding to a 5×5 kernel;

[0035] S3.3, by calculating the normalized Euclidean distance between the source image I(x, y) and the image I′(x, y) generated by Gaussian filtering, the saliency map SM is obtained:

[0036]

[0037] Here, F is the normalization factor.

[0038] Further, in S3, the gradient map is extracted as follows:

[0039] Use the Sobel filter to perform convolution to calculate the gradient map, extract the edge of the source image, and obtain the gradient map GM of the source image;

[0040] The Sobel filter detects edges in the x-axis and y-axis directions respectively through two 3×3 convolution kernels;

[0041] Calculate the gradient in the x-axis direction:

[0042] Calculate the gradient in the y-axis direction:

[0043] Compute the gradient magnitude:

[0044] Among them, the convolution kernel in the x-axis direction is K x , the convolution kernel in the y-axis direction is K y ; i and j represent the row and column coordinates of the image respectively;

[0045]

[0046] Finally, the G value is normalized to obtain the gradient map GM.

[0047] Further, in S3, the method for generating the weighted attention map is: fusing the saliency map and the gradient map according to the weight ratio to generate the weighted attention map M; M = 0.5 * SM+0.5 * GM.

[0048] Further, in S4, the GMM model construction method is as follows:

[0049] S4.1, data preparation: data enhancement processing is performed on the H&E staining image samples input into the GMM model, and image flipping, random cropping and random noise addition are performed in sequence;

[0050] S4.2, the weighted attention map of the source image and the IHC stained target image are used as the input of the GMM model;

[0051] S4.3: Calculate the probability density of the target image: This function is to quantify the probability that each pixel in the target image belongs to a component of the mixed Gaussian distribution, thereby achieving distribution modeling and classification of image pixels:

[0052] The pixel set X of the source image is {x1,…,x m ,…,xM}, x m ∈R 3 and the pixel set of the target image

[0053] Y={y1,…,y k ,…,y K},y k ∈R 3 ;

[0054] The target image follows the GMM modeled color distribution with the source image pixel set X as the Gaussian centroid; y k The probability density function p(y∈Y k ) is expressed as:

[0055]

[0056] in, p(y k ∣x m ) represents the mth Gaussian component, d is x m and k The dimension of , since color is the third channel, d = 3; for the mth Gaussian component, represents the diagonal covariance matrix, where I is the identity matrix, is a scalar, the variance of the mth Gaussian component, T represents the transpose, represents the inverse of the covariance matrix; in addition, all Gaussian components are assigned equal membership probability The simplification makes all GMM centroids,have equal importance in the color transfer task, and the GMM centroids are,the unknown pixel values ​​in the transferred image.

[0057] Further, in S5, the specific steps of iteratively optimizing the GMM model using the EM algorithm are as follows:

[0058] S5.1, obtain the centroid D and covariance matrix Σ of the GMM model by minimizing the negative log-likelihood function E(D,Σ);

[0059] The covariance matrix Σ={Σ1,…,Σ m ,…,Σ M};

[0060] The minimized negative log-likelihood function

[0061] In the EM algorithm, the E step:

[0062] in, The posterior probability is calculated based on the parameters updated in the previous iteration;

[0063] In the EM algorithm, the M step:

[0064]

[0065] The superscript "new" indicates that the parameters to be estimated are used to calculate the posterior probability in this iteration;

[0066] Update the mean:

[0067] Update variance:

[0068] in, is the mean of the updated Gaussian distribution; is the updated covariance;

[0069] S5.2, introduce the regularization term to maintain the gradient information of the original image:

[0070] Total variation regularization is introduced into the EM algorithm to maintain the edge features of the image while reducing noise and artifacts;

[0071] S5.3, through the EM algorithm, adjust the GMM model parameters so that the color distribution of the source image gradually matches the color distribution of the target image; judge whether the EM algorithm converges according to the change of the negative log-likelihood function, if not, return to S5.2 to continue iterating; if the maximum number of iterations q is reached max , stop iteration;

[0072] The hyperparameters involved in the GMM model include: the number of Gaussian components m, ranging from 3 to 10; variance The initial value is used to control the width of the Gaussian distribution, and the value range is 0.1-10; the hyperparameter in the EM algorithm, the regularization weight is λ, and the value range is 0.001-0.1; the number of iterations q max , the value range is 20-100; the convergence threshold judgment ∈, the value range is 10 -3 -10 -6 .

[0073] Further, in S6, the source image color is mapped to the required target image, and the mapping formula is as follows:

[0074]

[0075] Where μm is the mean of the Gaussian distribution before updating.

[0076] Further, in S7, the GMM model effect evaluation evaluates the virtual staining results by using quantitative indicators and qualitative evaluation;

[0077] The quantitative indicators include Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity Index Measure (SSIM), and the qualitative evaluation includes expert review.

[0078] Compared with the prior art, the technical effect of the present invention is as follows: the present invention adopts the GMM model as the main training framework to convert the H&E stained image into the IHC stained image in one step, so as to facilitate the medical staff to observe and analyze the tissue samples more comprehensively. At the same time, using the weighted attention map as the training set input, the boundaries of the tissue components can be accurately judged according to the information of different components, thereby improving the accuracy of the generated virtual stained image. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] Figure 1 A flowchart of a method for generating an image of a virtually stained pathological section based on a Gaussian mixture model provided by the present invention;

[0080] Figure 2 A sample processing flow chart of the input GMM model of the image generation method for virtual staining of pathological sections based on Gaussian mixture model provided by the present invention;

[0081] Figure 3 This is a structural diagram of the image generation method for virtually stained pathological sections based on a Gaussian mixture model provided by the present invention. DETAILED DESCRIPTION

[0082] like Figure 1 As shown, the present invention provides a method for generating a virtual stained image of a pathological section based on a Gaussian mixture model, which belongs to the technical field of medical image processing. First, the H&E stained pathological section image is used as the source image data set, and the IHC stained pathological section image is used as the target image data set; and the image in the source image data set is converted to the corresponding YUV color space; the saliency map and gradient map of the source image are extracted to generate a weighted attention map; then the GMM modeling is constructed, and the EM algorithm is used for iterative optimization, while the regularization term is introduced to maintain the gradient information of the original image; it is repeated until a satisfactory virtual staining result is obtained. The present invention uses the preprocessed weighted attention map of the pathological section as the input of the GMM model, judges the boundary of the tissue component through the information of different components, and improves the accuracy and reconstruction effect of the generated virtual staining image.

[0083] The specific steps of the technical solution of the present invention are as follows:

[0084] S1, obtaining a data set: using a pathological section image stained with hematoxylin and eosin (H&E) as a source image data set; using a pathological section image stained with immunohistochemistry (IHC) as a target image data set;

[0085] S2, preprocessing the H&E stained images in the source image dataset to obtain the source images;

[0086] S3, extracts the saliency map and gradient map of the source image and generates a weighted attention map;

[0087] S4, construct the GMM model;

[0088] S5, iteratively optimize the GMM model through the EM algorithm;

[0089] S6, inputting the image to be dyed into the optimized GMM model, and obtaining a virtual dyed image through color mapping;

[0090] S7, evaluate the performance of the GMM model.

[0091] Further, in S2, the preprocessing process of the H&E staining image is as follows:

[0092] S2.1, format conversion: convert tiff format images to .png or .jpg format images;

[0093] S2.2, image cropping: crop the .png or .jpg format image into image blocks with a resolution of 512×512, ensuring that there is overlap in the x-axis and y-axis directions to avoid large color differences between adjacent image blocks in the generated image;

[0094] S2.3, image conversion: convert the cropped H&E stained image from RGB space to YUV color space according to the following formula, and then perform color statistics; in order to better process color information; the conversion method selects ITU-R BT.601 (SDTV) conversion standard;

[0095]

[0096] Among them, Y, U, and V are the pixel values ​​in the color channels of the Gaussian filtered reference image; R, G, and B represent the red, green, and blue color channels of the H&E stained image, respectively;

[0097] S2.4, convert the YUV image after color conversion operation back to RGB space, the conversion formula is as follows:

[0098]

[0099] like Figure 2 As shown, in S3, the saliency map extraction method is as follows:

[0100] S3.1, calculate the mean of the pixels of the three channels of the source image YUV color space;

[0101] S3.2, smoothing the source image: performing a 5×5 separable binomial kernel Gaussian filter on the source image to reduce noise while maintaining edge information;

[0102] The specific separable binomial kernel Gaussian filtering method is as follows:

[0103] Perform a one-dimensional convolution on the GMM model pre-input image I(x, y) in the x-axis direction to obtain the intermediate image J(x, y):

[0104]

[0105] Perform a one-dimensional convolution on the intermediate image J(x, y) in the y-axis direction to obtain the final output image I′(x, y):

[0106]

[0107] Among them, x, y represent the coordinate values ​​of the image pixels; h k represents the horizontal filter weight; h z represents the vertical filter weight; k and z represent the different scales of the convolution kernel, k, z∈{-2,-1,0,1,2}, corresponding to a 5×5 kernel;

[0108] S3.3, by calculating the normalized Euclidean distance between the source image I(x, y) and the image I′(x, y) generated by Gaussian filtering, the saliency map SM is obtained:

[0109]

[0110] Here, F is the normalization factor.

[0111] The method for extracting the gradient map is as follows:

[0112] Use the Sobel filter to perform convolution to calculate the gradient map, extract the edge of the source image, and obtain the gradient map GM of the source image;

[0113] The Sobel filter detects edges in the x-axis and y-axis directions respectively through two 3×3 convolution kernels;

[0114] Calculate the gradient in the x-axis direction:

[0115] Calculate the gradient in the y-axis direction:

[0116] Compute the gradient magnitude:

[0117] Among them, the convolution kernel in the x-axis direction is K x , the convolution kernel in the y-axis direction is K y ,

[0118]

[0119] Finally, the G value is normalized to obtain the gradient map GM; i and j represent the row and column coordinates of the image respectively.

[0120] The method for generating the weighted attention map is as follows: the saliency map and the gradient map are fused according to the weight ratio to generate the weighted attention map M; M = 0.5 * SM+0.5 * GM.

[0121] like Figure 3 As shown in S4, the GMM model construction method is as follows:

[0122] S4.1, data preparation: data enhancement processing is performed on the H&E staining image samples input into the GMM model, and image flipping, random cropping and random noise addition are performed in sequence;

[0123] S4.2, the weighted attention map of the source image and the IHC stained target image are used as the input of the GMM model;

[0124] S4.3: Calculate the probability density of the target image: This function is to quantify the probability that each pixel in the target image belongs to a component of the mixed Gaussian distribution, thereby achieving distribution modeling and classification of image pixels:

[0125] The pixel set X of the source image is {x1,…,x m ,…,x M}, x m ∈R 3 and the pixel set Y of the target image = {y1,…,y k ,…,y K},y k ∈R 3 ;

[0126] The target image follows the GMM modeled color distribution with the source image pixel set X as the Gaussian centroid; y k The probability density function p(y∈Y k ) is expressed as:

[0127]

[0128] in, p(y k ∣x m ) represents the mth Gaussian component, d is x m andk The dimension of , since color is the third channel, d = 3; for the mth Gaussian component, represents the diagonal covariance matrix, where I is the identity matrix, is a scalar, the variance of the mth Gaussian component, T represents the transpose, represents the inverse of the covariance matrix; in addition, all Gaussian components are assigned equal membership probability The simplification makes all GMM centroids,have equal importance in the color transfer task, and the GMM centroids are,the unknown pixel values ​​in the transferred image.

[0129] like Figure 3 As shown, in S5, the specific steps of the EM algorithm iteratively optimizing the GMM model are as follows:

[0130] S5.1, obtain the centroid D and covariance matrix Σ of the GMM model by minimizing the negative log-likelihood function E(D,Σ);

[0131] The covariance matrix Σ={Σ1,…,Σ m ,…,Σ M};

[0132] The minimized negative log-likelihood function

[0133] In the EM algorithm, the E step:

[0134] in, The posterior probability is calculated based on the parameters updated in the previous iteration;

[0135] In the EM algorithm, the M step:

[0136]

[0137] The superscript "new" indicates that the parameters to be estimated are used to calculate the posterior probability in this iteration;

[0138] Update the mean:

[0139] Update variance:

[0140] in, is the mean of the updated Gaussian distribution; is the updated covariance;

[0141] S5.2, introduce the regularization term to maintain the gradient information of the original image:

[0142] Total variation regularization is introduced into the EM algorithm to maintain the edge features of the image while reducing noise and artifacts;

[0143] S5.3, through the EM algorithm, adjust the GMM model parameters so that the color distribution of the source image gradually matches the color distribution of the target image; judge whether the EM algorithm converges according to the change of the negative log-likelihood function, if not, return to S5.2 to continue iterating; if the maximum number of iterations q is reached max , stop iteration;

[0144] The hyperparameters involved in the GMM model include: the number of Gaussian components m, ranging from 3 to 10; variance The initial value is used to control the width of the Gaussian distribution, and the value range is 0.1-10; the hyperparameter in the EM algorithm, the regularization weight is λ, and the value range is 0.001-0.1; the number of iterations q max , the value range is 20-100; the convergence threshold judgment ∈, the value range is 10 -3 -10 -6 .

[0145] Further, in S6, the source image color is mapped to the required target image, and the mapping formula is as follows:

[0146]

[0147] Where μm is the mean of the Gaussian distribution before updating.

[0148] Further, in S7, the GMM model effect evaluation evaluates the virtual staining results by using quantitative indicators and qualitative evaluation;

[0149] The quantitative indicators include Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity Index Measure (SSIM), and the qualitative evaluation includes expert review.

Claims

1. A method for generating a virtual stained image of a pathological section based on a Gaussian mixture model, characterized in that: The virtual dyeing image generation method comprises the following steps: S1, obtaining a data set: using the pathological section images stained with H&E as the source image data set; using the pathological section images stained with IHC as the target image data set; S2, preprocessing the H&E stained images in the source image dataset to obtain the source images; S3, extracts the saliency map and gradient map of the source image and generates a weighted attention map; S4, construct the GMM model; S5, iteratively optimize the GMM model through the EM algorithm; S6, inputting the image to be dyed into the optimized GMM model, and obtaining a virtual dyed image through color mapping; S7, evaluate the performance of the GMM model.

2. The method for generating a virtual stained image of a pathological section based on a Gaussian mixture model according to claim 1, characterized in that: In S2, the preprocessing process of the H&E staining image is as follows: S2.1, format conversion: convert tiff format images to .png or .jpg format images; S2.2, image cropping: crop the .png or .jpg format image into image blocks with a resolution of 512×512; S2.3, image conversion: convert the cropped H&E stained image from RGB space to YUV color space according to the following formula, and then perform color statistics; the conversion method selects ITU-R BT.601 conversion standard; Among them, Y, U, and V are the pixel values ​​in the color channels of the Gaussian filtered reference image; R, G, and B represent the red, green, and blue color channels of the H&E stained image, respectively; S2.4, convert the YUV image after color conversion operation back to RGB space, the conversion formula is as follows:

3. The method for generating a virtual stained image of a pathological section based on a Gaussian mixture model according to claim 1, characterized in that: In S3, the saliency map extraction method is as follows: S3.1, calculate the mean of the pixels of the three channels of the source image YUV color space; S3.2, smoothing the source image: performing a 5×5 separable binomial kernel Gaussian filter on the source image to reduce noise while maintaining edge information; The specific separable binomial kernel Gaussian filtering method is as follows: Perform a one-dimensional convolution on the GMM model pre-input image I(x,y) in the x-axis direction to obtain the intermediate image J(x,y): Perform a one-dimensional convolution on the intermediate image J(x,y) in the y-axis direction to obtain the final output image I′(x,y): Among them, x, y represent the coordinate values ​​of the image pixels; h k represents the horizontal filter weight; h z represents the vertical filter weight; k and Z represent the different scales of the convolution kernel, k,z∈{-2,-1,0,1,2}, corresponding to a 5×5 kernel; S3.3, by calculating the normalized Euclidean distance between the source image I(x, y) and the image I′(x, y) generated by Gaussian filtering, the saliency map SM is obtained: Here, F is the normalization factor.

4. The method for generating a virtual stained image of a pathological section based on a Gaussian mixture model according to claim 1, characterized in that: In S3, the gradient map is extracted as follows: Use the Sobel filter to perform convolution to calculate the gradient map, extract the edge of the source image, and obtain the gradient map GM of the source image; The Sobel filter detects edges in the x-axis and y-axis directions respectively through two 3×3 convolution kernels; Calculate the gradient in the x-axis direction: Calculate the gradient in the y-axis direction: Compute the gradient magnitude: Among them, the convolution kernel in the x-axis direction is K x , the convolution kernel in the y-axis direction is K y ; i and j represent the row and column coordinates of the image respectively; Finally, the G value is normalized to obtain the gradient map GM.

5. The method for generating a virtual stained image of a pathological section based on a Gaussian mixture model according to claim 1, characterized in that: In S3, the weighted attention map is generated by fusing the saliency map and the gradient map according to a weight ratio to generate a weighted attention map M; M=00.5*SM+0.5*GM.

6. The method for generating a virtual stained image of a pathological section based on a Gaussian mixture model according to claim 1, characterized in that: In S4, the GMM model construction method is as follows: S4.1, data preparation: data enhancement processing is performed on the H&E staining image samples input into the GMM model, and image flipping, random cropping and random noise addition are performed in sequence; S4.2, the weighted attention map of the source image and the IHC stained target image are used as the input of the GMM model; S4.3: Calculate the probability density of the target image: This function is to quantify the probability that each pixel in the target image belongs to a component of the mixed Gaussian distribution, thereby achieving distribution modeling and classification of image pixels: The pixel set X of the source image is {x1, ..., x m , ..., x M } and the pixel set of the target image Y={y1,...,y k ,...,y K },y k ∈R 3 ; The target image follows the GMM modeled color distribution with the source image pixel set X as the Gaussian centroid; y k The probability density function p(y∈Y k ) is expressed as: in, p(y k |x m ) represents the mth Gaussian component, d is x m and k The dimension of , since color is the third channel, d = 3; for the mth Gaussian component, represents the diagonal covariance matrix, where I is the identity matrix, is a scalar, the variance of the mth Gaussian component, T represents the transpose, represents the inverse of the covariance matrix; in addition, all Gaussian components are assigned equal membership probability The simplification makes all GMM centroids,have equal importance in the color transfer task, and the GMM centroids are,the unknown pixel values ​​in the transferred image.

7. The method for generating a virtual stained image of a pathological section based on a Gaussian mixture model according to claim 1, characterized in that: In S5, the specific steps of iteratively optimizing the GMM model using the EM algorithm are as follows: S5.1, obtain the centroid D and covariance matrix ∑ of the GMM model by minimizing the negative log-likelihood function E(D, ∑); The covariance matrix ∑={∑1,...,∑ m , ..., ∑ M }; The minimized negative log-likelihood function In the EM algorithm, the E step: in, The posterior probability is calculated based on the parameters updated in the previous iteration; In the EM algorithm, the M step: The superscript "new" indicates that the parameters to be estimated are used to calculate the posterior probability in this iteration; Update the mean: Update variance: in, is the mean of the updated Gaussian distribution; is the updated covariance; S5.2, introduce the regularization term to maintain the gradient information of the original image: Total variation regularization is introduced into the EM algorithm to maintain the edge features of the image while reducing noise and artifacts; S5.3, through the EM algorithm, adjust the GMM model parameters so that the color distribution of the source image gradually matches the color distribution of the target image; judge whether the EM algorithm converges according to the change of the negative log-likelihood function, if not, return to S5.2 to continue iterating; if the maximum number of iterations q is reached max , stop iteration; The hyperparameters involved in the GMM model include: the number of Gaussian components m, ranging from 3 to 10; variance The initial value is used to control the width of the Gaussian distribution, and the value range is 0.1-10; the hyperparameter in the EM algorithm, the regularization weight is λ, and the value range is 0.001-0.1; the number of iterations q max , the value range is 20-100; the convergence threshold judgment ∈, the value range is 10 -3 -10 -6 .

8. The method for generating a virtual stained image of a pathological section based on a Gaussian mixture model according to claim 1, characterized in that: In S6, the source image color is mapped to the required target image. The mapping formula is as follows: Among them, μ m is the mean of the Gaussian distribution before updating.

9. The method for generating a virtual stained image of a pathological section based on a Gaussian mixture model according to claim 1, characterized in that: In S7, the GMM model effect evaluation is performed by using quantitative indicators and qualitative evaluation to evaluate the virtual staining results; The quantitative indicators include peak signal-to-noise ratio and structural similarity, and the qualitative evaluation includes expert review.

10. An electronic device, characterized in that: include: one or more processors; Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1 to 9.