Skip to content
forked from zzdxjtu/S-cuda

Code for S-cuda: Self-Cleansing Unsupervised Domain Adaptation for Medical Image Segmentation

Notifications You must be signed in to change notification settings

lly2111101/S-cuda

 
 

Repository files navigation

S-cuda: Self-Cleansing Unsupervised Domain Adaptation for Medical Image Segmentation

This repository provides code for the paper, S-CUDA: Self-Cleansing Unsupervised Domain Adaptation for Medical Image Segmentation. Please read our paper to understand our proposed method.

Pipeline

image

Getting started

Environments

  • python 3.5
  • tensorflow 1.4.0
  • keras 2.2.0
  • pytorch 0.4.0
  • CUDA 9.2

Packages

  • tqdm
  • skimage
  • opencv
  • scipy
  • matplotlib

Datasets

Download from Refuge, prepare dataset in data directory as follows.

S-cuda
│   Network-1
|   Network-2
│   scripts
└───dataset
│   │   source
│   │   │   images
│   │   │   labels
│   │
│   └───target
│   │   │   images
│   │   │   labels
│   │   │   pseudo_label 
│   │ 
│   └───test
│   │   │   images
│   │   │   labels
│   │
│   └───source.txt
│   │   target.txt
│   │   test.txt
│        
└───README.md

Initial weights and pre-trained model

Initial weights and pre-trained model download link:

unzip Initial_weights.zip 
unzip Pre-trained model.zip 

Running

0.Clone this repo:

git clone https://github.com/zzdxjtu/S-cuda.git
cd S-cuda

1.Train:
All training script is stored in scripts directory.

sh scripts/run1.sh
sh scripts/run2.sh
sh scripts/run3.sh
sh scripts/run4.sh

Before training, please check whether all the model weight and dataset path is correct.
2.Test:

cd S-cuda
python Network-1/evaluation.py

Supplementary notes

boudary.ipynb  ##Calculate the weight map of the optic cup, optic disc, and background  
calculate_dice.py  ##Calculate dice coefficient  
get_contour.ipynb  ##Obtain the edge contour of the target object  
hausdorff_dis.py  ##Calculate hausdorff distance  
noise_label.ipynb  ##Generate labels with different levels of noise and different proportions, including corrosion, expansion, deformation operations

Acknowledge

Some codes are revised according to liyunsheng13/BDL and EmmaW8/pOSAL. Thank them very much.

About

Code for S-cuda: Self-Cleansing Unsupervised Domain Adaptation for Medical Image Segmentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 89.2%
  • Python 10.5%
  • Shell 0.3%