A method for processing renal pathological images that integrates multi-tissue segmentation and quantitative analysis of lesions
By employing a multi-class semantic segmentation neural network model and an unsupervised domain adaptive strategy, the problems of inefficiency in manual interpretation and poor cross-batch generalization ability in kidney pathology image processing are solved. This enables panoramic, high-precision multi-tissue segmentation and quantitative analysis of lesions, improving the accuracy and stability of automated methods.
Patent Information
- Application Number
- CN202610772954.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-01
- Publication Date
- 2026-06-30
AI Technical Summary
Existing technologies for processing renal pathology images suffer from problems such as low efficiency and high subjectivity in manual interpretation, incomplete types of automated methods, and poor generalization ability across batches, making it difficult to achieve panoramic and high-precision automated quantitative pathological analysis.
A multi-class semantic segmentation neural network model is adopted, which combines the Class-Token mechanism and encoder-decoder structure. The model is optimized by weighted Dice loss and boundary Dice loss, and an unsupervised domain adaptive strategy is used to adapt to the staining differences of different batches, so as to achieve multi-tissue segmentation and quantitative analysis of lesions.
It enables panoramic and high-precision automated quantitative pathological analysis, improves the segmentation accuracy of multi-category tissues and the stability across batches, and provides an objective and repeatable intelligent auxiliary tool.
Smart Images

Figure CN122312633A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image processing technology, and in particular to a method for processing kidney pathological images that integrates multi-tissue segmentation and quantitative analysis of lesions. Background Technology
[0002] Kidney pathology is the gold standard for diagnosing glomerular diseases, tubulointerstitial diseases, and vascular lesions. Accurate identification and quantitative analysis of tissues and lesions in kidney pathological images are crucial for chronic kidney disease (CKD) assessment, kidney transplant monitoring, and drug toxicity evaluation. For example, interstitial fibrosis and tubular atrophy (IFTA) are the most important pathological features of CKD, and the Banff scoring system also incorporates them into its transplant rejection grading system.
[0003] However, current assessments rely primarily on manual interpretation by pathologists, which has the following fundamental flaws:
[0004] First, it is inefficient and highly subjective. A single whole-slice image contains dozens of glomeruli and thousands of tubular sections, which doctors must identify one by one and assign a semi-quantitative score (e.g., 0-3 points), taking tens of minutes to several hours per image. Different doctors show significantly low consistency in interpreting morphologically similar categories (healthy tubules vs. early atrophy, healthy glomeruli vs. segmental sclerosis), affecting diagnostic reproducibility and standardization in multicenter studies.
[0005] Secondly, existing deep learning methods lack comprehensive coverage. Panoramic segmentation studies primarily focus on healthy tissue, failing to adequately identify lesions such as sclerotic glomeruli and tubular atrophy. Methods targeting specific lesions (such as IFTA or glomerulosclerosis) only focus on single structures, unable to simultaneously segment healthy tissue, making it difficult to conduct holistic analysis (such as the lesion / total glomeruli ratio). Furthermore, some quantitative studies rely on fluorescent staining (such as DAPI), increasing the cost of clinical applications.
[0006] Secondly, intra-batch staining variability leads to insufficient generalization ability. Even when using the same staining method (such as HE or PAS), significant differences in color intensity and contrast can occur between different batches, operators, or storage times. Existing models often learn staining styles equally with anatomical structures, resulting in overfitting to specific datasets and a significant decline in cross-batch / cross-center performance. This problem has not yet been effectively solved in the field of kidney pathology segmentation. Summary of the Invention
[0007] To address the aforementioned shortcomings of existing technologies, the present invention aims to provide a kidney pathology image processing method that integrates multi-tissue segmentation and quantitative lesion analysis. This method solves the problems of subjective inefficiency in manual interpretation, incomplete category coverage in existing automated methods, and poor cross-batch generalization ability, thereby achieving panoramic and high-precision automated quantitative pathology analysis. The present invention aims to achieve multi-category panoramic segmentation and quantitative analysis, and improve cross-batch generalization ability.
[0008] The technical solution of this invention is as follows: A method for processing renal pathological images that integrates multi-tissue segmentation and quantitative analysis of lesions, comprising:
[0009] S1. Data Acquisition and Preprocessing: Acquire digital images (WSI) of PAS-stained whole-section renal pathology tissue and perform preprocessing.
[0010] S2. Multi-class semantic segmentation neural network model and training: The multi-class semantic segmentation neural network model is trained on a training set with pixel-level annotations. The multi-class semantic segmentation neural network model adopts the Class-Token mechanism, combined with multi-scale feature fusion and encoder-decoder structure. During training, the weighted Dice loss and boundary Dice loss are jointly optimized, and the model is trained using a training set containing kidney pathology images and corresponding pixel-level annotations.
[0011] S3. Unsupervised Domain Adaptation (Optional Step): For pathological images with significant staining differences between different batches, an unsupervised domain adaptation strategy is used to fine-tune the pre-trained multi-class semantic segmentation neural network model, enabling the model to adapt to style differences between different batches. Specifically, when the color shift of a new batch of images exceeds a preset high threshold, histogram matching is performed between the training data and the new batch of images. Then, the deep network parameters of the pre-trained model are frozen, and only the first few convolutional layers are unfrozen. A small number of iterations are then performed using the aligned training data for fine-tuning.
[0012] S4. Segmentation Result Calculation and Statistical Analysis;
[0013] The kidney pathology image after the S1 preprocessing step is input into the trained multi-class semantic segmentation neural network model to obtain segmentation result images of different types of tissues; statistical analysis is performed based on the segmentation result images to output quantitative analysis results.
[0014] Optionally, the preprocessing in step S1 includes:
[0015] Foreground region extraction: Foreground regions are extracted from the input whole-section images of kidney pathology. Artifacts such as non-tissue background at the edges, bubbles, stains, and slice folds are removed by thresholding or morphological operations. If a single image contains multiple paraffin sections, it is segmented into multiple independent samples for processing.
[0016] Color shift evaluation: Calculate the overall color shift between the image to be processed and the reference image set, defined as the Euclidean distance between the mean pixel value of each channel of the image to be processed and the mean pixel value of the corresponding channel of the reference image in the selected color space HED.
[0017] (1),
[0018] in and The image to be processed and the reference image are respectively in the channel. The average pixel value on the surface;
[0019] Adaptive decision-making: based on a preset high offset threshold and low offset threshold ( Make a judgment:
[0020] like This triggers shallow fine-tuning of the model;
[0021] like Perform color normalization;
[0022] like Skip color processing;
[0023] Color normalization primarily employs the Macenko algorithm to reduce color style shifts between batches. Specifically, the Macenko method transforms the image into optical density (OD) space, estimates the chromaticity vector through singular value decomposition, decomposes different chromaticity components using concentration information, matches the chromaticity concentration of the source image to the target image, and finally reconstructs the RGB image. Its core lies in the stable estimation of the chromaticity density matrix.
[0024] Image cropping and overlap sampling: The processed image is cropped into patches of uniform size, and a preset overlap ratio is set between adjacent patches to avoid loss of edge information.
[0025] Data augmentation includes one or more combinations of geometric transformations, color enhancement, noise and blur enhancement; geometric transformations include random translation, random rotation, random shearing, horizontal flipping, and independent scaling; color enhancement includes Gamma contrast adjustment and random pixel value shift; noise and blur enhancement includes random coarse grain loss, Gaussian blur, and additive Gaussian noise.
[0026] Optionally, the multi-class semantic segmentation neural network model in S2 includes:
[0027] The encoder consists of several stacked 3x3 and 1x1 convolutional modules. Each module contains a convolutional layer, a batch normalization layer, and a ReLU activation function. It downsamples step by step through convolution or pooling operations with a stride of 2 to extract multi-scale feature maps from shallow to deep layers.
[0028] Multi-scale feature fusion module: Establishes connections between different levels of the encoder, fuses the multi-scale features extracted from each level, and enables the model to utilize both detailed information and global context at the same time;
[0029] Decoder: Composed of alternating upsampling layers and convolutional layers, it upsamples the feature map output by the encoder step by step to gradually restore the spatial resolution, and fuses the features of the corresponding layers of the encoder through skip connections to accurately locate the tissue boundary;
[0030] The Class-Token module introduces a set of learnable class embedding vectors, each vector corresponding to a type of tissue or lesion to be segmented. By interacting with image features, it generates a probability map independently for each class.
[0031] Output layer: The feature maps of each category output by the decoder are mapped one by one through convolutional layers and sigmoid activation functions to generate a probability distribution map of each category, and finally fused into a panoramic segmentation result map containing all categories.
[0032] Optionally, the multi-class semantic segmentation neural network model optimizes its parameters by optimizing the loss function through backpropagation. The training of the class semantic segmentation neural network model adopts the Dice loss under joint weighting of class and boundary and the binary cross-entropy (BCE) loss.
[0033] (2),
[0034] (3),
[0035] (4),
[0036] in, For pixels Category The predicted probability, For the true label (0 or 1), Total number of pixels To balance the hyperparameters of the two loss terms; The weights are for each category, with sclerotic glomeruli and IFTA having a greater weight than healthy tissue. This is mainly used to increase the model's attention to sparse samples and avoid ignoring rare but crucial pathological features. For boundary weights, in the boundary region The rest of the area This weight focuses on the precise fit of tissue edges, especially for the blurred boundaries of lesion areas.
[0037] Optionally, the unsupervised domain adaptation in step S3 includes:
[0038] Histogram matching: The new batch of test WSI images with large color shifts that trigger the fine-tuning strategy are used as the target domain images, and their pixel intensity distribution is used as a reference. The original training images are used as the source domain images, and their histograms are aligned with the distribution of the target domain to eliminate color style shifts between batches.
[0039] The model is fine-tuned by freezing the deep network parameters in the pre-trained model and only unfreezing the parameters of the first few layers of the network responsible for low-level features such as color and edges. A small number of iterations are then performed using source domain data after color matching to make the model adapt to the coloring style of the target domain while retaining the ability to segment tissue structures.
[0040] Optionally, step S4, segmentation results and statistical analysis, includes:
[0041] The preprocessed kidney pathology images are input into a trained multi-class semantic segmentation neural network model, where the model is used for each class. Output a probability map with the same size as the input image. , where each pixel value This indicates that the pixel belongs to the category. The probability of obtaining the final single-channel segmentation result image. For each pixel location... Make the following decisions:
[0042] (5),
[0043] That is, the category with the highest probability is selected as the predicted label of the pixel, thereby merging the probability maps of all categories into a complete segmentation map. Each pixel is assigned a unique category among healthy glomerulus, sclerotic glomerulus, healthy tubule, IFTA, arteriolar arteriole, and capillary.
[0044] Based on the segmentation result image, extract the pixel regions corresponding to each category and calculate at least one of the following quantization metrics:
[0045] Sclerosis index: A statistical measure of the ratio of healthy glomeruli to sclerotic glomeruli in terms of area and number.
[0046] (6),
[0047] (7),
[0048] in, These represent the total area of healthy glomeruli and sclerotic glomeruli, respectively. These represent the total number of healthy glomeruli and sclerotic glomeruli, respectively.
[0049] The ratio of renal tubular atrophy to interstitial fibrosis: Statistical analysis of the areas of renal tubular atrophy and interstitial fibrosis (area expressed as...). In the cortex (area expressed as...) The proportion of the ) is similar to the T-score in MEST-C, but uses a more precise ratio rather than a semi-quantitative analysis:
[0050] (8);
[0051] The area ratio or density ratio of arteries to capillaries: Statistical arteries (area expressed as...) ) and capillaries (area expressed as The pixel area is used to calculate the area ratio or density ratio, which reflects the characteristics of renal microcirculation and vascular distribution.
[0052] (9);
[0053] Finally, the statistical analysis report is output in the form of numerical tables.
[0054] A kidney pathology image processing system based on this method, integrating multi-tissue segmentation and quantitative lesion analysis, includes:
[0055] a) Image acquisition module, used to acquire digital images of PAS-stained whole sections of kidney pathology;
[0056] b) Preprocessing module, used for foreground extraction, color shift evaluation and adaptive color normalization, cropping and sampling, and data augmentation of images;
[0057] c) Unsupervised domain adaptation module: For pathological images with large staining differences between different batches, the pre-trained semantic segmentation neural network model is fine-tuned in an unsupervised manner so that the model can adapt to style differences between different batches.
[0058] d) Segmentation module, which loads and runs a multi-class semantic segmentation neural network model to output segmentation result images;
[0059] e) Statistical analysis module, used to calculate quantitative indicators based on the segmentation result map and output reports.
[0060] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0061] This invention can simultaneously and automatically identify and segment five important healthy tissues (cortical region, healthy glomeruli, healthy tubules, arterioles-arterioles, and capillaries) and two common pathological tissues (sclerotic glomeruli and tubular atrophy and interstitial fibrosis) in renal pathology images. It overcomes the limitations of existing technologies that can only analyze a few structures, enabling clinical assessment to move beyond relying on fragmented semi-quantitative indicators and instead make comprehensive judgments based on a complete tissue structure network, thus more closely reflecting the pathologist's true understanding of the overall degree of disease. Addressing the challenges of limited sample size, irregular morphology, and blurred boundaries in diseased areas, this method significantly improves the detection sensitivity and edge delineation accuracy of these difficult-to-identify areas through a loss function. Simultaneously, an adaptive strategy effectively eliminates interference caused by varying staining depths across different batches, making the model more stable across different hospitals and scanning devices. Finally, the system directly outputs multiple quantitative indicators from the original image, such as the proportion of glomerular sclerosis, the degree of fibrosis, and vascular density, without manual intervention, providing an objective, repeatable, and intelligent auxiliary tool for the accurate assessment and large-scale clinical research of chronic kidney disease. Attached Figure Description
[0062] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0063] Figure 1 This is an overall flowchart of the kidney pathology image analysis method provided in the embodiments of the present invention;
[0064] Figure 2 This is a schematic diagram of the structure of the multi-category semantic segmentation neural network model in an embodiment of the present invention;
[0065] Figure 3 Example images of the input pathological images, segmentation real labels, system segmentation prediction, and statistical analysis reports in an embodiment of the present invention; wherein, (a) is the original kidney pathological image (PAS staining), (b) is the manually labeled real segmentation image, (c) is the segmentation result image predicted by the model of the present invention (different categories are distinguished by different colors), and (d) is the statistical analysis report in the form of a numerical table. Detailed Implementation
[0066] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0067] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0068] like Figures 1-3 As shown, Embodiment 1 of the present invention provides a method for processing renal pathological images that integrates multi-tissue segmentation and quantitative analysis of lesions, comprising the following steps:
[0069] Step S1: Data acquisition and preprocessing;
[0070] The method of acquisition involves placing the PAS-stained section of the kidney biopsy under a digital pathology scanner and scanning the entire section at 20× or 40× magnification to generate a WSI digital image.
[0071] Furthermore, based on Figure 1 The overall flowchart shown includes the following preprocessing steps:
[0072] 1.1 Foreground Region Extraction: For each WSI digital image, Otsu thresholding was used to obtain a tissue foreground mask. Morphological opening operations were then used to remove isolated noise points smaller than 5000 pixels, and non-tissue regions at the edges were eliminated. If the image contained multiple independent tissues, they were segmented into independent samples using connected component analysis.
[0073] 1.2 Color Shift Evaluation and Adaptive Processing: Randomly select from the current batch of images Zhang (for example) Using this as a reference image, it is converted to the HED color space, and each color channel is calculated. average pixel value Calculate the mean value of the same channel for the image to be processed. The overall color offset is calculated using the following formula:
[0074] (11),
[0075] Set a preset high offset threshold and low offset threshold (Adjustments can be made based on the stability of the actual dyeing batch). According to The value of executes the following adaptive decision:
[0076] like If the staining difference is too large, the shallow fine-tuning step of the model is triggered (see the domain adaptation section below).
[0077] like Then perform color normalization (see subsequent steps);
[0078] like If the coloring style is consistent across batches, then skip color processing and proceed directly to image cropping and oversampling.
[0079] 1.3 Color Normalization: The Macenko method is used for color normalization in the optical density space. Specifically, the RGB image is converted to the OD space, and the first two principal components are extracted using SVD as color vectors. The color density matrix of the source image is aligned to the color matrix of the reference image, and then the RGB image is reconstructed. For the HED color space, histogram matching can also be used directly: for each channel, the cumulative distribution function (CDF) is calculated, and the mapping function is... .
[0080] 1.4 Image cropping and overlap sampling: The normalized image is cropped into 1024×1024 pixel patches, and 50% overlap is set between adjacent patches (i.e., a step size of 512 pixels) to avoid loss of boundary information. The patches are then uniformly scaled to 512×512 pixels.
[0081] 1.5 Data Augmentation: To broaden the diversity of training samples and improve the model's generalization ability, online data augmentation is performed on the cropped tiles. The following augmentation modules are randomly selected based on a preset probability (e.g., 0.5):
[0082] Geometric transformations include random translation (moving -20% to +20% in both the horizontal and vertical directions), random rotation (-180° to 180°), random shearing (-16° to 16°), horizontal flipping (probability 0.5), and independent horizontal and vertical scaling (0.75 to 1.5 times).
[0083] Color enhancements include Gamma contrast adjustment (range 0–2.0) and random pixel value offset (-0.1–0.1, performed independently per channel with a 50% probability).
[0084] Noise and blur enhancement: including random coarse-grained dropout (dropout probability 0-0.05, dropout area size 0%-25% of image size), Gaussian blur (standard deviation 0-1.0 pixels), and additive Gaussian noise (standard deviation 0-0.1).
[0085] The above enhancement methods can be used individually or in combination. Each enhancement is enabled with random probability during each training iteration, thereby improving the model's robustness to staining variations, scanning noise, and geometric deformations while maintaining the authenticity of the histopathological structure.
[0086] Step S2: Multi-class semantic segmentation neural network model and training;
[0087] Furthermore, the model structure used in this embodiment is as follows: Figure 2 As shown. The model is based on the U-Net architecture of Class-Token, and its specific components are as follows:
[0088] 2.1 Encoder: Using U-Net as the backbone network, it consists of 5 stages, each composed of multiple convolutional blocks. Each convolutional block contains 3×3 convolutions, batch normalization, and ReLU activation. Some layers use convolutions with a stride of 2 for downsampling, and the output feature map sizes are successively 1, 1, 1 / 2, 1 / 4, and 1 / 8 of the original image. The feature maps output by each stage of the encoder are denoted as... .
[0089] 2.2 Multi-scale Feature Fusion Module: Employs a Feature Pyramid Network (FPN) structure to perform multi-scale feature fusion. The feature maps are obtained by sequentially upsampling and adding them element by element. Then, each channel is adaptively weighted using an attention gating mechanism (ChannelAttention).
[0090] 2.3 Class-Token Module: Defines a learnable class embedding matrix ,in (7 tissue / lesion types) The highest layer features of the encoder After 1×1 convolution to reduce the dimension to 256 channels, it is flattened into , and then with Perform multi-head cross-attention (num_heads=7):
[0091] (11),
[0092] Obtaining category-aware features Then reshape it into Category proxy graph.
[0093] 2.4 Decoder: The class proxy graph is progressively upsampled using nearest neighbor interpolation with scale_factor=2, combined with skip connections. Each decoding stage includes: a nearest neighbor interpolation upsampling layer, element-wise summation of encoder skip connections, and a residual block adjustment channel (1×1 convolutional layer + batch normalization + ReLU).
[0094] The final output is Each feature map has the same resolution as the input image, and after Sigmoid activation, a probability map for each category is obtained. .
[0095] 2.5 Loss Function: The loss function consists of the Dice loss weighted jointly by class and boundary values, and the binary cross-entropy (BCE) loss.
[0096] (2),
[0097] set up .
[0098] Weighted Dice loss:
[0099] (3),
[0100] Weighted BCE loss:
[0101] (4),
[0102] Among them, the category weights for different categories They are: sclerotic glomeruli IFTA Healthy glomeruli healthy renal tubules ,artery capillaries For boundary weights First, the Sobel operator is used to extract the boundary pixel set of the real segmentation map. Boundary pixel set within The rest of the area .
[0103] 2.6 Training Setup: The AdamW optimizer is used, with cosine annealing scheduling for the learning rate, and an initial learning rate of [value missing]. Weight decay The model was trained on a single NVIDIA RTX 3090 GPU for a total of 500 epochs with a batch size of 8. The average Dice was calculated for the validation set every 5 epochs, and the best model was saved.
[0104] Step S3, Unsupervised Domain Adaptation (Optional Step);
[0105] Furthermore, when the color offset is calculated for the new batch of images... At this time, shallow fine-tuning of the model is triggered, specifically including:
[0106] 3.1 Randomly select 20 unlabeled images from the new batch as the target domain reference, and perform color normalization on the source domain training set in step S1.3 to align it with the color distribution of the target domain.
[0107] 3.2 Freeze all layers of the pre-trained model except for the first two convolutional blocks (i.e., only unfreeze the layers responsible for low-level features such as edges and colors), and continue training for 50 epochs using the aligned source domain data, reducing the learning rate to [missing value]. Other hyperparameters remain unchanged.
[0108] 3.3 The fine-tuned model can be directly applied to target domain image segmentation without any target domain annotation.
[0109] Step S4, segmentation results and statistical analysis include:
[0110] Furthermore, statistical analysis is performed based on the segmentation results map to output quantitative analysis results;
[0111] 4.1 For any test image, 7 probability maps are obtained through model inference. The final segmentation image is obtained by taking the maximum probability for each pixel. Figure 3 (Part c) The segmentation accuracy of each category was evaluated on the independent test set using Dice coefficient, F1, TPR, and PPV. The results are shown in Table 1.
[0112] Table 1 - Segmentation accuracy of different tissues
[0113]
[0114] 4.2 Based on the segmentation results, the following indicators are automatically calculated (the formulas are described in the foregoing description of the invention and specific implementation):
[0115] Hardening index area ratio and number ratio: ;in, These represent the total area of healthy glomeruli and sclerotic glomeruli, respectively. These represent the total number of healthy glomeruli and sclerotic glomeruli, respectively.
[0116] The ratio of renal tubular atrophy to interstitial fibrosis: ;in This indicates the area of renal tubular atrophy and interstitial fibrosis. Indicates the area on the cortex;
[0117] Artery / capillary area ratio: ;in Indicates arterial area, Indicates the area of capillaries;
[0118] The final report is output as a graph showing numerical tables on the original image. Figure 3 (part d). The fully automated process provided in this embodiment takes approximately 15 minutes to process a single WSI image (approximately 20,000 x 20,000 pixels).
[0119] Example 2 (Different combinations of loss functions)
[0120] This embodiment only uses the category-weighted Dice loss and BCE loss (excluding boundary weighting), that is, for all pixels. At this point, the boundary fit of the lesion area slightly decreases, with the boundary F1 score for the IFTA category dropping from 0.76 to 0.71, but training becomes more stable. Whether to enable boundary loss weighting can be selected based on the application scenario.
[0121] Example 3 (Online Color Adaptive)
[0122] In practical deployment, for new batches of unlabeled data, this embodiment implements a buffer pooling strategy: the average color shift is recalculated after processing every 20 images. If the threshold is exceeded twice consecutively, a background fine-tuning will be automatically triggered, without affecting the online inference service.
[0123] Matters not covered in this invention are common knowledge.
[0124] The above embodiments are only for illustrating the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be construed as limiting the scope of protection of the present invention. All equivalent changes or modifications made in accordance with the spirit and essence of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A method for processing renal pathological images that integrates multi-tissue segmentation and quantitative analysis of lesions, characterized in that, Includes the following steps: S1: Obtain digital images of PAS-stained whole-section renal pathology tissue and perform preprocessing; S2: Input the preprocessed kidney pathology image into a pre-trained multi-class semantic segmentation neural network model to obtain segmentation result images of different types of tissues; the multi-class semantic segmentation neural network model is trained on a pixel-level labeled training set, and adopts a Class-Token mechanism, encoder-decoder architecture and multi-scale feature fusion, and uses Dice and BCE loss under class and boundary weighting for joint optimization; S3: Perform statistical analysis based on the segmentation result map and output quantitative analysis results.
2. The method according to claim 1, characterized in that, Preprocessing includes at least one of the following: foreground region extraction, color offset evaluation and adaptive decision-making, color normalization, image cropping and oversampling, and data augmentation.
3. The method according to claim 2, characterized in that, Color offset evaluation includes: converting the image to the HED color space, calculating the Euclidean distance Δ between the mean pixel values of each channel of the image to be processed and the reference image; and selecting whether to trigger shallow fine-tuning of the model, perform color normalization, or skip color processing based on the comparison of the Euclidean distance Δ with preset high and low thresholds.
4. The method according to claim 2, characterized in that, Color normalization can be achieved by using the Macenko algorithm to decompose and match color vectors in the optical density space, or by using a histogram matching method.
5. The method according to claim 2, characterized in that, Data augmentation includes one or more combinations of geometric transformations, color enhancement, noise and blur enhancement; geometric transformations include random translation, random rotation, random shearing, horizontal flipping, and independent scaling; color enhancement includes Gamma contrast adjustment and random pixel value shifting; noise and blur enhancement includes random coarse grain loss, Gaussian blur, and additive Gaussian noise.
6. The method according to claim 1, characterized in that, Multi-class semantic segmentation neural network models include: a) Encoder: It consists of several stacked convolutional modules, which are downsampled step by step through convolution or pooling with a stride of 2 to extract multi-scale feature maps; b) Multi-scale feature fusion module: fuses features from different levels of the encoder; c) Class-Token module: Introduces learnable class embedding vectors, interacts with image features through an attention mechanism, and generates a probability map independently for each class; d) Decoder: Composed of alternating upsampling layers and convolutional layers, it restores resolution and accurately locates boundaries through skip connections; e) Output layer: The probability distribution map of each category is output through convolutional layers and sigmoid activation function, and then fused into a panoramic segmentation result.
7. The method according to claim 1, characterized in that, The training of the category semantic segmentation neural network model employs Dice loss with joint weighting of category and boundary values, and binary cross-entropy (BCE) loss. The loss function is as follows: (2), in, To balance the hyperparameters of the two loss terms, a weighted Dice loss is used. and weighted BCE loss All include category weights and boundary weights Boundary weights The value is greater than 1 in the peripheral regions of the tissue, and 1 in the remaining regions.
8. The method according to claim 3, characterized in that, When the color shift of the new batch of images exceeds a preset high threshold, unsupervised domain adaptation will be adopted. The steps are as follows: perform histogram matching between the training data and the new batch of images, then freeze the deep network parameters of the pre-trained model, only unfreeze the first few convolutional layers, and use the aligned training data for iterative fine-tuning.
9. The method according to claim 1, characterized in that, Statistical analysis includes calculating at least one of the following indicators: Hardening index: (6), (7), in, These represent the total area of healthy glomeruli and sclerotic glomeruli, respectively. These represent the total number of healthy glomeruli and sclerotic glomeruli, respectively. The ratio of renal tubular atrophy to interstitial fibrosis: (8), in This indicates the area of renal tubular atrophy and interstitial fibrosis. Indicates the area of the cortex; Artery to capillary area ratio: (9), in Indicates arterial area, Indicates the area of capillaries; Output the data in a numerical table format.
10. A renal pathology image processing system integrating multi-tissue segmentation and quantitative lesion analysis based on the method of any one of claims 1 to 9, characterized in that, include: a) Image acquisition module, used to acquire digital images of PAS-stained whole sections of kidney pathology; b) Preprocessing module, used for foreground extraction, color shift evaluation and adaptive color normalization, cropping and sampling, and data augmentation of images; c) Unsupervised domain adaptation module: For pathological images with large staining differences between different batches, the pre-trained semantic segmentation neural network model is fine-tuned in an unsupervised manner so that the model can adapt to style differences between different batches. d) Segmentation module, which loads and runs a multi-class semantic segmentation neural network model to output segmentation result images; e) Statistical analysis module, used to calculate quantitative indicators based on the segmentation result map and output reports.
