Please install essential dependencies (see requirements.txt
)
dcm2nii
json5==0.8.5
jupyter==1.0.0
nibabel==2.5.1
numpy==1.15.1
opencv-python==4.1.1.26
Pillow==7.1.0
sacred==0.7.5
scikit-image==0.14.0
SimpleITK==1.2.3
torch==1.3.0
torchvision==0.4.1
Abdominal MRI
-
Download Combined Healthy Abdominal Organ Segmentation dataset and put the
/MR
folder under./data/CHAOST2/
directory -
Converting downloaded data (T2 fold) to
nii
files in 3D for the ease of reading
run ./data/CHAOST2/dcm_img_to_nii.sh
to convert dicom images to nifti files.
run ./data/CHAOST2/png_gth_to_nii.ipynp
to convert ground truth with png
format to nifti.
- Pre-processing downloaded images
run ./data/CHAOST2/image_normalize.ipynb
Abdominal CT
-
Download Synapse Multi-atlas Abdominal Segmentation dataset and put the
/img
and/label
folders under./data/SABS/
directory -
Intensity windowing
run ./data/SABS/intensity_normalization.ipynb
to apply abdominal window.
- Crop irrelavent emptry background and resample images
run ./data/SABS/resampling_and_roi.ipynb
Shared steps
- Build class-slice indexing for setting up experiments
run ./data/<CHAOST2/SABS>class_slice_index_gen.ipynb
run ./data_preprocessing/pseudolabel_gen.ipynb
. You might need to specify which dataset to use within the notebook.
run ./examples/train_ssl_abdominal_<mri/ct>.sh
and ./examples/test_ssl_abdominal_<mri/ct>.sh
This code is based on SSL-ALPNet(ECCV'20) by Ouyang et al.