Dyeing normalization method based on conventional HE pathological section of lung

By combining traditional statistical methods with the improved StainGAN network and adopting deformable convolution and attention mechanisms, the adaptability and computational resource issues of pathological image staining normalization methods are solved, efficient and stable image consistency and detail fidelity are achieved, and the accuracy of clinical diagnosis is improved.

CN120807669APending Publication Date: 2025-10-17YANGTZE DELTA REGION INST (QUZHOU) UNIV OF ELECTRONIC SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510634452.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Existing pathology image staining normalization methods have poor adaptability between different laboratories or staining batches. Traditional methods do not accurately process the details of pathology sections. Deep learning methods have high computing resource requirements and are sensitive to the quality of input images, resulting in insufficient image quality and recognition capabilities, affecting the accuracy of clinical diagnosis.

Method used

Combining traditional statistical methods with the improved StainGAN network, through coarse color normalization and fine-grained processing, using deformable convolution modules and attention mechanisms, the recognition ability of complex shapes and details is improved, and the dependence of deep learning on data quality is reduced.

Benefits of technology

It achieves efficient and stable pathological image staining normalization, improves image consistency and detail fidelity, enhances the ability to recognize complex tissue structures, and improves the accuracy and efficiency of clinical diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807669A_ABST
    Figure CN120807669A_ABST
Patent Text Reader

Abstract

The invention relates to a method based on lung conventional Hamp; and E, a staining normalization method of the pathological section. The problems that a pathological image staining normalization method in the prior art is insufficient in recognition capability and inaccurate in staining separation are solved. The method comprises the following steps: S1, preprocessing digital pathological section data; s2, establishing a rough dyeing normalization model and outputting an image after color migration; and S3, performing fine-grained normalization processing on the output image by using an improved StainGAN network. The method has the advantages that the color difference caused by different dyeing batches and equipment is reduced, more standardized input data is provided for a deep learning model, the dependence on training data is reduced, the recognition capability on a complex organization structure is improved, meanwhile, the influence of background noise is effectively reduced, and more detail information is reserved. The method not only improves the accuracy and consistency of dyeing normalization, but also improves the detail recovery capability of the pathological image, and especially has obvious advantages in lung cancer pathological image analysis.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of bioinformatics and computer science, and particularly relates to a staining normalization method based on lung routine H&E pathological sections. BACKGROUND

[0002] In recent years, the incidence of lung cancer continues to rise, and it has become one of the most common malignant tumors in the world. Early diagnosis and timely treatment are crucial to improve patient survival. Pathological section images, as an important basis for lung cancer diagnosis, can provide detailed information on cell morphology and tissue structure. However, different laboratories, scanning equipment and staining methods can lead to significant differences in color and intensity of histopathological images. For example, different chemical compositions and concentrations of different staining agents result in differences in color of the stained tissue sections; the optical properties and imaging parameters of different scanning equipment also affect the final appearance of the images. These differences not only increase the complexity of image analysis, but also can lead to misdiagnosis or missed diagnosis of computer-aided diagnosis systems. Traditional staining normalization methods usually rely on manual selection of reference images or use complex mathematical models, making it difficult to efficiently and accurately perform image style conversion, limiting their application in actual clinical practice.

[0003] Currently, the pathological image staining normalization methods can be mainly divided into two categories: traditional staining normalization methods and deep learning-based methods in recent years. Among them,

[0004] Traditional staining normalization methods: In the staining normalization, the color space and histogram are directly converted and adjusted to realize the standardization of image color. The histogram transformation-based method is a typical representative of this kind of method, which mainly converts the color space of the input image into a reference RGB color space with known color value distribution, thereby standardizing the color appearance of histopathology images. The key to this method is to select an appropriate reference color space, which is usually derived from a large collection of representative images, reflecting the staining scheme or laboratory to be normalized. Secondly, matrix decomposition and optimization methods use mathematical models and the optical properties of staining agents to achieve more detailed staining normalization by separating pixel staining components. The typical representative of this kind of method is the separation transformation-based method, which classifies pixels into different staining agents through color deconvolution and matrix decomposition techniques, infers the absorption ratio of the staining agent based on the Beer-Lambert law, and thereby realizes the pixel-level staining separation.

[0005] Deep learning-based methods: In recent years, deep learning has gradually emerged in the field of stain normalization. Generative adversarial networks (GAN) achieve data modeling through the dynamic game between the generator and the discriminator: the generator synthesizes realistic samples from random noise to simulate the real data distribution; the discriminator optimizes the discrimination ability through binary classification (real / generated). Both are optimized alternately in the adversarial training, the generator gradually learns the strategy of false-to-real, while the discriminator synchronously improves the discrimination accuracy, until the system reaches an equilibrium state-the statistical characteristics of generated samples and real data are difficult to distinguish. This mechanism enables GAN to efficiently fit high-dimensional complex distribution, and is widely used in image generation, style transfer and medical image processing (such as stain normalization), breaking through the limitations of data scarcity and heterogeneity through unsupervised learning, and providing standardized solutions for cross-device and cross-center pathological analysis. StainGAN is based on the idea of generative adversarial networks (GAN), which automatically converts images of one staining style to another by learning the mapping relationship between different staining styles. This method does not require expert manual selection of reference images and can automatically achieve stain style normalization, thereby improving the standardization level and diagnostic accuracy of pathological images. The network structure of StainGAN includes a generator (Generator) and a discriminator (Discriminator), which are optimized together through adversarial training. The task of the generator is to convert the staining style of the input image to the target style. The generator of StainGAN usually adopts ResNet or other deep convolutional network structures, which can effectively extract multi-scale features and preserve the details of the input image. The task of the discriminator is to distinguish between generated images and real images. These structures can finely distinguish the local features of the image, guiding the generator to generate higher quality images.

[0006] However, these two methods still have defects, including:

[0007] Traditional stain normalization methods: Poor adaptability between different laboratories or staining batches, usually do not fully utilize the staining characteristics of histopathological images, and the processing of pathological section details may result in irregular and chaotic patterns in the background and region of interest of the normalized image, which may appear artifacts, affecting the quality of the image and subsequent analysis, and the recognition ability of complex shapes and irregular tissues in lung pathological pictures is insufficient, and in the case of small initial image size or extremely low staining agent proportion, the problem of inaccurate staining separation may be encountered.

[0008] Deep learning-based methods: Many methods still rely on large amounts of annotated data, which limits their versatility and adaptability. Deep learning methods, particularly convolutional neural networks (CNNs) and generative adversarial networks (GANs), require significant computing resources for training and inference. This is particularly problematic for processing high-resolution pathology images, resulting in long processing times and demanding hardware configurations. Deep learning models, especially GANs, typically require a lengthy training process, potentially taking hours or even days to train an efficient model. This makes deep learning methods potentially inadequate for real-time processing in practical applications. Deep learning methods are also highly sensitive to input image quality. Model performance can significantly decline if the input image is noisy or has inconsistent staining. Therefore, appropriate preprocessing and normalization of the images are crucial. Furthermore, existing StainGAN methods, when processing complex pathology images, still suffer from issues such as insufficient recognition of complex shapes and irregular tissues and background noise interference, which impacts their accuracy in clinical diagnosis.

[0009] In summary, the existing pathological image staining normalization methods have insufficient recognition ability and inaccurate staining separation, which affects the accuracy of clinical diagnosis. Summary of the Invention

[0010] The purpose of the present invention is to address the above problems and provide a staining normalization method based on conventional H&E pathological sections of the lungs.

[0011] To achieve the above objectives, the present invention adopts the following technical solutions: a staining normalization method based on conventional H&E pathological sections of the lungs, the method comprising the following steps:

[0012] S1, digital pathology slide data preprocessing;

[0013] S2, establishing a rough color normalization model and outputting the image after color migration;

[0014] S3. Use the improved StainGAN network to perform fine-grained normalization on the output image.

[0015] In the above-mentioned staining normalization method based on conventional H&E pathological sections of the lung, step S1 specifically includes the following steps:

[0016] S11, dividing the digital pathology slides and assigning labels according to the annotation information;

[0017] S12. Generate a tissue mask and a tumor mask based on the labeled information;

[0018] S13. Cut the H&E digital pathology slide into slices of 256x256 pixels according to the mask.

[0019] In the above-described staining normalization method based on lung conventional H&E pathological sections, step S2 specifically comprises the following steps:

[0020] S21, constructing a rough staining normalization model of WSI pathological images based on traditional statistical methods;

[0021] S22, inputting the slice source image and the slice reference image subjected to data preprocessing in step S1 into the rough staining normalization model;

[0022] S23, the rough staining normalization model performs color space conversion on the input images, i.e., converting the slice source image and the slice reference image from RGB color space to iaβ color space;

[0023] S24, calculating statistical features of the source image and the reference image in the iaβ color space;

[0024] S25, mapping the statistical features of the source image to the feature space of the reference image;

[0025] S26, converting the migrated image from iaβ color space back to RGB color space, and outputting the image subjected to color migration.

[0026] In step S3, the StainGAN network is a medical image processing model of traditional GANs, and the StainGAN network comprises a generator and a discriminator.

[0027] In the above-described staining normalization method based on lung conventional H&E pathological sections, step S3 specifically comprises the following steps:

[0028] S31, constructing a deformable convolution module;

[0029] S32, learning lung whole slide image features of various shapes and scales by using the variable receptive field of the deformable convolution module, and improving the recognition ability of the deformable convolution module to complex shape targets;

[0030] S33, setting an attention gate module on the discriminator;

[0031] S34, using the attention gate module to distinguish irrelevant and noisy responses generated by the generator, and strengthening the extraction of regions of interest, i.e., highlighting the color and structural salient features of the whole slide image.

[0032] In step S31, the deformable convolution module is constructed and comprises the following steps:

[0033] S311, a conventional convolution can be regarded as a weighted sum of a sampling grid with weights W, after regular sampling on the input feature map A, for any position p0 on the output feature map B, the following can be obtained:

[0034]

[0035] In the above formula, R is a grid, that is, a convolution kernel,

[0036] pn is an enumeration of the sampling region of the convolution kernel,

[0037] W(pn) represents the weight of the corresponding position of the convolution kernel,

[0038] X(p0+pn) represents the element value at the position p0+pn on the input feature map,

[0039] Y(p0) represents the element value at the position p0 on the output feature map, which is obtained by convolving the convolution kernel with the input feature map;

[0040] S312, the deformable convolution obtains:

[0041]

[0042] In the above formula, Δp n is the offset added in the grid R, and after the offset, the sampling region of the convolution kernel becomes an irregular region.

[0043] In step S33, the attention gate module scales the input feature xp by the attention coefficient a e (0, 1].

[0044] In the above method for normalizing staining based on a lung routine H&E pathological section, the attention gate module includes the following steps:

[0045] S331, the fourth layer convolution output result F4xH4xW4 of the encoder discriminator is denoted as xp input, and the fifth layer convolution output result F5xH5xW5 is denoted as g input, which is used as a gate signal. After 1x1x1 convolution, the two are added, and the obtained result is sequentially subjected to ReLU activation function, 1x1x1 convolution, Sigmoid activation function, and resampling to obtain a 1-dimensional weight matrix a,

[0046] S332, multiplying a by xp input obtains a new feature map xp', which obtains a new feature map that has been assigned an attention weight;

[0047] S333, a mixed attention module is added.

[0048] In the above method for normalizing staining based on a lung routine H&E pathological section, the mixed attention module includes a spatial attention module and a channel attention module; wherein,

[0049] Spatial attention module: Y is up-sampled by 2 times + X, then passes through multiple 1x1 convolution layers to obtain position context information, and obtains a weight map through a Sigmoid function, and the weight map is multiplied with the input X to obtain a spatial attention map;

[0050] Channel attention module: X and Y are connected in the channel dimension, then pass through global average pooling and global max pooling to obtain two 1x1x3c feature maps, then pass through a shared convolution layer to obtain two 1x1xc feature maps, then fuse to obtain channel weights, and the channel weights are multiplied with X to obtain a channel attention map.

[0051] In step S34, the spatial attention map and the channel attention map are fused into the skip connection, helping the network to focus on the most relevant areas and channels, and reducing the risk of interference from the background area of the input image. The improved StainGAN fine staining normalization outputs a pathological section after staining normalization consistent with the style of the target staining image.

[0052] Compared with the prior art, the advantages of the present application are:

[0053] 1. In the first stage, a traditional statistical method is used for coarse-grained normalization to reduce the influence of staining batches, scanning equipment and laboratory environment on the color distribution of pathological images, and to provide more standardized input data for deep learning. In the second stage, an improved StainGAN network is used for fine-grained staining normalization, and the color consistency and detail restoration ability are further optimized through a deep learning model, thereby improving the normalization effect and solving the problem of high dependence of deep learning methods on data quality.

[0054] 2. By combining the traditional statistical method with the deep learning method, the present application makes full use of the advantages of the traditional method in computational efficiency, and combines the powerful non-linear modeling ability of the deep learning method. The traditional statistical method in the first stage can significantly reduce color differences and provide uniform input data, so that the deep learning method in the second stage can focus more on optimizing detail and structure consistency, and finally realize the efficiency and stability of staining normalization. This combination effectively reduces the requirements of the deep learning model on data quality and improves its generalization ability.

[0055] 3. In the design of the deep learning model, the present application introduces a deformable convolution module, so that the convolution kernel can adaptively adjust its shape and position to adapt to complex and irregular cell and tissue structures in pathological tissues. This innovation improves the adaptability of the model to lung cancer pathological images, enabling more accurate identification of tissue details and improving the fidelity of tissue morphology during staining normalization, making the normalized image more clinically valuable.

[0056] 4、The improved attention mechanism is adopted, including an attention gate module and a hybrid attention mechanism, so as to enhance the recognition ability of key organizational structures and reduce the interference of background noise. The combination of spatial attention and channel attention ensures that the model can highlight the key areas of pathological images more effectively, while maintaining the details such as cell edges and textures, so that the normalized image is not only more natural in visual effect, but also better adapts to subsequent pathological analysis tasks.

[0057] 5、In the implementation process of deep learning, an improved generative adversarial network (GAN) is adopted to improve the accuracy and consistency of staining normalization. The generator is responsible for converting the input image into a standardized staining style, while the discriminator is used to evaluate the quality of the generated image, so that the adversarial training can continuously optimize the normalization effect. In addition, combined with the optimization strategy of perception loss and structure loss, the application ensures that the generated image not only maintains consistency in color, but also retains the details of the organizational structure, avoiding the artifacts or detail loss problems that may occur in traditional GAN methods. BRIEF DESCRIPTION OF DRAWINGS

[0058] Figure 1 is the overall flowchart of the application;

[0059] Figure 2 is the digital pathology slice data preprocessing flowchart in the application;

[0060] Figure 3 is the rough staining normalization model workflow chart in the application;

[0061] Figure 4 is the StainGAN network structure chart in the application.

[0062] Figure 5 is the deformable convolution module schematic diagram in the application.

[0063] Figure 6 is the attention gate module schematic diagram in the application.

[0064] Figure 7 is the hybrid attention module schematic diagram for feature learning in the application. DETAILED DESCRIPTION

[0065] The application will be further described in detail below in combination with the drawings and specific embodiments.

[0066] As shown in Figure 1 , a staining normalization method based on lung routine H&E pathological sections, the method comprises the following steps:

[0067] S1, digital pathology slice data preprocessing;

[0068] S2, establishing a rough color normalization model and outputting the image after color migration;

[0069] S3. Use the improved StainGAN network to perform fine-grained normalization on the output image.

[0070] Digital pathology slides refer to the conversion of H&E-stained solid microscope slides into high-resolution digital images through scanning equipment.

[0071] Stain Normalization is a key image preprocessing technology in digital pathology. It aims to eliminate color and optical property variations in tissue sections caused by differences in staining procedures, thereby achieving comparability of staining results across samples and laboratories.

[0072] like Figure 2 As shown, step S1 specifically includes the following steps:

[0073] S11, dividing the digital pathology slides and assigning labels according to the annotation information;

[0074] S12. Generate a tissue mask and a tumor mask based on the labeled information;

[0075] S13. Cut the H&E digital pathology slide into slices of 256x256 pixels according to the mask.

[0076] like Figure 3 As shown, step S2 specifically includes the following steps:

[0077] S21. Construct a rough staining normalization model for WSI pathology images based on traditional statistical methods;

[0078] S22, inputting the slice source image and the slice reference image that have undergone data preprocessing in step S1 into a rough staining normalization model;

[0079] S23, the rough color normalization model performs color space conversion on the input image, that is, converting the slice source image and the slice reference image from the RGB color space to the ιαβ color space;

[0080] S24, calculating statistical features of the source image and the reference image in ιαβ color space;

[0081] S25, mapping the statistical features of the source image to the feature space of the reference image;

[0082] S26. Convert the migrated image from the ιαβ color space back to the RGB color space, and output the image after color migration.

[0083] Its global color style is consistent with the reference image. The overall color distribution of the image is close to the reference image, but there may be local details that are insufficient or background noise.

[0084] In step S3, the StainGAN network is a medical image processing model of a traditional GAN, and the StainGAN network includes a generator and a discriminator.

[0085] StainGAN is a medical image processing model based on Generative Adversarial Network, GAN, and its core architecture is composed of a generator and a discriminator: the generator maps pathological images of different staining batches or institutions to a standard staining space through deep learning, and the discriminator distinguishes between generated images and real reference images, dynamically optimizes the mapping relationship through adversarial training. While eliminating staining differences such as hematoxylin overdyeing and eosin deviation, the network strictly maintains key biological information such as cell nucleus morphology and matrix texture.

[0086] As shown in Figure 4 , step S3 specifically includes the following steps:

[0087] S31, constructing a deformable convolution module;

[0088] S32, learning features of lung whole slide images of various shapes and scales using the variable receptive field of the deformable convolution module, and improving the recognition ability of the deformable convolution module for complex shape targets;

[0089] S33, setting an attention gate module on the discriminator;

[0090] S34, using the attention gate module to distinguish irrelevant and noisy responses generated by the generator, and strengthening the extraction of regions of interest, i.e. highlighting the color and structural salient features of the whole slide image.

[0091] The introduction of mixed attention and other modules not only enhances the model's attention to feature regions, but also combines local and global features, improving the model's recognition ability for image structure edges and subtle regions.

[0092] As shown in Figure 5 , in step S31, the deformable convolution module is constructed and includes the following steps:

[0093] S311, a conventional convolution can be regarded as a weighted sum of a sampling grid with weights W, after regular sampling on the input feature map A, for any position p0 on the output feature map B, the following can be obtained:

[0094]

[0095] In the above formula, R is a grid, i.e. a convolution kernel,

[0096] pn is an enumeration of the sampling region of the convolution kernel,

[0097] W(pn) represents the weight of the corresponding position of the convolution kernel,

[0098] X(p0+pn) represents the element value at the position p0+pn on the input feature map,

[0099] Y(p0) represents the element value at the position p0 on the output feature map, which is obtained by convolving the convolution kernel with the input feature map;

[0100] S312, the deformable convolution obtains:

[0101]

[0102] In the above formula, Δp n is the offset added in the grid R, and after the offset, the sampling region of the convolution kernel becomes an irregular region.

[0103] In step S33, the attention gate module scales the input feature xp by the attention coefficient α∈(0, 1].

[0104] As shown in Figures 6-7 , the attention gate module is constructed including the following steps:

[0105] S331, the fourth layer convolution output result F4xH4xW4 of the encoder discriminator is denoted as xp input, and the fifth layer convolution output result F5xH5xW5 is denoted as g input, which is used as a gate signal. After 1x1x1 convolution, they are added, and the obtained result is sequentially subjected to ReLU activation function, 1x1x1 convolution, Sigmoid activation function (the purpose is to assign a value, i.e. attention weight, to each part of the feature map), and resampling to obtain a 1-dimensional weight matrix α,

[0106] S332, α is multiplied by xp input to obtain a new feature map xp', which obtains a new feature map with attention weight assigned;

[0107] By introducing the attention gate module, the discriminator can more accurately identify the subtle differences between the generated image and the real image, thereby improving the discrimination ability of the model.

[0108] S333, a mixed attention module is added.

[0109] The mixed attention module includes a spatial attention module and a channel attention module; wherein,

[0110] Spatial attention module: Y is 2 times up-sampling + X after a plurality of 1x1 convolution layers to obtain position context information, and a weight map is obtained via a Sigmoid function, and the weight map is multiplied by the input X to obtain a spatial attention map;

[0111] Channel attention module: X and Y channel dimensions are connected, and then global average pooling and global maximum pooling are performed to obtain two 1x1x3c feature maps, and two 1x1xc feature maps are obtained through a shared convolution layer, and then channel weights are fused to obtain a channel attention map, and the channel attention map is multiplied by X to obtain a channel attention map.

[0112] In step S34, the spatial attention map and the channel attention map are fused into the skip connection, helping the network to focus on the most relevant areas and channels, and reducing the risk of interference from the background area of the input image. The refined stain normalization of the improved StainGAN outputs a stained and normalized pathological section consistent with the style of the target stained image.

[0113] In summary, the principle of the embodiment is to use traditional statistical methods for preprocessing and coarse-grained normalization in the first stage. This will provide more standardized and consistent input for subsequent deep learning methods, thereby improving the performance and efficiency of the overall system. In balancing performance and computation, a GAN network variant structure is designed, a deformable convolution module is introduced to effectively learn the features of lung whole slide images of various shapes and scales using a variable receptive field to improve the model's recognition ability for complex shape targets; the attention gate module is integrated into the discriminator when judging, which is used to distinguish irrelevant and noisy responses generated by the generator, and to strengthen the extraction of regions of interest to highlight the color and structural features of the whole slide image; the introduction of hybrid attention and other modules not only enhances the model's attention to feature regions but also combines local and global features to improve the model's recognition ability for image structure edges and subtle regions.

[0114] The specific embodiments described herein merely illustrate the spirit of the present application. Those skilled in the art of the present application can make various modifications or supplements to the described specific embodiments or use similar ways to replace them, without deviating from the spirit of the present application or exceeding the scope defined by the appended claims.

Claims

1. A staining normalization method based on conventional H&E pathological sections of the lung, characterized in that: This method comprises the following steps: S1, digital pathology slide data preprocessing; S2, establishing a rough color normalization model and outputting the image after color migration; S3. Use the improved StainGAN network to perform fine-grained normalization on the output image.

2. A staining normalization method based on conventional H&E pathological sections of lungs according to claim 1, characterized in that: Step S1 specifically includes the following steps: S11, dividing the digital pathology slides and assigning labels according to the annotation information; S12. Generate a tissue mask and a tumor mask based on the labeled information; S13. Cut the H&E digital pathology slide into slices of 256x256 pixels according to the mask.

3. A staining normalization method based on conventional H&E pathological sections of lungs according to claim 2, characterized in that: Step S2 specifically includes the following steps: S21. Construct a rough staining normalization model for WSI pathology images based on traditional statistical methods; S22, inputting the slice source image and the slice reference image that have undergone data preprocessing in step S1 into a rough staining normalization model; S23, the rough color normalization model performs color space conversion on the input image, that is, converting the slice source image and the slice reference image from the RGB color space to the ιαβ color space; S24, calculating statistical features of the source image and the reference image in ιαβ color space; S25, mapping the statistical features of the source image to the feature space of the reference image; S26. Convert the migrated image from the ιαβ color space back to the RGB color space, and output the image after color migration.

4. A staining normalization method based on conventional H&E pathological sections of lungs according to claim 3, characterized in that: In step S3, the StainGAN network is a medical image processing model of traditional GANs, and the StainGAN network includes a generator and a discriminator.

5. A staining normalization method based on conventional H&E pathological sections of lungs according to claim 4, characterized in that: Step S3 specifically includes the following steps: S31, build a deformable convolution module; S32. Utilize the variable receptive field of the deformable convolution module to learn features of lung whole slide images of various shapes and scales, thereby improving the deformable convolution module's ability to recognize complex-shaped objects. S33, setting an attention gating module on the discriminator; S34. Use the attention gating module to distinguish irrelevant and noisy responses produced by the generator and enhance the extraction of regions of interest, that is, to highlight the significant color and structural features of the whole slide image.

6. A staining normalization method based on conventional H&E pathological sections of lungs according to claim 4, characterized in that: In step S31, the deformable convolution module is constructed by: S311. Conventional convolution can be viewed as the weighted sum of a sampling grid with weight W. After regular sampling on the input feature map A, for any position p0 on the output feature map B, we can obtain: In the above formula, R is the grid or convolution kernel, pn is the enumeration of the convolution kernel sampling area, W(pn) represents the weight of the corresponding position of the convolution kernel, X(p0+pn) represents the element value at position p0+pn on the input feature map. Y(p0) represents the element value at position p0 on the output feature map, which is obtained by convolving the convolution kernel with the input feature map; S312, deformable convolution is obtained: In the above formula, Δp n It is the offset added in the grid R. After the offset, the sampling area of ​​the convolution kernel becomes an irregular area.

7. The method for normalizing the staining of conventional H&E lung pathological sections according to claim 4, characterized in that: In step S33, the attention gating module scales the input feature xp by the attention coefficient α∈(0,1].

8. A staining normalization method based on conventional H&E pathological sections of lungs according to claim 7, characterized in that: The construction of the attention gating module includes the following steps: S331, the fourth convolution output result F4×H4×W4 of the encoder discriminator is recorded as xp input, and the fifth convolution output result F5×H5×W5 is recorded as g input. As the gate signal, the two are added after 1×1×1 convolution. The result is sequentially activated by ReLU activation function, 1×1×1 convolution, Sigmoid activation function, and resampling to obtain a 1-dimensional weight matrix α. S332, α is multiplied by the xp input to obtain a new feature map xp', and a new feature map with assigned attention weights is obtained; S333, added hybrid attention module.

9. A staining normalization method based on conventional H&E pathological sections of lungs according to claim 8, characterized in that: The hybrid attention module includes a spatial attention module and a channel attention module; wherein, Spatial attention module: Y is upsampled by 2 times + X and then passes through multiple 1×1 convolution layers to obtain position context information. The weight map is obtained by the Sigmoid function, and the weight map is multiplied by the input X to obtain the spatial attention map; Channel attention module: After the X and Y channel dimensions are concatenated, global average pooling and global maximum pooling are performed to obtain two 1×1×3c feature maps. Two 1×1×c feature maps are obtained through a shared convolutional layer. The channel weights are then fused and multiplied by X to obtain the channel attention map.

10. A staining normalization method based on conventional H&E pathological sections of lungs according to claim 9, characterized in that: In step S34, the spatial attention map and the channel attention map are fused into the skip connection to help the network focus on the most relevant areas and channels and reduce the risk of interference from the background area of ​​the input image. After the refined staining normalization of the improved StainGAN, the output is a normalized pathological section with the same style as the target staining image.