mgvz's picture
Update README.md
4d59f15 verified
metadata
library_name: transformers
license: cc-by-nc-4.0
datasets:
  - histai/SPIDER-colorectal
base_model:
  - histai/hibou-L
pipeline_tag: image-classification

SPIDER-Colorectal Model

Model Description

SPIDER-colorectal model is a deep learning model trained for patch-level pathology classification, specifically for colorectal. 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-colorectal-model", trust_remote_code=True)
processor = AutoProcessor.from_pretrained("histai/SPIDER-colorectal-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-colorectal dataset, a subset of the SPIDER dataset. The dataset includes:

Class Central Patches
Adenocarcinoma high grade 6299
Adenocarcinoma low grade 6066
Adenoma high grade 5493
Adenoma low grade 5693
Fat 6081
Hyperplastic polyp 5893
Inflammation 5523
Mucus 5711
Muscle 5866
Necrosis 5481
Sessile serrated lesion 4993
Stroma healthy 8001
Vessels 6082

Total Counts:

  • 77,182 central patches
  • 1,039,150 total patches (including context patches)
  • 1,719 total slides used for annotation

Results

Organ Accuracy Precision F1 Score
Colorectal 0.914 0.917 0.915

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