Pytorch Implementation for our MICCAI 2022 paper: Patcher: Patch Transformers with Mixture of Experts for Precise Medical Image Segmentation .
- Tested OS: Linux
- Python >= 3.7
- Install PyTorch 1.6.0 with the correct CUDA version.
- Install the dependencies:
pip install pytorch_lightning==1.5.2 pip install mmcv-full==1.2.2 -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.6.0/index.html pip install -r requirements.txt
Kvasir-SEG is available online. Download, put it under data/ and run:
python pre_process.py
We will also release the stroke lesion segmentation data soon.
You can try our models on Kvasir-SEG. For example:
python train.py --cfg patchformer_kvasir_moe_2_strct_adam_aug2 --gpu 0,1
Or you can train our models on your customized data, just put them under data/ and follow the same scheme.
This repo borrows code from
If you find our work useful in your research, please cite our paper:
@article{ou2022patcher,
title={Patcher: Patch Transformers with Mixture of Experts for Precise Medical Image Segmentation},
author={Ou, Yanglan and Yuan, Ye and Huang, Xiaolei and Wong, Stephen TC and Volpi, John and Wang, James Z and Wong, Kelvin},
journal={arXiv preprint arXiv:2206.01741},
year={2022}
}