SPIDER-Breast Model
Model Description
SPIDER-breast model is a deep learning model trained for patch-level pathology classification, specifically for breast. It is part of the SPIDER dataset initiative, which provides a large, high-quality, multi-organ pathology dataset with expert-annotated labels.
If you would like to support, sponsor, or obtain a commercial license for the SPIDER data and models, please contact us at [email protected].
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-breast-model", trust_remote_code=True)
processor = AutoProcessor.from_pretrained("histai/SPIDER-breast-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-breast dataset, a subset of the SPIDER dataset. The dataset includes:
Class | Total Patches |
---|---|
Adenosis | 2899 |
Benign phyllodes tumor | 4526 |
Ductal carcinoma in situ (high-grade) | 5632 |
Ductal carcinoma in situ (low-grade) | 5017 |
Fat | 6286 |
Fibroadenoma | 5243 |
Fibrocystic changes | 5027 |
Fibrosis | 6260 |
Invasive non-special type carcinoma | 6142 |
Lipogranuloma | 4941 |
Lobular invasive carcinoma | 5102 |
Malignant phyllodes tumor | 5271 |
Necrosis | 5396 |
Normal ducts | 4891 |
Normal lobules | 5821 |
Sclerosing adenosis | 3423 |
Typical ductal hyperplasia | 5546 |
Vessels | 5469 |
Total Counts:
- 92,892 central patches
- 984,924 total patches (including context patches)
- 921 total slides used for annotation
Results
Organ | Accuracy | Precision | F1 Score |
---|---|---|---|
Breast | 0.902 | 0.896 | 0.897 |
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
- 68
Model tree for histai/SPIDER-breast-model
Base model
histai/hibou-L