Skip to content

TylerSpears/carn-le

Repository files navigation

Official Implementation of Super-Resolution of Manifold-Valued Diffusion MRI Refined by Multi-Modal Imaging, CDMRI 2022

Setup

To install as a python package, install directly from this repository (no pypi wheels!):

pip install git+ssh://[email protected]/TylerSpears/carn-le.git

Environment

Required Packages

This project requires the python packages:

  • pytorch
  • conda
  • tensorboard
  • jupyter
  • numpy
  • ...and many others

It is strongly recommended that you create a new conda environment with the environment.yml file.

Please see the environment/ directory for other environment description files.

Environment Variables

Several configuration options in the form of environment variables are used in this code. In particular, env vars that define directories are needed to properly locate data and write results. For example, the DATA_DIR, WRITE_DATA_DIR, and RESULTS_DIR all designate directories for reading and writing.

It is recommended that these variables be stored in a .env file. For convenience, you may want to set up direnv for automatic variable loading. Your .env file should be specific to your system and may contain sensitive data or keys, so it is explicitly not version-controlled.

See the .env.template file for all env vars and example values, and for a starting point for your own .env file.

Developers

Installing Packages

Installing new python packages to the conda environment requires the following anaconda channels:

  • pytorch
  • conda-forge

When installing a new python package, always use mamba for installation; this will save you so much time and effort. For example:

# conda install numpy
# replaced by
mamba install numpy

If a package is not available on the anaconda channels, or a package must be built from a git repository, then use pip:

pip install ipyvolume

pre-commit Hooks

This repository relies on pre-commit to run basic cleanup and linting utilities before a commit can be made. Hooks are defined in the .pre-commit-config.yaml file. To set up pre-commit hooks:

# If pre-commit is not already in your conda environment
mamba install -c conda-forge pre-commit
pre-commit install
# (Optional) run against all files
pre-commit run --all-files

git Filters

The nbstripout application is set up as a git repository filter that strips jupyter/ipython notebooks (*.ipynb files) of output and metadata. Install nbstripout with:

# If not installed in your conda env already
mamba install -c conda-forge nbstripout
nbstripout --install --attributes .gitattributes

You may also install nbstripout as a pre-commit hook (see https://github.com/kynan/nbstripout#using-nbstripout-as-a-pre-commit-hook), but this causes your local working version to be stripped of output.

You may selectively keep cell outputs in jupyter itself by tagging a cell with the keep_output tag. See https://github.com/kynan/nbstripout#keeping-some-output for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published