All Projects → ad12 → DOSMA

ad12 / DOSMA

Licence: GPL-3.0 license
An AI-powered open-source medical image analysis toolbox

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to DOSMA

BrainPrep
Preprocessing pipeline on Brain MR Images through FSL and ANTs, including registration, skull-stripping, bias field correction, enhancement and segmentation.
Stars: ✭ 107 (+137.78%)
Mutual labels:  mri
torchkbnufft
A high-level, easy-to-deploy non-uniform Fast Fourier Transform in PyTorch.
Stars: ✭ 133 (+195.56%)
Mutual labels:  mri
brainGraph
Graph theory analysis of brain MRI data
Stars: ✭ 136 (+202.22%)
Mutual labels:  mri
VT-UNet
[MICCAI2022] This is an official PyTorch implementation for A Robust Volumetric Transformer for Accurate 3D Tumor Segmentation
Stars: ✭ 151 (+235.56%)
Mutual labels:  mri
pykale
Knowledge-Aware machine LEarning (KALE): accessible machine learning from multiple sources for interdisciplinary research, part of the 🔥PyTorch ecosystem
Stars: ✭ 381 (+746.67%)
Mutual labels:  medical-image-analysis
subpixel-embedding-segmentation
PyTorch Implementation of Small Lesion Segmentation in Brain MRIs with Subpixel Embedding (ORAL, MICCAIW 2021)
Stars: ✭ 22 (-51.11%)
Mutual labels:  mri
sycomore
MRI simulation toolkit
Stars: ✭ 13 (-71.11%)
Mutual labels:  mri
ACSConv
[IEEE JBHI] Reinventing 2D Convolutions for 3D Images - 1 line of code to convert pretrained 2D models to 3D!
Stars: ✭ 108 (+140%)
Mutual labels:  medical-image-analysis
GaNDLF
A generalizable application framework for segmentation, regression, and classification using PyTorch
Stars: ✭ 77 (+71.11%)
Mutual labels:  medical-image-analysis
nn-segmentation-for-lar
Neural networks to segment some type of biomedical images
Stars: ✭ 21 (-53.33%)
Mutual labels:  mri
Radiomics-research-by-using-Python
Radiomics (here mainly means hand-crafted based radiomics) contains data acquire, ROI segmentation, feature extraction, feature selection, machine learning modeling, and stastical analysis.
Stars: ✭ 27 (-40%)
Mutual labels:  medical-image-analysis
CS MoCo LAB
Compressed Sensing and Motion Correction LAB: An MR acquisition and reconstruction system
Stars: ✭ 91 (+102.22%)
Mutual labels:  mri
MIRT.jl
MIRT: Michigan Image Reconstruction Toolbox (Julia version)
Stars: ✭ 80 (+77.78%)
Mutual labels:  mri
vbcg
real-time application for video-based methods in the context of MRI
Stars: ✭ 20 (-55.56%)
Mutual labels:  mri
ENIGMA
The ENIGMA Toolbox is an open-source repository for accessing 100+ ENIGMA statistical maps, visualizing cortical and subcortical surface data, and relating neuroimaging findings to micro- and macroscale brain organization. 🤠
Stars: ✭ 66 (+46.67%)
Mutual labels:  mri
spinalcordtoolbox
Comprehensive and open-source library of analysis tools for MRI of the spinal cord.
Stars: ✭ 135 (+200%)
Mutual labels:  mri
sunrise
NumPy, SciPy, MRI and Music | Presented at ISMRM 2021 Sunrise Educational Session
Stars: ✭ 20 (-55.56%)
Mutual labels:  mri
MRQy
MRQy is a quality assurance and checking tool for quantitative assessment of magnetic resonance imaging (MRI) data.
Stars: ✭ 58 (+28.89%)
Mutual labels:  mri
fastmri-reproducible-benchmark
Try several methods for MRI reconstruction on the fastmri dataset. Home to the XPDNet, runner-up of the 2020 fastMRI challenge.
Stars: ✭ 117 (+160%)
Mutual labels:  mri
CCD
Code for 'Constrained Contrastive Distribution Learning for Unsupervised Anomaly Detection and Localisation in Medical Images' [MICCAI 2021]
Stars: ✭ 30 (-33.33%)
Mutual labels:  medical-image-analysis

DOSMA: Deep Open-Source Medical Image Analysis

License: GPL v3 GitHub Workflow Status codecov Documentation Status

Documentation | Questionnaire | DOSMA Basics Tutorial

DOSMA is an AI-powered Python library for medical image analysis. This includes, but is not limited to:

  • image processing (denoising, super-resolution, registration, segmentation, etc.)
  • quantitative fitting and image analysis
  • anatomical visualization and analysis (patellar tilt, femoral cartilage thickness, etc.)

We hope that this open-source pipeline will be useful for quick anatomy/pathology analysis and will serve as a hub for adding support for analyzing different anatomies and scan sequences.

Installation

DOSMA requires Python 3.6+. The core module depends on numpy, nibabel, nipype, pandas, pydicom, scikit-image, scipy, PyYAML, and tqdm.

Additional AI features can be unlocked by installing tensorflow and keras. To enable built-in registration functionality, download elastix. Details can be found in the setup documentation.

To install DOSMA, run:

pip install dosma

# To install with AI support
pip install dosma[ai]

If you would like to contribute to DOSMA, we recommend you clone the repository and install DOSMA with pip in editable mode.

git clone [email protected]:ad12/DOSMA.git
cd DOSMA
pip install -e '.[dev,docs]'
make dev

To run tests, build documentation and contribute, run

make autoformat test build-docs

Features

Simplified, Efficient I/O

DOSMA provides efficient readers for DICOM and NIfTI formats built on nibabel and pydicom. Multi-slice DICOM data can be loaded in parallel with multiple workers and structured into the appropriate 3D volume(s). For example, multi-echo and dynamic contrast-enhanced (DCE) MRI scans have multiple volumes acquired at different echo times and trigger times, respectively. These can be loaded into multiple volumes with ease:

import dosma as dm

multi_echo_scan = dm.load("/path/to/multi-echo/scan", group_by="EchoNumbers", num_workers=8, verbose=True)
dce_scan = dm.load("/path/to/dce/scan", group_by="TriggerTime")

Data-Embedded Medical Images

DOSMA's MedicalVolume data structure supports array-like operations (arithmetic, slicing, etc.) on medical images while preserving spatial attributes and accompanying metadata. This structure supports NumPy interoperability, intelligent reformatting, fast low-level computations, and native GPU support. For example, given MedicalVolumes mvA and mvB we can do the following:

# Reformat image into Superior->Inferior, Anterior->Posterior, Left->Right directions.
mvA = mvA.reformat(("SI", "AP", "LR"))

# Get and set metadata
study_description = mvA.get_metadata("StudyDescription")
mvA.set_metadata("StudyDescription", "A sample study")

# Perform NumPy operations like you would on image data.
rss = np.sqrt(mvA**2 + mvB**2)

# Move to GPU 0 for CuPy operations
mv_gpu = mvA.to(dosma.Device(0))

# Take slices. Metadata will be sliced appropriately.
mv_subvolume = mvA[10:20, 10:20, 4:6]

Built-in AI Models

DOSMA is built to be a hub for machine/deep learning models. A complete list of models and corresponding publications can be found here. We can use one of the knee segmentation models to segment a MedicalVolume mv and model weights downloaded locally:

from dosma.models import IWOAIOAIUnet2DNormalized

# Reformat such that sagittal plane is last dimension.
mv = mv.reformat(("SI", "AP", "LR"))

# Do segmentation
model = IWOAIOAIUnet2DNormalized(input_shape=mv.shape[:2] + (1,), weights_path=weights)
masks = model.generate_mask(mv)

Parallelizable Operations

DOSMA supports parallelization for compute-heavy operations, like curve fitting and image registration. Image registration is supported thru the elastix/transformix libraries. For example we can use multiple workers to register volumes to a target, and use the registered outputs for per-voxel monoexponential fitting:

# Register images mvA, mvB, mvC to target image mv_tgt in parallel
_, (mvA_reg, mvB_reg, mvC_reg) = dosma.register(
   mv_tgt,
   moving=[mvA, mvB, mvC],
   parameters="/path/to/elastix/registration/file",
   num_workers=3,
   return_volumes=True,
   show_pbar=True,
)

# Perform monoexponential fitting.
def monoexponential(x, a, b):
   return a * np.exp(b*x)

fitter = dosma.CurveFitter(
   monoexponential,
   num_workers=4,
   p0={"a": 1.0, "b": -1/30},
)
popt, r2 = fitter.fit(x=[1, 2, 3, 4], [mv_tgt, mvA_reg, mvB_reg, mvC_reg])
a_fit, b_fit = popt[..., 0], popt[..., 1]

Citation

@inproceedings{desai2019dosma,
  title={DOSMA: A deep-learning, open-source framework for musculoskeletal MRI analysis},
  author={Desai, Arjun D and Barbieri, Marco and Mazzoli, Valentina and Rubin, Elka and Black, Marianne S and Watkins, Lauren E and Gold, Garry E and Hargreaves, Brian A and Chaudhari, Akshay S},
  booktitle={Proc 27th Annual Meeting ISMRM, Montreal},
  pages={1135},
  year={2019}
}

In addition to DOSMA, please also consider citing the work that introduced the method used for analysis.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].