Model Card for KidneyCell2Tissue H&E models
Requesting Access
Access is granted only to users whose Hugging Face primary email matches their institutional/academic email. Requests from personal domains (e.g., @gmail, @hotmail) will be declined.
Model Description
- Developed by: Bertrand Chauveau, Bordeaux University Hospital
- Model type: Ultralytics YOLO26 model, channels first
- Task: instance segmentation of glomeruli, tubules, arteries/arterioles and peritubular capillaries in kidney transplant biopsies (H&E)
- Dataset: Trained on 5 μm-thick H&E, BGR tile 1024 x 1024 pixels at a resolution around 0.29 μm/pixel
- Input: shape (1024, 1024, 3), raw pixel values 0.-255. as uint8, BGR
- Repository: https://github.com/bertrandchauveau/KidneyCell2Tissue
- Paper: pending
- License: cc-by-nc-sa-4.0
Intended Use & Limitations
Intended Use
These models are intended for research purposes, for automated segmentation of tissue compartments in kidney transplant H&E histopathology slides from Xenium datasets.
Limitations
- Research use only
- Stain specificity: The model was trained specifically on H&E slides.
How To Use
Load model
from huggingface_hub import login
from huggingface_hub import hf_hub_download
from ultralytics import YOLO
login() # login with your User Access Token, found at https://huggingface.co/settings/tokens
#load model (example for glomeruli)
REPO_ID = "bertrandchauveau/KidneyCell2Tissue_HE"
FILENAME = "yolo26_1024_glomerulus_xenium_he_thr0439.pt"
# Download the .pt file from the Hub (cached locally for future use)
model_path = hf_hub_download(repo_id=REPO_ID, filename=FILENAME)
# Load the weights into Ultralytics YOLO
model = YOLO(model_path)
Inference
import cv2
import numpy as np
img_size = (1024, 1024)
threshold = float(FILENAME.split('thr')[1].split('.')[0]) / 10000 #recommended threshold
#get an example image
!wget https://raw.githubusercontent.com/bertrandchauveau/KidneyCell2Tissue/main/example_image/example_he.png
#load image
img_array = cv2.imread('example_he.png')
#prediction
res = model.predict(img_array, imgsz=(1024, 1024), conf=threshold, iou=0.7, max_det=300, retina_masks=True)
Software Dependencies
Python Packages
- ultralytics >=8.4.0
Contact
For any additional questions or comments, contact Bertrand Chauveau (bertrand.chauveau@chu-bordeaux.fr)