Home

Awesome

[SAMIHS: Adaptation of Segment Anything Model for Efficient Intracranial Hemorrhage Segmentation]

by Yinuo Wang, Kai Chen, Weimin Yuan, Cai Meng, Xiangzhi Bai

This repository provides a PyTorch implementation of our work accepted by ISBI 2024 --> [arXiv]

Overview

<p align="center"><img width="80%" src="fig/overview.png" /></p>

Updates

Usage

1. Installation

$ git clone https://github.com/mileswyn/SAMIHS.git
$ cd SAMIHS/
$ pip install requirements.txt

2. Checkpoints

We use checkpoint of SAM in vit_b version. Please download the pre-trained model and place it at pretrained/sam_vit_b_01ec64.pth.

3. Data

4. Training

If you have already arranged your data, you can start training your model.

cd "/home/...  .../SAMIHS/"
python train.py -task <your dataset name> -sam_ckpt <pre-trained model path> -fold <fold number>

5. Testing

After finishing training, you can start testing your model.

python test.py -task <your dataset name> -sam_ckpt <pre-trained model path> -fold <fold number>

Before testing, don't forget modify the "load_path" (the path of your trained model) in [./utils/config.py].

Citation

If our SAMIHS is helpful to you, please consider citing our paper:

@article{wang2023samihs,
  title={SAMIHS: Adaptation of Segment Anything Model for Intracranial Hemorrhage Segmentation},
  author={Wang, Yinuo and Chen, Kai and Yuan, Weimin and Meng, Cai and Bai, XiangZhi},
  journal={arXiv preprint arXiv:2311.08190},
  year={2023}
}

Acknowledgement