Skip to content

examples of using PyMIC for medical image computing with deep learning

Notifications You must be signed in to change notification settings

HiLab-git/PyMIC_examples

Repository files navigation

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), Self-Supervised Learning (Self-SL), 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.

News

2024.01 Examples of Self-Supervised Learning have been added.

2024.01 More 2D segmentation networks including SwinUNet and TransUNet have been added.

2023.12 Semi-Supervised Method MCNet has been added to seg_semi_sup/ACDC.

Install PyMIC

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

pip install PYMIC==0.5.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:

Catetory Example Remarks
Classification AntBee Finetuning a resnet18 for Ant and Bee classification
CHNCXR Finetuning restnet18 and vgg16 for normal/tuberculosis X-ray image classification
Fully supervised segmentation JSRT Using five 2D Networks for lung segmentation from chest X-ray images
JSRT2 Using a customized network and loss function for the JSRT dataset
Fetal_HC Using a 2D UNet for fetal head segmentation from 2D ultrasound images
Prostate Using a 3D UNet for prostate segmentation from 3D MRI
Semi-supervised segmentation seg_semi_sup/ACDC Semi-supervised methods for heart structure segmentation using 2D CNNs
seg_semi_sup/AtriaSeg Semi-supervised methods for left atrial segmentation using 3D CNNs
Weakly-supervised segmentation seg_weak_sup/ACDC Segmentation of heart structure with scrible annotations
Noisy label learning seg_noisy_label/JSRT Comparing different NLL methods for learning from noisy labels
Self-Supervised learning seg_self_sup/lung Self-Supervised learning methods for pretraining a segmentation model

Useful links

Citation

BibTeX entry:

@article{Wang2022pymic,
author = {Guotai Wang and Xiangde Luo and Ran Gu and Shuojue Yang and Yijie Qu and Shuwei Zhai and Qianfei Zhao and Kang Li and Shaoting Zhang},
title = {{PyMIC: A deep learning toolkit for annotation-efficient medical image segmentation}},
year = {2023},
url = {https://doi.org/10.1016/j.cmpb.2023.107398},
journal = {Computer Methods and Programs in Biomedicine},
volume = {231},
pages = {107398},
}

About

examples of using PyMIC for medical image computing with deep learning

Resources

Stars

Watchers

Forks

Packages

No packages published