Skip to content

YanglanOu/patcher

Repository files navigation

Patcher

Pytorch Implementation for our MICCAI 2022 paper: Patcher: Patch Transformers with Mixture of Experts for Precise Medical Image Segmentation .

Overview

Loading Patcher Overview

Installation

Environment

  • Tested OS: Linux
  • Python >= 3.7

Dependencies:

  1. Install PyTorch 1.6.0 with the correct CUDA version.
  2. 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
    
    

Datasets

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.

Training

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.

Acknowledgment

This repo borrows code from

Citation

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}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages