Giter VIP home page Giter VIP logo

swans's Introduction

SWANS

Spatial warping network for 3D segmentation of the hippocampus in MRI images

Any issues please contact: [email protected]

Prerequisites

FMRIB Software Library (FSL) version 5.0 or higher (http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/)

python 3.6

tensorflow 1.15 (https://www.tensorflow.org/install/pip#ubuntu-macos)

keras 2.3.1

numpy 1.19.2

nibabel 3.1.1

nipype 1.5.1

matplotlib 3.3.2

Usage

First, it is necessary to activate the tensorflow virtual environment and to add the folder "functions" to the pythonpath:

$ source /path_to_virt_env/bin/activate

$ export PYTHONPATH=/path_to_virt_env/lib/python3.6/site-packages:/path_to_swans_folder/functions:$PYTHONPATH

Second, the T1-weighted image has to be brain exctracted, for example with the tool BET of FSL (https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/BET)

Third, you have to excecute the following command:

$ python swans.py -i /path_to_the_image/t1_brain.nii.gz [-m trained]

Alternatively, you can use the baseline model:

$ python swans.py -i /path_to_the_image/t1_brain.nii.gz -m locked

Models are available under request and have to be inserted inside "models" folder

Output

Inside the folder /path_to_the_image/ you will find:

segmentations of the left and right hippocampi in MNI space, which are called respectively "t1_brain_LHipp_prediction.nii.gz" and "t1_brain_RHipp_prediction.nii.gz"

segmentations of the left and right hippocampi in subject space, which are called respectively "t1_brain_LHipp_prediction_to_sub.nii.gz" and "t1_brain_RHipp_prediction_to_sub.nii.gz"

T1 image in the standard MNI space from linear transformation "t1_brain_to_std_flirt.nii.gz"

T1 image in the standard MNI space from non-linear transformation "t1_brain_to_std_fnirt.nii.gz"

text file containing hippocampal volumes "t1_brain_volumes.txt"

png figure of 3 slices of the segmentation overlapped to T1 image

Example data

Example data to be used as input can be found in https://neurovault.org/collections/12227/

swans's People

Contributors

ericabalboni avatar nkdinsdale 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.