| --- |
| license: mit |
| tags: |
| - pathology |
| - histology |
| - cell-phenotyping |
| - foundation-models |
| - benchmark |
| pretty_name: "PathoCell Benchmark Datasets" |
| --- |
| |
| # PathoCell: A Benchmark for Foundational Models in Computational Pathology |
|
|
| This repository contains the datasets for **PathoCellBench** (formerly PhenoBench), a comprehensive benchmark designed to evaluate the cell phenotyping capabilities of pathology Foundation Models. |
|
|
| The benchmark suite includes four key datasets, all processed into the efficient LMDB (Lightning Memory-Mapped Database) format to facilitate large-scale experimentation. |
|
|
| ## Datasets Included |
|
|
| This collection consolidates the following datasets: |
|
|
| * **[PathoCell](https://huggingface.co/datasets/FabianReith/phenobench/tree/main/data/phenocell)** (formerly PhenoCell): Our new, challenging benchmark dataset for H&E cell phenotyping with 14 granular cell types. |
| * **[PanNuke](https://huggingface.co/datasets/FabianReith/phenobench/tree/main/data/pannuke)**: A pan-cancer nucleus segmentation and classification dataset. **Note: This dataset requires a one-time setup step after downloading (see instructions below).** |
| * **[Lizard](https://huggingface.co/datasets/FabianReith/phenobench/tree/main/data/lizard)**: A large-scale nucleus segmentation and classification dataset in colon histology. |
| * **[ARCTIQUE](https://huggingface.co/datasets/FabianReith/phenobench/tree/main/data/arctique)**: A colorectal cancer histology dataset for tile-based classification. |
|
|
| --- |
|
|
| ## **IMPORTANT**: Setup Instructions for the PanNuke Dataset |
|
|
| Due to repository file size limits, the large database file for the **PanNuke dataset** (`data.mdb`) was split into smaller parts. Before you can use this dataset, you must reassemble these parts into a single file. |
|
|
| After downloading the repository, navigate into the PanNuke `lmdb` directory and run the `cat` command as shown below. |
|
|
| # 1. Navigate to the correct directory |
| cd data/pannuke/pannuke_lmdb/ |
| |
| # 2. Run the cat command to merge the parts into a single file |
| cat data.mdb.part_* > data.mdb |
| |
| # 3. Verify the new file 'data.mdb' has been created. |
| # You can now optionally delete the .part files to save space. |
| # rm data.mdb.part_* |
| |
| The other datasets (`PathoCell`, `Lizard`, and `ARCTIQUE`) are ready to use immediately after download and do not require this step. |
|
|
| --- |
|
|
| ## How to Use |
|
|
| You can download the entire dataset collection using the Hugging Face `datasets` library. |
|
|
| from datasets import load_dataset |
| |
| # Download all the dataset files |
| # Note: This does not load the LMDB files into memory, it only downloads the raw files. |
| # Remember to run the reassembly command for PanNuke after downloading. |
| dataset_path = load_dataset("FabianReith/phenobench", cache_dir="./huggingface_data") |
| |
| print(f"Dataset downloaded to: {dataset_path.cache_files}") |
| |
| After reassembly, you can use your own custom data loader to read from the resulting `.mdb` files. |
|
|
| ## Dataset Structure |
|
|
| The data is organized into folders, one for each of the four datasets. |
|
|
| ```` |
| / |
| ├── data/ |
| │ ├── arctique/ |
| │ │ ├── arctique_lmdb/ |
| │ │ │ ├── data.mdb |
| │ │ │ └── lock.mdb |
| │ │ └── ... (other metadata files) |
| │ │ |
| │ ├── lizard/ |
| │ │ ├── lizard_lmdb/ |
| │ │ │ ├── data.mdb |
| │ │ │ └── lock.mdb |
| │ │ └── ... |
| │ │ |
| │ ├── pannuke/ |
| │ │ ├── pannuke_lmdb/ (Requires reassembly) |
| │ │ │ ├── data.mdb.part_aa |
| │ │ │ ├── data.mdb.part_ab |
| │ │ │ └── ... |
| │ │ └── ... |
| │ │ |
| │ └── phenocell/ (PathoCell legacy name) |
| │ ├── phenocell/ |
| │ │ ├── data.mdb |
| │ │ └── lock.mdb |
| │ └── ... |
| │ |
| ├── pathocell_hdf/ |
| │ └── ... (contains the PathoCell dataset in HDF5 format) |
| │ |
| ├── .gitattributes |
| └── README.md |
| ```` |
|
|
| ## Citation Information |
|
|
| If you use our benchmark or the **PathoCell** dataset in your research, please cite our work. |
|
|
| *TODO* |
|
|
|
|
| Please also ensure you cite the original papers for the **PanNuke**, **Lizard**, and **ARCTIQUE** datasets if you use them. |
|
|
| ## License |
|
|
| This dataset collection is licensed under the **MIT License**. |