TissueQC
histology segmentation and artifact removal
2 min read
The model performs single-pass histological tile segmentation into background, tissue, and artifacts at 5x resolution (2 $\mu\text{m}$/pixel). It outputs both a tissue mask with artifacts and a clean mask with artifacts removed (folds, ink, blur, debris) without running a second model. The architecture is based on a U-Net with an EfficientNet-B0 encoder (4.5 million parameters) by the JaumeLab team. This tool is useful for researchers and pipeline developers processing Whole-Slide Images (WSI).
Key features
- Single-pass tile classification into three classes: background, tissue, and artifacts
- High processing speed: processing 16 TCGA slides took 52 seconds on a single graphics card
- Lightweight U-Net architecture with an EfficientNet-B0 encoder (4.5M parameters)
- High quality metrics: Dice score for tissue is 0.98, and for artifacts on tissue is 0.95
What you can do
- Integrate the model into a histological scan (WSI) processing pipeline to automatically remove folds, ink, and debris
- Generate a clean tissue mask by excluding artifacts for subsequent analysis
Example
import json, torch, segmentation_models_pytorch as smp
from huggingface_hub import hf_hub_download
from safetensors.torch import load_file
repo = "JaumeLab/TissueQC"
cfg = json.load(open(hf_hub_download(repo, "config.json")))
model = smp.Unet(encoder_name=cfg["encoder_name"], encoder_weights=None, classes=cfg["num_classes"],
decoder_channels=tuple(cfg["decoder_channels"]))
model.load_state_dict(load_file(hf_hub_download(repo, "model.safetensors")))
model.eval()Read more
DetailsMetrics: Tissue Dice 0.98, Artifact-on-tissue Dice 0.95
Requirements: Trained on 512x512 tiles at 2 $\mu\text{m}$/pixel (5x)
Limitations: Dense dark tissue or dark colloid edges in the thyroid gland may be incorrectly identified as artifacts; not validated for diagnostic use
Training: TCGA and GTEx datasets (H&E staining and immunohistochemistry)










Comments