SPIDER-Thorax Model
Model Description
SPIDER-thorax model is a deep learning model trained for patch-level pathology classification, specifically for thorax. It is part of the SPIDER dataset initiative, which provides a large, high-quality, multi-organ pathology dataset with expert-annotated labels.
Model Sources
- Repository: https://github.com/HistAI/SPIDER
- Paper: SPIDER: A Comprehensive Multi-Organ Supervised Pathology Dataset and Baseline Models
How to Get Started with the Model
Model works with 1120×1120 patches. Use the following code snippet to load and use the model:
from transformers import AutoModel, AutoProcessor
from PIL import Image
model = AutoModel.from_pretrained("histai/SPIDER-thorax-model", trust_remote_code=True)
processor = AutoProcessor.from_pretrained("histai/SPIDER-thorax-model", trust_remote_code=True)
image = Image.open("path_to_image.png")
inputs = processor(images=image, return_tensors="pt")
outputs = model(**inputs)
print(outputs.predicted_class_names)
Training Data
The model is trained on the SPIDER-thorax dataset, a subset of the SPIDER dataset. The dataset includes:
Class | Central Patches |
---|---|
Alveoli | 6652 |
Bronchial cartilage | 5685 |
Bronchial glands | 4412 |
Chronic inflammation + fibrosis | 6070 |
Detritus | 5146 |
Fibrosis | 6494 |
Hemorrhage | 5247 |
Lymph node | 6088 |
Pigment | 5177 |
Pleura | 4560 |
Tumor non-small cell | 6445 |
Tumor small cell | 5061 |
Tumor soft | 5894 |
Vessel | 5376 |
Total Counts:
- 78,307 central patches
- 599,459 total patches (including context patches)
- 411 total slides used for annotation
Results
Organ | Accuracy | Precision | F1 Score |
---|---|---|---|
Thorax | 0.962 | 0.958 | 0.960 |
License
The model is licensed under CC BY-NC 4.0 and is for research use only.
Citation
If you use this model, please cite the following:
@misc{nechaev2025spidercomprehensivemultiorgansupervised,
title={SPIDER: A Comprehensive Multi-Organ Supervised Pathology Dataset and Baseline Models},
author={Dmitry Nechaev and Alexey Pchelnikov and Ekaterina Ivanova},
year={2025},
eprint={2503.02876},
archivePrefix={arXiv},
primaryClass={eess.IV},
url={https://arxiv.org/abs/2503.02876},
}
More Information
To explore other models and the SPIDER dataset you can visit the Hugging Face HistAI page or GitHub of the project.
Contacts
- Authors: Dmitry Nechaev, Alexey Pchelnikov, Ekaterina Ivanova
- Email: [email protected], [email protected], [email protected]
- Downloads last month
- 90
Inference Providers
NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API:
The HF Inference API does not support model that require custom code execution.
Model tree for histai/SPIDER-thorax-model
Base model
histai/hibou-L