Skip to main content

DiffTomo

A PyTorch library for differentiable tomographic and medical image reconstruction, bringing together classical and deep learning methods in one place.

DiffTomo is designed to cover multiple imaging modalities, including CT, MRI and PET, with differentiable forward and backward operators that can sit directly inside neural network pipelines. At the moment the library contains CT functions only. MRI and PET reconstruction are planned.

Features

Currently available (CT)

  • Differentiable projectors implemented as CUDA kernels with autograd support
    • Parallel-beam: forward projection, backprojection and filtered backprojection (FBP)
    • Fan-beam: forward projection, backprojection and filtered backprojection (FBP)
  • FBP filters: ram-lak, shepp-logan, cosine, hamming, hann
  • Iterative reconstruction: ART, SART, SIRT, CGLS, TV regularization, TGV regularization, DRP
  • Data: Shepp-Logan phantom and sample datasets (carved cheese, walnut)
  • Pretrained models: loading support for a small set of models

Planned

  • MRI reconstruction
  • PET reconstruction
  • More classical and deep learning methods across modalities

Requirements

  • Python 3.10+
  • PyTorch with CUDA support
  • An NVIDIA GPU and a CUDA toolkit (nvcc) matching your PyTorch build
  • ninja (the CUDA extension is compiled just in time)

Documentation

For guidelines and how to use the library, see the docs.

Installation

git clone https://github.com/yourusername/difftomo.git
cd difftomo
pip install -e .

Repository layout

difftomo/         # library source
  CT/             # projectors and iterative methods
  data/           # phantoms and datasets
docs/             # documentation and examples
test/             # tests

Next features coming up

  • Helsinki CT dataset and more pretrained models
  • A learned, transformer attention-based iterative filter that replaces the fixed FBP filter, to study how the filter affects reconstruction quality
  • MRI reconstruction functions
  • PET reconstruction functions

Metadata

Release files for difftomo 0.1.0

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

Source distribution (sdist)

Source distribution for difftomo 0.1.0
File Size Uploaded Provenance Actions
difftomo-0.1.0.tar.gz 41.1 kB Without provenance Details for difftomo-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for difftomo 0.1.0
File Interpreter ABI Platform Actions
difftomo-0.1.0-py3-none-any.whl Python 3 none any Details for difftomo-0.1.0-py3-none-any.whl

Total release size: 89.0 kB

Release files / difftomo-0.1.0.tar.gz

Download URL difftomo-0.1.0.tar.gz
Size 41.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c0808c59097d1adf7143f2aa25b207f5570b570f8525cdf8375c5b34d6dcfd30
BLAKE2b-256 checksum
How to use checksums
cb9ea4407abfb57af573749dcb729ddf270bd9249685531e70674c590fbecf27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.19

Release files / difftomo-0.1.0-py3-none-any.whl

Download URL difftomo-0.1.0-py3-none-any.whl
Size 47.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2591e4b62f81cdf41fba322f3150f1606ef200eeb096a0d0247cc758f400ff0c
BLAKE2b-256 checksum
How to use checksums
8f00de572f68956eb3a6696baa43262f114a1ea839c05f9892f82b00aeb75f4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.19

Security for difftomo 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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