A Pytorch implementation for the SAM-Path framework. More details about the research can be found in the paper SAM-Path: A Segment Anything Model for Semantic Segmentation in Digital Pathology and arxiv.
Follow the instructions for installing Anaconda/miniconda.
Additionally, install the dependencies of SAM. Please refrain from installing the original SAM as we have made some modifications.
Then Install the required packages:
$ pip install monai torchmetrics==0.11.4 pytorch_lightning==2.0.2 albumentations box wandb
Detailed structure of our dataset organization is provided. Download our preprocessed dataset from the following: link https://drive.google.com/drive/folders/1BUPZz3nB52J5zRs1ZcEvNK03zw18BeLN?usp=sharing.
Use train.py
to train and evaluate our framework.
For example:
python main.py --config configs.BCSS --devices 0 --project sampath --name bcss_run0
python main.py --config configs.CRAG --devices 1 --project sampath --name crag_run0
The pretrained models can be downloaded from SAM and HIPT.
For any questions or concerns, feel free to report issues or send a direct message to the new repository owner.
If this project contributes to your research, please cite using the following BibTeX entry, adjusting the authors to fit your reference style.
@article{zhang2023sam,
title={SAM-Path: A Segment Anything Model for Semantic Segmentation in Digital Pathology},
author={Zhang, Jingwei and Ma, Ke and Kapse, Saarthak and Saltz, Joel and Vakalopoulou, Maria and Prasanna, Prateek and Samaras, Dimitris},
journal={arXiv preprint arXiv:2307.09570},
year={2023}
}