Skip to main content

Command-line tool to perform MRI upsampling via SRGANS

Project description

Braingan3d Software Release

Usage

The usage of this software is relatively simple,

brainsgan input_file output_file

The input_file and output_file files can be either path to NIFTI images (with extension either .nii or .nii.gz) or to a file (normally in the .txt format) containing a list of images. For the upsampling for more than on file, the second form is preferred, as it avoids loading the model onto the GPU over and over again.

It is possible to choose the network used with the -n/--network flag. E.g.,

brainsgan LR_scan.nii.gz SR_scan.nii.gz --network dHCP

Recommended settings

This code does not take advantage of more than one GPU. Thus, used in a multi-GPU system, it is recommended to add the CUDA_VISIBLE_DEVICES before running the code

CUDA_VISIBLE_DEVICES=<GPU_to_be_used> brainsgan input_file output_file

It is also possible to use only the CPU by leaving GPU_to_be_used empty.

Runtime

Running on a single Nvidia P100, the upsampling takes roughly one second per scan and roughtly 4s on the CPU.

Developer Information

Build

The following information is only useful for individuals who are actively contributing to the program.

We use setuptool and wheel to build the distribution code. The process is described next. More information can be found here.

  1. Be sure that setuptools, twine, and wheel are up-to-dated
python3 -m pip install --user --upgrade setuptools wheel twine
  1. Run the build command
python3 setup.py sdist bdist_wheel
  1. Upload the package to pip
python3 -m twine upload dist/*

Project details


Download files

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

Source Distribution

brainhance-0.0.1.tar.gz (8.3 MB view hashes)

Uploaded Source

Built Distribution

brainhance-0.0.1-py3-none-any.whl (8.3 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page