Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

MR acquisition-invariant network.

Project description

[![BuildStatus](]( [![Docs](]( ![Python version]( [![DOI](](

# MR Acquisition-Invariant Neural Network

This repository contains experiments and code accompanying the paper:

"MR Acquisition-Invariant Representation Learning"

which is currently under review. The preprint is on [ArXiv](

## Installation

mrainet can be installed through:
pip install mrainet

PyPI takes care of all dependencies. However, to ensure that these don't mess up your current python environment, you should set up a virtual one. If you're familiar with [conda](, you can do this through:
conda env create -f environment.yml
source activate mrainet

## Usage

Please visit the [examples]( section in the documentation to get started.

To give you an impression of how the module is used, here's an example call:
from mrainet.mraicnn import MRAIConvolutionalNeuralNetwork

M = MRAIConvolutionalNeuralNetwork()

H = M.feedforward(X)
where X are MRI-scans from the source scanner, Y are their corresponding segmentations, Z are MRI-scans from the target scanner, and U is its corresponding incomplete segmentations (nearly all are NaN). H represents the patches fed through the network and embedded in MRAI-net's penultimate layer (MRAI representation).

For more information on individual classes, methods and functions, visit the [docs](

## Data

In order to isolate MRI-scanner acquisition-based variation in medical images, we simulated datasets of varying scan protocol parameters using [SIMRI]( High-quality human brain phantoms were used, which can be found here:
- [Brainweb](

The original code for SIMRI can be downloaded from [here]( Our repo contains a modified version of SIMRI that includes the additional NMR relaxation times, as described in the paper's appendix. For more information on how to run your own simulations, see the example shell script named `` in the folder `data/brainweb/simulator`.

Real data consisted of the MRBrainS data set, known from the brain tissue segmentation challenge at MICCAI 2013.
- [MRBrainS](

We used only the 5 training scans provided, as the labels for the remaining 15 scans have not been released.

## Experiments

Experimental scripts from the paper are included in this repository:
- `exp-mrai-cnn_b1b3`: simulated data from MRI-scanners with different acquisition protocols.
- `exp_mrai-cnn_b1mb`: simulated data as souce and real data as target, for different field strengths.
- `exp_mrai-cnn_b3mb`: simulated data as souce and real data as target, for equivalent field strengths.

For more information on experiment parameters and setup, see the [README]( in the experiments folder.

## Contact
Bugs, comments and questions can be submitted to the [issues tracker](

Project details

Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mrainet, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size mrainet-0.1.0-py2.py3-none-any.whl (25.4 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size mrainet-0.1.0.tar.gz (20.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page