Home

Awesome

PyMIC_examples

PyMIC is a PyTorch-based toolkit for medical image computing with annotation-efficient deep learning. Here we provide a set of examples to show how it can be used for image classification and segmentation tasks. For annotation efficient learning, we show examples of Semi-Supervised Learning (SSL), Weakly Supervised Learning (WSL) and Noisy Label Learning (NLL), respectively. For beginners, you can follow the examples by just editting the configuration files for model training, testing and evaluation. For advanced users, you can easily develop your own modules, such as customized networks and loss functions.

Install PyMIC

The released version of PyMIC (v0.4.0) is required for these examples, and it can be installed by:

pip install PYMIC==0.4.0

To use the latest development version, you can download the source code here, and install it by:

python setup.py install

Data

The datasets for the examples can be downloaded from Google Drive or Baidu Disk (extraction code: xlwg). Extract the files to PyMIC_data after downloading.

List of Examples

Currently we provide the following examples in this repository:

CatetoryExampleRemarks
ClassificationAntBeeFinetuning a resnet18 for Ant and Bee classification
ClassificationCHNCXRFinetuning restnet18 and vgg16 for normal/tuberculosis X-ray image classification
Fully supervised segmentationJSRTUsing a 2D UNet for lung segmentation from chest X-ray images
Fully supervised segmentationJSRT2Using a customized network and loss function for the JSRT dataset
Fully supervised segmentationFetal_HCUsing a 2D UNet for fetal head segmentation from 2D ultrasound images
Fully supervised segmentationProstateUsing a 3D UNet for prostate segmentation from 3D MRI
Semi-supervised segmentationseg_ssl/ACDCSemi-supervised methods for heart structure segmentation using 2D CNNs
Semi-supervised segmentationseg_ssl/AtriaSegSemi-supervised methods for left atrial segmentation using 3D CNNs
Weakly-supervised segmentationseg_wsl/ACDCSegmentation of heart structure with scrible annotations
Noisy label learningseg_nll/JSRTComparing different NLL methods for learning from noisy labels

Useful links