Skip to main content

meddlr

GitHub Workflow Status GitHub Documentation Status pre-commit codecov

Getting Started

Meddlr is a config-driven ML framework built to simplify medical image reconstruction and analysis problems.

⚡ QuickStart

# Install Meddlr with basic dependencies
pip install meddlr

# Install Meddlr with all dependencies (e.g. pretrained models, benchmarking)
pip install 'meddlr[all]'

Installing locally: For local development, fork and clone the repo and run pip install -e ".[alldev]"

Installing from main: For most up-to-date code without a local install, run pip install "meddlr @ git+https://github.com/ad12/meddlr@main"

Configure your paths and get going!

import meddlr as mr
import os

# (Optional) Configure and save machine/cluster preferences.
# This only has to be done once and will persist across sessions.
cluster = mr.Cluster()
cluster.set(results_dir="/path/to/save/results", data_dir="/path/to/datasets")
cluster.save()
# OR set these as environment variables.
os.environ["MEDDLR_RESULTS_DIR"] = "/path/to/save/results"
os.environ["MEDDLR_DATASETS_DIR"] = "/path/to/datasets"

Detailed instructions are available in Getting Started.

Visualizations

Use MeddlrViz to visualize your medical imaging datasets, ML models, and more!

pip install meddlr-viz
A gallery of images from the BRATS dataset

🐘 Model Zoo

Easily serve and download pretrained models from the model zoo. A (evolving) list of pre-trained models can be found here, on HuggingFace 🤗, and in project folders.

To use them, pass the URLs for the config and weights (model) files to mr.get_model_from_zoo:

import meddlr as mr

model = mr.get_model_from_zoo(
  cfg_or_file="https://huggingface.co/arjundd/vortex-release/resolve/main/mridata_knee_3dfse/Supervised/config.yaml",
  weights_path="https://huggingface.co/arjundd/vortex-release/resolve/main/mridata_knee_3dfse/Supervised/model.ckpt",
)

📓 Projects

Check out some projects built with meddlr!

✏️ Contributing

Want to add new features, fix a bug, or add your project? We'd love to include them! See CONTRIBUTING.md for more information.

Acknowledgements

Meddlr's design for rapid experimentation and benchmarking is inspired by detectron2.

About

If you use Meddlr for your work, please consider citing the following work:

@article{desai2021noise2recon,
  title={Noise2Recon: A Semi-Supervised Framework for Joint MRI Reconstruction and Denoising},
  author={Desai, Arjun D and Ozturkler, Batu M and Sandino, Christopher M and Vasanawala, Shreyas and Hargreaves, Brian A and Re, Christopher M and Pauly, John M and Chaudhari, Akshay S},
  journal={arXiv preprint arXiv:2110.00075},
  year={2021}
}

Release files for meddlr 0.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for meddlr 0.0.9
File Size Uploaded
meddlr-0.0.9.tar.gz 219.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for meddlr 0.0.9
File Interpreter ABI Platform
meddlr-0.0.9-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 496.3 kB

Release files / meddlr-0.0.9.tar.gz

Download URL meddlr-0.0.9.tar.gz
Size 219.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cd5e8654dcf9ed632f221f8b2a25d5057f7313d8264e9435d7969fe958ce62d2
BLAKE2b-256 checksum
How to use checksums
8d642fe05a5f0b46877893c43cb339558abd169e63519b8c564d93a8f91d7c48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / meddlr-0.0.9-py2.py3-none-any.whl

Download URL meddlr-0.0.9-py2.py3-none-any.whl
Size 276.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
dd5a5e5517de78b7c70846a163f1b760f877134a0ff1a7b7c6a3c0c52978ab2d
BLAKE2b-256 checksum
How to use checksums
1b63ccd6e75f10a682073f02d0aa755c54ade273473730912ce44aabf95ba0c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page