MIRTorch
A differentiable PyTorch toolbox for medical imaging reconstruction, developed at the University of Michigan. MIRTorch provides composable linear maps, proximal operators, iterative solvers, and MRI and SPECT system models.
Documentation · Examples · API
New
FINUFFT/cuFINUFFT now accelerate non-Cartesian and B0-informed MRI; warm NVIDIA A10 benchmarks measured up to 5.2× faster NUFFT, 9.4× faster Toeplitz, and 12.3× faster iterative solvers (workload-dependent). Both NUFFT backends also support efficient first-order trajectory gradients, enabling SNOPY-style sampling-pattern optimization directly in MIRTorch (Wang and Fessler, 2023).
Install
Install PyTorch for your platform, then:
pip install MIRTorch
CUDA users can install cuFINUFFT with:
pip install "MIRTorch[cufinufft]"
For local development:
pip install -e ".[dev]"
Backends and compilation
NuSense, NuSenseGram, Gmri, and GmriGram use an installed FINUFFT or
cuFINUFFT library when the device supports it, then fall back to torchkbnufft.
Base macOS, Apple Metal, and Linux ARM installs therefore work without a
native library. Set backend="torchkbnufft" or backend="finufft" to
override the automatic choice.
Real-valued CUDA runs of Diff2dgram, FISTA, and POGM use torch.compile
automatically when PyTorch provides it. Other inputs stay eager; pass
compile=False to disable compilation explicitly.
Examples
The notebooks choose CUDA, Apple Metal, or CPU at runtime:
demo_mri.ipynb: CG-SENSE and B0-informed PWLSdemo_3d.ipynb: 3D non-Cartesian MRI and Toeplitz embeddingdemo_trajectory_optimization.ipynb: SNOPY-style radial trajectory optimizationdemo_cs.ipynb: compressed-sensing MRIdemo_mlem.ipynb: SPECT reconstructiondemo_mnist.ipynb: CG, FISTA, and POGMdemo_dl.ipynb: dictionary learning
Citation and acknowledgments
MIRTorch is inspired by MIRT, MIRT.jl, SigPy, and PyLops.
If MIRTorch is useful in your work, please cite:
@inproceedings{wang:22:mirtorch,
title={{MIRTorch}: A {PyTorch}-powered Differentiable Toolbox for Fast Image
Reconstruction and Scan Protocol Optimization},
author={Wang, Guanhua and Shah, Neel and Zhu, Keyue and Noll, Douglas C. and
Fessler, Jeffrey A.},
booktitle={Proceedings of the International Society for Magnetic Resonance
in Medicine (ISMRM)},
pages={4982},
year={2022}
}
See the documentation for the BJORK and SPECT citations.
MIRTorch is distributed under the BSD 3-Clause License.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mirtorch-0.3.0.tar.gz.
File metadata
- Download URL: mirtorch-0.3.0.tar.gz
- Upload date:
- Size: 88.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
301c3c72dda6b28e67ce243ae851ccfc383e03ab8cf0c0b59110776226a7162b
|
|
| MD5 |
e3608121c5ae826c69f62777ae9472db
|
|
| BLAKE2b-256 |
e031996180a50ba57505aee778e14bd94a3cfebd6acfb264efb781cc3a08d264
|
Provenance
The following attestation bundles were made for mirtorch-0.3.0.tar.gz:
Publisher:
python-release.yml on guanhuaw/MIRTorch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mirtorch-0.3.0.tar.gz -
Subject digest:
301c3c72dda6b28e67ce243ae851ccfc383e03ab8cf0c0b59110776226a7162b - Sigstore transparency entry: 2330140528
- Sigstore integration time:
-
Permalink:
guanhuaw/MIRTorch@95efb8950b6d9d23cfc140023af72a441c59c8e3 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/guanhuaw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yml@95efb8950b6d9d23cfc140023af72a441c59c8e3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mirtorch-0.3.0-py3-none-any.whl.
File metadata
- Download URL: mirtorch-0.3.0-py3-none-any.whl
- Upload date:
- Size: 106.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2dd85fa6578d6b2179555c0e371881d8bc0d02c3a131ac6313fc2f5b3569928
|
|
| MD5 |
e69c3ddf9af1755e1856a61af21d88ad
|
|
| BLAKE2b-256 |
3c03e28ebfd129730f84907453ba4378e38dea3d8a55913c3007ff0f05e31bda
|
Provenance
The following attestation bundles were made for mirtorch-0.3.0-py3-none-any.whl:
Publisher:
python-release.yml on guanhuaw/MIRTorch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mirtorch-0.3.0-py3-none-any.whl -
Subject digest:
c2dd85fa6578d6b2179555c0e371881d8bc0d02c3a131ac6313fc2f5b3569928 - Sigstore transparency entry: 2330140687
- Sigstore integration time:
-
Permalink:
guanhuaw/MIRTorch@95efb8950b6d9d23cfc140023af72a441c59c8e3 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/guanhuaw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yml@95efb8950b6d9d23cfc140023af72a441c59c8e3 -
Trigger Event:
push
-
Statement type: