bertrandchauveau's picture
Update README.md
16f0ae5 verified
|
Raw History Blame Contribute Delete
2.91 kB
metadata
license: cc-by-nc-sa-4.0
language:
  - en
pipeline_tag: image-segmentation
library_name: keras
tags:
  - histology
  - pathology
  - vision
  - kidney
  - transplantation
  - Masson's trichrome

Model Card for EffNetV2S_DLV3_512_interstitial_fibrosis_kidney_transplant

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: Keras segmentation model, DeepLabv3+ architecture with an EfficientNetV2S backbone, channels last
  • Task: semantic segmentation of interstitial fibrosis in kidney transplant biopsies
  • Dataset: Trained on green Masson's trichrome, RGB tile 512 x 512 pixels at a resolution around 1 μm/pixel
  • Input: shape (batch_size, 512, 512, 3), raw pixel values 0.-255. as float32
  • Repository: https://github.com/bertrandchauveau/FIAT_DL
  • Paper: pending
  • License: cc-by-nc-sa-4.0

Intended Use & Limitations

Intended Use

This model is intended for automated segmentation of fibrosis in kidney transplant histopathology slides for research purposes.

Limitations

  • Research use only
  • Stain specificity: The model was trained specifically on green Masson's trichrome slides from Bordeaux University Hospital

How To Use

Load model

import os
os.environ["KERAS_BACKEND"] = "torch"  # or "jax" or "tensorflow"
import keras
from huggingface_hub import login

login()  # login with your User Access Token, found at https://huggingface.co/settings/tokens

#load model
model = keras.saving.load_model("hf://bertrandchauveau/EffNetV2S_DLV3_512_interstitial_fibrosis_kidney_transplant")

Inference

from keras.utils import img_to_array, load_img
import numpy as np

img_size = (512, 512)
threshold = 0.35 #recommended threshold value

#get an example image
!wget https://raw.githubusercontent.com/bertrandchauveau/FIAT_DL/main/example_tile.jpg

#image to array
img_array = img_to_array(load_img('example_tile.jpg', target_size=img_size))
img_batch = np.expand_dims(img_array, axis=0)  #expects shape (batch, 512, 512, 3) and float32 values 0-255

#prediction
pred = model.predict(img_batch)[0]  #shape (1,512,512,2) to (512,512,2)
mask = np.where(pred[...,1] >= threshold, 255, 0).astype(np.uint8)  #pred[...,1] is the score of fibrosis, 0 of "non-fibrosis"

Software Dependencies

Python Packages

  • keras>3.0

Contact

For any additional questions or comments, contact Bertrand Chauveau (bertrand.chauveau@chu-bordeaux.fr)


library_name: keras

This model has been uploaded using the Keras library and can be used with JAX, TensorFlow, and PyTorch backends.

For more details about the model architecture, check out config.json.