You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

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

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

Downloads last month
68
Safetensors
Model size
304M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for histai/SPIDER-breast-model

Base model

histai/hibou-L
Finetuned
(4)
this model

Dataset used to train histai/SPIDER-breast-model