đ SPIDER-Breast Model
The SPIDER-breast model is a deep - learning model designed for patch - level breast pathology classification, leveraging the high - quality SPIDER dataset.
đ Quick Start
The SPIDER - breast model operates with 1120Ã1120 patches. You can use the following Python code to load and utilize 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)
⨠Features
The SPIDER - breast model is part of the SPIDER dataset initiative. It is trained for patch - level breast pathology classification, using a large, high - quality, multi - organ pathology dataset with expert - annotated labels.
đĻ Installation
The provided code snippet uses the transformers
library. You can install it via pip install transformers
if not already installed.
đ Documentation
Model Description
The 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 models@hist.ai.
Model Sources
Training Data
The model is trained on the [SPIDER - breast](https://huggingface.co/datasets/histai/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: dmitry@hist.ai, alex@hist.ai, kate@hist.ai