Home

Awesome

ACERTA ABIDE DOI

Deep learning using the ABIDE data

Environment Setup

Please be aware that this code is meant to be run with Python 3 under Linux (MacOS may work, Windows probably not). Download the packages from requirements.txt:

pip install -r requirements.txt

Running with separate virtual environments

You can also keep a separate set of python libraries to work with the code (if you are not root, or if you have multiple python set ups in the same machine) by running the following commands.

virtualenv env
source env/bin/activate
pip install -r requirements.txt

Just remember to always activate your separate environment before running the code by running

source env/bin/activate

Tensorflow Quirks

If you have multiple CUDA driver installations in your computer, you may also need to specify environment variables indicating where your preferred driver is installed as follows:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/<path/to>/cuda-8.0/targets/x86_64-linux/lib/

Tensorflow will also try to use all available GPUs (and memory) in your system, to prevent that, you need to mask the other GPUs using the CUDA_VISIBLE_DEVICES environment variable. Its parameter is a list of GPU IDs, where GPU ID is the number you see beside the GPU when you list them (e.g. using nvidia-smi), so command:

export CUDA_VISIBLE_DEVICES=1

will only let Tensorflow see the second GPU available in your bus.

Data preparation

The first step is to download the dataset:

python download_abide.py

This command will download the preprocessed datasets from Amazon S3.

And compile the dataset into CV folds and by experiment.

python prepare_data.py \
    --whole \
    --male \
    --threshold \
    --folds 10 \
    cc200

Model training

python nn.py \
    --whole \
    --male \
    --threshold \
    --folds 10 \
    cc200

Model evaluation

python nn_evaluate.py \
    --whole \
    --male \
    --threshold \
    --folds 10 \
    --mean \
    cc200