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-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.

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

Downloads last month
64
Safetensors
Model size
304M params
Tensor type
F32
·
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-colorectal-model

Base model

histai/hibou-L
Finetuned
(3)
this model

Dataset used to train histai/SPIDER-colorectal-model