Skip to content

HiLab-git/PartialScribble

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PS-Seg

Official code for: PS-Seg: Learning from Partial Scribbles for 3D Multiple Abdominal Organ Segmentation

Overall Framework

The overall framework of PS-Seg: Overall

Dataset

  • The WORD dataset can be downloaded from WORD.
  • The Synapse dataset can be downloaded from Synapase

Usage with PyMIC

To facilitate the use of code and make it easier to compare with other methods, we have implemented PS-Seg in PyMIC, a Pytorch-based framework for annotation-efficient segmentation. The core modules of PS-Seg in PyMIC can be found here. It is suggested to use PyMIC for this experiment. In the following, we take the WORD dataset as an example for scribble-supervised segmentation.

Step 0: Preparation

0.1. Environment Setup.

conda create -n PSSeg python=3.10
conda activate PSSeg
pip install -r requirements.txt
pip install pymic

0.2. Dataset processing.

Preprocess WORD dataset by:

python data/preprocess_WORD.py

Generate scribble label by:

python data/scribble_generator.py

To speed up the training process, we convert the data into h5 files by:

python data/image2h5.py

Step 1: Training

The configurations including dataset, network, optimizer and hyper-parameters are contained in the configure file config/psseg_word.cfg. Train the PS-Seg model by running:

python run.py train config/psseg_word.cfg

Step 2: Test

Obtain predictions for testing images:

python run.py test config/psseg_word.cfg

Step 3: Compare with other weakly supervised segmentation methods

PyMIC also provides implementation of several other weakly supervised methods (learning from scribbles). Please see PyMIC_examples/seg_weak_sup/ACDC for examples.

Acknowledgement

The code of scribble-supervised learning framework is borrowed from WSL4MIS

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages