Code Monkey home page Code Monkey logo

mr-brainstem-glioma-synthesis's Introduction

Pix2pixHD based Multi-task Generative Model

To reduce the exposure of Gadolinium-based Contrast Agents (GBCAs) in brainstem glioma detection and provide high-resolution contrast information, we propose a novel multi-task generative network for contrast-enhanced T1-weight MR synthesis on brainstem glioma images. The proposed network can simultaneously synthesize the high-resolution contrast-enhanced image and the segmentation mask of brainstem glioma lesions.

Image-to-image translation at 512x512 resolution

  • {T1, T2, ASL}-to-{T1ce, tumor mask}

Prerequisites

  • Linux or Windows
  • Python 3
  • NVIDIA GPU (11G memory or larger) + CUDA cuDNN

Getting Started

Installation

pip install dominate
  • Clone this repo:
git clone https://github.com/yXiangXiong/Multi-task_Generative_Synthesis_Network
cd pix2pixHD_Multi-task_Learning

Testing

  • Test the model (bash ./scripts/test_1024p.sh):
#!./scripts/test.sh
python test.py --dataroot F:\xiongxiangyu\pix2pixHD_Mask_Data --name NC2C --label_nc 0 --input_nc 9 --output_nc 6 --resize_or_crop none --gpu_ids 0 --which_epoch 200 --no_instance --how_many 144

The test results will be saved to a html file here: ./results/NC2C/test_latest/index.html.

More example scripts can be found in the scripts directory.

Training

  • Train a model at 512 x 512 resolution (bash ./scripts/train_512p.sh):
#!./scripts/train.sh
python train.py --dataroot F:\xiongxiangyu\pix2pixHD_Mask_Data --name NC2C --label_nc 0 --input_nc 9 --output_nc 6 --netG global --resize_or_crop none --gpu_ids 0 --batchSize 1 --no_instance
  • To view training results, please checkout intermediate results in ./checkpoints/NC2C/web/index.html. If you have tensorflow installed, you can see tensorboard logs in ./checkpoints/NC2C/logs by adding --tf_log to the training scripts.

Citation

If you find this useful for your research, please use the following.

Acknowledgments

This code borrows heavily from pix2pixHD.

mr-brainstem-glioma-synthesis's People

Contributors

yxiangxiong avatar

Stargazers

 avatar

Watchers

Kostas Georgiou 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.