Virtual special staining-based in-vitro evaluation method and system for kidney biopsy sample quality
By acquiring images of undewaxed slides and utilizing a hybrid contrast virtual staining generation model and target detection network, the problems of time consumption and detection accuracy in traditional kidney biopsy were solved, enabling rapid and accurate glomerular counting and tissue quality assessment.
Patent Information
- Application Number
- CN202610381574.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-26
- Publication Date
- 2026-06-26
Smart Images

Figure CN122289185A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of biomedical image processing technology, specifically relating to an in vitro assessment method and system for the quality of kidney biopsy samples based on virtual staining. Background Technology
[0002] The gold standard for diagnosing chronic kidney disease is renal biopsy. According to authoritative consensus both domestically and internationally, a qualified light microscopy specimen must contain at least 10 glomeruli. The current pathological evaluation workflow is typically as follows: Sampling and Fixation: Renal biopsy tissue is fixed in formalin and embedded in paraffin. Sectioning and Pretreatment: The paraffin block is cut into thin sections (2-3 μm), followed by time-consuming dewaxing and hydration. Chemical Staining: H&E, PAS, or hexamine silver staining is performed using chemical reagents, a process that can take several hours to several days. Microscopic Evaluation: The pathologist observes the stained sections under a microscope and counts the number of glomeruli to determine the specimen's suitability.
[0003] However, the above-mentioned pathological assessment workflow has the following shortcomings: Significant time delays and inability to perform real-time quality control: Traditional staining processes are too time-consuming, making it impossible to quickly determine whether there are enough glomeruli in the slides. Specimen waste and irreversibility: Once chemical staining begins, if the specimen is found to be substandard, it has already been consumed and is irreversible, leading to the waste of valuable samples and reagents. Difficulty in manually interpreting unstained slides: Although unstained slides can be observed directly, unstained tissue lacks color and texture contrast, appearing pale and lacking in features. Relying solely on manual microscopic observation of unstained slides for glomeruli counting is extremely inefficient and highly subjective, easily resulting in missed detections. Furthermore, existing methods often require complete dewaxing, still consuming approximately 20 minutes of processing time, which is not fast enough; differences in deformation and color changes can also affect the final results. These factors pose significant challenges to traditional machine vision. Summary of the Invention
[0004] To address the shortcomings of existing technologies, the present invention aims to provide an in vitro assessment method and system for kidney biopsy quality based on virtual staining, thereby solving the problems in the prior art.
[0005] The objective of this invention can be achieved through the following technical solutions: An in vitro assessment method for the quality of renal biopsy samples based on virtual staining includes the following steps: Obtain undewaxed mounted sections to be evaluated, and scan the undewaxed mounted sections to obtain unstained whole-section images; The unstained whole slice image is input into a pre-trained hybrid contrastive virtual staining generation model to generate a virtual special staining image with special staining texture; wherein, the hybrid contrastive virtual staining generation model is obtained by optimization training based on a total loss function, which includes adversarial loss, L1 loss and PatchNCE block noise contrast estimation loss to maximize the mutual information between the input image and the generated image at the corresponding spatial location; The virtual staining image is input into the target detection network to identify the glomerular structure in the virtual staining image and count the total number of glomeruli. Based on the comparison between the total number of glomeruli and the preset number threshold, the suitability assessment result of the undewaxed and sealed sections is output.
[0006] Furthermore, the preparation steps of the undewaxed mounted sections include: Paraffin sections of renal biopsy tissue of predetermined thickness were cut; The paraffin slices are baked at a preset temperature; The paraffin sections were directly mounted using mounting medium.
[0007] Furthermore, the preset thickness is 2µm; the conditions for baking the paraffin slices at the preset temperature are: baking at 70°C for 2 minutes.
[0008] Furthermore, after scanning the undewaxed slide to obtain an image of the unstained whole slide, the process further includes: The resolution of the unstained whole-section image was normalized to 0.5µm / pixel; When inputting the unstained whole-slice image into the pre-trained hybrid contrast virtual staining generation model, the input resolution is adjusted to 1024×1024 pixels.
[0009] Furthermore, the hybrid contrastive virtual staining generation model includes a generator using a ResNet architecture and a discriminator using a PatchGAN architecture; The total loss function is: in, Indicates the input image. Represents paired images of the true values. Indicates the generated image; To combat the losses; For the L1 loss, For the PatchNCE block noise contrast estimation loss, and These are the corresponding weighting coefficients.
[0010] Furthermore, the training process of the pre-trained hybrid contrastive virtual coloring generation model includes: Crops the input image into 256×256 pixel blocks, and sets the batch size to 1; The Adam optimizer was used for optimization over a total of 60 cycles, including a constant learning rate phase for the first 30 cycles and a linear decay to zero phase for the last 30 cycles.
[0011] Furthermore, the virtual special staining image is a virtual hexamine silver staining image or a virtual PAS staining image; The target detection network is a YOLO network model, used to extract semantic features of the virtual special staining image and output the bounding box and confidence score of the glomerular structure.
[0012] Furthermore, the preset quantity threshold is 10; the process of outputting the suitability assessment result of the undewaxed and sealed sections includes: When the total number of glomeruli is greater than or equal to 10, a prompt message indicating that the sample collection is qualified is output. When the total number of glomeruli is less than 10, a prompt message indicating that the sample collection is unqualified will be output.
[0013] The in vitro assessment system for the quality of renal biopsy samples based on virtual staining, performing the above-described method, includes: The image acquisition module is used to acquire the undewaxed mounted slide to be evaluated, and to scan the undewaxed mounted slide to obtain an image of the unstained whole slide; The virtual special staining module is used to input the unstained whole slice image into a pre-trained hybrid contrastive virtual staining generation model to generate a virtual special staining image with special staining texture; wherein, the hybrid contrastive virtual staining generation model is obtained by optimization training based on a total loss function, which includes adversarial loss, L1 loss and PatchNCE block noise contrast estimation loss for maximizing the mutual information between the input image and the generated image at the corresponding spatial location; The detection and statistics module is used to input the virtual staining image into the target detection network, identify the glomerular structure in the virtual staining image, and count the total number of glomeruli. The quality assessment module is used to output the suitability assessment result of the undewaxed slide based on the comparison result of the total number of glomeruli with the preset number threshold.
[0014] A computer storage medium storing a readable program that, when executed, instructs a computing device to perform the above-described in vitro assessment method for the quality of kidney biopsy samples based on virtual staining.
[0015] The beneficial effects of this invention are: 1. This invention employs a specific physical slicing preparation method of "undewaxed and sealed slices" to directly scan the baked paraffin slices with sealing tablets. This technique not only fills the pores and optimizes the refractive index matching using sealing tablets, but also directly eliminates the tedious steps of xylene dewaxing and ethanol rehydration, thereby saving processing time. The process can be completed in just a few minutes, achieving truly rapid upstream real-time quality control.
[0016] 2. Unlike existing technologies that primarily generate virtual H&E images, this invention trains a deep learning model specifically to generate virtual hexamine silver (V-Silver) or virtual PAS images. This technique utilizes the light scattering characteristics of unstained tissue to significantly enhance the contrast of the glomerular basement membrane and mesangial matrix, thereby enabling downstream target detection networks (such as YOLO) to more accurately identify key structures and improve detection accuracy to an extremely high level similar to real chemical staining (mAP@0.5 reaches approximately 0.91).
[0017] 3. To address the issue of blurred output that standard Pix2pix networks tend to produce when processing nonlinear deformations of tissue restaining, this invention introduces a hybrid contrast architecture into the generative network, incorporating PatchNCE (block noise contrast estimation) loss derived from unpaired contrast transformation. This approach effectively overcomes the limitations caused by small errors in image registration by maximizing the mutual information between input and output at the image block level, thereby generating high-quality virtual images with clear edges and high fidelity of anatomical structures (such as glomerular boundaries).
[0018] 4. In clinical settings, different digital slide scanners can cause optical domain shifts, leading to a sharp decline in the detection performance of raw, unstained images. The virtual staining model introduced in this invention effectively acts as a "computational normalizer." This method effectively mitigates the differences in hardware input of the raw data, restoring the cross-device detection performance to a high level after model processing, thus giving the system significant value for clinical promotion and implementation.
[0019] 5. The evaluation process of this invention relies solely on optical scanning and computational generation, requiring no expensive chemical staining reagents throughout. Due to the use of a non-dewaxed preparation method, after the automated evaluation system completes the testing, the slides can be directly stripped of coverslips and mounting media, seamlessly integrating into subsequent routine pathological chemical staining lines. This mechanism ensures the absolute non-destructive nature of the evaluation process, neither affecting the doctor's final diagnosis nor fundamentally avoiding the waste of valuable samples caused by "discovering insufficient material only after staining." Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a schematic diagram of unstained sections in different states and subsequent virtual staining quality evaluation indicators. Figure 2 This is a schematic diagram illustrating the advantages of hybrid contrast virtual staining compared to traditional virtual staining methods; Figure 3 This is a schematic diagram comparing the detection results of different virtual staining directions. Detailed Implementation
[0022] 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.
[0023] Example 1 An in vitro assessment method for the quality of renal biopsy samples based on virtual staining includes the following steps: S1, Slicing under specific physical conditions The non-dewaxed / mounted (NM) sectioning method was used. Paraffin sections were baked and then directly mounted and scanned, without the need for xylene dewaxing and alcohol hydration steps. Related experiments ( Figure 1 This indicates that the non-dewax mounting method can maintain a high level of virtual staining quality while saving dewaxing time.
[0024] Although the tissue contains paraffin, the sections of kidney biopsy tissue are thinner than regular sections (4-6 μm), making the mounting medium more effective at dissolving the paraffin. Furthermore, the mounting medium fills pores, optimizes refractive index matching, and balances optical clarity with workflow efficiency (saving approximately 20 minutes compared to dewaxing). In this embodiment, a xylene-containing resin mounting medium commonly used in pathology laboratories is used, where the xylene can dissolve the paraffin in the section.
[0025] The tissue section processing and data collection process is as follows: Figure 1As shown in section A, the process specifically includes: Pathological paraffin blocks are sectioned using a paraffin microtome to form 2μm thick sections. First, the untreated sections are directly scanned using a digital pathology scanner at 20x magnification to obtain undewaxed, unmounted (NN) images. Then, the sections are placed in a 70°C oven for 2 minutes, mounted using coverslips and standard mounting medium (China Yizhiyuan Biotechnology Co., Ltd.), and scanned to obtain undewaxed, mounted (NM) images. After completing the above steps, the coverslips are removed, and the tissue samples are dewaxed with xylene, rehydrated with a series of gradient ethanol solutions, and then scanned again for dewaxed, unmounted (DN) images. Subsequently, the sections are remounted and scanned again to obtain dewaxed, mounted (DM) images. After completing these unstained imaging stages, the sections are stained with hematoxylin and eosin (H&E), periodic acid-Scheffler (PAS), or silver methylamine (Silver) according to standard clinical protocols to finally obtain stained tissue images.
[0026] Among them, WSI (whole slice image) of slices in different preparation states and their magnified local images are as follows: Figure 1 As shown in Figure B, it can be seen that: the undewaxed and unmounted slides are generally grayish, with weak structural layers and visible sectioning marks; the undewaxed and mounted slides show a clear boundary between the tissue and the blank area, and the glomerular structure is relatively clear; the dewaxed slides have the best contrast and the most prominent tissue structure; while the dewaxed and mounted slides are too transparent, resulting in decreased imaging clarity. In this embodiment, the virtual staining quality under different preparation states is evaluated. The quality evaluation process includes: to quantify the influence of preparation states on the adaptability of virtual staining, this embodiment uses a virtual staining model with unstained slides as input and real H&E slides as targets for paired training. The model is trained and tested independently for each of the four preparation states to quantify the impact of preparation differences individually. The model converges after 60 epochs, and the generated images visually exhibit typical H&E staining characteristics.
[0027] Bar charts for virtual staining quality evaluation under different preparation conditions are shown below. Figure 1 As shown in the CF diagram, NN represents undewaxed and unsealed film, NM represents undewaxed and sealed film, DN represents dewaxed and unsealed film, and DM represents dewaxed and sealed film. Higher PSNR (Peak Signal-to-Noise Ratio) and SSIM (Structural Similarity) scores indicate better pixel-level fidelity, while lower FID (Frechez Distance) and LPIPS (Learned Perceptual Patch Similarity) scores represent better perceptual realism and consistency with feature distribution. Figure 1 As can be seen from G, although the dewaxed unsealed group and the non-dewaxed sealed group are almost equivalent in image quality, the dewaxed unsealed group requires an additional dewaxing step (about 20 minutes) and the experimental procedure is more complicated.
[0028] The trade-off analysis shows that the undewaxed sealing (NM) method achieves the best balance between quality and efficiency.
[0029] S2, Introduction of Hybrid Contrast Virtual Staining Generation Model To address the issue of blurred outputs in standard Conditional GANs (such as Pix2pix) when handling unavoidable nonlinear deformations during histological restaining, due to their reliance on pixel-level L1 loss, a hybrid contrastive Pix2pix architecture is proposed. This architecture integrates PatchNCE (block noise contrast estimation loss) derived from unpaired contrastive transformation into a pairwise training mechanism. This design aims to overcome the limitations of traditional pixel-level alignment when dealing with minor tissue morphological deformations by introducing a contrastive learning mechanism.
[0030] The total loss function is shown in the following formula: in, Indicates the input image. Represents paired images of the true values. Indicates the generated image; To combat the losses; and These are the corresponding weight coefficients; In this embodiment, =10, =1. The generator and discriminator are optimized using the Adam optimizer with a momentum parameter of 0.5. The initial learning rate is set to 0.0002. In this formula, Loss utilizes paired true values To ensure the color accuracy of the generated image; and The loss function is then used to maximize the input at the patch level. With output Mutual information between inputs and outputs. PatchNCE (contrast patch) loss maximizes the mutual information between inputs and outputs at their respective spatial locations, resolving blurring caused by minor errors in image registration and generating images with high-fidelity anatomical structures. Since the stained sections are the same and scanned by the same scanner within a short period, the actual tissue deformation is minimal, requiring only rigid registration and removal of areas with significant deformation.
[0031] In terms of network model construction, the generator in this embodiment adopts a ResNet-based architecture, specifically containing nine residual blocks to facilitate gradient propagation in deep networks and enhance feature extraction capabilities; the discriminator uses a PatchGAN structure to focus on local high-frequency details of the image. All models are implemented in a deep learning framework (e.g., PyTorch).
[0032] During model training, the input image was cropped into 256×256 pixel patches with a batch size of 1. The Adam optimizer was used, with beta parameters set to 0.5 and 0.999, respectively. The training process lasted for 60 epochs, including a constant learning rate phase for the first 30 epochs and a linear decay to zero phase for the following 30 epochs to ensure that the model converged to the optimal solution.
[0033] During the inference phase, to ensure image consistency across a large field of view, the output resolution is adjusted to 1024×1024 pixels.
[0034] The overall loss function described above employs a dual-supervision strategy. The advantage of this strategy is twofold: firstly, it ensures the generated images possess correct staining phenotypes; secondly, even with slight registration errors between the source and target images, it can still generate clear, high-fidelity anatomical structures (e.g., glomerular boundaries). Figure 2 As shown in the figure, experimental results demonstrate that, compared with the benchmark Pix2pix and CUT models, the hybrid contrast architecture of this invention achieves better perceptual quality and structure preservation capabilities while maintaining comparable inference latency.
[0035] Specifically, the experimental verification process included: during the training phase, all three models used the same input image; the Pix2pix and CUT models used their default parameters, and the model in this experiment used the same parameters, with the same training batch. During the inference phase, the output resolution was adjusted to 1024×1024 pixels. This experiment was conducted on a workstation equipped with an NVIDIA RTX 5080 GPU.
[0036] Experimental results are as follows Figure 2 As shown; where: Figure 2 The AD in the figure represents a quantitative performance comparison: based on the optimized undewaxed / mounted unstained slide input, the virtual staining quality generated by the three generation models (CUT, Pix2pix, and mixed contrast Pix2pix) is compared; it can be seen that compared with CUT and Pix2pix, this method achieves better perceived quality and structure preservation ability.
[0037] Figure 2 The 'E' in the figure represents the comparison of inference time for different models on an NVIDIA RTX 5080 GPU (expressed as the number of seconds to process each 1024×1024 image block); it can be seen that this method maintains inference latency comparable to the baseline model.
[0038] S3, Preferred Virtual Specialized Color Mode The model was trained to generate virtual hexamine silver staining (V-Silver) or virtual PAS staining (V-PAS) images, rather than traditional virtual H&E.
[0039] Downstream automated glomerular detection: The generated virtual stained images are input into the target detection network (such as YOLOv11) to automatically identify and count glomeruli and output the appropriateness assessment results for tissue sampling. Before the target detection network is used, it needs to be fine-tuned and trained: The real labeled data is established by two senior nephrologists by manually drawing the glomerular bounding boxes on real H&E whole slice images, and then YOLOv11 is fine-tuned and trained using this dataset.
[0040] By utilizing the light scattering properties of unstained tissues, deep learning was used to enhance the contrast between the glomerular basement membrane and mesangial matrix.
[0041] In this embodiment, the target detection experiment was conducted as follows: To explore the specific contribution of different input modalities to detection performance, this embodiment trained and evaluated the YOLOv11 model under five different data settings: raw unstained image (Raw), virtual H&E (VH&E), virtual PAS (V-PAS), virtual silver staining (V-Silver), and real H&E (Real H&E). During training, the whole-slice image was segmented into 1792×1792 pixel mosaic blocks, and then downsampled to the network input resolution of 1024×1024 pixels. The YOLOv11 model was trained for 200 rounds using the Automatic Mixed Precision (AMP) algorithm, with a batch size of 6. Mosaic data augmentation was disabled to avoid artificially truncating the glomerular structure and to maintain the authenticity of the anatomical background. To reduce random bias and ensure robustness of performance evaluation, this embodiment implemented a rigorous patient-level 5-fold cross-validation scheme, and all reported metrics were expressed as the mean ± standard deviation (SD) of all folds.
[0042] Experimental results are as follows Figure 3 As shown, where, Figure 3 In the figure, A represents the mAP@0.5 bar chart detected by YOLOv11 using various virtual staining methods. Figure 3 In the graph, B represents the PR curves of various virtual staining YOLOv11 detection methods. It can be seen that the real H&E model performs best, representing the upper limit of detection performance (mAP@0.5 = 0.9353). Notably, all three virtual staining modalities show significant performance improvements compared to the original unstained baseline. Among them, virtual silver staining and virtual PAS show significantly better detection results than virtual H&E.
[0043] The above experiments demonstrate that virtual hexamine silver staining and virtual PAS staining are significantly superior to virtual H&E (VH&E) and unstained images (RAW) in downstream detection tasks.
[0044] Example 2 In this embodiment, the technical solution of the present invention is illustrated through specific examples; Renal biopsy evaluation process based on virtual silver staining of undewaxed sections Step 1: Physical preparation of slices Obtain the paraffin-embedded tissue block from the kidney biopsy and cut 2μm thick tissue sections using a microtome. Bake the sections at 70°C for 2 minutes, then mount them directly with standard mounting medium and cover with a coverslip. Note: Do not perform xylene dewaxing or ethanol hydration.
[0045] Step 2: Digital scanning. The above "undewaxed / mounted" slides were scanned using a digital pathology slide scanner to obtain unstained whole slide images (WSI), with the resolution normalized to 0.5 μm / pixel.
[0046] Step 3: Image Preprocessing and Virtual Coloring The uncolored WSI is cut into 256×256 pixel image blocks.
[0047] Input a pre-trained hybrid virtual coloring generator network. This network is based on the ResNet architecture (9 residual blocks), and the discriminator uses the PatchGAN structure.
[0048] The model is loaded with V-Silver (virtual silver staining) weights. These weights are obtained by jointly optimizing the training set (paired unstained images and real hexamine silver stained images) using L1 loss and PatchNCE contrastive loss.
[0049] The generator outputs a virtual image with realistic hexamine silver staining texture, with a focus on enhancing the contrast of the black glomerular basement membrane lines.
[0050] Step 4: Automatic Glomerular Detection and Counting The generated V-Silver virtual image patches can be reassembled or directly input into the YOLOv11s object detection model.
[0051] The model identifies glomerular structures in images and outputs bounding boxes and confidence scores.
[0052] The system automatically counts the total number of glomeruli in the entire image.
[0053] Step 5: Quality Control Decision If the number of glomeruli detected is ≥10, the system will indicate "sampling qualified"; otherwise, it will indicate "insufficient sampling", and it is recommended to immediately re-slice the tissue or remind the clinician to immediately obtain additional tissue.
[0054] Example 3 In this embodiment, an in vitro assessment system for the quality of renal biopsy samples based on virtual staining is proposed, specifically including: The image acquisition module is used to acquire the undewaxed mounted slide to be evaluated, and to scan the undewaxed mounted slide to obtain an image of the unstained whole slide; The virtual special staining module is used to input the unstained whole slice image into a pre-trained hybrid contrastive virtual staining generation model to generate a virtual special staining image with special staining texture; wherein, the hybrid contrastive virtual staining generation model is obtained by optimization training based on a total loss function, which includes adversarial loss, L1 loss and PatchNCE block noise contrast estimation loss for maximizing the mutual information between the input image and the generated image at the corresponding spatial location; The detection and statistics module is used to input the virtual staining image into the target detection network, identify the glomerular structure in the virtual staining image, and count the total number of glomeruli. The quality assessment module is used to output the suitability assessment result of the undewaxed slide based on the comparison result of the total number of glomeruli with the preset number threshold.
[0055] Based on a similar inventive concept, embodiments of the present invention also provide a computer storage medium storing a readable program that, when run by a processor, can execute the above-described in vitro assessment method for kidney biopsy quality based on virtual staining.
[0056] Based on a similar inventive concept, this invention provides an electronic device, including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the above-described in vitro assessment method for kidney biopsy quality based on virtual staining.
[0057] Based on a similar inventive concept, embodiments of the present invention also provide a computer program product, including computer instructions, which instruct a computing device to perform the operations corresponding to the above-described in vitro assessment method for kidney biopsy quality based on virtual staining.
[0058] The methods of the present invention can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code originally stored on a remote recording medium or a non-transitory machine-readable medium and subsequently stored on a local recording medium, downloaded via a network. Thus, the methods described herein can be processed by software stored on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components (e.g., RAM, ROM, flash memory, etc.) capable of storing or receiving software or computer code that, when accessed and executed by the computer, processor, or hardware, implements the methods described herein. Furthermore, when a general-purpose computer accesses the code used to implement the methods shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for performing the methods shown herein.
[0059] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention.
Claims
1. An in vitro method for evaluating the quality of renal biopsy samples based on virtual staining, characterized in that, Includes the following steps: Obtain undewaxed mounted sections to be evaluated, and scan the undewaxed mounted sections to obtain unstained whole-section images; The unstained whole slice image is input into a pre-trained hybrid contrastive virtual staining generation model to generate a virtual special staining image with special staining texture; wherein, the hybrid contrastive virtual staining generation model is obtained by optimization training based on a total loss function, which includes adversarial loss, L1 loss and PatchNCE block noise contrast estimation loss to maximize the mutual information between the input image and the generated image at the corresponding spatial location; The virtual staining image is input into the target detection network to identify the glomerular structure in the virtual staining image and count the total number of glomeruli. Based on the comparison between the total number of glomeruli and the preset number threshold, the suitability assessment result of the undewaxed and sealed sections is output.
2. The in vitro assessment method for renal biopsy quality based on virtual staining according to claim 1, characterized in that, The preparation steps of the undewaxed mounted sections include: Paraffin sections of renal biopsy tissue of predetermined thickness were cut; The paraffin slices are baked at a preset temperature; The paraffin sections were directly mounted using mounting medium.
3. The in vitro assessment method for renal biopsy quality based on virtual staining according to claim 2, characterized in that, The preset thickness is 2µm; the conditions for baking the paraffin slices at the preset temperature are: baking at 70°C for 2 minutes.
4. The in vitro assessment method for renal biopsy quality based on virtual staining according to claim 1, characterized in that, After scanning the undewaxed slide to obtain an image of the unstained whole slide, the process further includes: The resolution of the unstained whole-section image was normalized to 0.5µm / pixel; When inputting the unstained whole-slice image into the pre-trained hybrid contrast virtual staining generation model, the input resolution is adjusted to 1024×1024 pixels.
5. The in vitro assessment method for renal biopsy quality based on virtual staining according to claim 1, characterized in that, The hybrid contrastive virtual staining generation model includes a generator using a ResNet architecture and a discriminator using a PatchGAN architecture. The total loss function is: in, Indicates the input image. Represents paired images of the true values. Indicates the generation of an image; To combat the losses; For the L1 loss, For the PatchNCE block noise contrast estimation loss, and These are the corresponding weighting coefficients.
6. The in vitro assessment method for renal biopsy quality based on virtual staining according to claim 5, characterized in that, The training process of the pre-trained hybrid contrastive virtual coloring generation model includes: Crops the input image into 256×256 pixel blocks, and sets the batch size to 1; The Adam optimizer was used for optimization over a total of 60 cycles, including a constant learning rate phase for the first 30 cycles and a linear decay to zero phase for the last 30 cycles.
7. The in vitro assessment method for renal biopsy quality based on virtual staining according to claim 1, characterized in that, The virtual special staining image is a virtual hexamine silver staining image or a virtual PAS staining image; The target detection network is a YOLO network model, used to extract semantic features of the virtual special staining image and output the bounding box and confidence score of the glomerular structure.
8. The in vitro assessment method for renal biopsy quality based on virtual staining according to claim 1, characterized in that, The preset quantity threshold is 10; The process of outputting the sampling suitability assessment results of the undewaxed mounted sections includes: When the total number of glomeruli is greater than or equal to 10, a prompt message indicating that the sample collection is qualified is output. When the total number of glomeruli is less than 10, a prompt message indicating that the sample collection is unqualified is output.
9. An in vitro assessment system for the quality of renal biopsy samples based on virtual staining, comprising the method described in any one of claims 1-8, characterized in that, include: The image acquisition module is used to acquire the undewaxed mounted slide to be evaluated, and to scan the undewaxed mounted slide to obtain an image of the unstained whole slide; The virtual special staining module is used to input the unstained whole slice image into a pre-trained hybrid contrastive virtual staining generation model to generate a virtual special staining image with special staining texture; wherein, the hybrid contrastive virtual staining generation model is obtained by optimization training based on a total loss function, which includes adversarial loss, L1 loss and PatchNCE block noise contrast estimation loss for maximizing the mutual information between the input image and the generated image at the corresponding spatial location; The detection and statistics module is used to input the virtual staining image into the target detection network, identify the glomerular structure in the virtual staining image, and count the total number of glomeruli. The quality assessment module is used to output the suitability assessment result of the undewaxed slide based on the comparison result of the total number of glomeruli with the preset number threshold.
10. A computer storage medium storing a readable program, characterized in that, When the program is running, the program can instruct the computing device to perform the in vitro assessment method for kidney biopsy quality based on virtual staining as described in any one of claims 1-8.