GithubHelp home page GithubHelp logo

mip-deepstroke's Introduction

MIP-DeepStroke

Deep learning network for predicting lesions in stroke.

This project aims to predict stroke lesions from T2-weighted, CT-Perfusion and Diffusion-weighted images. This research was supported by the Medical Image Processing Lab (MIPLAB) in Campus Biotech Geneva.

Requirements

  • Tensorflow(-GPU)
  • Keras

How to I use this code?

This code is relatively generic and might be used for any binary segmentation task.

Dataset creation

First, the different input and output images should be organised in the following manner. The images should stored by patient in .nii format.

~/training_data/patient_id/[input_modalities1.nii, input_modalities2.nii, output_mask.nii]

Now that the folder is well organised, you can run the following script to create a dataset of patches from the images.

  • For 2D patches: python ~/MIP-Deepstroke/Unet2D/create_dataset.py -d ~/training_data -p 512x512 for 512x512 patches.
  • For 3D patches: python ~/MIP-Deepstroke/UnetCT/create_dataset.py -d ~/training_data -p 32x32x32 for 32x32x32 (3D) patches.

By default, the data is saved under ~/Data/{ddmmyy-hhmm}/{patch_size}.

Training

To train a model on the data just created, use the following command:

  • For 2D : python ~/MIP-Deepstroke/Unet2D/train_2D.py -d {DATAPATH} -i {INPUT_MODALITY1} -i {INPUT_MODALITY2} -o {OUTPUT_MODALITY}
  • For 3D : python ~/MIP-Deepstroke/Unet2D/train.py -d {DATAPATH} -i {INPUT_MODALITY1} -i {INPUT_MODALITY2} -o {OUTPUT_MODALITY}

Example : python ~/MIP-Deepstroke/Unet2D/train.py -d ~/Data/010119-1000/32x32x32 -i T2 -i TRACE -o LESION

By default, models are saved under ~/Models/{date}/checkpoints.

Note

This README is still under construction.

External code

mip-deepstroke's People

Contributors

narduzzi avatar

Watchers

James Cloos 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.