Pytorch Medical Segmentation

This repository is an unoffical PyTorch implementation of Medical segmentation in 3D and 2D.

Requirements

  • pytorch1.7
  • python>=3.6

Notice

  • You can modify hparam.py to determine whether 2D or 3D segmentation and whether multicategorization is possible.
  • We provide algorithms for almost all 2D and 3D segmentation.
  • This repository is compatible with almost all medical data formats(e.g. nii.gz, nii, mhd, nrrd, ...), by modifying fold_arch in hparam.py of the config.

Training

  • without pretrained-model
set hparam.train_or_test to 'train'
python main.py
  • with pretrained-model
set hparam.train_or_test to 'train'
python main.py -k True

Inference

  • testing
set hparam.train_or_test to 'test'
python main.py

Examples

Pytorch-Medical-Segmentation7

Done

  • 2D
  • 3D

TODO

  • [ ] dataset
  • [ ] benchmark
  • [ ] nnunet

By The Way

This project is not perfect and there are still many problems. If you are using this project and would like to give the author some feedbacks, you can send Kangneng Zhou an email.

GitHub