Coder Social home page Coder Social logo

hb-liu / multi-view-iseg Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 129 KB

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

License: Apache License 2.0

Python 77.13% Jupyter Notebook 20.45% Shell 2.42%
dcan iseg multi-view-learning

multi-view-iseg's Introduction

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 ([email protected]).

multi-view-iseg's People

Contributors

hb-liu avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.