You need to agree to share your Hugging Face information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

Model Card for KidneyCell2Tissue molecular 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 (molecular-based cell masks)
  • Dataset: Trained on cell semantic masks, BGR tile 1024 x 1024 pixels at a resolution around 0.29 ฮผm/pixel. See github repository for expected colors.
  • 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 slides from Xenium datasets.

Limitations

  • Research use only
  • Stain specificity: The model was trained specifically on Xenium-derived cell semantic masks.

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_MOL"
FILENAME = "yolo26_1024_glomerulus_xenium_mol_thr0421.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_mol.png

#load image
img_array = cv2.imread('example_mol.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)

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support