TRECARD Renal Histology Segmentation U-Net
A U-Net convolutional neural network for pixel-wise semantic segmentation of inflammation-associated interstitial fibrosis and tubular atrophy (i-IFTA), focal inflammatory infiltrates, and tubular dilation in haematoxylin-and-eosin (H&E)-stained whole-slide images (WSIs) of rat kidney tissue.
Given an H&E image patch, the model assigns each pixel to one of four classes:
| Index | Class | Mask color |
|---|---|---|
| 0 | Inflammatory infiltrates (focal) | red |
| 1 | i-IFTA (inflammation-associated interstitial fibrosis and tubular atrophy) | green |
| 2 | Tubular dilation | blue |
| 3 | Unaltered tissue | white |
Paired with the companion inference pipeline, it reassembles patch-level predictions into a full whole-slide segmentation overlay and computes the percentage of tissue area occupied by each lesion type — turning a task that takes a pathologist hours per slide into a few minutes.
Developed by the TRECARD group (Translational Research on Renal and Cardiovascular Diseases), Department of Physiology and Pharmacology, University of Salamanca / IBSAL, Spain.
Companion code (WSI inference pipeline): https://github.com/mhjoana98/TRECARD-Renal-Histology-Segmentation
Intended Uses & Limitations
Intended use: a research support tool for preclinical histopathological assessment of renal injury in rat models of AKI-induced chronic kidney disease (ischaemia-reperfusion, cisplatin nephrotoxicity, or both) — segmenting and quantifying the three lesion types above on whole-slide H&E images.
Not intended for:
- Clinical use or diagnosis in humans. The model was trained and validated exclusively on rat tissue and has not been validated on human biopsies.
- Any tissue type, stain, or species outside H&E-stained rat kidney sections.
For full methodology, dataset description, training details, evaluation metrics, and comparison against expert/junior pathologist annotators, see the associated manuscript (citation below).
How to Use
import os
os.environ["KERAS_BACKEND"] = "torch" # must be set before importing keras
import keras
import numpy as np
model = keras.saving.load_model("TRECARD_renal_histology_segmentation_unet.keras", compile=False)
# patch: H&E image patch, 512x512x3, uint8
x = patch.astype("float32") / 255.0
pred_mask = model.predict(x[None, ...]).argmax(axis=-1)[0] # 512x512, classes 0-3
For inference over a full whole-slide image (patch tiling, spatial reassembly, colour overlay, and area quantification), see the companion pipeline: https://github.com/mhjoana98/TRECARD-Renal-Histology-Segmentation
Citation
Please if you use this model, use the following citation:
@Article{biomedinformatics6050084,
AUTHOR = {Mercado-Hernández, Joana and Martín-Calvo, David and Carniglia, Giada and Díaz-Morales, Noelia and Düwell, Annette and Fuentes-Calvo, Isabel and Collado, Lucía García and Kovalchuk, Andriy and López-Hernández, Francisco J. and Martín-Fernández, Nuria and Sancho-Martínez, Sandra M. and Martínez-Salgado, Carlos},
TITLE = {A Deep Learning-Based Tool for Segmentation and Quantification of i-IFTA, Focal Infiltrates, and Tubular Dilation in Haematoxylin–Eosin-Stained Renal Whole-Slide Images},
JOURNAL = {BioMedInformatics},
VOLUME = {6},
YEAR = {2026},
NUMBER = {5},
ARTICLE-NUMBER = {84},
URL = {https://www.mdpi.com/2673-7426/6/5/84},
ISSN = {2673-7426},
ABSTRACT = {(1) Background: Simultaneous evaluation of acute and chronic lesions is critical for staging renal disease, yet manual assessment suffers from high inter-observer variability and heavy workloads. While deep learning models excel at structural segmentation, none currently consolidate the concurrent quantification of key AKI-to-CKD transition markers on standard-stained tissue slides. (2) Methods: We developed a U-Net-based convolutional neural network for the pixel-wise segmentation and quantification of inflammation-associated interstitial fibrosis and tubular atrophy (i-IFTA), focal inflammatory infiltrates and tubular dilation in haematoxylin–eosin-stained whole-slide images (WSIs) from rat models of renal injury. (3) Results: The model demonstrated robust pixel-wise segmentation in H&E-stained rodent renal tissue (overall accuracy: 88.26%, macro-averaged Dice coefficient: 0.843; per-class Dice ranging from 0.727 for focal infiltrates to 0.920 for unaltered tissue). While comparative evaluation against human annotators was performed on a limited patch subset, the model exhibited agreement trends close to expert pathologists and superior to junior annotators. The end-to-end WSI inference pipeline generates full-slide visual overlays and automated WSI-level quantitative area measurements in a mean time of 103.57 s per WSI on GPU hardware. (4) Conclusions: This model offers an objective and automated framework for quantifying key structural and inflammatory lesions in rodent renal tissue. By enabling rapid WSI-level quantitative area measurements, it establishes a solid foundation for preclinical histopathological assessment and provides high potential for future translation into human clinical pathology.},
DOI = {10.3390/biomedinformatics6050084}
}
APA style: Mercado-Hernández, J., Martín-Calvo, D., Carniglia, G., Díaz-Morales, N., Düwell, A., Fuentes-Calvo, I., Collado, L. G., Kovalchuk, A., López-Hernández, F. J., Martín-Fernández, N., Sancho-Martínez, S. M., & Martínez-Salgado, C. (2026). A Deep Learning-Based Tool for Segmentation and Quantification of i-IFTA, Focal Infiltrates, and Tubular Dilation in Haematoxylin–Eosin-Stained Renal Whole-Slide Images. BioMedInformatics, 6(5), 84. https://doi.org/10.3390/biomedinformatics6050084
Funding
Instituto de Salud Carlos III (ISCIII): PI21/01226, PI21/00548, PI24/01058, PI25/00053, RICORS2040 (RD21/0005/0004, RD24/0004/0024), co-funded by the European Union; Consejería de Educación, Junta de Castilla y León (IES160P20), co-funded by FEDER funds.
Ethical Statement
No new animal experiments were performed for this study; tissue derived from previously approved studies (University of Salamanca Bioethics Committee approvals 52, 143, and 690), conducted in accordance with the Declaration of Helsinki, the European Guide for the Care and Use of Laboratory Animals (Directive 2010/63/UE), and Spanish national/regional regulations.