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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-nc-nd-4.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
tags:
|
| 6 |
+
- histology
|
| 7 |
+
- pathology
|
| 8 |
+
- vision
|
| 9 |
+
- pytorch
|
| 10 |
+
extra_gated_prompt: >-
|
| 11 |
+
The data and associated code are released under the CC-BY-NC 4.0 license and may only be used for non-commercial, academic research purposes with proper attribution.
|
| 12 |
+
If you are a commercial entity, please contact the corresponding author.
|
| 13 |
+
extra_gated_fields:
|
| 14 |
+
Full name (first and last): text
|
| 15 |
+
Current affiliation (no abbreviations): text
|
| 16 |
+
Type of Affiliation:
|
| 17 |
+
type: select
|
| 18 |
+
options:
|
| 19 |
+
- Academia
|
| 20 |
+
- Industry
|
| 21 |
+
- label: Other
|
| 22 |
+
value: other
|
| 23 |
+
Current and official institutional email (**this must match your primary email in your Hugging Face account, @gmail/@hotmail/@qq email domains will be denied**): text
|
| 24 |
+
Please explain your intended research use: text
|
| 25 |
+
I agree to all terms outlined above: checkbox
|
| 26 |
+
I agree to use this model for non-commercial, academic purposes only: checkbox
|
| 27 |
+
I agree not to distribute the model, if another user within your organization wishes to use Patho-Bench data, they must register as an individual user: checkbox
|
| 28 |
+
metrics:
|
| 29 |
+
- accuracy
|
| 30 |
+
pipeline_tag: image-feature-extraction
|
| 31 |
+
library_name: timm
|
| 32 |
+
---
|
| 33 |
+
|
| 34 |
+
# ♆ Patho-Bench
|
| 35 |
+
[📄 Preprint](https://arxiv.org/pdf/2501.16652) | [Code](https://github.com/mahmoodlab/patho-bench)
|
| 36 |
+
|
| 37 |
+
<!-- <img src="benchmark.png" alt="Patho-Bench" style="width: 38%;" align="right"/> -->
|
| 38 |
+
|
| 39 |
+
**Patho-Bench is designed for high-throughput evaluations of patch and slide encoder foundation models for whole-slide images (WSIs).**
|
| 40 |
+
|
| 41 |
+
This HuggingFace repository contains the data splits for the public Patho-Bench tasks. Please visit our codebase on [GitHub](https://github.com/mahmoodlab/patho-bench) for the full codebase and benchmark implementation.
|
| 42 |
+
|
| 43 |
+
This project was developed by the [Mahmood Lab](https://faisal.ai/) at Harvard Medical School and Brigham and Women's Hospital.
|
| 44 |
+
|
| 45 |
+
> [!NOTE]
|
| 46 |
+
> Contributions are welcome! If you'd like to submit a new dataset and/or task for inclusion in Patho-Bench, please reach out to us via the [Issues](https://github.com/mahmoodlab/patho-bench/issues) tab of our Github repo.
|
| 47 |
+
|
| 48 |
+
Currently, Patho-Bench contains the following task families. We will add more tasks in the future. For further details on each task, please refer to the [THREADS foundation model paper](https://arxiv.org/abs/2501.16652).
|
| 49 |
+
|
| 50 |
+
| **Family** | **Description** | **Tasks** |
|
| 51 |
+
|--------------------------------------|---------------------------------------------------------------------------------------|----------|
|
| 52 |
+
| **Morphological Subtyping** | Classifying distinct morphological patterns associated with different disease subtypes | 4 |
|
| 53 |
+
| **Tumor Grading** | Assigning a grade based on cellular differentiation and growth patterns | 2 |
|
| 54 |
+
| **Molecular Subtyping** | Predicting antigen presence (e.g., via IHC staining) | 3 |
|
| 55 |
+
| **Mutation Prediction** | Predicting specific genetic mutations in tumors | 21 |
|
| 56 |
+
| **Treatment Response & Assessment** | Evaluating patient response to treatment | 6 |
|
| 57 |
+
| **Survival Prediction** | Predicting survival outcomes and risk stratification | 6 |
|
| 58 |
+
|
| 59 |
+
## 🔥 Latest updates
|
| 60 |
+
- **January 2025**: Patho-Bench is now available on HuggingFace.
|
| 61 |
+
|
| 62 |
+
## ⚡ Installation
|
| 63 |
+
Install the required packages:
|
| 64 |
+
```
|
| 65 |
+
pip install --upgrade datasets
|
| 66 |
+
pip install --upgrade huggingface_hub
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
## 🔑 Authentication
|
| 70 |
+
|
| 71 |
+
```python
|
| 72 |
+
from huggingface_hub import login
|
| 73 |
+
login(token="YOUR_HUGGINGFACE_TOKEN")
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
## ⬇️ Usage
|
| 77 |
+
|
| 78 |
+
The Patho-Bench data splits are designed for use with the Patho-Bench [software package](https://github.com/mahmoodlab/patho-bench). However, you are welcome to use the data splits in your custom pipeline. Each task is associated with a YAML file containing task metadata and a CSV file containing the sample IDs, slide IDs, and labels.
|
| 79 |
+
|
| 80 |
+
> [!NOTE]
|
| 81 |
+
> Patho-Bench only provides the data splits and labels, NOT the raw image data. You will need to download the raw image data from the respective dataset repositories (see links below).
|
| 82 |
+
|
| 83 |
+
### Download an individual task
|
| 84 |
+
```python
|
| 85 |
+
import datasets
|
| 86 |
+
dataset='cptac_coad'
|
| 87 |
+
task='KRAS_mutation'
|
| 88 |
+
datasets.load_dataset(
|
| 89 |
+
'MahmoodLab/patho-bench',
|
| 90 |
+
cache_dir='/path/to/saveto',
|
| 91 |
+
dataset_to_download=dataset, # Throws error if source not found
|
| 92 |
+
task_in_dataset=task, # Throws error if task not found in dataset
|
| 93 |
+
trust_remote_code=True
|
| 94 |
+
)
|
| 95 |
+
```
|
| 96 |
+
|
| 97 |
+
### Download all tasks from a dataset
|
| 98 |
+
```python
|
| 99 |
+
import datasets
|
| 100 |
+
dataset='cptac_coad'
|
| 101 |
+
task='*'
|
| 102 |
+
datasets.load_dataset(
|
| 103 |
+
'MahmoodLab/patho-bench',
|
| 104 |
+
cache_dir='/path/to/saveto',
|
| 105 |
+
dataset_to_download=dataset,
|
| 106 |
+
task_in_dataset=task,
|
| 107 |
+
trust_remote_code=True
|
| 108 |
+
)
|
| 109 |
+
```
|
| 110 |
+
|
| 111 |
+
### Download entire Patho-Bench [4.2 MB]
|
| 112 |
+
```python
|
| 113 |
+
import datasets
|
| 114 |
+
dataset='*'
|
| 115 |
+
datasets.load_dataset(
|
| 116 |
+
'MahmoodLab/patho-bench',
|
| 117 |
+
cache_dir='/path/to/saveto',
|
| 118 |
+
dataset_to_download=dataset,
|
| 119 |
+
trust_remote_code=True
|
| 120 |
+
)
|
| 121 |
+
```
|
| 122 |
+
|
| 123 |
+
## 📢 Image data access links
|
| 124 |
+
|
| 125 |
+
For each dataset in Patho-Bench, please visit the respective repository below to download the raw image data.
|
| 126 |
+
|
| 127 |
+
| Dataset | Link |
|
| 128 |
+
|---------|------|
|
| 129 |
+
| EBRAINS [Roetzer et al., 2022] | [https://doi.org/10.25493/WQ48-ZGX](https://doi.org/10.25493/WQ48-ZGX) |
|
| 130 |
+
| BRACS [Brancati et al., 2021] | [https://www.bracs.icar.cnr.it/](https://www.bracs.icar.cnr.it/) |
|
| 131 |
+
| PANDA [Bulten et al., 2022] | [https://panda.grand-challenge.org/data/](https://panda.grand-challenge.org/data/) |
|
| 132 |
+
| IMP [Neto et al., 2024] | [https://rdm.inesctec.pt/dataset/nis-2023-008](https://rdm.inesctec.pt/dataset/nis-2023-008) |
|
| 133 |
+
| BCNB [Xu et al., 2021] | [https://bupt-ai-cz.github.io/BCNB/](https://bupt-ai-cz.github.io/BCNB/) |
|
| 134 |
+
| CPTAC-BRCA [Edwards et al., 2015] | [https://www.cancerimagingarchive.net/collection/cptac-brca/](https://www.cancerimagingarchive.net/collection/cptac-brca/) |
|
| 135 |
+
| CPTAC-CCRCC [Edwards et al., 2015] | [https://www.cancerimagingarchive.net/collection/cptac-ccrcc/](https://www.cancerimagingarchive.net/collection/cptac-ccrcc/) |
|
| 136 |
+
| CPTAC-COAD [Edwards et al., 2015] | [https://www.cancerimagingarchive.net/collection/cptac-coad/](https://www.cancerimagingarchive.net/collection/cptac-coad/) |
|
| 137 |
+
| CPTAC-GBM [Edwards et al., 2015] | [https://www.cancerimagingarchive.net/collection/cptac-gbm/](https://www.cancerimagingarchive.net/collection/cptac-gbm/) |
|
| 138 |
+
| CPTAC-HNSC [Edwards et al., 2015] | [https://www.cancerimagingarchive.net/collection/cptac-hnsc/](https://www.cancerimagingarchive.net/collection/cptac-hnsc/) |
|
| 139 |
+
| CPTAC-LSCC [Edwards et al., 2015] | [https://www.cancerimagingarchive.net/collection/cptac-lscc/](https://www.cancerimagingarchive.net/collection/cptac-lscc/) |
|
| 140 |
+
| CPTAC-LUAD [Edwards et al., 2015] | [https://www.cancerimagingarchive.net/collection/cptac-luad/](https://www.cancerimagingarchive.net/collection/cptac-luad/) |
|
| 141 |
+
| CPTAC-PDAC [Edwards et al., 2015] | [https://www.cancerimagingarchive.net/collection/cptac-pda/](https://www.cancerimagingarchive.net/collection/cptac-pda/) |
|
| 142 |
+
| MUT-HET-RCC | [https://doi.org/10.25452/figshare.plus.c.5983795](https://doi.org/10.25452/figshare.plus.c.5983795) |
|
| 143 |
+
| OV-Bevacizumab [Wang et al., 2022] | [https://www.nature.com/articles/s41597-022-01127-6](https://www.nature.com/articles/s41597-022-01127-6) |
|
| 144 |
+
| NADT-Prostate [Wilkinson et al., 2021] | [https://www.medrxiv.org/content/10.1101/2020.09.29.20199711v1.full](https://www.medrxiv.org/content/10.1101/2020.09.29.20199711v1.full) |
|
| 145 |
+
| POST-NAT-BRCA | [https://onlinelibrary.wiley.com/doi/10.1002/cyto.a.23244](https://onlinelibrary.wiley.com/doi/10.1002/cyto.a.23244) |
|
| 146 |
+
| BOEHMK | [https://www.synapse.org/Synapse:syn25946117/wiki/611576](https://www.synapse.org/Synapse:syn25946117/wiki/611576) |
|
| 147 |
+
| MBC | [https://www.synapse.org/Synapse:syn59490671/wiki/628046](https://www.synapse.org/Synapse:syn59490671/wiki/628046) |
|
| 148 |
+
| SURGEN | [https://www.ebi.ac.uk/biostudies/bioimages/studies/S-BIAD1285](https://www.ebi.ac.uk/biostudies/bioimages/studies/S-BIAD1285) |
|
| 149 |
+
|
| 150 |
+
## 📇 Contact
|
| 151 |
+
For any questions, contact:
|
| 152 |
+
|
| 153 |
+
- Faisal Mahmood ([email protected])
|
| 154 |
+
- Anurag Vaidya ([email protected])
|
| 155 |
+
- Andrew Zhang ([email protected])
|
| 156 |
+
- Guillaume Jaume ([email protected])
|
| 157 |
+
|
| 158 |
+
## 📜 Data description
|
| 159 |
+
Developed by: Mahmood Lab AI for Pathology @ Harvard/BWH
|
| 160 |
+
Repository: GitHub
|
| 161 |
+
License: CC-BY-NC-4.0
|
| 162 |
+
|
| 163 |
+
## 🤝 Acknowledgements
|
| 164 |
+
Patho-Bench tasks were compiled from public image datasets and repositories (linked above). We thank the authors of these datasets for making their data publicly available.
|
| 165 |
+
|
| 166 |
+
## 📰 How to cite
|
| 167 |
+
If Patho-Bench contributes to your research, please cite:
|
| 168 |
+
|
| 169 |
+
```
|
| 170 |
+
@article{vaidya2025molecular,
|
| 171 |
+
title={Molecular-driven Foundation Model for Oncologic Pathology},
|
| 172 |
+
author={Vaidya, Anurag and Zhang, Andrew and Jaume, Guillaume and Song, Andrew H and Ding, Tong and Wagner, Sophia J and Lu, Ming Y and Doucet, Paul and Robertson, Harry and Almagro-Perez, Cristina and others},
|
| 173 |
+
journal={arXiv preprint arXiv:2501.16652},
|
| 174 |
+
year={2025}
|
| 175 |
+
}
|
| 176 |
+
|
| 177 |
+
@article{zhang2025standardizing,
|
| 178 |
+
title={Accelerating Data Processing and Benchmarking of AI Models for Pathology},
|
| 179 |
+
author={Zhang, Andrew and Jaume, Guillaume and Vaidya, Anurag and Ding, Tong and Mahmood, Faisal},
|
| 180 |
+
journal={arXiv preprint arXiv:2502.06750},
|
| 181 |
+
year={2025}
|
| 182 |
+
}
|
| 183 |
+
```
|