Skip to content

Transfer Adult-like Phase Images for Robust Multi-view Isointense Infant Brain Segmentation

License

Notifications You must be signed in to change notification settings

hb-liu/multi-view-iseg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Transferring Adult-like Phase Images for Robust Multi-view Isointense Infant Brain Segmentation

Authors

Huabing Liu*, Jiawei Huang, Dengqiang Jia, Qian Wang, Jun Xu, and Dinggang Shen

Citation

To be released

Introduction

This repo includes the source codes and pretrained models for our latest work on isointense infant brain segmentation. The two major components are 1) disentangled cycle-consistent adversarial network (dcan) for style transfer between isointense and adult-like phase images; 2) the segmentation network coseg that implements multi-view learning to incorporate adult-like phase images in isointense infant brain segmentation. If you find this repo useful, please give it a star ⭐ and consider citing our paper in your research. Thank you.

1. Create Environment:

  • Python 3 (Recommend to use Anaconda)

  • NVIDIA GPU + Pytorch

  • Python packages:

pip install -r requirements.txt

2. Preparation

Prepare code

Build up the workspace, so that everything can be correctly stored:

sh install.sh

Prapare dataset

For your own dataset, format each data as:

|--<name_of_the_data>
    |-- t1.nii.gz
    |-- t2.nii.gz
    |-- seg.nii.gz

for T1-weighted images, T2-weighted images, and segmentation (if exists), respectively.

Then put formatted data into correct folders:

  • for isointense phase images, put them into <pwd>/dcan/data/raw/6m
  • for adult-like phase images, put them into <pwd>/dcan/data/raw/12m

Suppose <pwd> is the directory of this repo

Prapare pretrained models

For test-only purpose of this repo, we have shared all the pretrained models:

Method Model Zoo
dcan OneDrive
coseg OneDrive

Put downloaded *.pth into Results folders

3. Run DCAN

Preprocess

Run proc.ipynb

Modify the proc.ipynb:

  • for processing isointense phase images:
data_path = 'data/raw/6m'
out_path = 'data/processed/6m'
  • for processing adult-like phase images:
data_path = 'data/raw/12m'
out_path = 'data/processed/12m'

Train

Python3 train.py

Synthesize data for downstream segmentation task

Run syn.ipynb

Modify the syn.ipynb:

  • for transferring isointense phase images to adult-like contrast
config.dataset.src_dir = 'data/processed/6m'
config.dataset.dst_dir = 'data/processed/12m'
  • for transferring adult-like phase images to isointense contrast:
config.dataset.src_dir = 'data/processed/12m'
config.dataset.dst_dir = 'data/processed/6m'

4. Run COSEG

Preprocess

Run proc.ipynb

Modify the proc.ipynb

  • for processing source isointense phase images:
data_path = '../dcan/data/processed/6m'
out_path = 'data/processed/6m'
  • for processing synthetic isointense phase images:
data_path = '../dcan/data/syn/6m'
out_path = 'data/syn/6m'
  • for processing source adult-like phase images:
data_path = '../dcan/data/processed/12m'
out_path = 'data/processed/12m'
  • for processing synthetic adult-like phase images:
data_path = '../dcan/data/syn/12m'
out_path = 'data/syn/12m'

Train

sh train.sh

Test

python3 test.py

P.S.

If you find any bugs upon running this repo, please raise an issue in the github page or send me an email (hbliu98@gmail.com).

About

Transfer Adult-like Phase Images for Robust Multi-view Isointense Infant Brain Segmentation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published