Views
No views yet
Efficient Special Stain Classification for Digital Pathology Oskar Thaeter et al. — TODO: venue/arXiv link
class+mean feature. Inputs are normalised internally using H0-mini's statistics.| File | Input | Architecture |
|---|---|---|
thumbnail_896x1792.pth | 896 × 1792 px slide thumbnail | H0-mini → MLP head → 14 classes |
patch_40x_512px.pth | 40× patches, 512 px → 224 px | H0-mini → linear head → 14 classes, soft-voted |
1git clone https://github.com/oskarthaeter/efficient-special-stain-classification
2cd efficient-special-stain-classification
3pip install -r requirements.txt
4python download_weights.py1from pathlib import Path
2import torch
3from pipelines.thumbnail import load_thumbnail_model, predict
4
5model = load_thumbnail_model(Path("weights/thumbnail_896x1792.pth"))
6model.to(torch.device("cuda" if torch.cuda.is_available() else "cpu"))
7
8result = predict(Path("slide.svs"), model, device)
9print(result["predicted_class"]) # e.g. "PAS"1from pathlib import Path
2import torch
3from pipelines.soft_voting import load_patch_model, predict
4
5model = load_patch_model(Path("weights/patch_40x_512px.pth"))
6model.to(torch.device("cuda" if torch.cuda.is_available() else "cpu"))
7
8result = predict(
9 slide_path=Path("slide.svs"),
10 h5_path=Path("trident_output/slide.h5"),
11 model=model,
12 device=device,
13)
14print(result["predicted_class"])1@article{TODO,
2 title = {TODO},
3 author = {TODO},
4 year = {2026},
5}1@misc{filiot2025distillingfoundationmodelsrobust,
2 title={Distilling foundation models for robust and efficient models in digital pathology},
3 author={Alexandre Filiot and Nicolas Dop and Oussama Tchita and Auriane Riou and Thomas Peeters and Daria Valter and Marin Scalbert and Charlie Saillard and Geneviève Robin and Antoine Olivier},
4 year={2025},
5 eprint={2501.16239},
6 archivePrefix={arXiv},
7 primaryClass={cs.CV},
8 url={https://arxiv.org/abs/2501.16239},
9}