Skip to content

The official implementation of 'A Hierarchical Consistency Framework for Domain Generalization on Medical Image Segmentation'

Notifications You must be signed in to change notification settings

scott-yjyang/HCDG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HCDG: A Hierarchical Consistency Framework for Domain Generalization on Medical Image Segmentation

Requirements

  • python 3.6.8
conda create -n HCDG python=3.6.8 
  • PyTorch 1.5.0

    conda activate HCDG 
    conda install pytorch==1.5.0 torchvision cudatoolkit=9.2 -c pytorch 
    pip install tensorboardX==2.0
    pip install opencv-python
    pip install pyyaml
    pip install MedPy
    pip install tqdm
    pip install matplotlib
    conda install -c anaconda scikit-image

Usage

  1. Download the Fundus dataset into your own folder and change --data-dir correspondingly.

  2. Train the model.

    python train.py -g 0 --datasetTrain 1 2 3 --datasetTest 4 --batch-size 4 --resume ./pretrained-weight/test4-40.pth.tar # You need to pretrain a vanilla model
  3. Test the model.

    python test.py --model-file ./logs/test4/20210910_215812.079473/checkpoint_50.pth.tar --datasetTest 4 -g 0
    

Reference

If you find this code helpful, please cite our paper:

  @article{yang2021hcdg,
     title={Hcdg: A Hierarchical Consistency Framework for Domain Generalization on Medical Image Segmentation},
     author={Yang, Yijun and Wang, Shujun and Zhu, Lei and Yu, Lequan},
     publisher={AIIM-D-22-01172}
  }

About

The official implementation of 'A Hierarchical Consistency Framework for Domain Generalization on Medical Image Segmentation'

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages