Pytorch implementation of our Weakly Supervised Medical Image Segmentation via Superpixel-guided Scribble Walking and Class-wise Contrastive Regularization.
- The ACDC dataset with mask annotations can be downloaded from: ACDC.
- The Scribble annotations of ACDC can be downloaded from: Scribble.
- The data processing code Link the pre-processed ACDC data Link.
Some important required packages include:
- Pytorch version >=0.4.1.
- TensorBoardX
- Python >= 3.6
- Efficientnet-Pytorch
pip install efficientnet_pytorch
- Some basic python packages such as Numpy, Scikit-image, SimpleITK, Scipy ......
Follow official guidance to install Pytorch.
- Clone this project.
git clone https://github.com/Lemonzhoumeng/SC-Net
cd SC-Net
- Data pre-processing or directly download the pre-processed data.
cd code
python dataloaders/acdc_data_processing.py
- Superpixel-guided Scribble Walking to augment the scribble labels
python add_super.py
Or download our augmented labels from Google drive.
- Train the model
python train_superpixel_dual_contrastive.py --fold {}
- Test the model
python test_2D_contrastive_superpixel.py
The code is modified from WSL4MIS.
If you use this codebase in your research, please cite the following paper:
@InProceedings{Zhou2023scnet,
author={Meng Zhou, Zhe Xu, Kang Zhou, Kai-yu Tong},
title={Weakly Supervised Medical Image Segmentation via Superpixel-guided Scribble Walking and Class-wise Contrastive Regularization},
booktitle={MICCAI},
year={2023}}
- If you have any questions, feel free to contact Meng at (1155156866@link.cuhk.edu.hk)